:root {
  --ink: #06172f;
  --ink-2: #0b2447;
  --paper: #fcfbf8;
  --slate: #5e7190;
  --line: #cfd8e2;
  --coral: #f16c5b;
  --max: 1320px;
  --pad: clamp(24px, 5vw, 80px);
  --serif: "Noto Serif SC", Georgia, serif;
  --sans: "Noto Sans SC", Arial, sans-serif;
  --mono: "DM Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 10; top: -50px; left: 24px; padding: 10px 14px; background: var(--paper); color: var(--ink); transition: top .2s; }
.skip-link:focus { top: 16px; }

.site-header { height: 84px; position: absolute; z-index: 4; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--pad); color: var(--paper); }
.wordmark { font-family: var(--serif); font-size: 23px; font-weight: 700; }
.site-nav { display: flex; gap: clamp(22px, 3vw, 48px); font-size: 15px; }
.site-nav a { position: relative; padding: 8px 0; }
.site-nav a::after { content: ""; position: absolute; right: 0; bottom: 1px; left: 0; height: 1px; background: var(--coral); transform: scaleX(0); transform-origin: right; transition: transform .2s ease; }
.site-nav a:hover::after, .site-nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.menu-button { display: none; width: 40px; height: 40px; padding: 8px; border: 0; background: transparent; color: inherit; }
.menu-button span:not(.sr-only) { display: block; height: 1px; margin: 5px 0; background: currentColor; }

.hero { min-height: min(800px, 88svh); overflow: hidden; position: relative; color: var(--paper); background: var(--ink); }
.hero-grid { max-width: var(--max); min-height: min(800px, 88svh); margin: 0 auto; padding: 160px var(--pad) 100px; display: grid; grid-template-columns: minmax(440px, .95fr) 1.05fr; align-items: center; }
.hero-copy { position: relative; z-index: 1; max-width: 650px; }
.section-index { display: flex; align-items: center; gap: 14px; margin: 0 0 28px; color: #9bafc9; font: 500 13px/1 var(--mono); letter-spacing: .12em; }
.section-index::after { content: ""; width: 52px; height: 2px; background: currentColor; }
.section-index span { letter-spacing: .18em; }
.coral { color: var(--coral); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font: 900 clamp(68px, 9vw, 144px)/.98 var(--serif); letter-spacing: 0; }
.hero-role { margin-bottom: 40px; color: #8da6ca; font: 600 clamp(27px, 3vw, 44px)/1.2 var(--serif); }
.hero-summary { max-width: 530px; margin-bottom: 42px; color: #e2e8f2; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.85; }
.hero-actions, .contact-actions { display: flex; gap: 14px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 26px; min-height: 58px; padding: 0 24px; border: 1px solid transparent; font-size: 15px; font-weight: 600; transition: transform .2s, background .2s, border-color .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--paper); background: var(--coral); }
.button-primary:hover { background: #d95d4e; }
.button-secondary { border-color: #5a79a5; background: transparent; color: var(--paper); }
.button-secondary:hover { border-color: var(--paper); }
.hero-visual { align-self: stretch; margin: -160px calc(-1 * var(--pad)) -100px -18%; position: relative; }
.hero-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--ink) 0%, transparent 32%), linear-gradient(0deg, var(--ink) 0%, transparent 20%); pointer-events: none; }
.hero-visual img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; }
.scroll-cue { position: absolute; right: var(--pad); bottom: 28px; display: flex; align-items: center; gap: 10px; color: #9bafc9; font: 12px var(--mono); letter-spacing: .12em; }
.scroll-cue span { display: block; width: 42px; height: 1px; background: var(--coral); }

.section-light { background: var(--paper); }
.section-shell { width: min(var(--max), 100%); margin: 0 auto; padding: clamp(90px, 11vw, 160px) var(--pad); display: grid; grid-template-columns: minmax(180px, .26fr) 1fr; gap: clamp(40px, 7vw, 120px); }
.experience .section-shell { padding-top: clamp(50px, 6vw, 80px); }
.section-side h2 { margin-bottom: 24px; font: 900 clamp(42px, 5vw, 70px)/1.08 var(--serif); }
.vertical-label { margin: 0; color: var(--slate); font: 13px/1 var(--mono); letter-spacing: .16em; writing-mode: vertical-rl; }
.timeline { border-left: 1px solid var(--line); }
.timeline-entry { display: grid; grid-template-columns: 28px 1fr auto; column-gap: 28px; min-height: 120px; padding: 0 0 30px; position: relative; }
.timeline-entry:not(:last-child) { border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.timeline-marker { width: 13px; height: 13px; margin: 5px 0 0 -7px; border: 3px solid var(--paper); border-radius: 50%; background: var(--slate); box-shadow: 0 0 0 1px var(--slate); }
.timeline-entry.current .timeline-marker { background: var(--coral); box-shadow: 0 0 0 1px var(--coral); }
.entry-main h3 { margin-bottom: 8px; font-size: clamp(20px, 1.8vw, 27px); line-height: 1.35; }
.entry-main p { margin: 0; color: var(--slate); font-size: 17px; }
.entry-date { margin: 4px 0 0; white-space: nowrap; color: var(--ink); font: 14px var(--mono); }

.skills { border-top: 1px solid var(--line); }
.skills-shell { padding-top: clamp(70px, 9vw, 120px); padding-bottom: clamp(90px, 10vw, 140px); }
.section-side.compact h2 { font-size: clamp(38px, 4vw, 58px); }
.skills-list { margin: 0; border-top: 1px solid var(--ink); }
.skills-list > div { display: grid; grid-template-columns: minmax(150px, .38fr) 1fr; gap: 28px; padding: 23px 0; border-bottom: 1px solid var(--line); }
.skills-list dt { font-size: 17px; font-weight: 700; }
.skills-list dd { margin: 0; color: var(--ink-2); font: 15px/1.75 var(--mono); }
.skills-list i { padding: 0 6px; color: var(--coral); font-style: normal; }

.projects { color: var(--paper); background: var(--ink); }
.projects-shell { padding-top: clamp(90px, 11vw, 160px); padding-bottom: clamp(90px, 11vw, 160px); }
.dark-side h2 { color: var(--paper); }
.dark-side .vertical-label { color: #7894bb; }
.project-list { border-top: 1px solid #405579; }
.project { display: grid; grid-template-columns: minmax(75px, .2fr) minmax(300px, 1fr) minmax(105px, .28fr); gap: 28px; padding: 38px 0; border-bottom: 1px solid #405579; }
.project-number { margin: 0; color: #7193cf; font: 400 clamp(56px, 5vw, 84px)/.8 var(--mono); }
.project-copy { border-left: 2px solid var(--coral); padding-left: 28px; }
.project h3 { margin-bottom: 15px; font: 700 clamp(23px, 2vw, 32px)/1.3 var(--serif); }
.project-copy p { margin: 0; color: #d7e0ee; font-size: 16px; line-height: 1.9; }
.project ul { margin: 0; padding: 0 0 0 20px; border-left: 1px solid #49658c; list-style: none; color: #90a6c8; font: 13px/1.85 var(--mono); }

.contact-shell { padding-top: clamp(90px, 11vw, 150px); padding-bottom: clamp(90px, 11vw, 150px); }
.contact-details { border-top: 1px solid var(--ink); }
.contact-details > a, .email-row, .contact-details > p { min-height: 82px; margin: 0; display: flex; align-items: center; gap: 40px; border-bottom: 1px solid var(--line); }
.contact-details span { width: 68px; flex: 0 0 68px; color: var(--slate); font: 13px var(--mono); }
.contact-details strong { font-size: clamp(19px, 2.1vw, 28px); letter-spacing: 0; overflow-wrap: anywhere; }
.email-row a { flex: 1; display: flex; align-items: center; gap: 40px; }
.copy-button { flex: 0 0 auto; padding: 8px 0; border: 0; border-bottom: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; font-size: 14px; }
.copy-button:hover, .copy-button:focus-visible { color: var(--coral); border-color: currentColor; }
.contact-actions { margin-top: 36px; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 100px; padding: 0 var(--pad); color: #8ba0c1; background: var(--ink); font: 12px var(--mono); letter-spacing: .08em; }
footer p { margin: 0; }
footer a:hover { color: var(--paper); }
.toast { position: fixed; z-index: 8; bottom: 28px; left: 50%; padding: 12px 18px; transform: translate(-50%, 80px); background: var(--ink); color: var(--paper); opacity: 0; font-size: 14px; transition: transform .2s, opacity .2s; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 820px) {
  .site-header { height: 68px; padding: 0 24px; }
  .wordmark { font-size: 19px; }
  .menu-button { display: block; position: relative; z-index: 3; }
  .site-nav { position: fixed; inset: 0; min-height: 100svh; display: grid; align-content: center; padding: 90px 24px 32px; background: rgba(6, 23, 47, .98); transform: translateY(-100%); transition: transform .25s ease; }
  .site-nav.open { transform: translateY(0); }
  .site-nav a { width: fit-content; font: 600 30px var(--serif); }
  .hero { min-height: min(720px, 92svh); }
  .hero-grid { min-height: min(720px, 92svh); padding: 120px 24px 100px; display: flex; align-items: flex-start; }
  .hero-copy { max-width: 100%; }
  h1 { font-size: clamp(64px, 19vw, 96px); }
  .hero-role { font-size: 29px; margin-bottom: 28px; }
  .hero-summary { font-size: 16px; line-height: 1.8; max-width: 480px; }
  .hero-visual { position: absolute; z-index: 0; inset: 260px -100px 0 20%; margin: 0; opacity: .86; }
  .hero-visual::after { background: linear-gradient(90deg, var(--ink) 0%, rgba(6,23,47,.15) 70%), linear-gradient(0deg, var(--ink) 0%, transparent 35%); }
  .scroll-cue { right: 24px; }
  .section-shell { padding: 84px 24px; grid-template-columns: 1fr; gap: 45px; }
  .experience .section-shell { padding-top: 44px; }
  .section-side { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: end; }
  .section-side h2 { margin: 0; font-size: 43px; }
  .section-side .section-index { margin: 0; }
  .section-side .section-index::after { width: 24px; }
  .vertical-label { writing-mode: horizontal-tb; font-size: 11px; }
  .timeline { margin-left: 7px; }
  .timeline-entry { grid-template-columns: 22px 1fr; column-gap: 20px; padding-bottom: 25px; }
  .entry-date { grid-column: 2; margin: 12px 0 0; font-size: 12px; }
  .entry-main h3 { font-size: 19px; }
  .entry-main p { font-size: 15px; }
  .skills-list > div { grid-template-columns: 1fr; gap: 8px; padding: 18px 0; }
  .skills-list dd { font-size: 13px; line-height: 1.9; }
  .project { grid-template-columns: 62px 1fr; gap: 16px; padding: 30px 0; }
  .project-number { font-size: 48px; }
  .project-copy { padding-left: 18px; }
  .project h3 { font-size: 22px; }
  .project-copy p { font-size: 15px; }
  .project ul { grid-column: 2; margin-left: 18px; padding-left: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .contact-details > a, .email-row, .contact-details > p { min-height: 74px; gap: 18px; }
  .contact-details span { flex-basis: 50px; width: 50px; font-size: 11px; }
  .contact-details strong { font-size: 18px; }
  .email-row a { gap: 18px; min-width: 0; }
  .copy-button { font-size: 12px; }
  footer { min-height: 82px; padding: 0 24px; }
}

@media (max-width: 480px) {
  .hero-actions { align-items: stretch; flex-direction: column; max-width: 240px; }
  .button { min-height: 50px; }
  .project ul { grid-template-columns: 1fr; }
  .email-row { align-items: center; }
  .email-row strong { font-size: 16px; }
  .copy-button { writing-mode: vertical-rl; border-bottom: 0; border-left: 1px solid var(--ink); }
}

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