/* Alex Tuchkov — Portfolio 2026. Style: Noir (selfyn-os/docs/05_STYLES.md). */
@font-face { font-family: "Six Caps"; src: url("../fonts/SixCaps-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Instrument Serif"; font-style: italic; src: url("../fonts/InstrumentSerif-italic.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Instrument Serif"; font-style: normal; src: url("../fonts/InstrumentSerif-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Inter"; font-weight: 300 700; src: url("../fonts/Inter-normal.woff2") format("woff2"); font-display: swap; }

:root {
  --bg: #0e0e0d; --surface: #141413; --raised: #1c1c1a;
  --text: #ece8e0; --mute: rgba(236,232,224,.68); --faint: rgba(236,232,224,.42);
  --line: rgba(236,232,224,.10); --line2: rgba(236,232,224,.20);
  --pen: #e2261b;
  --caps: "Six Caps", "Sofia Sans Extra Condensed", "Arial Narrow", sans-serif;
  --serif: "Instrument Serif", "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --gut: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font: 300 16px/1.6 var(--sans); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--pen); color: #fff; }

/* grain */
body::after { content: ""; position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-3%)} 60%{transform:translate(-2%,-1%)} 80%{transform:translate(3%,3%)} 100%{transform:translate(0,0)} }

.caps { font-family: var(--caps); font-weight: 400; text-transform: uppercase; line-height: .82; letter-spacing: .005em; }
.pen { font-family: var(--serif); font-style: italic; color: var(--pen); font-weight: 400; letter-spacing: -.01em; }
.serif { font-family: var(--serif); font-weight: 400; }
.label { font: 500 11px/1.3 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--faint); }

/* nav */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gut); transition: background .4s, backdrop-filter .4s; }
.nav.solid { background: rgba(14,14,13,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav .mark { font-family: var(--caps); font-size: 30px; line-height: 1; letter-spacing: .04em; }
.nav .mark i { font-family: var(--serif); color: var(--pen); font-size: 20px; margin-left: 6px; letter-spacing: 0; text-transform: none; }
.nav ul { list-style: none; display: flex; gap: 26px; }
.nav li a { font: 500 11px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--mute); position: relative; padding: 6px 0; transition: color .25s; }
.nav li a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--pen); transition: right .35s var(--ease); }
.nav li a:hover { color: var(--text); } .nav li a:hover::after { right: 0; }
.nav .burger { display: none; width: 34px; height: 34px; position: relative; }
.nav .burger span { position: absolute; left: 6px; right: 6px; height: 1px; background: var(--text); transition: transform .3s; }
.nav .burger span:first-child { top: 13px; } .nav .burger span:last-child { top: 21px; }
body.menu .nav .burger span:first-child { transform: translateY(4px) rotate(45deg); }
body.menu .nav .burger span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* hero */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; }
.hero video, .hero .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,14,13,.55) 0%, rgba(14,14,13,0) 28%, rgba(14,14,13,0) 50%, rgba(14,14,13,.92) 100%); }
.hero .meta { position: absolute; z-index: 2; top: 92px; right: var(--gut); text-align: right; }
.hero .meta .label { display: block; color: var(--mute); }
.hero .meta .now { margin-top: 10px; font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--text); min-height: 1.4em; transition: opacity .3s; }
.hero .name { position: absolute; z-index: 2; left: var(--gut); right: var(--gut); bottom: clamp(28px, 6vh, 64px); }
.hero h1 { font-size: clamp(120px, 27vw, 430px); display: flex; flex-wrap: wrap; column-gap: .12em; }
.hero h1 .w { display: inline-flex; overflow: hidden; padding-top: .04em; }
.rise > span { display: inline-block; transform: translateY(105%); animation: rise .9s var(--ease) forwards; }
@keyframes rise { to { transform: translateY(0); } }
.hero .tag { position: relative; margin-top: -.42em; margin-left: .2em; font-size: clamp(34px, 5.4vw, 86px); line-height: 1; opacity: 0; animation: fade 1s .9s forwards; }
.hero .role { position: absolute; z-index: 2; right: var(--gut); bottom: clamp(36px, 7vh, 76px); max-width: 260px; text-align: right; color: var(--mute); font-size: 14px; opacity: 0; animation: fade 1s 1.2s forwards; }
.hero .scroll { position: absolute; z-index: 2; left: 50%; bottom: 18px; width: 1px; height: 46px; background: var(--line2); overflow: hidden; }
.hero .scroll::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--text); animation: drip 1.8s infinite; }
@keyframes drip { to { top: 110%; } }
@keyframes fade { to { opacity: 1; } }

/* marquee */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 18px 0; white-space: nowrap; }
.marquee .track { display: inline-flex; gap: 48px; animation: marq 40s linear infinite; padding-left: 48px; }
.marquee span { font-family: var(--caps); font-size: clamp(38px, 5vw, 64px); line-height: 1; text-transform: uppercase; }
.marquee em { font-family: var(--serif); color: var(--pen); font-size: clamp(22px, 2.6vw, 34px); align-self: center; }
@keyframes marq { to { transform: translateX(-50%); } }

/* sections */
section { padding: clamp(80px, 12vw, 160px) var(--gut) 0; }
.shead { display: grid; grid-template-columns: auto auto 1fr; align-items: end; column-gap: 18px; margin-bottom: clamp(28px, 4vw, 54px); }
.shead .idx { font: 500 11px/1 var(--sans); letter-spacing: .18em; color: var(--pen); align-self: start; padding-top: 10px; }
.shead h2 { font-size: clamp(84px, 13vw, 210px); }
.shead .rule { height: 1px; background: var(--line2); margin-bottom: .9em; }
.shead .line { grid-column: 2 / 4; margin-top: -.55em; margin-left: .1em; font-size: clamp(24px, 3vw, 44px); position: relative; }
.intro-note { max-width: 560px; color: var(--mute); margin: -8px 0 clamp(28px, 4vw, 48px) 0; }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* tiles */
.tile { position: relative; overflow: hidden; background: var(--surface); border-radius: 3px; cursor: pointer; isolation: isolate; }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), opacity .5s; }
.tile video { position: absolute; inset: 0; opacity: 0; }
.tile.playing video { opacity: 1; }
.tile:hover img, .tile:hover video { transform: scale(1.035); }
.tile .cap { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 40px 18px 16px; display: flex; justify-content: space-between; align-items: end; gap: 12px;
  background: linear-gradient(transparent, rgba(14,14,13,.85)); }
.tile .cap h3 { font-family: var(--caps); font-weight: 400; font-size: clamp(34px, 3.4vw, 54px); line-height: .85; text-transform: uppercase; }
.tile .cap .label { color: var(--mute); }
.tile .play { position: absolute; z-index: 2; top: 14px; right: 14px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line2);
  display: grid; place-items: center; backdrop-filter: blur(6px); background: rgba(14,14,13,.35); opacity: 0; transform: scale(.8); transition: .35s var(--ease); }
.tile:hover .play { opacity: 1; transform: none; }
.tile .play::before { content: ""; border-left: 10px solid var(--text); border-block: 6px solid transparent; margin-left: 3px; }

.films { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.films .tile { aspect-ratio: 16/9; grid-column: span 2; }
.films .tile.big { grid-column: span 4; grid-row: span 2; aspect-ratio: auto; }
.films .tile.wide { grid-column: span 3; }
.films .tile.full { grid-column: span 6; }

.strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 14px; margin-inline: calc(var(--gut) * -1); padding-inline: var(--gut); scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.strip .tile { flex: 0 0 auto; height: clamp(260px, 38vw, 480px); scroll-snap-align: start; }
.strip .tile img { width: auto; height: 100%; }
.strip-nav { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.strip-nav button { width: 44px; height: 44px; border: 1px solid var(--line2); border-radius: 50%; transition: border-color .25s, color .25s; }
.strip-nav button:hover { border-color: var(--pen); color: var(--pen); }

.boards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.boards .tile { aspect-ratio: 16/9; }
.boards.three { grid-template-columns: repeat(3, 1fr); }
.boards .tile.feature { grid-column: span 2; }
.boards.three .tile.feature { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.more-btn { margin-top: 22px; display: inline-flex; align-items: center; gap: 12px; padding: 14px 22px; border: 1px solid var(--line2); border-radius: 40px;
  font: 500 11px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; transition: .3s; }
.more-btn:hover { border-color: var(--pen); color: var(--pen); }
.hidden-more { display: none; }

/* animated boards */
.tile .pill { position: absolute; z-index: 2; left: 12px; bottom: 12px; padding: 6px 10px; border-radius: 20px; background: rgba(14,14,13,.6);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font: 500 10px/1 var(--sans); letter-spacing: .14em; color: var(--text); transition: opacity .3s; }
.tile.playing .pill { opacity: 0; }

/* cases list */
.cases { border-top: 1px solid var(--line2); }
.case-row { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 18px; padding: 16px 0 12px; border-bottom: 1px solid var(--line); position: relative; }
.case-row .n { font: 500 11px/1 var(--sans); letter-spacing: .18em; color: var(--faint); }
.case-row h3 { font-family: var(--caps); font-weight: 400; text-transform: uppercase; font-size: clamp(56px, 8.6vw, 140px); line-height: .84; transition: color .3s, transform .6s var(--ease); }
.case-row .who { text-align: right; }
.case-row .who b { display: block; font-weight: 500; font-size: 14px; }
.case-row .who span { color: var(--faint); font-size: 13px; }
.case-row .sub { grid-column: 2; font-family: var(--serif); font-style: italic; color: var(--pen); font-size: clamp(18px, 1.8vw, 26px); margin-top: -.2em; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .5s var(--ease), opacity .4s; }
.case-row:hover h3 { transform: translateX(14px); }
.case-row:hover .sub { max-height: 2em; opacity: 1; }
.cursor-img { position: fixed; z-index: 40; left: 0; top: 0; width: min(34vw, 460px); aspect-ratio: 16/9; pointer-events: none; border-radius: 3px; overflow: hidden;
  opacity: 0; transform: translate(-50%, -50%) scale(.9); transition: opacity .3s, transform .4s var(--ease); }
.cursor-img.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.cursor-img img { width: 100%; height: 100%; object-fit: cover; }

/* tabs */
.tabs { display: flex; gap: 6px; margin-bottom: 22px; flex-wrap: wrap; }
.tabs button { padding: 12px 20px; border: 1px solid var(--line2); border-radius: 40px; font: 500 11px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--mute); transition: .3s; }
.tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.tabpanel[hidden] { display: none; }

/* about */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 96px); }
.about .lead { font-size: clamp(30px, 3.6vw, 56px); line-height: 1.08; }
.about .lead em { color: var(--pen); }
.about p + p { margin-top: 1em; }
.about .body { color: var(--mute); font-size: 17px; }
.about .lists { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 44px; }
.about ul { list-style: none; margin-top: 12px; }
.about li { font-family: var(--caps); font-size: clamp(34px, 3vw, 48px); text-transform: uppercase; line-height: .95; border-bottom: 1px solid var(--line); padding: 8px 0 4px; }

/* contact */
.contact { padding-bottom: 40px; }
.contact .big { font-size: clamp(110px, 22vw, 360px); }
.contact .pen { display: block; font-size: clamp(30px, 4.6vw, 72px); margin-top: -.5em; margin-left: .2em; position: relative; }
.contact .mail { display: inline-block; margin-top: 46px; font-family: var(--serif); font-size: clamp(28px, 4vw, 64px); border-bottom: 1px solid var(--line2); transition: color .3s, border-color .3s; }
.contact .mail:hover { color: var(--pen); border-color: var(--pen); }
footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 64px var(--gut) 28px; color: var(--faint); font-size: 12px; letter-spacing: .08em; }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(8,8,7,.96); display: grid; grid-template-rows: auto 1fr auto; opacity: 0; pointer-events: none; transition: opacity .35s; }
.lb.open { opacity: 1; pointer-events: auto; }
.lb .top { display: flex; justify-content: space-between; align-items: center; padding: 16px var(--gut); gap: 16px; }
.lb .top h4 { font-family: var(--caps); font-weight: 400; text-transform: uppercase; font-size: 40px; line-height: 1; }
.lb .top .label { margin-top: 4px; }
.lb .x { width: 44px; height: 44px; border: 1px solid var(--line2); border-radius: 50%; font-size: 20px; flex: 0 0 auto; }
.lb .stage { display: grid; place-items: center; min-height: 0; padding: 0 var(--gut); position: relative; }
.lb .stage img, .lb .stage video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 2px; background: #000; }
.lb .arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border: 1px solid var(--line2); border-radius: 50%; background: rgba(14,14,13,.5); font-size: 18px; }
.lb .arrow.prev { left: 12px; } .lb .arrow.next { right: 12px; }
.lb .arrow:hover, .lb .x:hover { border-color: var(--pen); color: var(--pen); }
.lb .count { text-align: center; padding: 14px; }

/* case page */
.case-hero { position: relative; height: 92svh; min-height: 520px; overflow: hidden; }
.case-hero img, .case-hero video { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: settle 2.4s var(--ease) forwards; }
@keyframes settle { to { transform: scale(1); } }
.case-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,14,13,.5), rgba(14,14,13,0) 30%, rgba(14,14,13,.15) 55%, var(--bg)); }
.case-hero .head { position: absolute; z-index: 2; left: var(--gut); right: var(--gut); bottom: 24px; }
.case-hero h1 { font-size: clamp(90px, 16vw, 260px); }
.case-hero h1 .w { display: inline-flex; overflow: hidden; margin-right: .12em; }
.case-hero .pen { font-size: clamp(24px, 3.4vw, 50px); margin-top: -.35em; margin-left: .15em; position: relative; }
.case-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 40px var(--gut); border-bottom: 1px solid var(--line); }
.case-meta div b { display: block; font-weight: 400; font-size: 17px; margin-top: 8px; }
.case-body { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(24px, 6vw, 96px); padding: clamp(56px, 8vw, 120px) var(--gut); }
.case-body .k { font-family: var(--caps); font-size: clamp(64px, 8vw, 120px); text-transform: uppercase; line-height: .84; }
.case-body p { font-size: clamp(18px, 1.6vw, 22px); color: var(--mute); } .case-body p:first-child { color: var(--text); font-family: var(--serif); font-size: clamp(24px, 2.4vw, 36px); line-height: 1.2; }
.case-body p + p { margin-top: 1.1em; }
.case-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 var(--gut); }
.case-gallery .tile { aspect-ratio: 16/9; }
.case-gallery .tile.full { grid-column: span 2; }
.next-case { display: block; margin-top: clamp(80px, 12vw, 160px); padding: 40px var(--gut) 20px; border-top: 1px solid var(--line2); }
.next-case .caps { font-size: clamp(90px, 16vw, 260px); transition: color .3s; }
.next-case:hover .caps { color: var(--pen); }

@media (max-width: 900px) {
  .nav ul { position: fixed; inset: 0; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px; padding: 0 var(--gut);
    background: var(--bg); opacity: 0; pointer-events: none; transition: opacity .3s; }
  body.menu .nav ul { opacity: 1; pointer-events: auto; }
  body.menu .nav { bottom: 0; background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; align-items: flex-start; }
  body.menu { overflow: hidden; }
  .nav li a { font: 400 64px/1 var(--caps); letter-spacing: .01em; color: var(--text); }
  .nav .burger { display: block; z-index: 2; }
  .films { grid-template-columns: 1fr 1fr; }
  .films .tile, .films .tile.wide { grid-column: span 1; }
  .films .tile.full { grid-column: span 2; }
  .films .tile.big { grid-column: span 2; grid-row: auto; aspect-ratio: 16/9; }
  .boards.three { grid-template-columns: 1fr 1fr; }
  .boards.three .tile.feature { grid-row: auto; aspect-ratio: 16/9; }
  .about, .case-body { grid-template-columns: 1fr; }
  .case-row { grid-template-columns: 34px 1fr; }
  .case-row .who { grid-column: 2; text-align: left; }
  .case-row .sub { max-height: none; opacity: 1; padding-bottom: 6px; }
  .cursor-img { display: none; }
  .hero .role { display: none; }
}
@media (max-width: 560px) {
  .films, .boards, .boards.three, .case-gallery { grid-template-columns: 1fr; }
  .films .tile.big, .boards .tile.feature, .boards.three .tile.feature, .case-gallery .tile.full { grid-column: auto; }
  .about .lists, .case-meta { grid-template-columns: 1fr; }
  .shead { grid-template-columns: auto 1fr; } .shead .rule { display: none; } .shead .line { grid-column: 1 / 3; }
  .tile .cap h3 { font-size: 34px; }
  .lb .arrow { top: auto; bottom: -64px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .rise > span { transform: none; } .reveal { opacity: 1; transform: none; }
}
