:root {
  color-scheme: dark;
  --bg: #111311;
  --bg-soft: #171a17;
  --surface: #1d201d;
  --surface-2: #242824;
  --text: #f2efe8;
  --muted: #abaea6;
  --line: rgba(242, 239, 232, .14);
  --accent: #df7d4e;
  --accent-light: #f2a277;
  --max: 1240px;
  --radius: 3px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 86% 7%, rgba(223, 125, 78, .10), transparent 24rem),
    var(--bg);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  z-index: 20;
}

img { display: block; width: 100%; height: auto; }
button, input { font: inherit; }
a { color: inherit; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  padding: .65rem 1rem;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-180%);
  z-index: 100;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: .8rem clamp(1rem, 4vw, 4rem);
  border-bottom: 1px solid var(--line);
  background: rgba(17, 19, 17, .86);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  font-size: .84rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--bg);
  background: var(--text);
  font-weight: 800;
  letter-spacing: -.05em;
}

nav { display: flex; gap: clamp(1rem, 2.5vw, 2.3rem); }
nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: .84rem;
  transition: color .2s ease;
}
nav a:hover, nav a:focus-visible { color: var(--text); }

.hero {
  width: min(calc(100% - 2rem), var(--max));
  min-height: calc(100svh - 72px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(360px, .72fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: center;
  padding: clamp(3rem, 7vw, 7rem) 0;
}

.hero-copy { padding-top: 2rem; }
.eyebrow {
  margin: 0 0 1.35rem;
  color: var(--accent-light);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .18em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1, h2, h3, p { overflow-wrap: anywhere; }
h1 {
  max-width: 830px;
  margin: 0;
  font-size: clamp(3rem, 7vw, 6.9rem);
  font-weight: 500;
  letter-spacing: -.065em;
  line-height: .92;
}

h1 em {
  display: inline-block;
  color: var(--accent-light);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.hero-intro {
  max-width: 690px;
  margin: 2.25rem 0 0;
  color: #d0d2cc;
  font-size: clamp(1.08rem, 1.8vw, 1.35rem);
  line-height: 1.55;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: .75rem 1.15rem;
  border: 1px solid var(--line);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 700;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.button:hover, .button:focus-visible { transform: translateY(-2px); }
.button-primary { color: var(--bg); background: var(--text); }
.button-ghost { color: var(--text); background: transparent; }
.button-ghost:hover { background: var(--surface); }

.skill-line {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.4rem;
  margin: 2.25rem 0 0;
  padding: 1.15rem 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  list-style: none;
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.skill-line li::before { content: "•"; margin-right: .55rem; color: var(--accent); }

.hero-visual { margin: 0; }
.hero-visual .image-button {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--surface);
}
.hero-visual .image-button::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,.15);
  pointer-events: none;
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual figcaption,
.output-card figcaption,
.qa-card figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .75rem;
  color: var(--muted);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.manifesto {
  border-block: 1px solid var(--line);
  padding: clamp(3rem, 6vw, 6rem) max(1rem, calc((100vw - var(--max)) / 2));
  background: var(--bg-soft);
}
.manifesto p {
  max-width: 1100px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 4.1vw, 4.4rem);
  letter-spacing: -.035em;
  line-height: 1.12;
}
.manifesto strong { color: var(--accent-light); font-weight: 400; }

.section {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
  padding: clamp(5rem, 10vw, 10rem) 0;
}
.section + .section { border-top: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: .55fr 1.1fr; gap: 1rem 4rem; margin-bottom: clamp(2.5rem, 5vw, 5rem); }
.section-heading .eyebrow { grid-column: 1; }
.section-heading h2 { grid-column: 2; grid-row: 1 / span 2; }
.section-heading > p:last-child { grid-column: 2; }
h2 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 5rem);
  font-weight: 500;
  letter-spacing: -.05em;
  line-height: 1.02;
}
h3 { margin: 0; font-size: 1.15rem; line-height: 1.3; }
.section-heading > p:last-child,
.reference-copy > p,
.quality-copy > p {
  max-width: 700px;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.project-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); }
.project-grid article { min-height: 250px; padding: 1.5rem; border-right: 1px solid var(--line); }
.project-grid article:last-child { border-right: 0; }
.project-grid .number { display: block; margin-bottom: 4rem; color: var(--accent-light); font-size: .72rem; letter-spacing: .14em; }
.project-grid p { margin: 1rem 0 0; color: var(--muted); font-size: .9rem; }

.reference { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2.5rem, 7vw, 7rem); align-items: center; }
.reference-media { background: #dfdedb; }
.reference-copy h2 { font-size: clamp(2.2rem, 4.2vw, 4.5rem); }
.reference-list { margin: 2.5rem 0 0; border-top: 1px solid var(--line); }
.reference-list > div { display: grid; grid-template-columns: .42fr 1fr; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.reference-list dt { color: var(--text); font-size: .82rem; font-weight: 700; text-transform: uppercase; }
.reference-list dd { margin: 0; color: var(--muted); }

.image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: zoom-in;
  color: inherit;
  background: transparent;
}
.image-button:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 4px; }

.model-board { position: relative; }
.board-note {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .9rem;
  color: var(--bg);
  background: rgba(242, 239, 232, .93);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}
.board-note span { font-family: Georgia, "Times New Roman", serif; font-size: 1.65rem; font-weight: 400; }

.output-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  margin-top: 1.2rem;
}
.output-card { margin: 0; padding: 1rem; border: 1px solid var(--line); background: var(--bg-soft); }
.output-card .image-button { aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface); }
.output-card img { height: 100%; object-fit: cover; }
.output-wide { grid-column: 1 / -1; }
.output-wide .image-button { aspect-ratio: 16 / 9; }
.output-wide img { object-position: 50% 37%; }
.output-card small { color: var(--accent-light); font-size: inherit; }

.quality { display: grid; grid-template-columns: .72fr 1fr; gap: clamp(3rem, 7vw, 7rem); }
.quality-copy { position: sticky; top: 110px; align-self: start; }
.quality-copy h2 { font-size: clamp(2.7rem, 5vw, 5rem); }
.quality-tags { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 2rem; }
.quality-tags span { padding: .45rem .65rem; border: 1px solid var(--line); color: #d4d5d0; font-size: .76rem; }

.comparison { grid-column: 2; }
.comparison-stage { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface); user-select: none; }
.comparison-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.comparison-after-wrap { position: absolute; inset: 0; overflow: hidden; clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.comparison-after { width: 100%; max-width: none; }
.comparison-line { position: absolute; top: 0; bottom: 0; left: var(--split); width: 2px; background: white; transform: translateX(-1px); box-shadow: 0 0 0 1px rgba(0,0,0,.2); pointer-events: none; }
.comparison-handle { position: absolute; top: 50%; left: 50%; width: 52px; height: 52px; border: 2px solid white; border-radius: 50%; background: rgba(17,19,17,.72); transform: translate(-50%, -50%); backdrop-filter: blur(5px); cursor: ew-resize; pointer-events: auto; touch-action: none; transition: width .18s ease, height .18s ease, background .18s ease, box-shadow .18s ease; }
.comparison-handle::before { content: "↔"; position: absolute; inset: 0; display: grid; place-items: center; color: white; font-size: 1.15rem; }
.comparison-handle:hover,
.comparison-handle:focus-visible,
.comparison.is-dragging .comparison-handle { width: 58px; height: 58px; background: rgba(223,125,78,.92); box-shadow: 0 0 0 6px rgba(255,255,255,.14); outline: none; }
.comparison-label { position: absolute; top: 1rem; padding: .4rem .6rem; color: var(--bg); background: rgba(242,239,232,.9); font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.comparison-label-before { left: 1rem; }
.comparison-label-after { right: 1rem; }
.comparison input { width: 100%; margin: 1rem 0 0; accent-color: var(--accent); cursor: ew-resize; }
.comparison-help { margin: .35rem 0 0; color: var(--muted); font-size: .8rem; }

.qa-grid { grid-column: 1 / -1; display: grid; grid-template-columns: 1.25fr .75fr; gap: 1.2rem; margin-top: 2rem; }
.qa-card { margin: 0; padding: 1rem; border: 1px solid var(--line); background: var(--bg-soft); }
.qa-card .image-button { overflow: hidden; background: var(--surface); }
.qa-card:first-child .image-button { aspect-ratio: 16 / 9; }
.qa-card:last-child .image-button { aspect-ratio: 1 / 1; }
.qa-card img { height: 100%; object-fit: cover; }
.qa-card figcaption { flex-direction: column; gap: .1rem; }
.qa-card figcaption strong { color: var(--text); }

.workflow-list { margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.workflow-list li { display: grid; grid-template-columns: .4fr 1fr; gap: 2rem; padding: 2rem 0; border-bottom: 1px solid var(--line); }
.workflow-list li > span { color: var(--accent-light); font-family: Georgia, "Times New Roman", serif; font-size: 2rem; }
.workflow-list p { max-width: 710px; margin: .5rem 0 0; color: var(--muted); }

.fit-table { border: 1px solid var(--line); }
.fit-row { display: grid; grid-template-columns: .46fr 1fr; gap: 2rem; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--line); }
.fit-row:last-child { border-bottom: 0; }
.fit-row strong { font-size: .95rem; }
.fit-row span { color: var(--muted); }
.fit-head { color: var(--accent-light); background: var(--bg-soft); font-size: .72rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }

.motivation { display: grid; grid-template-columns: 1.1fr .7fr; gap: clamp(3rem, 8vw, 8rem); align-items: start; }
.motivation-copy h2 { max-width: 860px; }
.motivation-copy > p:not(.eyebrow) { max-width: 780px; margin: 1.2rem 0 0; color: var(--muted); }
.motivation-copy .motivation-lead { color: var(--text); font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.55; }
.motivation-aside { position: sticky; top: 110px; padding: clamp(1.5rem, 3vw, 2.5rem); border: 1px solid var(--line); background: var(--bg-soft); }
.motivation-aside blockquote { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.6rem, 3vw, 2.65rem); line-height: 1.25; }
.quote-author { margin: 1.2rem 0 0; color: var(--accent-light); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.motivation-points { margin: 2.5rem 0 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.motivation-points li { display: grid; grid-template-columns: 2rem 1fr; gap: .6rem; padding: .9rem 0; border-bottom: 1px solid var(--line); color: #d0d2cc; font-size: .88rem; }
.motivation-points span { color: var(--accent-light); font-family: Georgia, "Times New Roman", serif; }

.cv-layout { display: grid; grid-template-columns: 1.35fr .65fr; gap: clamp(3rem, 7vw, 7rem); align-items: start; }
.timeline { border-top: 1px solid var(--line); }
.timeline-entry { display: grid; grid-template-columns: .28fr 1fr; gap: 1.5rem; padding: 2rem 0; border-bottom: 1px solid var(--line); }
.timeline-period { margin: 0; color: var(--accent-light); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.35rem, 2.5vw, 2rem); line-height: 1.2; }
.timeline-kicker { margin: 0 0 .45rem; color: var(--muted); font-size: .73rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.timeline-entry h3 { font-size: clamp(1.3rem, 2vw, 1.8rem); }
.timeline-entry div > p:last-child { max-width: 720px; margin: .8rem 0 0; color: var(--muted); }
.cv-competencies { padding: 1.5rem; border: 1px solid var(--line); background: var(--bg-soft); }
.competency-block + .competency-block { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.competency-label { margin: 0 0 1rem; color: var(--accent-light); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.competency-block ul { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.competency-block li { padding: .42rem .58rem; border: 1px solid var(--line); color: #d4d5d0; font-size: .76rem; }

footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 2rem;
  align-items: end;
  padding: 3rem max(1rem, calc((100vw - var(--max)) / 2));
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #0d0f0d;
  font-size: .78rem;
}
footer div { display: flex; flex-direction: column; gap: .15rem; }
footer strong { color: var(--text); font-size: 1rem; }
footer p { margin: 0; }
footer a { color: var(--text); text-decoration: none; }

.lightbox {
  width: min(94vw, 1200px);
  max-height: 92vh;
  padding: 1rem;
  border: 1px solid var(--line);
  color: var(--text);
  background: #0c0e0c;
}
.lightbox::backdrop { background: rgba(0,0,0,.86); backdrop-filter: blur(5px); }
.lightbox img { max-height: calc(92vh - 5rem); object-fit: contain; }
.lightbox p { margin: .75rem 3.5rem .1rem 0; color: var(--muted); font-size: .85rem; }
.lightbox-close { position: absolute; top: .75rem; right: .75rem; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; color: var(--text); background: rgba(17,19,17,.85); cursor: pointer; font-size: 1.7rem; line-height: 1; }

.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; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  h1 { font-size: clamp(3.4rem, 8.5vw, 5.5rem); }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .project-grid article:nth-child(2) { border-right: 0; }
  .project-grid article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .reference { gap: 3rem; }
  .quality { grid-template-columns: 1fr; }
  .quality-copy { position: static; }
  .comparison { grid-column: 1; }
  .motivation { grid-template-columns: 1fr; }
  .motivation-aside { position: static; max-width: 720px; }
  .cv-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-header { min-height: 64px; }
  .brand-name { display: none; }
  nav { gap: .8rem; }
  nav a { font-size: .74rem; }
  nav a:nth-child(2) { display: none; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding-top: 3.5rem; }
  .hero-copy { padding-top: 0; }
  h1 { font-size: clamp(3rem, 15vw, 5rem); }
  .hero-visual { width: min(100%, 560px); margin-left: auto; }
  .section-heading { grid-template-columns: 1fr; }
  .section-heading .eyebrow,
  .section-heading h2,
  .section-heading > p:last-child { grid-column: 1; grid-row: auto; }
  .project-grid { grid-template-columns: 1fr; }
  .project-grid article { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .project-grid article:last-child { border-bottom: 0; }
  .project-grid .number { margin-bottom: 2rem; }
  .reference { grid-template-columns: 1fr; }
  .reference-media { order: 2; }
  .reference-copy { order: 1; }
  .output-grid, .qa-grid { grid-template-columns: 1fr; }
  .output-wide { grid-column: 1; }
  .output-wide .image-button { aspect-ratio: 4 / 5; }
  .output-wide img { object-position: center; }
  .workflow-list li { grid-template-columns: 68px 1fr; gap: 1rem; }
  .fit-row { grid-template-columns: 1fr; gap: .4rem; }
  .fit-head { display: none; }
  .timeline-entry { grid-template-columns: 1fr; gap: .75rem; }
  footer { grid-template-columns: 1fr; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1; transform: none; }
}
