:root {
  color-scheme: dark;
  --background: #0b0f12;
  --surface: #12181d;
  --surface-hover: #172027;
  --text: #e2e8f0;
  --muted: #8b9ca7;
  --border: #1e2930;
  --accent: #2dd4bf;
  --accent-dark: #14b8a6;
  --max-width: 1100px;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}
a { color: inherit; text-underline-offset: .22em; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 10; background: var(--accent); color: #0b0f12; padding: .7rem 1rem; font-weight: 700; }
.skip-link:focus { top: 1rem; }
.site-header, main, footer { width: min(calc(100% - 2rem), var(--max-width)); margin-inline: auto; }
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding-block: 1.4rem; }
.header-right { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.lang-switch { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 700; }
.lang-current { color: var(--accent); }
.lang-link { color: var(--muted); text-decoration: none; }
.lang-link:hover { color: var(--text); }
.lang-divider { opacity: .3; color: var(--muted); }
.identity { font-weight: 750; text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: .7rem 1.25rem; }
nav a { color: var(--muted); font-size: .9rem; text-decoration: none; }
nav a:hover { color: var(--text); }
nav a[aria-current="true"] { color: var(--accent); font-weight: 700; }
section { padding-block: clamp(4rem, 8vw, 7rem); scroll-margin-top: 4rem; }
.hero { min-height: 72vh; display: grid; align-content: center; max-width: 900px; }
.eyebrow, .section-label, .project-index, .timeline-date { color: var(--accent); font-size: .78rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.025em; }
h1 { max-width: 16ch; margin: .4rem 0 1.5rem; font-size: clamp(3rem, 8vw, 6.7rem); }
h2 { max-width: 21ch; margin: .5rem 0 2.5rem; font-size: clamp(2rem, 5vw, 3.8rem); }
h3 { font-size: 1.25rem; }
.hero-summary { max-width: 670px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.3rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.5rem; }
.button { display: inline-flex; align-items: center; min-height: 44px; padding: .65rem 1.1rem; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; background: var(--surface); color: var(--text); }
.button:hover { border-color: var(--accent); color: var(--text); }
.button-primary { background: var(--accent); border-color: var(--accent); color: #0b0f12; font-weight: 700; }
.button-primary:hover { background: #5eead4; border-color: #5eead4; color: #0b0f12; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.expertise-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.project-card { min-width: 0; padding: clamp(1.4rem, 3vw, 2.2rem); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.project-card h3 { margin-block: .5rem .9rem; }
.project-summary, .project-tech, .expertise-grid p, .timeline p, #about > p { color: var(--muted); }
.project-tech { overflow-wrap: anywhere; font-size: .9rem; }
.project-card .external-link { display: inline-block; margin-top: .8rem; font-weight: 700; color: var(--accent); }
.project-card .external-link:hover { color: #5eead4; }
.expertise-grid article { padding-block: 1rem; border-top: 1px solid var(--border); }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: minmax(8rem, .4fr) 1.6fr; column-gap: 2rem; padding-block: 1.6rem; border-top: 1px solid var(--border); }
.timeline h3, .timeline p { margin-block: 0 .5rem; }
.company-link { color: inherit; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: .2em; transition: color .15s ease, text-decoration-color .15s ease; }
.company-link:hover { color: var(--accent); text-decoration-color: var(--accent); }
.timeline-location { color: var(--muted); font-weight: 400; font-size: .95rem; }
#about > p { max-width: 720px; font-size: 1.1rem; }
footer { display: flex; justify-content: space-between; gap: 1rem; padding-block: 2.5rem; border-top: 1px solid var(--border); color: var(--muted); }
footer div { display: flex; gap: 1rem; }

@media (max-width: 720px) {
  .site-header, footer { align-items: flex-start; flex-direction: column; }
  .header-right { width: 100%; justify-content: space-between; }
  .hero { min-height: auto; padding-top: 5rem; }
  .project-grid, .expertise-grid { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
