*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #eef1f4;
  --bg-deep: #e4e9ef;
  --paper: #f7f9fb;
  --ink: #1a222c;
  --muted: #5a6573;
  --rule: #c5ced8;
  --accent: #2f5f6b;
  --accent-soft: rgba(47, 95, 107, 0.14);
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Sora", "Segoe UI", system-ui, sans-serif;
  --space: clamp(1.25rem, 3vw, 2.25rem);
  --space-lg: clamp(3rem, 8vw, 6rem);
  --max: 72rem;
  --narrow: 40rem;
  --radius: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 17px;
}

body {
  margin: 0;
  background:
    radial-gradient(ellipse 120% 80% at 10% -10%, #dce6ec 0%, transparent 55%),
    radial-gradient(ellipse 90% 60% at 100% 20%, #d5dde6 0%, transparent 50%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration: none;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.75rem;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.85rem;
}

.skip-link:focus {
  left: 0.75rem;
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--paper);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.04);
  animation: heroKen 18s ease-out forwards;
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(12, 18, 24, 0.35) 0%,
      rgba(12, 18, 24, 0.55) 45%,
      rgba(12, 18, 24, 0.82) 100%
    );
}

.hero__grain {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: flex-end;
  padding: var(--space);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 400;
}

.nav a {
  color: rgba(247, 249, 251, 0.88);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 0.15rem;
  transition: border-color 0.25s ease, opacity 0.25s ease;
}

.nav a:hover {
  border-bottom-color: rgba(247, 249, 251, 0.7);
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: var(--space-lg) var(--space) var(--space);
  max-width: 40rem;
  opacity: 0;
  transform: translateY(1.25rem);
  animation: heroIn 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.25s forwards;
}

.hero__place {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(247, 249, 251, 0.7);
}

.hero__name {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.75rem, 8vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero__line {
  margin: 0 0 1.75rem;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  line-height: 1.55;
  color: rgba(247, 249, 251, 0.88);
  max-width: 32rem;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.2rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn--primary {
  background: var(--paper);
  color: var(--ink);
}

.btn--primary:hover {
  background: transparent;
  color: var(--paper);
  border-color: rgba(247, 249, 251, 0.65);
}

.btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: rgba(247, 249, 251, 0.45);
}

.btn--ghost:hover {
  border-color: var(--paper);
  background: rgba(247, 249, 251, 0.08);
}

.hero__line-draw {
  position: relative;
  z-index: 1;
  color: rgba(247, 249, 251, 0.45);
  line-height: 0;
}

.hero__line-draw svg {
  width: 100%;
  height: 48px;
  display: block;
}

.draw-path {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: drawLine 2.4s ease-out 0.8s forwards;
}

/* ——— Sections ——— */
.section {
  padding: var(--space-lg) 0;
}

.section__inner {
  width: min(100% - 2 * var(--space), var(--max));
  margin-inline: auto;
}

.section__inner.narrow {
  width: min(100% - 2 * var(--space), var(--narrow));
}

.section__label {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.section__head {
  margin-bottom: clamp(2rem, 5vw, 3rem);
  max-width: 36rem;
}

.section__head h2 {
  margin: 0 0 0.6rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
}

.section__head p {
  margin: 0;
  color: var(--muted);
}

.lede {
  margin: 0;
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  line-height: 1.55;
  font-family: var(--serif);
  font-weight: 400;
}

.section--intro {
  padding-top: var(--space-lg);
  border-bottom: 1px solid var(--rule);
}

.section--method {
  background: var(--bg-deep);
  border-block: 1px solid var(--rule);
}

/* ——— Work ——— */
.work {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  border-top: 1px solid var(--rule);
}

.work:first-of-type {
  border-top: none;
  padding-top: 0;
}

.work__meta {
  max-width: 38rem;
  margin-bottom: 1.75rem;
}

.work__tag {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}

.work__meta h3 {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.5vw, 2.15rem);
  letter-spacing: -0.015em;
}

.work__year {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.work__meta p {
  margin: 0 0 0.85rem;
}

.work__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 0.5rem !important;
}

.work__figure {
  margin: 0 0 1.5rem;
}

.work__figure video,
.work__figure img {
  width: 100%;
  background: #0e141a;
}

.work__figure figcaption,
.gallery figcaption {
  margin-top: 0.55rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.work__figure--secondary {
  margin-top: 1.25rem;
}

.embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #0e141a;
}

.embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.gallery {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
}

.gallery figure {
  margin: 0;
  overflow: hidden;
  background: var(--paper);
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery figure:hover img {
  transform: scale(1.03);
}

.gallery--plotter {
  grid-template-columns: 1fr 1fr;
}

.gallery--oracle {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 720px) {
  .gallery--plotter,
  .gallery--oracle {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .gallery--oracle {
    grid-template-columns: 1fr;
  }
}

/* ——— Method ——— */
.pipeline {
  list-style: none;
  margin: 0 0 3rem;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.pipeline li {
  margin: 0;
  padding: 1.35rem 1.25rem;
  background: var(--paper);
}

.pipeline strong {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

@media (min-width: 800px) {
  .pipeline {
    grid-template-columns: repeat(3, 1fr);
  }
}

.interests h3 {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.35rem;
}

.interests ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--ink);
}

.interests li {
  margin-bottom: 0.45rem;
}

/* ——— CV ——— */
.cv-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 800px) {
  .cv-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.cv-grid h3 {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.25rem;
}

.cv-grid h3 + .cv-list {
  margin-top: 0;
}

.cv-grid h3:not(:first-child) {
  margin-top: 2rem;
}

.cv-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cv-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.95rem;
  color: var(--muted);
}

.cv-list li span {
  display: block;
  color: var(--ink);
  font-weight: 400;
  margin-bottom: 0.15rem;
}

.cv-list--compact li {
  padding: 0.55rem 0;
}

/* ——— Contact ——— */
.section--contact {
  padding-bottom: calc(var(--space-lg) + 1rem);
}

.contact-list {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
}

.contact-list li {
  margin-bottom: 0.65rem;
  font-size: 1.05rem;
}

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 1.5rem var(--space);
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

/* ——— Motion: reveal ——— */
.reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition:
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero__image,
  .hero__content,
  .draw-path,
  .reveal,
  .gallery img {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
  }
}

@keyframes heroIn {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes heroKen {
  to {
    transform: scale(1);
  }
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}
