/* CV-sivun tyylit. */
:root {
  --bg: #F7F5F0;
  --surface: #FFFFFF;
  --ink: #1A1A18;
  --ink-light: #5A5A54;
  --accent: #1B4332;
  --accent-mid: #2D6A4F;
  --accent-light: #D8F3DC;
  --rule: #E0DDD6;
  --tag-bg: #ECEAE4;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

.page {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 40px;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.top-nav a,
.top-nav button {
  display: inline-block;
  text-decoration: none;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-mid);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 7px 10px;
}

.top-nav button {
  background: transparent;
  cursor: pointer;
}

.top-nav a:hover,
.top-nav button:hover {
  border-color: var(--accent-mid);
  color: var(--accent);
}

.top-nav a:focus-visible,
.top-nav button:focus-visible {
  outline: 3px solid var(--accent-mid);
  outline-offset: 2px;
}

/* HEADER */
.header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  padding-bottom: 28px;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 36px;
}

.name {
  font-family: 'DM Serif Display', serif;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -1px;
  color: var(--ink);
}

.title-tag {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-mid);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 6px;
}

.contacts {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contacts a, .contacts span {
  font-family: 'DM Mono', monospace;
  font-size: 11.5px;
  color: var(--ink-light);
  text-decoration: none;
}

.contacts a:hover { color: var(--accent-mid); }

/* SUMMARY */
.summary {
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  padding: 20px 24px;
  margin-bottom: 36px;
  font-size: 13.5px;
  line-height: 1.7;
  font-weight: 300;
}

.summary strong {
  font-weight: 600;
  color: #A7F3C0;
}

/* LAYOUT */
.two-col {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
}

/* SECTION */
.section { margin-bottom: 32px; }

.section-title {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-mid);
  margin-bottom: 16px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}

/* ENTRY */
.entry {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}

.entry:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 2px;
}

.entry-role {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}

.entry-date {
  font-family: 'DM Mono', monospace;
  font-size: 10.5px;
  color: var(--ink-light);
  white-space: nowrap;
  flex-shrink: 0;
}

.entry-org {
  font-size: 12.5px;
  color: var(--accent-mid);
  font-weight: 500;
  margin-bottom: 8px;
}

.entry-bullets {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.entry-bullets li {
  font-size: 13px;
  color: var(--ink-light);
  padding-left: 14px;
  position: relative;
  line-height: 1.55;
}

.entry-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent-mid);
  font-size: 11px;
}

/* ACHIEVEMENT HIGHLIGHT */
.achievement {
  background: var(--accent-light);
  border-left: 3px solid var(--accent-mid);
  border-radius: 0 4px 4px 0;
  padding: 6px 10px;
  font-size: 12.5px;
  color: var(--accent);
  font-weight: 500;
  margin-top: 8px;
  margin-bottom: 4px;
}

/* SKILLS SIDEBAR */
.skill-group {
  margin-bottom: 20px;
}

.skill-group-title {
  font-family: 'DM Mono', monospace;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 8px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag {
  background: var(--tag-bg);
  border-radius: 3px;
  padding: 3px 8px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--ink);
}

.tag.highlight {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 500;
}

/* THM BADGE */
.thm-badge {
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 20px;
}

.thm-badge .thm-title {
  font-family: 'DM Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #A7F3C0;
  margin-bottom: 6px;
}

.thm-stat {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 3px;
  color: rgba(255,255,255,0.8);
}

.thm-stat strong {
  color: #fff;
  font-weight: 600;
}

/* CERT LIST */
.cert-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cert-list li {
  font-size: 12.5px;
  color: var(--ink-light);
  padding-left: 12px;
  position: relative;
}

.cert-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-mid);
  font-size: 10px;
  top: 1px;
}

.cert-date {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--ink-light);
  margin-left: 4px;
}

/* LANGUAGE */
.lang-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
}

.lang-row:last-child { border-bottom: none; }

.lang-level {
  font-family: 'DM Mono', monospace;
  font-size: 10.5px;
  color: var(--ink-light);
}

/* PROJECTS */
.project-item {
  margin-bottom: 12px;
}

.project-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 2px;
}

.project-desc {
  font-size: 12px;
  color: var(--ink-light);
  line-height: 1.5;
}

/* MOBILE: sivupalkki siirtyy pääsisällön alle. Vain näytöllä, jotta tulosteen kaksi saraketta säilyvät. */
@media screen and (max-width: 720px) {
  .page { padding: 24px 16px 40px; }
  .header { grid-template-columns: 1fr; gap: 16px; }
  .contacts { text-align: left; }
  .summary { padding: 18px; }
  .two-col { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

/* PRINT */
@media print {
  body { background: white; }
  .page { padding: 20px 24px; max-width: 100%; }
  .top-nav { display: none; }
  .two-col { grid-template-columns: 1fr 260px; }
}

.skill-group-spaced { margin-top: 10px; }

.project-name a {
  color: var(--accent-mid);
  text-decoration: none;
}
