:root {
  color-scheme: light;
  --page: #f5f5f7;
  --surface: #fff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --blue: #0071e3;
  --header: rgba(245, 245, 247, .9);
  --contact-surface: #e8f2fc;
  --nav: #424245;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --page: #000;
  --surface: #1d1d1f;
  --ink: #f5f5f7;
  --muted: #a1a1a6;
  --line: #424245;
  --blue: #2997ff;
  --header: rgba(0, 0, 0, .82);
  --contact-surface: #161f2b;
  --nav: #d2d2d7;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; scroll-padding-top: 82px; background: var(--page); }
body { min-width: 320px; margin: 0; color: var(--ink); background: var(--page); font-family: var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
::selection { color: #fff; background: var(--blue); }
.page-shell { width: min(100% - 48px, 1080px); margin-inline: auto; }
.site-header { position: sticky; z-index: 10; top: 0; display: flex; min-height: 66px; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); background: var(--header); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); }
.identity { display: inline-flex; align-items: center; width: 44px; height: 44px; }
.brand-logo { display: block; width: 40px; height: 40px; object-fit: contain; filter: brightness(0); }
[data-theme="dark"] .brand-logo { filter: none; }
.desktop-nav { display: flex; align-items: center; gap: 30px; color: var(--nav); font-size: 12px; }
.desktop-nav a, .text-link, .inline-link, .project-link { transition: color .18s ease; }
.desktop-nav a:hover, .text-link:hover, .inline-link:hover, .project-link:hover { color: var(--blue); }
.contact-link { padding: 8px 14px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 12px; transition: background .18s ease; }
.contact-link:hover, .button-primary:hover { background: #0077ed; }
.theme-toggle { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; font: inherit; font-size: 17px; transition: background .18s ease, border-color .18s ease; }
.theme-toggle:hover { border-color: var(--muted); background: var(--surface); }
.mobile-nav { display: none; }
h1, h2, h3, p { margin-top: 0; }
.hero { display: grid; grid-template-columns: 1fr .92fr; align-items: center; gap: 64px; min-height: 570px; padding: 64px 0 76px; }
.hero-copy { max-width: 520px; }
.eyebrow, .section-label { margin: 0 0 18px; color: var(--blue); font-size: 13px; font-weight: 600; letter-spacing: 0; }
h1 { margin-bottom: 22px; font-size: clamp(48px, 6vw, 72px); font-weight: 600; letter-spacing: -2px; line-height: 1.04; }
h1 span, h2 span { color: var(--muted); }
.hero-intro { max-width: 445px; margin-bottom: 0; color: var(--muted); font-size: 17px; line-height: 1.55; }
.hero-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 28px; }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 0 17px; border-radius: 999px; font-size: 13px; font-weight: 500; transition: background .18s ease, transform .18s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--blue); color: #fff; }
.text-link, .inline-link, .project-link { color: var(--blue); font-size: 13px; }
.hero-visual { min-width: 0; margin: 0; overflow: hidden; aspect-ratio: 1.12; border-radius: 16px; background: #e4e4e7; }
.hero-visual img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 57% center; }
.map-visual { position: relative; height: clamp(330px, 37vw, 430px); aspect-ratio: auto; border: 1px solid var(--line); background: #111; }
.map-visual iframe { position: absolute; top: -72px; left: 0; display: block; width: 100%; height: calc(100% + 144px); border: 0; background: #111; }
.section-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 9%; }
.profile-section, .skills-section, .journey-section, .projects-section { padding: 83px 0; border-top: 1px solid var(--line); }
.section-heading h2, .section-topline h2, .contact-panel h2 { max-width: 490px; margin-bottom: 0; font-size: clamp(34px, 4vw, 48px); font-weight: 600; letter-spacing: -1.1px; line-height: 1.1; }
.profile-copy { align-self: center; }
.profile-copy p { margin-bottom: 16px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.profile-copy .lead { color: var(--ink); font-size: 18px; line-height: 1.5; }
.inline-link { display: inline-block; margin-top: 3px; }
.section-topline { display: flex; align-items: end; justify-content: space-between; gap: 32px; }
.skill-list { margin-top: 34px; border-top: 1px solid var(--line); }
.skill-row { display: grid; grid-template-columns: 190px 1fr; align-items: baseline; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.skill-row h3 { margin: 0; font-size: 15px; font-weight: 600; }
.skill-row p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.journey-section > .section-heading { margin-bottom: 34px; }
.journey-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px; }
.journey-column > h3 { margin-bottom: 18px; font-size: 19px; font-weight: 600; }
.timeline h4 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.journey-column > .timeline > .inline-link { display: inline-block; margin-top: 17px; }
.timeline { border-top: 1px solid var(--line); }
.timeline-item { display: grid; grid-template-columns: 100px 1fr; gap: 22px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.timeline-date { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.timeline-item h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.timeline-place { margin-bottom: 9px !important; color: var(--muted) !important; font-size: 12px !important; }
.timeline-item div > p:last-child { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 36px; margin-top: 34px; border-top: 1px solid var(--line); }
.project-item { min-width: 0; padding: 25px 0 27px; border-bottom: 1px solid var(--line); }
.project-meta { margin-bottom: 9px; color: var(--muted); font-size: 11px; font-weight: 500; }
.project-item h3 { margin-bottom: 8px; font-size: 18px; font-weight: 600; letter-spacing: -.2px; }
.project-item p:not(.project-meta) { max-width: 460px; margin-bottom: 12px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.project-link { display: inline-block; font-size: 12px; }
.network-page { min-height: calc(100vh - 135px); }
.network-hero { max-width: 720px; padding: 78px 0 42px; }
.network-hero h1 { font-size: clamp(42px, 6vw, 64px); }
.network-hero .hero-intro { max-width: 600px; }
.network-projects { border-top: 1px solid var(--line); }
.network-project { display: grid; grid-template-columns: minmax(220px, .7fr) 1.3fr; gap: 8px 36px; padding: 27px 0; border-bottom: 1px solid var(--line); }
.network-project .project-meta { grid-column: 1; grid-row: 1; margin: 0; }
.network-project h2 { grid-column: 1; grid-row: 2; margin: 0; font-size: 20px; font-weight: 600; }
.network-project > p:last-child { grid-column: 2; grid-row: 1 / 3; align-self: center; max-width: 550px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.contact-section { padding: 25px 0 78px; }
.contact-panel { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 40px; border-radius: 16px; background: var(--contact-surface); }
.contact-panel .section-label { margin-bottom: 12px; }
.contact-panel h2 { max-width: 560px; font-size: clamp(30px, 4vw, 43px); }
.site-footer { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.footer-brand { display: inline-flex; align-items: center; }
.revision-trigger { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; transition: color .18s ease, border-color .18s ease, background .18s ease; }
.revision-trigger:hover { border-color: var(--muted); background: var(--surface); color: var(--ink); }
.revision-trigger svg { width: 18px; height: 18px; }
.revision-dialog { position: fixed; width: min(420px, calc(100% - 32px)); padding: 30px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 80px rgba(0, 0, 0, .24); }
.revision-dialog::backdrop { background: rgba(0, 0, 0, .48); backdrop-filter: blur(4px); }
.revision-dialog form { display: grid; gap: 12px; }
.revision-dialog .section-label { margin: 0; }
.revision-dialog h2 { margin: 0 30px 4px 0; font-size: 24px; font-weight: 600; }
.revision-dialog label { color: var(--muted); font-size: 12px; }
.revision-dialog input { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--page); color: var(--ink); font: inherit; }
.revision-dialog input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.revision-dialog-close { position: absolute; top: 12px; right: 12px; display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: 24px; }
.revision-dialog-close:hover { background: var(--page); color: var(--ink); }
.revision-error { margin: 0; color: #c83232; font-size: 13px; }
.revision-submit { justify-self: start; border: 0; cursor: pointer; font: inherit; }
.mobile-nav nav { display: none; }
@media (max-width: 760px) {
  .page-shell { width: min(100% - 40px, 600px); }
  .desktop-nav { gap: 18px; }
  .hero { grid-template-columns: 1fr; gap: 34px; min-height: 0; padding: 67px 0 70px; }
  .hero-copy { max-width: 590px; }
  .hero-visual { aspect-ratio: 1.45; }
  .map-visual { height: 380px; aspect-ratio: auto; }
  .section-grid { grid-template-columns: 1fr; gap: 26px; }
  .profile-section, .skills-section, .journey-section, .projects-section { padding: 65px 0; }
  .section-topline { align-items: start; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
  .journey-columns { gap: 28px; }
  .network-hero { padding-top: 65px; }
}
@media (max-width: 560px) {
  html { scroll-padding-top: 70px; }
  .page-shell { width: calc(100% - 36px); }
  .site-header { min-height: 60px; gap: 12px; }
  .identity { font-size: 13px; }
  .desktop-nav { display: none; }
  .identity { width: 40px; height: 40px; }
  .brand-logo { width: 36px; height: 36px; }
  .contact-link { margin-left: auto; font-size: 11px; }
  .mobile-nav { position: relative; display: block; }
  .mobile-nav summary { display: grid; width: 34px; height: 36px; align-content: center; justify-items: center; gap: 5px; cursor: pointer; list-style: none; }
  .mobile-nav summary::-webkit-details-marker { display: none; }
  .mobile-nav summary span { width: 16px; height: 1px; background: var(--ink); }
  .mobile-nav nav { position: absolute; top: calc(100% + 10px); right: 0; display: grid; min-width: 170px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 10px 25px rgba(0, 0, 0, .1); }
  .mobile-nav nav a { padding: 12px 2px; color: var(--ink); font-size: 13px; }
  .mobile-nav nav a + a { border-top: 1px solid #e8e8ed; }
  .hero { gap: 28px; padding: 58px 0 62px; }
  h1 { font-size: clamp(43px, 12vw, 58px); letter-spacing: -1.6px; }
  .hero-intro { font-size: 15px; }
  .hero-visual { aspect-ratio: 1.2; border-radius: 12px; }
  .map-visual { height: 330px; aspect-ratio: auto; }
  .map-visual figcaption { min-height: 40px; padding-inline: 10px; font-size: 10px; }
  .section-heading h2, .section-topline h2 { font-size: 36px; }
  .profile-copy .lead { font-size: 16px; }
  .profile-copy p { font-size: 14px; }
  .skill-row { grid-template-columns: 1fr; gap: 7px; padding: 16px 0; }
  .skill-row h3 { font-size: 14px; }
  .skill-row p { font-size: 13px; }
  .timeline-item { grid-template-columns: 1fr; gap: 7px; padding: 17px 0; }
  .journey-columns { grid-template-columns: 1fr; gap: 36px; }
  .timeline-item h3 { font-size: 14px; }
  .timeline-item div > p:last-child { font-size: 12px; }
  .project-grid { grid-template-columns: 1fr; column-gap: 0; }
  .project-item { padding: 20px 0 22px; }
  .network-hero { padding: 54px 0 30px; }
  .network-hero h1 { font-size: 43px; }
  .network-project { grid-template-columns: 1fr; gap: 9px; padding: 20px 0; }
  .network-project .project-meta, .network-project h2, .network-project > p:last-child { grid-column: 1; grid-row: auto; }
  .network-project h2 { font-size: 18px; }
  .network-project > p:last-child { margin-top: 2px; font-size: 13px; }
  .contact-section { padding: 5px 0 56px; }
  .contact-panel { align-items: flex-start; flex-direction: column; gap: 20px; padding: 27px 22px; border-radius: 12px; }
  .contact-panel h2 { font-size: 32px; }
  .site-footer { min-height: 64px; flex-wrap: wrap; gap: 8px 14px; padding: 15px 0; font-size: 10px; }
  .site-footer span:nth-child(2) { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; } }