:root {
  color-scheme: dark;
  --ink: #f2efe9;
  --muted: #b7b2c2;
  --subtle: #9992a8;
  --surface: #17151e;
  --surface-raised: #201d29;
  --line: #393443;
  --accent: #c6a9ed;
  --accent-strong: #a884d5;
  --green: #8ed3b1;
  --page: 1160px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #111016;
  color: var(--ink);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: radial-gradient(ellipse at 82% 0%, #211a2d 0, transparent 34rem), #111016; }
a { color: inherit; text-decoration-color: var(--accent-strong); text-underline-offset: .25em; }
a:hover { color: #dec8fa; }
button { font: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.skip-link { position: absolute; z-index: 20; top: -5rem; left: 1rem; padding: .8rem 1rem; background: var(--ink); color: #111016; }
.skip-link:focus { top: 1rem; }
.preview-banner { padding: .65rem 1rem; background: #372f48; color: #f1e7ff; text-align: center; font-size: .78rem; letter-spacing: .04em; }
.site-header, main, .site-footer { width: min(var(--page), 100% - 3rem); margin-inline: auto; }
.site-header { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .75rem; font-size: .94rem; font-weight: 650; letter-spacing: .02em; text-decoration: none; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid #6f5b88; border-radius: 12px; color: var(--accent); font-size: 1.5rem; letter-spacing: -.08em; }
.primary-navigation ul { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.2rem); margin: 0; padding: 0; list-style: none; }
.primary-navigation a { color: var(--muted); font-size: .88rem; text-decoration: none; }
.primary-navigation a:hover, .primary-navigation a[aria-current="page"] { color: var(--ink); }
.nav-toggle { display: none; border: 1px solid var(--line); border-radius: 999px; padding: .55rem .85rem; background: transparent; color: var(--ink); }
main { min-height: calc(100vh - 190px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr); gap: clamp(3rem, 8vw, 7rem); align-items: center; padding-block: clamp(4.5rem, 11vw, 9.5rem) 5rem; }
.hero-copy { max-width: 710px; }
.eyebrow, .system-label { margin: 0 0 1rem; color: var(--accent); font-size: .72rem; font-weight: 700; letter-spacing: .17em; line-height: 1.5; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 790px; margin-bottom: 1.4rem; font-size: clamp(2.7rem, 7.2vw, 6.2rem); font-weight: 560; letter-spacing: -.065em; line-height: .99; }
.lead { max-width: 650px; color: #d3cedb; font-size: clamp(1.05rem, 1.8vw, 1.3rem); line-height: 1.7; }
.lead p { margin-bottom: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }
.button, .return-button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: .65rem; border: 1px solid transparent; border-radius: 999px; padding: .75rem 1.15rem; font-size: .88rem; font-weight: 650; text-decoration: none; transition: background-color .2s ease, border-color .2s ease, transform .2s ease; }
.button:hover, .return-button:hover { transform: translateY(-2px); }
.button-primary, .return-button { background: var(--accent); color: #20182d; }
.button-primary:hover, .return-button:hover { background: #d7c0f4; color: #20182d; }
.button-quiet { border-color: var(--line); color: var(--ink); }
.button-quiet:hover { border-color: var(--accent-strong); }
.name-line { margin: 2.5rem 0 0; color: var(--muted); font-size: .9rem; }
.portrait-frame { position: relative; max-width: 390px; justify-self: end; margin: 0; }
.portrait-frame::before { position: absolute; inset: -14px 14px 14px -14px; border: 1px solid #6f5b88; border-radius: 45% 45% 18px 18px; content: ""; }
.portrait-image { position: relative; display: block; width: min(100%, 360px); aspect-ratio: 8 / 9; border-radius: 45% 45% 18px 18px; object-fit: cover; background: var(--surface-raised); }
.portrait-frame figcaption { position: relative; margin-top: .9rem; color: var(--subtle); font-size: .72rem; line-height: 1.5; }
.section-block { padding-block: 4.5rem; border-top: 1px solid var(--line); }
.section-block h2 { margin-bottom: 1.2rem; font-size: clamp(1.7rem, 3.4vw, 2.7rem); font-weight: 540; letter-spacing: -.04em; line-height: 1.12; }
.featured-experience { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 3rem; }
.section-heading h2 { max-width: 460px; font-size: clamp(1.4rem, 2.3vw, 2rem); }
.focus-list { display: grid; align-content: start; gap: 1rem; }
.focus-card, .project-card, .skill-group, .placeholder-card { border: 1px solid var(--line); border-radius: 16px; padding: 1.25rem; background: linear-gradient(140deg, rgba(37, 33, 47, .9), rgba(24, 22, 30, .82)); }
.focus-card h3, .project-card h3, .skill-group h3 { margin-bottom: .6rem; font-size: 1.08rem; }
.focus-card p:last-child, .project-card p:last-child { margin-bottom: 0; }
.quiet-note { color: var(--muted); line-height: 1.7; }
.interest-block { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 3rem; align-items: start; }
.interest-block h2 { max-width: 430px; }
.interest-list { display: flex; flex-wrap: wrap; gap: .65rem; margin: .25rem 0 0; padding: 0; list-style: none; }
.interest-list li { border: 1px solid #4a4355; border-radius: 999px; padding: .62rem .85rem; color: #d4cedc; font-size: .82rem; }
.page-intro { max-width: 790px; padding-block: clamp(4rem, 9vw, 7.2rem) 3rem; }
.page-intro h1 { font-size: clamp(2.8rem, 6vw, 5.3rem); }
.page-intro p:not(.eyebrow) { color: #d3cedb; font-size: 1.07rem; line-height: 1.8; }
.timeline { display: grid; gap: 0; margin-top: 1.5rem; border-left: 1px solid #6f5b88; }
.timeline-entry { position: relative; margin-left: 1.5rem; padding: 0 0 2.5rem 1rem; }
.timeline-entry::before { position: absolute; top: .25rem; left: -1.84rem; width: 10px; height: 10px; border: 2px solid var(--accent); border-radius: 50%; background: #111016; content: ""; }
.timeline-date, .timeline-org { margin-bottom: .45rem; color: var(--muted); font-size: .82rem; }
.timeline-entry h3 { margin-bottom: .5rem; font-size: 1.25rem; }
.timeline-entry p, .timeline-entry li { color: #c7c1d0; line-height: 1.65; }
.timeline-entry ul { padding-left: 1.1rem; }
.skill-grid, .project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.skill-group ul { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.skill-group li { border-radius: 999px; padding: .45rem .65rem; background: #2b2635; color: #d7d0e0; font-size: .78rem; }
.cert-list { display: grid; gap: .85rem; padding-left: 1.2rem; color: #d3cedb; }
.cert-list span { color: var(--muted); }
.project-grid-large { padding-bottom: 5rem; }
.project-card { min-height: 180px; }
.project-card p { color: #c7c1d0; line-height: 1.65; }
.project-image { display: block; width: 100%; max-height: 220px; margin-bottom: 1.2rem; border-radius: 10px; object-fit: cover; }
.draft-badge { display: inline-block; margin-bottom: .65rem; border: 1px solid #8e75af; border-radius: 999px; padding: .3rem .55rem; color: #e4d3fa; font-size: .67rem; letter-spacing: .08em; text-transform: uppercase; }
.draft-card { border-style: dashed; }
.text-link { display: inline-block; margin-top: 1rem; color: var(--accent); font-weight: 650; text-decoration: none; }
.placeholder-card { margin-top: 1.5rem; color: var(--muted); }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
.site-footer p { margin: 0; }
.footer-end { display: flex; align-items: center; gap: 1.2rem; }
.pi-trigger { width: 28px; height: 28px; border: 1px solid #4a4355; border-radius: 50%; background: transparent; color: #b9a2d7; cursor: pointer; font-family: Georgia, serif; font-size: .9rem; line-height: 1; }
.pi-trigger:hover { border-color: var(--accent); color: var(--ink); }
.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; }

.system-dialog { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; border: 0; padding: clamp(1rem, 4vw, 3rem); background: #0c0d10; color: #e9e9e4; }
.system-dialog::backdrop { background: #0c0d10; }
.system-screen { position: relative; display: flex; min-height: 100%; flex-direction: column; justify-content: space-between; overflow: hidden; border: 1px solid #33353b; padding: clamp(1.2rem, 4vw, 3rem); background: radial-gradient(ellipse at 75% 45%, rgba(86, 74, 113, .2), transparent 40rem), #101115; }
.system-topline { display: flex; justify-content: space-between; color: #9c9eaa; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .7rem; letter-spacing: .14em; }
.dialog-close { border: 0; background: transparent; color: #c5c6ce; cursor: pointer; font-size: 1.8rem; }
.scanline { position: absolute; top: 0; right: 12%; width: 1px; height: 100%; background: linear-gradient(transparent, rgba(198, 169, 237, .42), transparent); opacity: .5; }
.system-sequence, .restricted-panel { width: min(680px, 100%); margin: auto; padding-block: 4rem; }
.system-label { color: #ae91d4; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.system-sequence h2, .restricted-panel h3 { margin: 0 0 2rem; font-size: clamp(2.2rem, 6vw, 5rem); font-weight: 500; letter-spacing: -.055em; }
.terminal-lines { display: grid; gap: .9rem; margin: 0; padding: 0; color: #b9bac1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: clamp(.85rem, 1.8vw, 1rem); list-style: none; }
.terminal-lines li { opacity: .45; transition: opacity .45s ease, color .45s ease; }
.terminal-lines li.is-current { color: #d8c6f0; opacity: 1; }
.sequence-meter { width: 100%; height: 2px; margin-top: 2rem; background: #292a31; }
.sequence-meter span { display: block; width: 0; height: 100%; background: #a98bd1; transition: width .65s ease; }
.system-sequence[data-progress="1"] .sequence-meter span { width: 33.333%; }
.system-sequence[data-progress="2"] .sequence-meter span { width: 66.667%; }
.system-sequence[data-progress="3"] .sequence-meter span { width: 100%; }
.system-sequence.is-complete { display: none; }
.restricted-panel[hidden] { display: none; }
.restricted-panel h3 { margin-bottom: 1rem; font-size: clamp(2rem, 5vw, 4.4rem); }
.restricted-panel > p:not(.system-label) { max-width: 580px; color: #b9bac1; line-height: 1.7; }
.system-status { display: flex; align-items: center; gap: .65rem; margin: 2rem 0; color: #b9bac1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px rgba(142, 211, 177, .4); }

@media (max-width: 760px) {
  .site-header, main, .site-footer { width: min(var(--page), 100% - 2rem); }
  .site-header { min-height: 76px; flex-wrap: wrap; gap: .5rem; padding-block: 1rem; }
  .nav-toggle { display: block; margin-left: auto; }
  .primary-navigation { display: none; width: 100%; padding: .4rem 0 .25rem; }
  .primary-navigation.is-open { display: block; }
  .primary-navigation ul { flex-wrap: wrap; gap: .7rem 1.2rem; }
  .primary-navigation a { display: inline-block; padding-block: .4rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; padding-block: 4rem; }
  .portrait-frame { width: min(82%, 350px); justify-self: center; }
  .featured-experience, .interest-block { grid-template-columns: 1fr; gap: 1.3rem; }
}
@media (max-width: 540px) {
  .skill-grid, .project-grid { grid-template-columns: 1fr; }
  .site-footer { align-items: flex-start; flex-direction: column; }
  .footer-end { width: 100%; justify-content: space-between; }
  .hero-actions .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

.brand-logo { display: block; object-fit: contain; }
.project-figure { margin: 0 0 1.2rem; }
.project-figure figcaption { color: var(--muted); font-size: .82rem; }
