/* Dana Shaker — portfolio
   Brand: black canvas, white type, DS. mark, wide geometric sans. */

:root {
  --bg: #000;
  --fg: #fff;
  --fg-soft: #ccc;
  --fg-mute: #a9a9a9;
  --line: rgba(255, 255, 255, 0.16);
  --font: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 2.4vw, 32px);
  --gap: clamp(10px, 1.2vw, 16px);
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.35s var(--ease) both; }
::view-transition-new(root) { animation: vt-in 0.5s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--fg); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ───────── Scroll progress ───────── */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60;
  background: var(--fg); transform-origin: 0 50%; transform: scaleX(0);
  pointer-events: none;
}

/* ───────── Header ───────── */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 var(--gutter);
  background: rgba(0, 0, 0, 0.82);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: transform 0.5s var(--ease);
  view-transition-name: site-header;
}
.site-header.is-hidden { transform: translateY(-100%); }
.nav { display: flex; gap: clamp(16px, 2vw, 26px); }
.nav a, .menu a.menu-link {
  font-size: 13px; font-weight: 600; color: var(--fg-mute);
  position: relative; padding: 6px 0; transition: color 0.3s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform 0.45s var(--ease);
}
.nav a:hover, .nav a.is-active { color: var(--fg); }
.nav a:hover::after { transform: scaleX(1); transform-origin: 0 50%; }
.logo { display: block; width: 64px; height: 64px; transition: opacity 0.3s; }
.logo:hover { opacity: 0.75; }
.logo img { width: 100%; height: 100%; object-fit: contain; }
.social { display: flex; justify-content: flex-end; gap: 6px; list-style: none; margin: 0; padding: 0; }
.social a {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  transition: background 0.3s, color 0.3s;
}
.social a:hover { background: var(--fg); color: var(--bg); }
.social svg { width: 17px; height: 17px; fill: currentColor; }

.menu-toggle { display: none; width: 34px; height: 34px; position: relative; justify-self: start; }
.menu-toggle span {
  position: absolute; left: 6px; right: 6px; height: 1.5px; background: var(--fg);
  transition: transform 0.4s var(--ease), top 0.4s var(--ease);
}
.menu-toggle span:nth-child(1) { top: 13px; }
.menu-toggle span:nth-child(2) { top: 20px; }
.menu-open .menu-toggle span:nth-child(1) { top: 16.5px; transform: rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { top: 16.5px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 45; background: var(--bg);
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  padding: var(--header-h) var(--gutter) 40px;
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path 0.6s var(--ease), visibility 0s 0.6s;
}
.menu-open .menu { clip-path: inset(0); visibility: visible; transition: clip-path 0.6s var(--ease); }
.menu a.menu-link { font-size: clamp(34px, 11vw, 56px); font-weight: 600; color: var(--fg); line-height: 1.15; }
.menu .social { justify-content: flex-start; margin-top: 28px; }

@media (max-width: 720px) {
  :root { --header-h: 60px; }
  .site-header .nav, .site-header .social { display: none; }
  .menu-toggle { display: block; }
  .site-header > .spacer { display: block; }
}
.spacer { display: none; }

main { padding-top: var(--header-h); }

/* ───────── Reveal primitives (only when JS is running) ───────── */
.js .line { display: block; overflow: hidden; }
.js .line > span { display: block; transform: translateY(105%); transition: transform 1s var(--ease); transition-delay: calc(var(--i, 0) * 70ms + 120ms); }
.js .is-ready .line > span, .js .in .line > span { transform: none; }

.js .word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.js .word > span { display: inline-block; transform: translateY(110%); transition: transform 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 28ms + 150ms); }
.js .is-ready .word > span { transform: none; }

.js .fade-up { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.js .fade-up.in, .js .is-ready .fade-up.on-load { opacity: 1; transform: none; }

/* ───────── Home hero: full-bleed project reel ───────── */
.home main { padding-top: 0; }
.home .site-header { transition: transform 0.5s var(--ease), background 0.4s; }
.home .site-header:not(.is-solid) { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.hero { position: relative; height: 100vh; height: 100svh; min-height: 520px; overflow: hidden; background: #0a0a0a; isolation: isolate; }
.slides { position: absolute; inset: 0; will-change: transform; }
.slide { position: absolute; inset: 0; display: block; overflow: hidden; visibility: hidden; z-index: 0; }
.slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); }
.slide.is-prev { visibility: visible; z-index: 1; }
.slide.is-active { visibility: visible; z-index: 2; }
.js .slide.is-active { animation: slide-in 1.3s var(--ease) both; }
.js .slide.is-active.from-below { animation-name: slide-in; }
.js .slide.is-active.from-above { animation-name: slide-in-rev; }
.js .slide.is-active img { animation: slide-zoom 7s linear both; }
.js .slide.is-prev img { transform: scale(1); }
@keyframes slide-in { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0); } }
@keyframes slide-in-rev { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
@keyframes slide-zoom { from { transform: scale(1.14); } to { transform: scale(1); } }
.hero-shade { position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(to bottom, rgba(0,0,0,0.45) 0, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 52%, rgba(0,0,0,0.72) 100%); }
.hero-ui { position: absolute; inset: auto 0 0 0; z-index: 4; display: flex; justify-content: flex-end; align-items: flex-end; gap: 24px; padding: 0 var(--gutter) clamp(22px, 4vh, 40px); pointer-events: none; }
.hero-ui > * { pointer-events: auto; }
.hero-side { display: grid; justify-items: end; gap: 14px; text-align: right; }
.hero-current { display: grid; gap: 2px; }
.hero-current .t { font-size: clamp(22px, 2.6vw, 34px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.hero-current .c { font-size: 13px; color: rgba(255, 255, 255, 0.82); }
.hero-current .t, .hero-current .c { transition: opacity 0.4s, transform 0.6s var(--ease); }
.hero-current.is-swapping .t, .hero-current.is-swapping .c { opacity: 0; transform: translateY(10px); }
.hero-nav { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hero-nav button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.5); display: grid; place-items: center; transition: background 0.3s, color 0.3s; }
.hero-nav button:hover { background: var(--fg); color: var(--bg); }
.hero-nav button svg { width: 14px; height: 14px; }
.hero-nav .reel-prev svg { transform: rotate(-90deg); } .hero-nav .reel-next svg { transform: rotate(90deg); }
.hero-bar { position: absolute; inset: auto 0 0 0; z-index: 5; height: 2px; background: rgba(255, 255, 255, 0.18); }
.hero-bar i { display: block; height: 100%; background: var(--fg); transform-origin: 0 50%; transform: scaleX(0); }
.hero-bar i.run { animation: bar var(--dur, 5s) linear both; }
@keyframes bar { to { transform: scaleX(1); } }
@media (max-width: 720px) {
  .hero-ui { flex-direction: column; align-items: stretch; gap: 20px; }
  .hero-side { justify-items: start; text-align: left; grid-template-columns: 1fr auto; align-items: end; }
}

/* ───────── About: pinned, scroll-driven, black → white ───────── */
.about { position: relative; background: var(--bg); }
.about-pin { position: relative; }
.about-layer { display: flex; flex-direction: column; justify-content: space-between; gap: clamp(32px, 6vh, 64px); padding: calc(var(--header-h) + 18px) var(--gutter) clamp(28px, 5vh, 56px); background: var(--bg); color: var(--fg); }
.about-layer.is-light { display: none; background: #fff; color: #000; }
.about-top, .about-foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: 13px; font-weight: 600; }
.about-name { margin: 0; font-size: 13px; font-weight: 600; }
.about-text { margin: 0; max-width: 17ch; font-size: clamp(42px, 7.4vw, 124px); font-weight: 600; line-height: 1; letter-spacing: -0.045em; }
.about-text .w { display: inline-block; will-change: opacity, transform; }
.about-layer.is-light .btn { border-color: #000; }
.about-layer.is-light .btn::before { background: #000; }
.about-layer.is-light .btn:hover { color: #fff; }
.js .about { height: 220vh; }
.js .about-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.js .about-layer { position: absolute; inset: 0; }
.js .about-layer.is-dark .about-foot .btn { opacity: 0; pointer-events: none; transition: opacity 0.6s, color 0.4s; }
.js .about.is-done .about-layer.is-dark .about-foot .btn { opacity: 1; pointer-events: auto; }
@media (max-width: 720px) { .about-foot > span { display: none; } .about-foot { justify-content: flex-start; } }
@media (prefers-reduced-motion: reduce) {
  .js .about { height: auto; }
  .js .about-pin { position: relative; height: auto; }
  .js .about-layer { position: relative; }
  .js .about-layer.is-light { display: none; }
  .js .about-layer.is-dark .about-foot .btn { opacity: 1; pointer-events: auto; }
}

/* ───────── Marquee ───────── */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 16px 0; margin-bottom: var(--gap); user-select: none; }
.marquee-track { display: flex; width: max-content; will-change: transform; }
.marquee-track span {
  font-size: clamp(15px, 1.7vw, 22px); font-weight: 600; white-space: nowrap;
  padding-right: 1.6em; position: relative;
}
.marquee-track span::after { content: ""; position: absolute; right: 0.62em; top: 50%; width: 0.36em; height: 0.36em; border-radius: 50%; background: var(--fg); transform: translateY(-50%); }

/* ───────── Work grid ───────── */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); padding: 0 0 clamp(40px, 8vh, 100px); }
.tile { display: block; position: relative; }
.tile-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #0d0d0d; }
.tile-px { position: absolute; inset: -7% 0; will-change: transform; }
.tile-px img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), filter 0.6s; }
.tile:hover .tile-px img, .tile:focus-visible .tile-px img { transform: scale(1.06); }
.js .tile-media { clip-path: inset(100% 0 0 0); transition: clip-path 1.1s var(--ease); transition-delay: calc(var(--col, 0) * 120ms); }
.js .tile-media .tile-px img { transform: scale(1.3); }
.js .tile.in .tile-media { clip-path: inset(0); }
.js .tile.in .tile-px img { transform: scale(1); }
.js .tile.in:hover .tile-px img { transform: scale(1.06); }
.tile-info { padding: 18px 12px 46px; text-align: center; }
.tile-title { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.35; }
.tile-title span { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.5s var(--ease); padding-bottom: 2px; }
.tile:hover .tile-title span { background-size: 100% 1px; }
.tile-cats { margin: 3px 0 0; color: var(--fg-soft); }
.tile-num { position: absolute; top: 14px; left: 16px; z-index: 2; font-size: 11px; font-weight: 600; mix-blend-mode: difference; opacity: 0; transform: translateY(-6px); transition: opacity 0.4s, transform 0.5s var(--ease); }
.tile:hover .tile-num { opacity: 1; transform: none; }
@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
  .tile-info { padding-bottom: 34px; }
}

/* ───────── Cursor follower ───────── */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 80; width: 86px; height: 86px; margin: -43px 0 0 -43px;
  border-radius: 50%; background: var(--fg); color: var(--bg);
  display: grid; place-items: center; font-size: 12px; font-weight: 600;
  pointer-events: none; will-change: transform;
}
.cursor > span { transform: scale(0); transition: transform 0.45s var(--ease); display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: var(--fg); }
.cursor { background: none; }
.cursor.is-on > span { transform: scale(1); }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ───────── Project page ───────── */
.project-head { text-align: center; padding: clamp(48px, 11vh, 120px) var(--gutter) clamp(40px, 8vh, 84px); }
.project-head .eyebrow { margin: 0 0 16px; font-size: 13px; color: var(--fg-soft); }
.project-head h1 { margin: 0 auto; max-width: 16ch; font-size: clamp(34px, 7vw, 104px); font-weight: 600; line-height: 1.02; letter-spacing: -0.035em; color: #eee; }
.project-head .desc { margin: clamp(20px, 4vh, 36px) auto 0; max-width: 620px; font-size: 13px; line-height: 20px; color: var(--fg-soft); }
.modules { display: flex; flex-direction: column; }
.m { position: relative; overflow: hidden; background: #0a0a0a; }
.m img, .m video { width: 100%; height: auto; }
.m-row { display: flex; background: none; }
.m-row .m-item { position: relative; overflow: hidden; min-width: 0; }
.m-row .m-item img { height: 100%; object-fit: cover; }
.m [data-zoom] { cursor: zoom-in; }
.js .m.reveal img, .js .m.reveal video, .js .m-item.reveal img { opacity: 0; transform: scale(1.06); transition: opacity 1s var(--ease), transform 1.4s var(--ease); transition-delay: calc(var(--i, 0) * 110ms); }
.js .m.reveal.in img, .js .m.reveal.in video, .js .m-item.reveal.in img { opacity: 1; transform: none; }
@media (max-width: 720px) { .m-row.wrap-sm { flex-wrap: wrap; } .m-row.wrap-sm .m-item { flex: 1 1 50% !important; } }

/* Next project */
.next { position: relative; display: block; overflow: hidden; text-align: center; padding: clamp(90px, 20vh, 220px) var(--gutter); margin-top: clamp(40px, 8vh, 100px); isolation: isolate; }
.next-bg { position: absolute; inset: -12% 0; z-index: -1; will-change: transform; }
.next-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.28; transform: scale(1.04); transition: opacity 0.8s var(--ease), transform 1.6s var(--ease); }
.next:hover .next-bg img { opacity: 0.6; transform: scale(1); }
.next .eyebrow { margin: 0 0 14px; font-size: 13px; font-weight: 600; color: var(--fg-soft); }
.next h2 { margin: 0; font-size: clamp(34px, 8vw, 128px); font-weight: 600; line-height: 1; letter-spacing: -0.035em; }
.next .arrow { display: inline-grid; place-items: center; width: 54px; height: 54px; margin-top: 26px; border: 1px solid var(--fg); border-radius: 50%; transition: background 0.4s, color 0.4s, transform 0.6s var(--ease); }
.next:hover .arrow { background: var(--fg); color: var(--bg); }
.next .arrow svg { width: 18px; height: 18px; }

/* ───────── Lightbox ───────── */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, 0.96); display: grid; place-items: center; opacity: 0; visibility: hidden; transition: opacity 0.4s, visibility 0s 0.4s; }
.lightbox.is-open { opacity: 1; visibility: visible; transition: opacity 0.4s; }
.lightbox img { max-width: 94vw; max-height: 90vh; width: auto; height: auto; transform: scale(0.96); transition: transform 0.6s var(--ease); cursor: zoom-out; }
.lightbox.is-open img { transform: none; }
.lb-btn { position: absolute; top: 50%; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: background 0.3s, color 0.3s; }
.lb-btn:hover { background: var(--fg); color: var(--bg); }
.lb-btn svg { width: 16px; height: 16px; }
.lb-prev { left: 16px; } .lb-prev svg { transform: rotate(180deg); }
.lb-next { right: 16px; }
.lb-close { top: 16px; right: 16px; margin: 0; }
.lb-count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; font-size: 11px; font-weight: 600; color: var(--fg-mute); }

/* ───────── Contact ───────── */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); padding: clamp(48px, 11vh, 120px) var(--gutter) clamp(60px, 10vh, 120px); align-items: start; }
.contact h1 { margin: 0; font-size: clamp(34px, 5.6vw, 84px); font-weight: 600; line-height: 1.04; letter-spacing: -0.035em; }
.contact .direct { margin-top: clamp(24px, 5vh, 48px); display: grid; gap: 6px; justify-items: start; }
.contact .direct a { font-size: 15px; font-weight: 600; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: 3px; transition: background-size 0.5s var(--ease); }
.contact .direct a:hover { background-size: 0 1px; background-position: 100% 100%; }
.form { display: grid; gap: 30px; }
.field { position: relative; display: grid; gap: 8px; }
.field label { font-size: 13px; font-weight: 600; }
.field input, .field textarea {
  width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  color: var(--fg); font: inherit; font-size: 15px; padding: 10px 0; resize: vertical;
}
.field textarea { min-height: 130px; }
.field input::placeholder, .field textarea::placeholder { color: #666; }
.field input:focus, .field textarea:focus { outline: none; }
.field::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--fg); transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.6s var(--ease); }
.field:focus-within::after { transform: scaleX(1); }
.btn {
  justify-self: start; display: inline-flex; align-items: center; gap: 12px;
  border: 1px solid var(--fg); border-radius: 999px; padding: 15px 30px;
  font-size: 13px; font-weight: 600;
  position: relative; overflow: hidden; isolation: isolate; transition: color 0.4s;
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fg); transform: translateY(101%); transition: transform 0.5s var(--ease); }
.btn:hover { color: var(--bg); }
.btn:hover::before { transform: none; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.form-note { min-height: 20px; margin: 0; color: var(--fg-soft); }
.hp { position: absolute; left: -9999px; }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; } }

/* ───────── Footer & back to top ───────── */
.site-footer { padding: 34px var(--gutter) 40px; text-align: center; border-top: 1px solid var(--line); }
.site-footer .social { justify-content: center; margin-bottom: 10px; }
.site-footer p { margin: 0; font-size: 10px; font-weight: 400; color: var(--fg-mute); line-height: 30px; }
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 52px; height: 52px; border-radius: 50%;
  background: rgba(40, 40, 40, 0.7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  display: grid; place-items: center; opacity: 0; transform: translateY(16px) scale(0.9); pointer-events: none;
  transition: opacity 0.4s, transform 0.5s var(--ease), background 0.3s;
}
.to-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: rgba(70, 70, 70, 0.9); }
.to-top svg.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.to-top svg.ring circle { fill: none; stroke: var(--fg); stroke-width: 1.5; stroke-dasharray: 157; stroke-dashoffset: calc(157 - 157 * var(--p, 0)); }
.to-top svg.arr { width: 16px; height: 16px; transform: rotate(-90deg); }

/* 404 */
.lost { min-height: 70vh; display: grid; place-content: center; text-align: center; gap: 24px; padding: var(--gutter); }
.lost h1 { margin: 0; font-size: clamp(60px, 16vw, 220px); font-weight: 600; line-height: 1; }
.lost .btn { justify-self: center; }

/* ───────── Reduced motion ───────── */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js .line > span, .js .word > span, .js .fade-up, .js .tile-media, .js .slide.is-active, .js .slide.is-active img, .js .tile-media .tile-px img,
  .js .m.reveal img, .js .m.reveal video, .js .m-item.reveal img { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .cursor { display: none; }
}

.form-note a { color: var(--fg); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
