:root {
  --paper: #f7f9fb;
  --surface: #ffffff;
  --ink: #102a43;
  --text: #17202a;
  --muted: #5f6b76;
  --accent: #0b7285;
  --accent-2: #235ea7;
  --rust: #9a6700;
  --gold: #d9971e;
  --line: #d8e1ea;
  --band: #e8f3f6;
  --band-2: #eaf0f7;
  --panel: #102328;
  --panel-2: #16323a;
  --panel-text: #fffaf2;
  --panel-muted: #c8d6cf;
  --panel-accent: #92d7c5;
  --panel-eyebrow: #9fbccf;
  --shadow-sm: 0 6px 18px rgb(16 42 67 / 8%);
  --shadow-md: 0 18px 40px rgb(16 42 67 / 12%);
  --shadow-lg: 0 28px 60px rgb(16 42 67 / 16%);
  --focus: #0b7285;
  --focus-on-panel: #fffaf2;
  --radius: 8px;
  --radius-sm: 6px;
  --max: 1180px;
  --gutter: clamp(1rem, 3vw, 2rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1720;
    --surface: #17222e;
    --ink: #f4f7fa;
    --text: #f4f7fa;
    --muted: #a7b3bf;
    --accent: #5dc2d2;
    --accent-2: #7aa9e8;
    --rust: #e8b34f;
    --gold: #e8b34f;
    --line: #31404e;
    --band: #17222e;
    --band-2: #1d2b38;
    --panel: #0c1719;
    --panel-2: #122025;
    --shadow-sm: 0 6px 18px rgb(0 0 0 / 35%);
    --shadow-md: 0 18px 40px rgb(0 0 0 / 45%);
    --shadow-lg: 0 28px 60px rgb(0 0 0 / 52%);
    --focus: #5dc2d2;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; overflow-x: hidden; background: var(--paper); color: var(--text);
  font-family: Inter, Arial, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.0625rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; }
h1, h2, h3 { margin: 0 0 0.6rem; color: var(--ink); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
h1 { font-size: clamp(3.4rem, 9vw, 7rem); font-weight: 900; letter-spacing: -0.035em; line-height: 0.92; }
h2 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); letter-spacing: -0.03em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.2; }

.eyebrow {
  margin: 0 0 0.85rem; color: var(--accent); font-size: 0.8rem;
  font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
}
.title-line {
  margin-bottom: 1.4rem; font-size: clamp(1.4rem, 3vw, 2.3rem);
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.1;
}
.role-line {
  margin: -0.6rem 0 1.2rem; color: var(--panel-muted);
  font-size: clamp(1rem, 1.5vw, 1.15rem); font-weight: 700;
}

.skip-link {
  position: absolute; top: 0; left: 0; z-index: 100; display: inline-flex;
  min-height: 2.75rem; transform: translateY(-150%); align-items: center;
  padding: 0.5rem 1.1rem; border-radius: 0 0 var(--radius-sm) 0;
  background: var(--panel-text); box-shadow: var(--shadow-md); color: var(--panel);
  font-weight: 800; text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { border-radius: 3px; outline: 3px solid var(--focus); outline-offset: 3px; }
.site-header :focus-visible, .hero :focus-visible, .contact-section :focus-visible, .cv-hero :focus-visible {
  outline-color: var(--focus-on-panel);
}

.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid rgb(255 250 242 / 14%);
  background: var(--panel); box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex; width: min(100%, var(--max)); margin: 0 auto;
  align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.85rem var(--gutter);
}
.brand {
  display: inline-grid; width: 2.75rem; height: 2.75rem; place-items: center;
  border: 1px solid var(--panel-accent); border-radius: var(--radius-sm);
  background: var(--panel-2); color: var(--panel-text); text-decoration: none;
}
.brand-mark { font-size: 1.1rem; font-weight: 900; letter-spacing: 0.04em; }
.nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: clamp(0.5rem, 2vw, 1.4rem); }
.nav a {
  display: inline-flex; min-height: 2.75rem; align-items: center; padding: 0 0.4rem;
  border-radius: var(--radius-sm); color: var(--panel-muted); font-size: 0.95rem;
  font-weight: 700; text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.nav a:hover, .nav a[aria-current='page'] {
  background: rgb(255 250 242 / 8%); color: var(--panel-text);
}

.button {
  display: inline-flex; min-height: 3rem; align-items: center; justify-content: center;
  padding: 0.75rem 1.4rem; border: 2px solid currentColor; border-radius: var(--radius-sm);
  font-size: 1rem; font-weight: 800; text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.button.primary { border-color: var(--accent); background: var(--accent); color: var(--paper); }
.button.secondary { background: transparent; color: var(--ink); }
.button:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.hero .button.primary, .contact-section .button.primary, .cv-hero .button.primary {
  border-color: var(--panel-text);
  background: var(--panel-text);
  color: var(--panel);
}
.hero .button.secondary, .contact-section .button.secondary, .cv-hero .button.secondary {
  border-color: var(--panel-text);
  color: var(--panel-text);
}
.hero .button.secondary:hover, .contact-section .button.secondary:hover, .cv-hero .button.secondary:hover {
  background: var(--panel-text);
  color: var(--panel);
}

.hero, .cv-hero {
  display: grid; width: min(100%, var(--max)); margin: 0 auto;
  grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.72fr);
  align-items: center; gap: clamp(2rem, 6vw, 4.5rem);
  padding: clamp(3.5rem, 7vw, 6.5rem) var(--gutter) clamp(3rem, 6vw, 5rem);
  background: var(--panel); box-shadow: 0 0 0 100vmax var(--panel);
  clip-path: inset(0 -100vmax); color: var(--panel-text);
}
.hero h1, .cv-hero h1 { color: var(--panel-text); }
.hero-copy { max-width: 42rem; }
.hero .eyebrow, .cv-hero .eyebrow, .contact-section .eyebrow { color: var(--panel-eyebrow); }
.hero .title-line, .cv-hero .title-line { color: var(--panel-accent); }
.hero-text {
  max-width: 39rem; margin-bottom: 0; color: var(--panel-muted);
  font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55;
}
.hero-actions, .contact-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.hero-actions { margin-top: 1.8rem; }

.profile-panel { display: grid; width: min(100%, 22rem); justify-self: end; gap: 1rem; }
.profile-panel img {
  width: 100%; aspect-ratio: 1; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); object-fit: cover;
}
.profile-panel dl {
  display: grid; margin: 0; overflow: hidden; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm);
}
.profile-panel div { padding: 0.95rem 1.1rem; border-top: 1px solid var(--line); }
.profile-panel div:first-child { border-top: 0; }
.profile-panel dt {
  margin-bottom: 0.25rem; color: var(--muted); font-size: 0.78rem;
  font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
}
.profile-panel dd { margin: 0; color: var(--ink); font-size: 1.1rem; font-weight: 800; }

.proof-band {
  display: grid; width: min(calc(100% - 2 * var(--gutter)), var(--max));
  margin: clamp(1.6rem, 4vw, 3rem) auto; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--line); box-shadow: var(--shadow-md);
}
.proof-band div {
  min-height: 8.5rem; padding: 1.6rem clamp(1rem, 2.5vw, 1.8rem); background: var(--surface);
}
.proof-band strong {
  display: block; margin-bottom: 0.4rem; color: var(--accent);
  font-size: clamp(1.35rem, 2.6vw, 1.85rem); font-weight: 900; line-height: 1.05;
}
.proof-band span { color: var(--muted); font-weight: 600; }

.section { width: min(100%, var(--max)); margin: 0 auto; padding: clamp(3.5rem, 8vw, 6rem) var(--gutter); }
.section-heading {
  display: grid; grid-template-columns: minmax(11rem, 18rem) minmax(0, 1fr);
  align-items: baseline; gap: 2rem; margin-bottom: 2.4rem;
}
.section-heading .eyebrow { margin: 0; }

.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.work-grid.featured-first { grid-template-columns: 1fr 1fr; }
.work-card, .skill-group, .cv-side section, .cv-block {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.work-card {
  display: flex; flex-direction: column; padding: 1.5rem;
  border-top: 4px solid var(--accent);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.work-card:nth-child(even) { border-top-color: var(--accent-2); }
.work-card:nth-child(3n) { border-top-color: var(--gold); }
.work-card:hover, .skill-group:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.work-card.featured {
  grid-column: span 1; padding: 1.75rem 1.75rem 1.6rem;
  border-top-width: 5px; box-shadow: var(--shadow-md);
}
.work-card.featured:first-child { border-top-color: var(--accent); }
.work-card.featured:nth-child(2) { border-top-color: var(--accent-2); }
.work-card .card-link {
  display: inline-flex; margin-top: 0.85rem; font-weight: 800; text-decoration: none;
}
.work-card .card-link:hover { text-decoration: underline; }
.work-type {
  display: inline-block; align-self: flex-start; margin-bottom: 1rem;
  padding: 0.2rem 0.6rem; border-radius: 999px; background: rgb(217 151 30 / 14%);
  color: var(--rust); font-size: 0.74rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase;
}
.work-card p { margin-bottom: 0.9rem; color: var(--muted); }
.work-card .evidence, .work-card .result { padding-top: 0.9rem; border-top: 1px solid var(--line); }
.work-card .result { margin-top: auto; margin-bottom: 0; }
.work-card strong { color: var(--ink); }

.split-section {
  background: var(--band); box-shadow: 0 0 0 100vmax var(--band); clip-path: inset(0 -100vmax);
}
.skill-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.skill-group {
  padding: 1.5rem; transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.skill-group h3, .cv-side h2, .cv-block h2 { color: var(--accent); }
.skill-group ul, .cv-side ul, .achievement-list, .cv-role ul {
  display: grid; gap: 0.55rem; margin: 0; padding-left: 1.25rem; color: var(--muted);
}

.timeline-section {
  background: var(--band-2); box-shadow: 0 0 0 100vmax var(--band-2); clip-path: inset(0 -100vmax);
}
.timeline {
  display: grid; margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none;
}
.timeline li {
  display: grid; grid-template-columns: minmax(9rem, 14rem) minmax(0, 1fr);
  gap: 2rem; padding: 1.4rem 0.4rem; border-bottom: 1px solid var(--line);
}
.timeline span, .cv-role > span { color: var(--accent-2); font-weight: 800; }
.timeline p { margin: 0; color: var(--muted); font-weight: 700; }

.about-section {
  display: grid; grid-template-columns: minmax(11rem, 18rem) minmax(0, 1fr);
  align-items: start; gap: 2rem;
}
.about-section .section-heading { display: block; margin: 0; }
.about-copy {
  max-width: 58rem; color: var(--ink); font-size: clamp(1.08rem, 2vw, 1.25rem);
}

.contact-section {
  display: grid; width: min(100%, var(--max)); margin: 0 auto;
  grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2rem;
  padding: clamp(2.8rem, 6vw, 4.5rem) var(--gutter);
  background: var(--panel); box-shadow: 0 0 0 100vmax var(--panel);
  clip-path: inset(0 -100vmax); color: var(--panel-text);
}
.contact-section h2 { color: var(--panel-text); }
.contact-section p { max-width: 42rem; margin-bottom: 0; color: var(--panel-muted); }
.contact-actions { justify-content: flex-end; }
.contact-meta {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; margin-top: 1rem;
  color: var(--panel-muted); font-weight: 700;
}
.contact-meta a { color: var(--panel-accent); }

.cv-hero {
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
  align-items: end; padding-block: clamp(3rem, 7vw, 5rem);
}
.cv-contact {
  display: grid; grid-template-columns: 6rem minmax(0, 1fr); align-items: center;
  gap: 1.1rem; padding: 1.1rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-md); color: var(--ink);
}
.cv-contact img { width: 6rem; height: 6rem; border-radius: var(--radius-sm); object-fit: cover; }
.cv-contact p { margin: 0 0 0.3rem; font-weight: 700; }
.cv-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.cv-layout {
  display: grid; width: min(100%, var(--max)); margin: 0 auto;
  grid-template-columns: minmax(16rem, 20rem) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem); padding: clamp(3rem, 7vw, 5rem) var(--gutter);
}
.cv-side, .cv-main { display: grid; align-content: start; gap: 1.2rem; }
.cv-side section, .cv-block { padding: clamp(1.4rem, 3vw, 2rem); }
.cv-side h2, .cv-block h2 {
  margin-bottom: 1.1rem; font-size: 1.2rem; letter-spacing: -0.01em; line-height: 1.2;
}
.cv-side h3 { margin: 1rem 0 0.25rem; font-size: 1.02rem; }
.cv-side p, .cv-main p, .cv-main li { color: var(--muted); }
.achievement-list strong { color: var(--ink); }
.cv-role {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(9rem, auto);
  gap: 0.4rem 1.2rem; padding: 1.4rem 0; border-top: 1px solid var(--line);
}
.cv-role:first-of-type { padding-top: 0.2rem; border-top: 0; }
.cv-role > div > p { margin: 0; font-weight: 700; }
.cv-role > span { text-align: right; }
.cv-role ul { grid-column: 1 / -1; margin-top: 0.6rem; }
.cv-note {
  margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line);
  color: var(--ink) !important; font-weight: 800;
}

.work-page { width: min(100%, var(--max)); margin: 0 auto; padding: clamp(3rem, 7vw, 5rem) var(--gutter); }
.work-page .back { display: inline-flex; margin-bottom: 1.5rem; font-weight: 800; text-decoration: none; }
.work-page .panel {
  padding: clamp(1.6rem, 4vw, 2.4rem); border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-md);
  border-top: 5px solid var(--accent);
}
.work-page .panel h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.05; }
.work-page .boundary {
  margin-top: 1.5rem; padding: 1.1rem 1.2rem; border-left: 4px solid var(--gold);
  background: var(--band); color: var(--ink);
}

.site-footer { border-top: 1px solid var(--line); background: var(--band); color: var(--ink); }
.footer-inner {
  display: grid; width: min(100%, var(--max)); margin: 0 auto; gap: 0.8rem;
  padding: clamp(2rem, 5vw, 3rem) var(--gutter);
}
.footer-name { margin: 0; color: var(--ink); font-size: 1.05rem; font-weight: 800; }
.footer-links { display: flex; flex-wrap: wrap; gap: clamp(0.8rem, 2vw, 1.6rem); }
.footer-links a {
  display: inline-flex; min-height: 2.75rem; align-items: center; font-weight: 700;
}
.footer-copy { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.92rem; }

@media (max-width: 980px) {
  .hero, .cv-hero, .cv-layout, .section-heading, .about-section, .contact-section {
    grid-template-columns: 1fr;
  }
  .profile-panel { max-width: 30rem; justify-self: start; }
  .proof-band, .work-grid, .skill-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-card.featured { grid-column: span 1; }
  .contact-actions { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .header-inner, .nav { gap: 0.4rem; }
  .nav a { padding: 0 0.3rem; font-size: 0.86rem; }
  h1 { font-size: clamp(2.6rem, 12vw, 3.6rem); }
  .hero { padding-top: 2rem; padding-bottom: 1.5rem; }
  .proof-band, .work-grid, .skill-groups { grid-template-columns: 1fr; }
  .timeline li, .cv-role { grid-template-columns: 1fr; }
  .cv-role > span { text-align: left; }
  .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important; transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
  }
  .button, .work-card, .skill-group { transform: none !important; }
}

@media print {
  :root {
    --paper: #fff; --surface: #fff; --ink: #000; --text: #111; --muted: #333;
    --accent: #000; --accent-2: #000; --line: #ccc; --band: #fff; --band-2: #fff;
    --panel: #fff; --panel-2: #fff; --panel-text: #000; --panel-muted: #333;
    --panel-accent: #000; --panel-eyebrow: #333; --shadow-sm: none; --shadow-md: none; --shadow-lg: none;
  }
  .site-header, .skip-link, .hero-actions, .contact-actions, .cv-actions, .nav { display: none !important; }
  .hero, .cv-hero, .contact-section, .split-section, .timeline-section {
    box-shadow: none !important; clip-path: none !important; background: #fff !important; color: #000 !important;
  }
  .hero h1, .cv-hero h1, .contact-section h2, .hero .title-line, .cv-hero .title-line { color: #000 !important; }
  a { color: #000; text-decoration: none; }
  .work-card, .cv-block, .cv-side section { break-inside: avoid; box-shadow: none; }
  .site-footer { border-top: 1px solid #ccc; }
  body { font-size: 11pt; }
}
