/* Denin — dark editorial portfolio. Fonts: Archivo + Noto Serif Display */
:root {
  --bg: #0b0b0c;
  --bg-2: #111113;
  --panel: #141416;
  --ink: #f2f0ea;
  --muted: #6f6f6f;
  --faint: #3a3a3d;
  --line: #232326;
  --accent: #e8e4d8;
  --serif: "Noto Serif Display", Georgia, serif;
  --sans: "Archivo", -apple-system, "Helvetica Neue", sans-serif;
}
* { box-sizing: border-box; }
/* fluid root: 16px up to 1280px wide, ramping to 22.4px (≈140%) at 2560px, capped above */
html { font-size: clamp(16px, 9.6px + 0.5vw, 22.4px); scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--ink); color: var(--bg); }
a { color: inherit; }
img { display: block; max-width: 100%; }

.grain {
  position: fixed; inset: 0; z-index: 120; pointer-events: none; opacity: .07;
  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'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* ── header ── */
.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem 1.5rem;
  padding: 1.4rem 2rem;
  background: linear-gradient(to bottom, rgba(11,11,12,.92), rgba(11,11,12,0));
}
.brand { text-decoration: none; line-height: 1.1; display: flex; align-items: baseline; gap: .55rem; white-space: nowrap; }
.brand-name { font-weight: 800; font-size: 1.12rem; letter-spacing: -0.01em; color: var(--ink); }
.brand-role { font-weight: 400; font-size: 1.12rem; letter-spacing: -0.01em; color: #8f8f93; }
.site-nav { font-size: 0.85rem; font-weight: 400; letter-spacing: 0.02em; }
.site-nav a { text-decoration: none; color: #8f8f93; }
.site-nav a.is-active { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.nav-sep { margin: 0 .15em; }

/* ── hero ── */
.hero { padding: 6rem 2rem 1rem; max-width: 100rem; display: grid; grid-template-columns: auto 1fr; gap: .4rem 2rem; align-items: start; }
.hero-side { display: grid; grid-template-columns: 1.35fr 1fr; gap: 2rem; align-items: start; align-self: stretch; }
.hero-title { margin: 0; line-height: .88; }
.hero-denin {
  display: block; font-weight: 800; letter-spacing: -0.045em;
  font-size: clamp(4.5rem, 14vw, 13rem);
}
.hero-hello { grid-column: 1 / -1; margin: 0 0 0.15rem 0.25rem; padding-top: 0.9rem; font-size: 1rem; color: #c9c6bd; }
.hero-bio { max-width: 30rem; color: #c9c6bd; font-size: 1rem; line-height: 1.68; margin: 0; padding-top: 0.4rem; align-self: start; }
.availability { display: grid; justify-items: center; align-content: center; gap: .72rem; padding-top: 0; text-align: center; align-self: center; }
.availability svg { width: 27px; height: 27px; color: var(--ink); }
.availability p { margin: 0; text-transform: uppercase; letter-spacing: .3em; padding-left: .3em; font-size: .62rem; line-height: 2; }

/* ── cloud ── */
.cloud-section { padding: 1rem 2rem 0; max-width: 100rem; position: relative; }
.cloud-section::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(62% 58% at 50% 46%, rgba(46, 110, 68, 0.30), transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
  mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
}
.cloud-section { padding-top: 0; }
.cloud {
  position: relative; height: 74vh; min-height: 440px; margin-top: 1rem;
  border: 0; border-radius: 0; overflow: hidden;
  background: transparent;
  cursor: crosshair; touch-action: pan-y;
}
.cloud-card {
  position: absolute; top: 0; left: 0; border-radius: 8px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
  background: #000; cursor: pointer; will-change: transform;
}
.cloud-card img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.05) contrast(1.05); }
.cloud-card:hover { border-color: rgba(255,255,255,.45); }
.cloud.is-expanded { height: auto; min-height: 0; cursor: default; }
.cloud.is-expanded .cloud-card { position: relative; transform: none !important; }
.cloud.is-expanded .cloud-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; padding: 12px; }

/* ── work / list ── */
.work {
  display: grid; grid-template-columns: minmax(280px, 5fr) 7fr;
  gap: 2.5rem; padding: 4rem 2rem; max-width: 100rem;
}
.work-left { position: relative; }
.filters { position: sticky; top: 7rem; }
.toggle { display: flex; gap: .5rem; }
.toggle-btn {
  background: transparent; border: 1px solid var(--faint); color: var(--muted);
  border-radius: 999px; padding: .45rem 1rem; font: inherit; font-size: .9rem; cursor: pointer;
}
.toggle-btn.is-on { color: var(--bg); background: var(--ink); border-color: var(--ink); }
.hover-preview { position: sticky; top: 15rem; margin: 2rem 0 0; max-width: none; }
.hover-preview img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 4px; background: #000; transition: opacity .25s; }

.list-head, .row {
  display: grid; grid-template-columns: 1fr 1fr 90px; gap: 1rem; align-items: baseline;
}
.list-head { color: var(--muted); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; padding-bottom: .6rem; }
.list-head .year-col { text-align: right; }
.project-list { list-style: none; margin: 0; padding: 0; }
.row {
  width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line);
  color: var(--muted); padding: 1rem 0; font: inherit; cursor: pointer;
  transition: color .25s, padding .25s;
}
.row:last-child { border-bottom: 1px solid var(--line); }
.row .t { font-size: 1.25rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.2; }
.row .b { font-size: 1.05rem; }
.row .y { text-align: right; font-variant-numeric: tabular-nums; }
.row:hover, .row.is-active { color: var(--ink); }
.row.is-dim { opacity: .45; }
.project-list.has-hover .row:not(.is-active) { color: #4c4c4e; }

/* ── info ── */
.info { border-top: 1px solid var(--line); padding: 4rem 2rem 0.8rem; max-width: 100rem; }
.info-grid { display: grid; grid-template-columns: 1fr auto; gap: 3.2rem; align-items: center; }
.letsdo { font-weight: 400; text-transform: uppercase; letter-spacing: -0.03em; line-height: 0.92; font-size: clamp(3.6rem, 8.4vw, 8rem); margin: 0; }
.letsdo em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.contact-block { align-self: center; justify-self: end; display: grid; gap: 0.28rem; padding-top: 0; padding-right: 1.1rem; text-align: left; justify-items: start; font-size: 0.8rem; line-height: 1.65; max-width: 26rem; }
.contact-block p { margin: 0; color: var(--ink); font-weight: 400; }
.contact-line { display: flex; align-items: baseline; justify-content: flex-start; gap: 0.64rem; flex-wrap: nowrap; }
.contact-line > * { flex-shrink: 0; }
.contact-line a { color: var(--ink); text-decoration: none; font-weight: 400; }
.contact-line a.dim { color: #8f8f93; font-size: 0.8rem; text-decoration: underline; text-underline-offset: 4px; }
.copy-btn { background: transparent; border: 0; padding: 0; color: #8f8f93; font: inherit; font-size: 0.8rem; font-weight: 400; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.copy-btn:hover { color: var(--ink); }
.contact-gap { height: 1.6rem; }
.site-foot { display: flex; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; color: var(--muted); border-top: 1px solid var(--line); margin-top: 1.9rem; padding: 0.64rem 0 0.88rem; font-size: 0.58rem; }
.site-foot a { color: var(--muted); }

/* ── center capped sections on very wide displays ── */
.hero, .cloud-section, .work, .info { margin-inline: auto; }

/* ── drawer ── */
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 80; }
.backdrop[hidden] { display: none; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 90;
  width: min(37.5rem, 100vw); background: var(--bg-2); border-left: 1px solid var(--line);
  transform: translateX(102%); transition: transform .45s cubic-bezier(.22,1,.36,1);
  overflow-y: auto; overscroll-behavior: contain;
}
.drawer.open { transform: none; }
.drawer-inner { padding: 1.2rem 1.4rem 3rem; position: relative; }
.drawer-close {
  position: sticky; top: 0; margin-left: auto; display: block;
  background: var(--ink); color: var(--bg); border: 0; width: 2.4rem; height: 2.4rem;
  border-radius: 50%; font-size: 1.4rem; cursor: pointer; z-index: 2;
}
.kicker { display: flex; gap: .6rem; align-items: center; color: var(--muted); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.pill { border: 1px solid var(--faint); border-radius: 999px; padding: .2rem .7rem; color: var(--ink); }
.drawer-title { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; margin: .8rem 0; }
.drawer-title em { font-style: italic; }
.drawer-brands { color: #c9c6bd; font-size: 1.05rem; }
.meta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 1rem 0; margin: 1.2rem 0; }
.meta-grid dt { color: var(--muted); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.meta-grid dd { margin: .25rem 0 0; }
.film-frame { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.film-frame img, .film-frame iframe, .film-frame video { width: 100%; aspect-ratio: 16/9; object-fit: cover; border: 0; display: block; background: #000; }
.film-note { color: var(--muted); font-size: .85rem; margin-top: .5rem; }
.drawer-desc { color: #d8d5cc; line-height: 1.6; margin: 1.2rem 0; }
.carousel-head { display: flex; justify-content: space-between; align-items: center; margin: 1.6rem 0 .6rem; }
.carousel-head h3 { margin: 0; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.car-btns { display: flex; gap: .5rem; }
.car-btns button { background: transparent; border: 1px solid var(--faint); color: var(--ink); border-radius: 50%; width: 2.2rem; height: 2.2rem; cursor: pointer; }
.carousel { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem; }
.carousel figure { flex: 0 0 82%; scroll-snap-align: start; margin: 0; }
.carousel img { border-radius: 8px; border: 1px solid var(--line); aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.next-btn { width: 100%; margin-top: 1.6rem; background: transparent; border: 1px solid var(--faint); color: var(--ink); border-radius: 10px; padding: .9rem; font: inherit; cursor: pointer; }
.next-btn:hover { border-color: var(--ink); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .site-head { padding: 0.9rem 1rem; flex-wrap: nowrap; gap: 0.75rem; align-items: center; }
  .brand { gap: 0.4rem; flex-shrink: 0; }
  .brand-name { font-size: 0.9rem; }
  .brand-role { font-size: 0.9rem; }
  .site-nav { font-size: 0.72rem; letter-spacing: 0.01em; white-space: nowrap; margin-left: auto; }
  .nav-sep { margin: 0 0.1em; }
  .hero, .cloud-section, .work, .info { padding-left: 1rem; padding-right: 1rem; }
  .hero { grid-template-columns: 1fr 1fr; gap: 0 1rem; align-items: start; }
  .hero-hello { grid-column: 1; grid-row: 1; margin: 0 0 0.15rem 0.1rem; padding-top: 0; font-size: 0.9rem; align-self: end; }
  .hero-title { grid-column: 1; grid-row: 2; margin: 0; align-self: start; }
  .hero-denin { font-size: 15.5vw; line-height: 0.88; }
  .hero-side { display: contents; }
  .hero-bio { grid-column: 1; grid-row: 3; max-width: none; font-size: 0.85rem; line-height: 1.6; margin: 0; padding-top: 0.6rem; }
  .availability { grid-column: 2; grid-row: 2 / span 2; align-self: center; justify-self: center; padding-top: 0; gap: 0.6rem; }
  .work { grid-template-columns: 1fr; }
  .filters { position: static; }
  .hover-preview { display: none; }
  .row .t { font-size: 1.05rem; }
  .row .b { font-size: .92rem; }
  .info-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .contact-block { align-self: start; justify-self: start; max-width: none; padding-top: 0; padding-right: 0; text-align: left; }
  .cloud { height: 54vh; min-height: 360px; margin-top: 0.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
