/* ============================================================
   TOKENS: warm paper, garden-inspired accents
   ============================================================ */
:root {
  --bg: #f4eee1;
  --bg-2: #efe7d6;
  --surface: #fffbf2;
  --text: #241f18;
  --muted: #6a6353;
  --ink: #2c544c;          /* deep garden teal */
  --line: #e2d6bf;
  --accent: #c9572f;       /* terracotta */
  --accent-soft: rgba(201, 87, 47, 0.12);
  --gold: #c98a3c;
  --shadow: 0 2px 8px rgba(60, 45, 25, 0.06), 0 24px 60px -28px rgba(60, 45, 25, 0.28);
  --maxw: 1320px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}
[data-theme="dark"] {
  --bg: #14110c;
  --bg-2: #1a160f;
  --surface: #1f1810;
  --text: #efe6d4;
  --muted: #9d9180;
  --ink: #7fb3a6;
  --line: #2c2318;
  --accent: #e8794f;
  --accent-soft: rgba(232, 121, 79, 0.16);
  --gold: #d6a259;
  --shadow: 0 2px 8px rgba(0,0,0,0.4), 0 30px 70px -30px rgba(0,0,0,0.85);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .4s ease, color .4s ease;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #fff; }

/* Subtle paper grain over everything (warm, tactile depth) */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="dark"] body::after { opacity: .055; }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* ============================================================
   SHARED
   ============================================================ */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 6vw; }
.section { padding: clamp(80px, 12vh, 160px) 0; position: relative; }
.section__label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .72rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.section__label::before { content: ""; width: 26px; height: 1px; background: currentColor; }
.section__title {
  font-family: var(--serif); font-weight: 600; letter-spacing: -.02em; line-height: 1.04;
  font-size: clamp(2rem, 5.2vw, 4.2rem); max-width: 16ch;
}
.section__title .accent { color: var(--accent); }

/* line-clip wrapper (for staggered reveals) */
.line { display: block; overflow: hidden; padding-bottom: .06em; }
.line > span { display: inline-block; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 6vw;
  transition: background .35s ease, border-color .35s ease, padding .35s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--line); padding-top: 12px; padding-bottom: 12px;
}
.nav__brand { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; letter-spacing: -.01em; }
.nav__brand .accent { color: var(--accent); }
.nav__links { display: flex; gap: 28px; align-items: center; }
.nav__links a {
  font-size: .9rem; font-weight: 500; color: var(--muted); position: relative; padding: 4px 0;
  transition: color .2s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 1.5px;
  background: var(--accent); transition: width .25s ease;
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { width: 100%; }
.nav__right { display: flex; align-items: center; gap: 14px; }
.theme-toggle {
  display: grid; place-items: center; width: 38px; height: 38px;
  background: var(--surface); color: var(--muted);
  border: 1px solid var(--line); border-radius: 50%; cursor: pointer;
  transition: color .2s, border-color .2s, transform .2s;
}
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); transform: rotate(-15deg); }
.nav__burger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; }
.nav__burger span { width: 22px; height: 2px; background: var(--text); transition: transform .3s, opacity .3s; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh; display: flex; align-items: flex-start;
  padding: 100px 16px 90px; position: relative;
}
/* Soft accent glow for ambient depth around the box */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(50% 50% at 16% 28%, var(--accent-soft), transparent 70%),
    radial-gradient(48% 46% at 90% 14%, color-mix(in srgb, var(--ink) 12%, transparent), transparent 72%);
}

/* The whole hero lives in one interactive box */
.hero__box {
  position: relative; z-index: 1; width: 100%; margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 5vw, 80px);
  align-items: center; padding: clamp(24px, 3vw, 48px);
  border: 1px solid var(--line); border-radius: 28px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--surface) 65%, var(--bg)), var(--bg));
  box-shadow: var(--shadow);
  overflow: hidden;
}
/* Cursor-following light that recolors the content under it */
.hero__box::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(150px 150px at var(--bx, 50%) var(--by, -10%), var(--accent), transparent 66%);
  opacity: 0; mix-blend-mode: overlay; transition: opacity .35s ease;
}
.hero__box.is-live::after { opacity: .5; }
.hero__inner { position: relative; z-index: 2; }
.hero__art { position: relative; z-index: 2; }
.hero__meta {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; margin-bottom: 26px; background: var(--surface);
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #28c76f; flex: none;
  box-shadow: 0 0 0 0 rgba(40,199,111,.5); animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(40,199,111,.5); }
  70% { box-shadow: 0 0 0 8px rgba(40,199,111,0); }
  100% { box-shadow: 0 0 0 0 rgba(40,199,111,0); }
}
.hero__name {
  font-family: var(--serif); font-weight: 600; letter-spacing: -.03em; line-height: .98;
  font-size: clamp(3rem, 9vw, 8rem); font-optical-sizing: auto;
}
.hero__name .accent { color: var(--accent); }
.hero__role {
  margin-top: 22px; font-size: clamp(1rem, 1.5vw, 1.3rem); color: var(--muted);
  max-width: 34ch; line-height: 1.5;
}
.hero__role b { color: var(--text); font-weight: 600; }
.hero__links { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 28px; }
.hero__links a {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .92rem; font-weight: 600; color: var(--muted);
  border-bottom: 1.5px solid transparent; padding-bottom: 2px;
  transition: color .2s, border-color .2s;
}
.hero__links a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.hero__links .ico { width: 16px; height: 16px; }
.hero__cv {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 28px;
  font-size: .9rem; font-weight: 600; padding: 13px 24px; border-radius: 999px;
  background: var(--accent); color: #fff; transition: transform .2s, box-shadow .2s;
}
.hero__cv:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px var(--accent); }
/* Bare portrait cutout — no frame; stands flush on the box's bottom border */
.hero__art {
  aspect-ratio: 4/5; height: 760px;
  align-self: end; justify-self: center;
  margin-bottom: calc(-1 * clamp(24px, 3vw, 48px)); /* reach past the box padding to the border */
  transition: transform .25s cubic-bezier(.22,1,.36,1);
  transform-style: preserve-3d;
}
.hero__art img {
  position: relative; z-index: 1;
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: center bottom;
}
.hero__art figcaption {
  position: absolute; left: 14px; bottom: 12px; z-index: 2;
  font-size: .72rem; font-weight: 600; letter-spacing: .04em; color: #fff;
  background: rgba(20,15,10,.45); padding: 5px 10px; border-radius: 999px;
  backdrop-filter: blur(6px);
}
.hero__scroll {
  position: absolute; left: 6vw; bottom: 30px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.hero__scroll span { animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ============================================================
   ABOUT
   ============================================================ */
.about__lead {
  font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 3.1rem); font-weight: 500;
  line-height: 1.18; letter-spacing: -.015em; max-width: 24ch; margin-bottom: 44px;
}
.about__lead .accent { color: var(--accent); }
.about__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; max-width: 880px; }
.about__cols p { font-size: 1.06rem; color: var(--muted); }

/* ============================================================
   WORK
   ============================================================ */
.work { background: var(--bg-2); }
.work__head { display: flex; flex-wrap: wrap; gap: 12px 30px; align-items: flex-end; justify-content: space-between; margin-bottom: 40px; }

/* Expanding accordion: hover a project to blow it up; the rest stay as slim bars */
.work__panels { display: flex; flex-direction: column; gap: 12px; height: clamp(600px, 86vh, 920px); }
.panel {
  position: relative; overflow: hidden; min-height: clamp(60px, 8.5vh, 92px);
  flex: 1 1 0;
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface);
  cursor: pointer;
  transition: flex-grow .55s cubic-bezier(.22,1,.36,1), background .4s ease, box-shadow .4s ease;
}
/* Resting state: the studio (first) sits open */
.panel:first-child { flex-grow: 7; }
.panel:first-child .panel__expand { opacity: 1; }
/* Hover: shrink everything, expand the one under the cursor */
.work__panels:hover .panel { flex-grow: .2; }
.work__panels .panel:hover, .panel:focus-within { flex-grow: 8; outline: none; }
.panel:hover, .panel:focus-within { box-shadow: var(--shadow); }
.panel:hover .panel__expand, .panel:focus-within .panel__expand { opacity: 1; }
.panel--featured { background: linear-gradient(118deg, var(--accent-soft), var(--surface) 58%); }
.panel--featured .panel__name { color: var(--accent); }

/* Always-visible header bar */
.panel__bar {
  flex: none; display: flex; align-items: center; gap: 16px;
  padding: clamp(15px, 2vh, 24px) clamp(20px, 2.4vw, 34px);
}
.panel__index { font-family: var(--serif); font-size: 1.05rem; font-weight: 700; color: var(--accent); min-width: 2.4ch; }
.panel__chip {
  width: clamp(30px, 3.6vh, 42px); aspect-ratio: 1/1; flex: none;
  border-radius: 24%; object-fit: cover;
  box-shadow: 0 5px 14px -5px rgba(40, 28, 14, 0.45);
}
.panel__name { font-family: var(--serif); font-weight: 600; letter-spacing: -.02em; line-height: 1.04; font-size: clamp(1.4rem, 2.8vw, 2.6rem); }
.panel__kind { margin-left: auto; font-size: .8rem; font-weight: 600; letter-spacing: .04em; color: var(--gold); white-space: nowrap; }

/* Content revealed on expand */
.panel__expand {
  flex: 1 1 auto; min-height: 0; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 40%) 1fr; gap: clamp(20px, 2.6vw, 40px);
  padding: 0 clamp(20px, 2.4vw, 34px) clamp(20px, 2.2vh, 30px);
  opacity: 0; transition: opacity .4s ease;
}
.panel__media {
  border-radius: 14px; overflow: hidden; background: var(--bg);
  box-shadow: 0 18px 44px -22px rgba(40, 28, 14, 0.5);
}
.panel__img { width: 100%; height: 100%; object-fit: cover; }
.panel__initial { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; font-family: var(--serif); font-weight: 700; font-size: 4rem; }
.panel__text { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.panel__paras p { color: var(--muted); font-size: 1.04rem; line-height: 1.6; max-width: 52ch; }
.panel__paras p + p { margin-top: 1em; }
.panel__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.taglink {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .82rem; font-weight: 600; color: var(--text);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px;
  background: var(--surface); transition: color .2s, border-color .2s, transform .2s, background .2s;
}
.taglink:hover { color: #fff; background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.taglink--soon { color: var(--muted); border-style: dashed; cursor: default; }
.taglink--soon:hover { color: var(--muted); background: var(--surface); border-color: var(--line); transform: none; }
.taglink .ico { width: 14px; height: 14px; }
.taglink .arr { font-size: .72rem; }

/* ============================================================
   ART: horizontal rail of illustrations
   ============================================================ */
.art__head { margin-bottom: 8px; }
.art__hint { font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 16px; display: inline-flex; gap: 8px; align-items: center; }
.art-rail {
  display: flex; gap: 26px; overflow-x: auto; scroll-snap-type: x proximity;
  padding: 40px 6vw 30px; margin: 0 -6vw; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--accent) transparent;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6vw, #000 calc(100% - 6vw), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 6vw, #000 calc(100% - 6vw), transparent 100%);
}
.art-rail::-webkit-scrollbar { height: 7px; }
.art-rail::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }
.art-rail::-webkit-scrollbar-thumb:hover { background: var(--accent); }
.art-rail { cursor: grab; }
.art-rail.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.art-rail img, .art-rail video { -webkit-user-drag: none; user-select: none; }
.art-card { flex: 0 0 auto; width: min(440px, 80vw); scroll-snap-align: center; }
.art-card__media {
  border-radius: 16px; overflow: hidden; aspect-ratio: 3/4; background: var(--surface);
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.art-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.22,1,.36,1); }
.art-card__img--contain { object-fit: contain; padding: 9%; }
.art-card:hover .art-card__img { transform: scale(1.05); }
.art-card__cap { padding: 14px 4px 0; }
.art-card__project { display: block; font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 3px; }
.art-card__title { font-family: var(--serif); font-size: 1.15rem; font-weight: 500; }

/* ============================================================
   DESIGN: brand & product work grid
   ============================================================ */
.design-grid {
  display: grid; gap: 18px; margin-top: 40px;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.dcard {
  border-radius: 14px; overflow: hidden; background: var(--bg);
  border: 1px solid var(--line);
}
.dcard__img { width: 100%; aspect-ratio: 1/1; object-fit: contain; background: var(--bg); transition: transform .5s cubic-bezier(.22,1,.36,1); }
.dcard:hover .dcard__img { transform: scale(1.04); }
.dcard__cap { padding: 10px 12px; font-size: .76rem; color: var(--muted); border-top: 1px solid var(--line); }

/* ============================================================
   CAPABILITIES: skills / experience / languages
   ============================================================ */
.caps { background: var(--bg-2); }
.caps__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 6vw; margin-top: 40px; }
.caps__sub { font-size: .72rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); margin-bottom: 18px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 44px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; font-size: .86rem;
  padding: 9px 15px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); cursor: default;
}
.chip.is-featured { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.chip .ico { width: 15px; height: 15px; }
.path { list-style: none; }
.path__item { display: grid; grid-template-columns: 120px 1fr; gap: 4px 18px; padding: 16px 0; border-top: 1px solid var(--line); }
.path__period { grid-row: span 2; font-size: .82rem; font-weight: 600; color: var(--muted); padding-top: 2px; }
.path__role { font-weight: 600; font-size: 1.02rem; }
.path__org { font-size: .9rem; color: var(--muted); }
.lang { margin-bottom: 18px; }
.lang__top { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: .92rem; }
.lang__lvl { color: var(--muted); }
.lang__bar { height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; }
.lang__bar span { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--gold)); transition: width 1.1s cubic-bezier(.22,1,.36,1); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { text-align: center; padding-bottom: clamp(60px, 9vh, 120px); }
.contact__title { font-family: var(--serif); font-weight: 600; letter-spacing: -.02em; line-height: 1; font-size: clamp(2.6rem, 8vw, 6.5rem); }
.contact__title .accent { color: var(--accent); }
.contact__email {
  display: inline-block; margin-top: 30px; font-size: clamp(1.1rem, 2.4vw, 1.7rem); font-weight: 600;
  border-bottom: 2px solid var(--accent); padding-bottom: 4px; transition: color .2s;
}
.contact__email:hover { color: var(--accent); }
.contact__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 26px; margin-top: 34px; }
.contact__links a { display: inline-flex; align-items: center; gap: 8px; font-size: .95rem; font-weight: 500; color: var(--muted); transition: color .2s; }
.contact__links a:hover { color: var(--accent); }
.contact__links .ico { width: 16px; height: 16px; }
.contact__cv {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 34px;
  font-size: .9rem; font-weight: 600; padding: 13px 24px; border-radius: 999px;
  background: var(--accent); color: #fff; transition: transform .2s, box-shadow .2s;
}
.contact__cv:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px var(--accent); }
.contact__foot { margin-top: 60px; font-size: .82rem; color: var(--muted); }

/* slim footer */
.siteft { padding: 34px 0; border-top: 1px solid var(--line); background: var(--bg-2); }
.siteft__row { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.siteft__copy { font-size: .82rem; color: var(--muted); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav.is-open .nav__links {
    display: flex; flex-direction: column; gap: 18px;
    position: absolute; top: 100%; left: 0; right: 0; padding: 24px 6vw 30px;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav__burger { display: flex; }
  .hero { padding-top: 116px; }
  .hero__box { grid-template-columns: 1fr; gap: 30px; padding: 26px; }
  .hero__art { height: clamp(440px, 64vh, 560px); }
  .hero__art { max-width: 380px; margin: 0 auto; width: 100%; }
  .about__cols { grid-template-columns: 1fr; gap: 22px; }
  /* Accordion -> static stacked cards (no hover on touch) */
  .work__panels { height: auto; gap: 18px; }
  .panel { flex: none; min-height: 0; }
  .panel:first-child { flex-grow: 0; }
  /* Let the bar wrap so the long "kind" label never forces the panel wider than the screen */
  .panel__bar { flex-wrap: wrap; gap: 10px 14px; }
  .panel__name { min-width: 0; }
  .panel__kind { margin-left: 0; flex-basis: 100%; }
  /* minmax(0,…) lets the column shrink so paragraphs wrap instead of being clipped */
  .panel__expand { opacity: 1; grid-template-columns: minmax(0, 1fr); padding: 0 22px 24px; gap: 18px; }
  .panel__media { aspect-ratio: 16/10; }
  .panel__paras p { max-width: 100%; overflow-wrap: anywhere; }
  /* Rails: drop the desktop -6vw edge bleed that overflowed the viewport on phones */
  .art-rail { margin-left: 0; margin-right: 0; }
  .caps__grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .status-dot, .hero__scroll span { animation: none; }
  * { scroll-behavior: auto !important; }
}
