:root {
  --bg: #091018;
  --surface: #101a24;
  --surface-2: #152330;
  --text: #f1f5f7;
  --muted: #9fb0bd;
  --line: rgba(180, 205, 220, 0.16);
  --accent: #5de0c0;
  --accent-2: #f0b45b;
  --max: 1180px;
  --radius: 22px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f5f1;
    --surface: #ffffff;
    --surface-2: #e9eeeb;
    --text: #10212a;
    --muted: #53666f;
    --line: rgba(16, 33, 42, 0.14);
  }
}

:root[data-theme="dark"] {
  --bg: #091018;
  --surface: #101a24;
  --surface-2: #152330;
  --text: #f1f5f7;
  --muted: #9fb0bd;
  --line: rgba(180, 205, 220, 0.16);
}

:root[data-theme="light"] {
  --bg: #f4f5f1;
  --surface: #ffffff;
  --surface-2: #e9eeeb;
  --text: #10212a;
  --muted: #53666f;
  --line: rgba(16, 33, 42, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 78% 3%, rgba(93, 224, 192, 0.11), transparent 27rem),
    radial-gradient(circle at 8% 28%, rgba(240, 180, 91, 0.08), transparent 25rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a { color: inherit; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 20; padding: .7rem 1rem; background: var(--accent); color: #07110e; border-radius: 8px; }
.skip-link:focus { top: 1rem; }

.site-header {
  width: min(calc(100% - 2rem), var(--max));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: .7rem; font-weight: 720; text-decoration: none; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; color: var(--accent); font-size: .75rem; letter-spacing: .08em; }
.nav { margin-left: auto; display: flex; gap: 1.5rem; }
.nav a { color: var(--muted); text-decoration: none; font-size: .92rem; }
.nav a:hover, .nav a:focus-visible { color: var(--text); }
.theme-toggle { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; }

main, .site-footer { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }
.hero { min-height: calc(100vh - 76px); display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); align-items: center; gap: clamp(3rem, 8vw, 7rem); padding: 5rem 0; }
.eyebrow, .section-kicker, .panel-label { margin: 0 0 1rem; color: var(--accent); font-size: .76rem; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 850px; margin-bottom: 1.5rem; font-size: clamp(3rem, 7vw, 6.6rem); line-height: .98; letter-spacing: -.065em; }
h2 { margin-bottom: 1rem; font-size: clamp(2rem, 4.2vw, 3.9rem); line-height: 1.05; letter-spacing: -.045em; }
h3 { margin-bottom: .7rem; font-size: 1.18rem; line-height: 1.25; }
.lead { max-width: 750px; color: var(--muted); font-size: clamp(1.05rem, 1.8vw, 1.25rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.button { display: inline-flex; align-items: center; min-height: 48px; padding: 0 1.2rem; border-radius: 12px; text-decoration: none; font-weight: 700; }
.button-primary { background: var(--accent); color: #07110e; }
.button-secondary { border: 1px solid var(--line); }
.button:hover { transform: translateY(-2px); }
.hero-panel { position: relative; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 88%, transparent); box-shadow: 0 24px 80px rgba(0,0,0,.17); overflow: hidden; }
.hero-panel::after { content: ""; position: absolute; width: 180px; height: 180px; right: -90px; top: -90px; border: 1px solid var(--accent); border-radius: 50%; opacity: .35; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); }
.metric { min-height: 125px; padding: 1rem; display: flex; flex-direction: column; justify-content: end; background: var(--surface); }
.metric strong { font-size: 1.4rem; letter-spacing: -.04em; }
.metric span { color: var(--muted); font-size: .85rem; }

.section { padding: clamp(5rem, 10vw, 9rem) 0; border-top: 1px solid var(--line); }
.intro { display: grid; grid-template-columns: .8fr 1.2fr; gap: 5rem; }
.intro-copy { color: var(--muted); font-size: clamp(1.08rem, 2vw, 1.4rem); }
.section-heading { margin-bottom: 3rem; display: flex; justify-content: space-between; align-items: end; gap: 2rem; }
.section-heading > p { max-width: 420px; color: var(--muted); }
.timeline { border-top: 1px solid var(--line); }
.timeline-item { display: grid; grid-template-columns: 150px 1fr; gap: 2rem; padding: 2rem 0; border-bottom: 1px solid var(--line); }
.timeline-year { color: var(--accent-2); font-size: 1.1rem; font-weight: 800; }
.timeline-content p { max-width: 760px; margin-bottom: 0; color: var(--muted); }
.timeline-content ul { max-width: 760px; margin: 1rem 0 0; padding-left: 1.2rem; color: var(--muted); }
.timeline-content li + li { margin-top: .35rem; }

.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.project-card { min-height: 330px; padding: 1.5rem; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.project-card.featured { background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface)); }
.card-index { margin-bottom: auto; color: var(--accent); font-size: .78rem; letter-spacing: .14em; }
.project-card p { color: var(--muted); }
.project-card strong { margin-top: auto; color: var(--accent-2); font-size: 1.45rem; letter-spacing: -.03em; }
.project-card > span:last-child { color: var(--muted); font-size: .82rem; }

.competencies { text-align: center; }
.competencies h2 { max-width: 760px; margin-inline: auto; }
.tag-list { max-width: 900px; margin: 2.5rem auto 0; display: flex; justify-content: center; flex-wrap: wrap; gap: .7rem; }
.tag-list span { padding: .65rem 1rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); }
.skill-profile { margin-top: 5rem; border-top: 1px solid var(--line); text-align: left; }
.skill-row { display: grid; grid-template-columns: .85fr 1.15fr; gap: 3rem; padding: 2rem 0; border-bottom: 1px solid var(--line); }
.skill-row h3 { margin: .65rem 0 0; }
.skill-row p { margin: 0; color: var(--muted); }
.skill-level { display: inline-flex; padding: .32rem .65rem; border: 1px solid var(--line); border-radius: 999px; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.level-primary { color: var(--accent-2); }
.level-advanced { color: var(--accent); }
.level-practical { color: var(--text); }
.level-growing { color: var(--muted); }
.work-style { margin-top: 5rem; text-align: left; }
.work-style-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.work-style-grid div { min-height: 170px; padding: 1.25rem; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.work-style-grid strong { color: var(--accent); font-size: .75rem; letter-spacing: .14em; }
.work-style-grid span { color: var(--muted); }
.credential-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.credential-card { min-height: 280px; padding: 1.5rem; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.credential-card:nth-child(1), .credential-card:nth-child(2), .credential-card:nth-child(3) { grid-column: span 2; }
.credential-card:nth-child(4), .credential-card:nth-child(5) { grid-column: span 3; }
.credential-card > span { color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.credential-card h3 { margin-top: auto; }
.credential-card p { margin-bottom: 0; color: var(--muted); }
.interest-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.interest-card { min-height: 260px; padding: 1.5rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.interest-card h3 { margin-top: 3rem; }
.interest-card p { margin-bottom: 0; color: var(--muted); }
.interest-number { color: var(--accent); font-size: .75rem; font-weight: 750; letter-spacing: .14em; }
.links-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: 5rem; }
.link-list { border-top: 1px solid var(--line); }
.link-list a { display: flex; justify-content: space-between; gap: 1rem; padding: 1.2rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--muted); }
.link-list a:hover, .link-list a:focus-visible { color: var(--accent); }

.site-footer { padding: 2rem 0 3rem; display: flex; justify-content: space-between; gap: 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.site-footer div { display: flex; flex-direction: column; }
.site-footer strong { color: var(--text); }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .button, .nav a, .link-list a { transition: color .2s ease, transform .2s ease, background .2s ease; }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .theme-toggle { margin-left: auto; }
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 3rem; padding: 5rem 0; }
  .intro, .links-section { grid-template-columns: 1fr; gap: 2rem; }
  .section-heading { display: block; }
  .project-grid { grid-template-columns: 1fr 1fr; }
  .interest-grid { grid-template-columns: 1fr 1fr; }
  .work-style-grid { grid-template-columns: 1fr; }
  .credential-grid { grid-template-columns: 1fr 1fr; }
  .credential-card:nth-child(n) { grid-column: auto; }
}

@media (max-width: 580px) {
  .site-header { height: 66px; }
  h1 { font-size: clamp(2.8rem, 14vw, 4.2rem); }
  .hero { padding-top: 3.5rem; }
  .metric-grid, .project-grid, .interest-grid { grid-template-columns: 1fr; }
  .credential-grid { grid-template-columns: 1fr; }
  .metric { min-height: 100px; }
  .timeline-item { grid-template-columns: 1fr; gap: .5rem; }
  .skill-row { grid-template-columns: 1fr; gap: 1rem; }
  .project-card { min-height: 280px; }
  .site-footer { flex-direction: column; }
}
