@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

:root {
  color-scheme: light dark;
  --bg: #f7f8f6;
  --surface: #ffffff;
  --surface-soft: #eef2f1;
  --text: #334155;
  --heading: #0f2742;
  --muted: #64748b;
  --accent: #087f7a;
  --accent-strong: #075e5b;
  --accent-soft: #dff3f0;
  --border: #dbe3e3;
  --shadow: 0 18px 50px rgba(15, 39, 66, 0.09);
  --header: rgba(247, 248, 246, 0.9);
  --grid: rgba(15, 39, 66, 0.055);
  --max: 1160px;
  --radius: 18px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #07131f;
    --surface: #0d1c2b;
    --surface-soft: #122538;
    --text: #c5d1dc;
    --heading: #f3f7fa;
    --muted: #90a2b5;
    --accent: #51c8bd;
    --accent-strong: #83ddd5;
    --accent-soft: #103d3d;
    --border: #22384b;
    --shadow: 0 20px 55px rgba(0, 0, 0, 0.28);
    --header: rgba(7, 19, 31, 0.9);
    --grid: rgba(131, 221, 213, 0.05);
  }
}

:root[data-theme='dark'] {
  --bg: #07131f;
  --surface: #0d1c2b;
  --surface-soft: #122538;
  --text: #c5d1dc;
  --heading: #f3f7fa;
  --muted: #90a2b5;
  --accent: #51c8bd;
  --accent-strong: #83ddd5;
  --accent-soft: #103d3d;
  --border: #22384b;
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.28);
  --header: rgba(7, 19, 31, 0.9);
  --grid: rgba(131, 221, 213, 0.05);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  position: relative;
  isolation: isolate;
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  font: 400 16px/1.7 'DM Sans', sans-serif;
}
body.menu-open { overflow: hidden; }
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { color: var(--heading); font-family: 'Manrope', sans-serif; line-height: 1.16; }
h1 { font-size: clamp(2.7rem, 7vw, 5.5rem); letter-spacing: -0.055em; }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -0.035em; }
h3 { font-size: 1.2rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 10px 16px; background: var(--heading); color: var(--bg); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.container { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section--soft { background: color-mix(in srgb, var(--surface-soft) 84%, transparent); border-block: 1px solid var(--border); }
.eyebrow { margin-bottom: 16px; color: var(--accent-strong); font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.lede { max-width: 720px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 40px; }
.section-head h2 { margin-bottom: 0; }
.text-link { color: var(--accent-strong); font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 5px; }

.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--border); background: var(--header); backdrop-filter: blur(16px); }
.nav { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--heading); font-family: 'Manrope', sans-serif; font-weight: 800; text-decoration: none; }
.brand-photo { width: 40px; height: 40px; object-fit: cover; object-position: 50% 34%; border: 2px solid var(--surface); border-radius: 50%; box-shadow: 0 0 0 1px var(--border); }
.brand-mark { width: 40px; height: 40px; flex: 0 0 40px; overflow: hidden; border: 2px solid var(--surface); border-radius: 50%; background: url('39fea302-61a3-4dbe-ab69-1303c605be59.jpg') 50% 34% / cover no-repeat; box-shadow: 0 0 0 1px var(--border); color: transparent; font-size: 0; }
.nav-links { display: flex; align-items: center; gap: 4px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.nav-links a { display: block; padding: 9px 12px; border-radius: 9px; color: var(--muted); font-size: .92rem; font-weight: 600; text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current='page'] { color: var(--heading); background: var(--surface-soft); }
.icon-button { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--border); border-radius: 11px; color: var(--heading); background: var(--surface); cursor: pointer; }
.theme-icon { width: 19px; height: 19px; }
.theme-icon--sun { display: none; }
:root[data-theme='dark'] .theme-icon--sun { display: block; }
:root[data-theme='dark'] .theme-icon--moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-icon--sun { display: block; }
  :root:not([data-theme='light']) .theme-icon--moon { display: none; }
}
.menu-button { display: none; }

.hero { position: relative; min-height: calc(100vh - 74px); display: grid; align-items: center; padding: 80px 0; overflow: hidden; }
.hero-particles, .page-particles { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; opacity: .42; }
@media (max-width: 700px) {
  .hero-particles, .page-particles { opacity: .3; }
}
.hero-grid { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: clamp(50px, 8vw, 100px); }
.hero h1 { max-width: 800px; margin-bottom: 26px; }
.hero h1 span { color: var(--accent-strong); }
.hero-actions, .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 11px 20px; border: 1px solid var(--heading); border-radius: 11px; background: var(--heading); color: var(--bg); font-weight: 700; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.button:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.button--secondary { border-color: var(--border); background: var(--surface); color: var(--heading); }
.button--accent { border-color: var(--accent); background: var(--accent); color: #fff; }
.hero-panel { position: relative; padding: 32px; border: 1px solid var(--border); border-radius: 26px; background: var(--surface); box-shadow: var(--shadow); }
.hero-panel::before { content: ''; position: absolute; inset: 12px -12px -12px 12px; z-index: -1; border: 1px solid var(--border); border-radius: 26px; }
.hero-panel-label { color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.hero-panel ul { display: grid; gap: 20px; margin: 24px 0 0; padding: 0; list-style: none; }
.hero-panel li { padding-top: 18px; border-top: 1px solid var(--border); }
.hero-panel strong { display: block; color: var(--heading); }
.hero-panel span { color: var(--muted); font-size: .9rem; }
.page-hero { padding: clamp(78px, 10vw, 126px) 0 70px; border-bottom: 1px solid var(--border); }
.page-hero h1 { max-width: 900px; margin-bottom: 24px; }

.route-grid, .card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.route-card, .card { position: relative; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 25px rgba(15,39,66,.04); }
.route-card { min-height: 240px; display: flex; flex-direction: column; text-decoration: none; transition: transform .2s, border-color .2s; }
.route-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.route-number { margin-bottom: auto; color: var(--accent-strong); font-size: .78rem; font-weight: 800; letter-spacing: .12em; }
.route-card h3 { margin: 38px 0 7px; font-size: 1.45rem; }
.route-card p { margin: 0; color: var(--muted); }
.arrow { position: absolute; top: 26px; right: 26px; font-size: 1.25rem; }
.highlight-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--border); }
.highlight { min-height: 170px; padding: 24px; background: var(--surface); }
.highlight strong { display: block; margin-bottom: 10px; color: var(--heading); font-family: 'Manrope', sans-serif; font-size: 1.03rem; }
.highlight p { margin: 0; color: var(--muted); font-size: .9rem; }

.timeline { position: relative; display: grid; gap: 18px; max-width: 920px; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; top: 12px; bottom: 12px; left: 6px; width: 1px; background: var(--border); }
.timeline-item { position: relative; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.timeline-item::before { content: ''; position: absolute; top: 36px; left: -28px; width: 13px; height: 13px; border: 3px solid var(--bg); border-radius: 50%; background: var(--accent); }
.timeline-top { display: flex; justify-content: space-between; gap: 16px; }
.timeline-top h3 { margin-bottom: 4px; }
.meta { color: var(--accent-strong); font-weight: 600; }
.date { color: var(--muted); font-size: .88rem; white-space: nowrap; }
.timeline-item p:last-child { margin-bottom: 0; }
.education-list { display: grid; gap: 16px; margin-top: 24px; }
.education-list .card { box-shadow: none; }
.education-list h4 { margin: 20px 0 0; color: var(--heading); font-size: .9rem; }
.education-list p:last-child { margin-bottom: 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: 9px; margin: 18px 0 0; padding: 0; list-style: none; }
.tag { padding: 6px 11px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-soft); color: var(--heading); font-size: .82rem; font-weight: 600; }
.cert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cert { padding: 24px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); }
.cert h3 { min-height: 2.8em; margin-bottom: 12px; font-size: 1rem; }
.cert p { margin-bottom: 4px; color: var(--muted); font-size: .86rem; }
.cert .issuer { color: var(--accent-strong); font-weight: 700; }

.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.project-card { display: flex; min-height: 410px; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); }
.project-visual { min-height: 170px; display: grid; place-items: center; padding: 30px; background: var(--surface-soft); border-bottom: 1px solid var(--border); }
.project-glyph { color: var(--accent-strong); font-family: 'Manrope', sans-serif; font-size: clamp(2rem, 5vw, 4.2rem); font-weight: 800; letter-spacing: -.07em; }
.project-body { flex: 1; padding: 28px; }
.status { display: inline-flex; margin-bottom: 18px; padding: 5px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.project-body p { color: var(--muted); }
.project-card--empty { border-style: dashed; }
.project-card--empty .project-visual { opacity: .58; }

.topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.topic { padding: 24px; border-top: 3px solid var(--accent); background: var(--surface); box-shadow: var(--shadow); }
.topic h3 { font-size: 1.05rem; }
.topic p { margin: 0; color: var(--muted); font-size: .9rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 80px); align-items: start; }
.callout { padding: clamp(30px, 5vw, 56px); border: 1px solid var(--border); border-radius: 24px; background: var(--heading); color: var(--bg); }
.callout h2, .callout h3 { color: var(--bg); }
.callout p { opacity: .78; }

.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 880px; }
.contact-card { padding: 32px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-decoration: none; }
.contact-card:hover { border-color: var(--accent); }
.contact-card small { display: block; margin-bottom: 22px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.contact-card strong { display: block; color: var(--heading); font-family: 'Manrope', sans-serif; font-size: clamp(1.15rem, 3vw, 1.7rem); }
.contact-card span { color: var(--accent-strong); }

.event-summary { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.event-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--border); }
.event-stat { min-height: 130px; padding: 22px; background: var(--surface); }
.event-stat small { display: block; margin-bottom: 8px; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.event-stat strong { display: block; color: var(--heading); font-family: 'Manrope', sans-serif; font-size: 1.05rem; line-height: 1.4; }
.event-note { margin-top: 16px; padding: 16px 18px; border-left: 3px solid var(--accent); background: var(--surface-soft); color: var(--muted); font-size: .9rem; }
.learning-list { display: grid; gap: 12px; margin: 24px 0 0; padding: 0; list-style: none; }
.learning-list li { padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--heading); font-weight: 600; }
.back-link { display: inline-flex; margin-bottom: 28px; color: var(--accent-strong); font-weight: 700; text-decoration: none; }

.footer { padding: 34px 0; border-top: 1px solid var(--border); background: var(--bg); }
.footer-row { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: .86rem; }
.footer-row p { margin: 0; }
.footer a { color: var(--heading); font-weight: 600; }
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero-grid, .split, .event-summary { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-panel { max-width: 600px; }
  .highlight-grid, .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .container { width: min(calc(100% - 28px), var(--max)); }
  .nav { flex-wrap: wrap; }
  .menu-button { order: 3; }
  .js .menu-button { display: grid; }
  .nav-links { order: 4; width: 100%; overflow-x: auto; }
  .js .nav-links { position: fixed; inset: 74px 0 auto; display: none; width: auto; padding: 20px; border-bottom: 1px solid var(--border); background: var(--bg); box-shadow: var(--shadow); }
  .js .nav-links.is-open { display: grid; }
  .nav-links a { padding: 13px 15px; }
  .theme-toggle { margin-left: auto; }
  .route-grid, .card-grid, .project-grid, .contact-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 360px; }
  .section-head, .timeline-top, .footer-row { align-items: flex-start; flex-direction: column; }
  .date { white-space: normal; }
}

@media (max-width: 520px) {
  .nav { min-height: 62px; gap: 12px; }
  .brand { gap: 8px; font-size: .9rem; }
  .brand-photo, .brand-mark { width: 34px; height: 34px; flex-basis: 34px; }
  .icon-button { width: 38px; height: 38px; }
  h1 { font-size: 2.12rem; letter-spacing: -.04em; }
  .page-hero { padding: 56px 0 48px; }
  .highlight-grid, .topic-grid, .cert-grid { grid-template-columns: 1fr; }
  .hero { padding: 46px 0 58px; }
  .hero h1 { max-width: 350px; margin-bottom: 20px; }
  .hero .lede { font-size: 1rem; line-height: 1.65; }
  .hero-actions { margin-top: 26px; }
  .hero-panel { padding: 24px; }
  .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
