:root {
  color-scheme: light;
  --bg: #f6f5ef;
  --surface: #fcfbf7;
  --soft: #edeee6;
  --ink: #192c36;
  --muted: #52636a;
  --accent: #396a5e;
  --accent-soft: #dce5dc;
  --line: #d6dcd3;
  --button: #203c37;
  --button-text: #faf9f3;
  --shadow: 0 16px 40px #192c3608;
  --serif: 'Libre Caslon Display', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, sans-serif;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #111f2b;
  --surface: #172833;
  --soft: #1b3038;
  --ink: #edece4;
  --muted: #b3c1c4;
  --accent: #a0c4b3;
  --accent-soft: #28483f;
  --line: #374a52;
  --button: #bbd3bf;
  --button-text: #14271f;
  --shadow: 0 16px 40px #00000012;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #111f2b;
    --surface: #172833;
    --soft: #1b3038;
    --ink: #edece4;
    --muted: #b3c1c4;
    --accent: #a0c4b3;
    --accent-soft: #28483f;
    --line: #374a52;
    --button: #bbd3bf;
    --button-text: #14271f;
    --shadow: 0 16px 40px #00000012;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: .25em; }
a, button { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
button, a { touch-action: manipulation; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 3px; }
[hidden] { display: none !important; }
::selection { background: var(--accent-soft); color: var(--ink); }
svg { display: block; max-width: 100%; }
p, h1, h2, h3, h4 { margin: 0; }
p + p { margin-top: 1rem; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.035em; line-height: 1.06; }
h1 { font-size: clamp(3.3rem, 6.4vw, 5.5rem); }
h2 { font-size: clamp(2.8rem, 5vw, 4.25rem); }
h3 { font-size: 1.5rem; font-weight: 500; line-height: 1.25; }
em { color: var(--accent); font-style: normal; }
.wrap { width: min(1160px, calc(100% - 3rem)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: .75rem; left: 1rem; z-index: 10; padding: .75rem 1.25rem; background: var(--button); color: var(--button-text); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.site-header { min-height: 108px; display: flex; align-items: center; gap: 2rem; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: .9rem; text-decoration: none; flex-shrink: 0; }
.brand-mark { font: 3rem/1 var(--serif); letter-spacing: -.09em; }
.brand-mark > span { color: var(--accent); }
.brand-name { font-size: .75rem; font-weight: 500; line-height: 1.35; letter-spacing: .015em; }
.main-nav { display: flex; align-items: center; gap: 1.9rem; margin-left: auto; }
.main-nav a { text-decoration: none; font-size: .85rem; color: var(--muted); padding-block: .7rem; transition: color .2s; }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--accent); text-decoration: underline; }
.header-controls { display: flex; gap: .55rem; align-items: center; }
.language-switch, .theme-toggle { display: inline-flex; justify-content: center; align-items: center; width: 44px; min-height: 44px; background: none; border: 1px solid var(--line); border-radius: 50%; text-decoration: none; font-size: .75rem; font-weight: 600; transition: background .2s, border-color .2s; }
.theme-toggle { border-color: transparent; }
.language-switch:hover, .theme-toggle:hover { background: var(--soft); border-color: var(--accent); }
.eyebrow { color: var(--accent); font: 500 .7rem/1.6 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.hero { min-height: 710px; padding-block: 6.5rem 5.5rem; display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 2rem; }
.hero-content { position: relative; z-index: 1; }
.hero-content .eyebrow { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.5rem; }
.small-rule { display: inline-block; background: var(--accent); width: 28px; height: 1px; }
.hero h1 { margin-bottom: 1.65rem; }
.hero-intro { max-width: 490px; color: var(--muted); font-size: 1.03rem; line-height: 1.85; }
.hero-intro strong { color: var(--ink); font-weight: 500; }
.hero-actions { display: flex; align-items: center; gap: 1.8rem; margin-top: 2rem; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 52px; padding: .85rem 1.4rem; border: 1px solid transparent; border-radius: 4px; font-size: .85rem; font-weight: 500; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.primary { background: var(--button); color: var(--button-text); }
.button:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.text-link { display: inline-flex; gap: 1rem; align-items: center; min-height: 44px; text-decoration: none; font-size: .85rem; font-weight: 500; color: var(--accent); }
.text-link > span:last-child { transition: transform .2s; }
.text-link:hover { text-decoration: underline; }
.text-link:hover > span:last-child { transform: translate(2px, -2px); }
.location { display: flex; align-items: center; gap: .6rem; margin-top: 3rem; color: var(--muted); font-size: .73rem; flex-wrap: wrap; }
.hero-socials .social-links { margin-top: 1.25rem; gap: 1.6rem; }
.hero-socials .social-links a { font-size: .73rem; }
.location-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.location-time { margin-left: .3rem; padding-left: .8rem; border-left: 1px solid var(--line); }
.hero-art { position: relative; isolation: isolate; min-width: 0; aspect-ratio: .94; }
.art-caption { position: absolute; top: 2%; left: 8%; color: var(--muted); font-size: .58rem; letter-spacing: .18em; }
.ambient-glow { position: absolute; z-index: -1; inset: 13% 7% 10% 7%; border-radius: 50%; background: radial-gradient(ellipse at 40% 45%, var(--accent-soft), transparent 68%), radial-gradient(ellipse at 60% 70%, var(--accent-soft), transparent 60%); opacity: .9; filter: blur(20px); animation: drift 24s ease-in-out infinite alternate; }
.contour { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; color: var(--accent); }
.contour g { stroke: currentColor; stroke-width: .7; opacity: .45; transform-origin: 50% 50%; animation: breathe 30s ease-in-out infinite alternate; }
.orbit-point { fill: var(--accent); }
.art-note { position: absolute; top: 43%; left: 24%; font: clamp(1.5rem, 2.3vw, 2rem)/1.2 var(--serif); letter-spacing: -.02em; }
.art-bottom { position: absolute; bottom: 1%; left: 8%; display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .58rem; letter-spacing: .14em; }
.art-bottom > span { width: 24px; height: 1px; background: var(--accent); }
@keyframes drift { from { transform: translate(-5px, -10px) scale(.95); } to { transform: translate(10px, 12px) scale(1.08); } }
@keyframes breathe { from { transform: rotate(-5deg) scale(.96); } to { transform: rotate(7deg) scale(1.035); } }
.section { padding-block: 6.2rem; }
#work { border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 3rem; margin-bottom: 3rem; }
.section-heading .eyebrow, .about-grid .eyebrow, .contact-section .eyebrow { margin-bottom: 1rem; }
.section-heading > p { max-width: 350px; color: var(--muted); font-size: .95rem; }
.projects-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.project-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 2.25rem; display: flex; flex-direction: column; transition: transform .35s, border-color .35s, box-shadow .35s, opacity .6s; }
.project-card:hover, .project-card:focus-within { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.project-top { display: flex; align-items: start; justify-content: space-between; margin-bottom: 2rem; }
.project-icon { width: 68px; height: 68px; display: grid; place-items: center; border-radius: 14px; background: var(--soft); color: var(--accent); }
.icon-grok { background: var(--button); color: var(--button-text); }
.project-number { font-size: .75rem; color: var(--muted); }
.project-category { font-size: .63rem; margin-bottom: .5rem; }
.project-card h3 { font: 2.25rem/1.15 var(--serif); letter-spacing: -.02em; }
.project-repo { color: var(--muted); font-size: .7rem; margin-top: .4rem; }
.project-description { color: var(--muted); font-size: .92rem; line-height: 1.8; margin-top: 1rem; margin-bottom: 1.5rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: auto 0 0; }
.tags li { padding: .22rem .65rem; background: var(--soft); color: var(--muted); border-radius: 3px; font-size: .65rem; }
.project-bottom { margin-top: 1.3rem; padding-top: 1rem; border-top: 1px solid var(--line); min-height: 61px; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.about-section { background: var(--soft); margin-top: 1rem; }
.about-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 6rem; }
.about-grid h2 { font-size: clamp(2.8rem, 4.5vw, 4rem); }
.about-monogram { font: 11rem/.9 var(--serif); color: var(--accent); opacity: .24; letter-spacing: -.12em; margin-top: 4.5rem; }
.about-monogram span { font-style: italic; }
.about-copy { color: var(--muted); font-size: .95rem; }
.about-copy .lead { font-size: 1.2rem; color: var(--ink); line-height: 1.75; }
.stats { display: flex; gap: 3rem; padding: 1.8rem 0 0; margin: 1.8rem 0 .4rem; border-top: 1px solid var(--line); }
.stats dt { font: 3.2rem/1.2 var(--serif); color: var(--ink); letter-spacing: -.04em; }
.stats dd { font-size: .75rem; margin: .4rem 0 0; }
.stats-note { font-size: .67rem; }
.about-copy h3 { font-size: 1rem; color: var(--ink); margin-top: 2rem; margin-bottom: .75rem; }
.about-copy > .text-link { margin-top: 1rem; }
.contact-section { padding-block: 7rem; }
.contact-section h2 { max-width: 800px; font-size: clamp(3.1rem, 6vw, 5rem); }
.contact-copy { max-width: 440px; color: var(--muted); margin-top: 1.5rem; }
.social-links { display: flex; align-items: flex-start; gap: 2.5rem; padding: 0; list-style: none; margin: 2rem 0 0; flex-wrap: wrap; }
.social-links a { min-height: 44px; display: inline-flex; align-items: center; gap: 1.7rem; font-size: .9rem; text-decoration: none; border-bottom: 1px solid var(--accent); }
.social-links a:hover { color: var(--accent); }
.site-footer { border-top: 1px solid var(--line); padding-block: 1.8rem; display: flex; justify-content: space-between; gap: 1rem; align-items: center; color: var(--muted); font-size: .68rem; }
.site-footer p span { display: block; margin-top: .25rem; }
.site-footer a { display: inline-flex; gap: 1rem; align-items: center; min-height: 44px; text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.reveal { transition: opacity .7s, transform .7s; }
.reveal-ready { opacity: 0; transform: translateY(18px); }
.resume-main { padding-block: 4rem 5rem; }
.resume-hero { margin-bottom: 3rem; }
.resume-hero > .eyebrow { margin-bottom: 1rem; }
.resume-hero h1 { font-size: clamp(3rem, 6vw, 4.8rem); }
.resume-intro { max-width: 600px; color: var(--muted); margin-top: 1rem; }
.resume-actions { display: flex; align-items: center; gap: 1.5rem; margin-top: 1.6rem; flex-wrap: wrap; }
.resume-sheet { padding: 3rem; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.resume-identity { display: flex; justify-content: space-between; gap: 2rem; align-items: start; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.resume-identity h2 { font-size: 2.4rem; max-width: 600px; }
.resume-identity p { margin-top: .5rem; color: var(--muted); font-size: .8rem; }
.resume-identity > p { font-size: .72rem; flex-shrink: 0; }
.resume-columns { display: grid; grid-template-columns: 2.3fr 1fr; gap: 3rem; margin-top: 2rem; }
.resume-section-title { font: 600 .7rem/1.6 var(--sans); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: 1.25rem; }
.resume-entry { margin-bottom: 1.7rem; }
.entry-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; flex-wrap: wrap; }
.resume-entry h4 { font-size: .95rem; line-height: 1.5; font-weight: 600; }
.resume-entry p, .resume-entry li, .resume-sidebar p { font-size: .8rem; color: var(--muted); }
.resume-entry .role { color: var(--ink); margin-top: .4rem; }
.resume-entry ul { padding-left: 1.2rem; margin: .7rem 0 0; }
.resume-entry li + li { margin-top: .4rem; }
.resume-entry p + p { margin-top: .25rem; }
.entry-heading p { font-size: .68rem; }
.resume-sidebar { border-left: 1px solid var(--line); padding-left: 2rem; }
.resume-sidebar section + section { margin-top: 2rem; }
.resume-sidebar .resume-section-title { margin-bottom: .65rem; }
.resume-sidebar .social-links { display: block; margin-top: 0; }
.resume-sidebar .social-links a { font-size: .78rem; }
.error-main { padding-block: 8rem; min-height: 70vh; }
.error-main .eyebrow { margin-bottom: 1rem; }
.error-main > p:not(.eyebrow) { color: var(--muted); margin: 1.5rem 0 2rem; max-width: 450px; }
@media (min-width: 1600px) { .hero { min-height: 790px; } }
@media (max-width: 900px) {
  .site-header { gap: 1rem; }
  .main-nav { gap: 1.25rem; }
  .hero { padding-block: 5rem; min-height: 650px; gap: .75rem; }
  .hero h1 { font-size: clamp(3.5rem, 7vw, 4.5rem); }
  .hero-art { margin-left: -1rem; }
  .about-grid { gap: 3rem; }
  .resume-sheet { padding: 2rem; }
  .resume-columns { gap: 2rem; }
  .resume-identity { display: block; }
}
@media (max-width: 680px) {
  .wrap { width: calc(100% - 2.5rem); }
  .site-header { min-height: 120px; flex-wrap: wrap; justify-content: space-between; padding-block: 1rem .5rem; row-gap: .4rem; }
  .brand-mark { font-size: 2.4rem; }
  .brand-name { font-size: .65rem; }
  .header-controls { margin-left: auto; }
  .main-nav { order: 3; width: 100%; justify-content: space-between; gap: .5rem; margin-left: 0; }
  .main-nav a { font-size: .75rem; }
  .hero { grid-template-columns: 1fr; padding-block: 3.5rem 2rem; gap: 2rem; }
  .hero h1 { font-size: clamp(3.1rem, 10.5vw, 4.4rem); }
  .hero-content .eyebrow { font-size: .62rem; letter-spacing: .1em; }
  .hero-intro { font-size: .95rem; }
  .hero-actions { gap: 1.3rem; }
  .hero-actions .button { padding-inline: 1.1rem; }
  .location { margin-top: 2rem; font-size: .67rem; }
  .hero-art { width: min(100%, 380px); margin-inline: auto; }
  .art-note { font-size: 1.8rem; }
  .section { padding-block: 3.8rem; }
  .section-heading { display: block; margin-bottom: 2rem; }
  .section-heading > p { margin-top: 1.25rem; max-width: none; }
  .projects-grid { grid-template-columns: 1fr; gap: 1rem; }
  .project-card { padding: 1.6rem; }
  .project-top { margin-bottom: 1.5rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-monogram { display: none; }
  .about-copy .lead { font-size: 1.08rem; }
  .stats { gap: 2.5rem; }
  .contact-section h2 { font-size: clamp(2.8rem, 10vw, 4rem); }
  .social-links { gap: 1.5rem; }
  .site-footer { align-items: start; font-size: .62rem; }
  .resume-main { padding-block: 3rem; }
  .resume-hero h1 { font-size: 3.3rem; }
  .resume-sheet { padding: 1.5rem; }
  .resume-identity h2 { font-size: 2.1rem; }
  .resume-columns { grid-template-columns: 1fr; }
  .resume-sidebar { border-left: none; border-top: 1px solid var(--line); padding: 1.5rem 0 0; }
  .resume-sidebar section + section { margin-top: 1.5rem; }
  .resume-sidebar .social-links { display: flex; }
  .error-main { padding-block: 5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal-ready { opacity: 1; transform: none; }
  .project-card:hover, .project-card:focus-within, .button:hover, .text-link:hover > span:last-child { transform: none; }
}
@page { size: A4; margin: 14mm; }
@media print {
  :root, :root[data-theme], :root:not([data-theme]) { color-scheme: light; --sans: Arial, sans-serif; --serif: Georgia, serif; --bg: white; --surface: white; --soft: white; --ink: #162831; --muted: #3c4f56; --accent: #244f43; --line: #bac5bf; }
  *, *::before, *::after { animation: none !important; transition: none !important; box-shadow: none !important; }
  body { background: white; color: #162831; font-size: 9pt; line-height: 1.45; }
  .site-header, .site-footer, .skip-link, .resume-hero { display: none !important; }
  .wrap { width: 100%; }
  .resume-main { padding: 0; }
  .resume-sheet { border: 0; border-radius: 0; padding: 0; }
  .resume-identity { display: flex; gap: 1rem; padding-bottom: 1rem; }
  .resume-identity h2 { font: 24pt/1.1 Georgia, serif; }
  .resume-identity p, .resume-entry p, .resume-entry li, .resume-sidebar p { font-size: 9pt; }
  .resume-identity > p { font-size: 8pt; }
  .resume-columns { grid-template-columns: 2.5fr 1fr; gap: 1.4rem; margin-top: 1rem; }
  .resume-sidebar { border-left: 1px solid var(--line); border-top: 0; padding: 0 0 0 1.2rem; }
  .resume-section-title { font-size: 8pt; margin-bottom: .6rem; }
  .resume-entry { margin-bottom: 1rem; break-inside: avoid; }
  .resume-entry h4 { font-size: 10pt; }
  .entry-heading { gap: .25rem; }
  .resume-sidebar section { break-inside: avoid; }
  .resume-sidebar section + section { margin-top: 1.2rem; }
  .resume-sidebar .social-links { display: block; }
  .social-links a { min-height: 0; }
  a { color: inherit; text-decoration: none; }
  .reveal-ready { opacity: 1; transform: none; }
  h3, h4 { break-after: avoid; }
  p, li { orphans: 2; widows: 2; }
}
