:root{
  --bg: #070707;
  --surface: #101010;
  --surface-raised: #161616;
  --border: #262626;
  --border-soft: #1a1a1a;
  --text: #f5f4f1;
  --text-dim: #8c8a87;
  --text-faint: #4d4b49;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Archivo', -apple-system, 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.mono{ font-family: 'IBM Plex Mono', 'SFMono-Regular', monospace; }
a{ color: inherit; text-decoration: none; }
@media (prefers-reduced-motion: reduce){ *{ animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

/* film-grain overlay */
.grain{
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  opacity: 0.045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- nav ---------- */
nav{
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 36px;
  transition: background .3s ease, border-color .3s ease, padding .3s ease;
  border-bottom: 1px solid transparent;
}
nav.scrolled{
  background: rgba(7,7,7,0.82);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--border-soft);
  padding: 16px 36px;
}
.nav-name{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.nav-links{
  display: flex; gap: 34px; list-style: none; margin: 0; padding: 0;
}
.nav-links a{
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color .15s ease;
}
.nav-links a:hover{ color: var(--text); }
.nav-burger{
  display: none;
  width: 28px; height: 18px; position: relative;
  background: none; border: none; cursor: pointer; padding: 0;
}
.nav-burger span{
  position: absolute; left: 0; right: 0; height: 1px; background: var(--text);
  transition: transform .25s ease, opacity .25s ease;
}
.nav-burger span:nth-child(1){ top: 0; }
.nav-burger span:nth-child(2){ top: 8px; }
.nav-burger span:nth-child(3){ top: 16px; }

.mobile-menu{
  position: fixed; inset: 0; z-index: 39;
  background: #070707;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.mobile-menu.open{ opacity: 1; pointer-events: auto; }
.mobile-menu a{
  font-family: 'Archivo', sans-serif; font-weight: 600; font-size: 28px; text-transform: uppercase;
}

@media (max-width: 760px){
  .nav-links{ display: none; }
  .nav-burger{ display: block; }
}

/* ---------- hero ---------- */
.hero{
  position: relative;
  height: 100svh; min-height: 560px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: #0a0a0a;
}
.hero-video-stack{ position: absolute; inset: 0; z-index: 0; }
.hero-video{
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: contain;
  opacity: 0; transition: opacity .5s ease;
}
.hero-video.active{ opacity: 1; }
.hero::after{
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.15) 40%, rgba(7,7,7,0.92) 100%);
}
.hero-reel-tag{
  position: absolute; bottom: 24px; left: 28px; z-index: 2;
  font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; letter-spacing: .04em;
  color: var(--text-faint);
}
.hero-content{
  position: relative; z-index: 2; text-align: center; padding: 0 24px;
}
.hero h1{
  font-weight: 800;
  font-size: clamp(42px, 8vw, 92px);
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
.hero .role{
  margin-top: 18px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(11px, 1.4vw, 13px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.scroll-cue{
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .14em;
  color: var(--text-faint);
}
.scroll-cue .line{ width: 1px; height: 26px; background: linear-gradient(var(--text-faint), transparent); animation: scrollpulse 2.4s ease-in-out infinite; }
@keyframes scrollpulse{ 0%,100%{ opacity: .3; } 50%{ opacity: 1; } }

/* ---------- page hero (short banner for project pages) ---------- */
.page-hero{
  position: relative;
  aspect-ratio: 21/9;
  min-height: 320px;
  max-height: 72vh;
  overflow: hidden;
  background: #0a0a0a;
}
.page-hero video, .page-hero img{
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.page-hero::after{
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(7,7,7,0.15) 60%, rgba(7,7,7,0.95) 100%);
}

/* ---------- section shell ---------- */
main{ position: relative; z-index: 1; }
section{ padding: 110px 36px; border-bottom: 1px solid var(--border-soft); max-width: 1180px; margin: 0 auto; }
section:last-of-type{ border-bottom: none; }
.section-head{ display: flex; align-items: baseline; gap: 16px; margin-bottom: 48px; }
.section-head .index{ font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--text-faint); }
.section-head h2{ font-size: clamp(26px,3.6vw,36px); font-weight: 700; margin: 0; }

/* ---------- project grid ---------- */
.grid-2{ display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.tile{ display: block; }
.tile-media{
  position: relative; aspect-ratio: 4/3; border-radius: 2px; overflow: hidden;
  border: 1px solid var(--border);
}
.tile-media .fill{ position: absolute; inset: 0; }
.tile-media .corner-tag{
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; color: var(--text);
  background: rgba(7,7,7,0.75); padding: 5px 9px; border-radius: 3px;
  opacity: 0; transform: translateY(6px);
  transition: opacity .2s ease, transform .2s ease;
}
.tile:hover .corner-tag{ opacity: 1; transform: translateY(0); }
.tile:hover .tile-media{ border-color: #3a3a3a; }
.tile-caption{ margin-top: 16px; display: flex; justify-content: space-between; align-items: baseline; }
.tile-caption h3{ font-size: 19px; font-weight: 600; margin: 0; }
.tile-caption span{ font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--text-faint); }

@media (max-width: 760px){ .grid-2{ grid-template-columns: 1fr; } }

/* ---------- scene sequence (mixed video/still) ---------- */
.scene-grid{ margin-top: 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.scene-item{
  position: relative; aspect-ratio: 4/3; border-radius: 3px; overflow: hidden; border: 1px solid var(--border);
  background: #0c0c0c;
}
.scene-item video, .scene-item img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.scene-item .corner-tag{
  position: absolute; left: 10px; bottom: 10px; z-index: 2;
  font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .04em;
  color: var(--text); background: rgba(7,7,7,0.72); padding: 3px 7px; border-radius: 3px;
}
@media (max-width: 760px){ .scene-grid{ grid-template-columns: repeat(2, 1fr); } }

/* ---------- project detail ---------- */
.proj-head{ display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.proj-head h2{ font-size: clamp(28px,4.4vw,40px); font-weight: 700; margin: 0; }
.proj-meta{ font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--text-faint); white-space: nowrap; }
.proj-desc{ margin-top: 18px; font-size: 15.5px; line-height: 1.75; color: var(--text-dim); max-width: 62ch; }

.media-slot{
  margin-top: 34px; aspect-ratio: 16/9; border-radius: 3px; border: 1px solid var(--border);
  background: radial-gradient(ellipse at 30% 20%, #181818 0%, #0c0c0c 70%);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.media-slot .play{ width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.media-slot .corner-tag{
  position: absolute; left: 16px; bottom: 16px;
  font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; color: var(--text-faint);
}

.photo-grid{ margin-top: 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.photo-slot{
  width: 100%; aspect-ratio: 4/3; border-radius: 3px; border: 1px solid var(--border);
  background: radial-gradient(ellipse at 70% 30%, #151515 0%, #0b0b0b 70%);
  display: block; object-fit: cover;
  font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--text-faint); letter-spacing: .04em;
}

/* ---------- design gallery (graphic design page) ---------- */
.cat-desc{ margin-top: 14px; font-size: 15px; line-height: 1.7; color: var(--text-dim); max-width: 62ch; }
.design-grid{ margin-top: 28px; display: flex; flex-wrap: wrap; gap: 16px; }
.design-tile{
  flex: 0 1 260px; max-width: 100%;
  border: 1px solid var(--border); border-radius: 3px; overflow: hidden;
  background: #0c0c0c;
  transition: border-color .15s ease;
}
.design-tile:hover{ border-color: #3a3a3a; }
.design-tile img{ display: block; width: 100%; height: auto; }
.design-tile.w-sm{ flex-basis: 200px; }
.design-tile.w-md{ flex-basis: 300px; }
.design-tile.w-lg{ flex-basis: 440px; }

.proj-foot{ margin-top: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; align-items: flex-start; }
.tags{ display: flex; flex-wrap: wrap; gap: 8px; }
.tag{
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; padding: 5px 10px;
  border: 1px solid var(--border); border-radius: 100px; color: var(--text-dim);
}
.venue{ font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; color: var(--text-faint); line-height: 1.6; text-align: right; max-width: 32ch; }

/* ---------- project page chrome (back link, prev/next) ---------- */
.proj-breadcrumb{
  padding: 110px 36px 0; max-width: 1180px; margin: 0 auto;
}
.back-link{
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-dim); transition: color .15s ease;
}
.back-link:hover{ color: var(--text); }
.proj-section{ padding-top: 40px; }

.proj-nav{
  max-width: 1180px; margin: 0 auto; padding: 48px 36px 110px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.proj-nav a{
  flex: 1; min-width: 200px;
  border: 1px solid var(--border); border-radius: 4px; padding: 20px 22px;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color .15s ease, background .15s ease;
}
.proj-nav a:hover{ border-color: #3a3a3a; background: var(--surface); }
.proj-nav .dir{ font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.proj-nav .name{ font-size: 18px; font-weight: 600; }
.proj-nav .next{ text-align: right; align-items: flex-end; }

/* ---------- skills ---------- */
.skills-grid{ display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 48px; }
.skill-group h3{
  font-family: 'IBM Plex Mono', monospace; font-weight: 500; font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 12px;
}

/* ---------- footer ---------- */
footer{ max-width: 1180px; margin: 0 auto; padding: 110px 36px 140px; }
.about-layout{ display: flex; gap: 44px; margin-top: 28px; align-items: flex-start; flex-wrap: wrap; }
.about-photo{ width: 280px; aspect-ratio: 3/4; object-fit: cover; border-radius: 3px; border: 1px solid var(--border); flex-shrink: 0; }
.about-body{ flex: 1; min-width: 280px; }
footer h2{ font-size: clamp(30px,5vw,48px); font-weight: 800; }
footer .pitch{ margin-top: 14px; color: var(--text-dim); font-size: 15.5px; max-width: 50ch; line-height: 1.6; }
.foot-contact{ margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px 28px; font-family: 'IBM Plex Mono', monospace; font-size: 13.5px; }
.contact-item{ display: inline-flex; align-items: center; gap: 9px; line-height: 1; }
.foot-contact a{ border-bottom: 1px solid var(--border); transition: color .15s ease, border-color .15s ease; line-height: 1; }
.foot-contact a:hover{ color: var(--text); border-color: var(--text); }
.contact-item:hover svg{ stroke: var(--text); }
.contact-item svg{ display: block; stroke: var(--text-faint); flex-shrink: 0; transition: stroke .15s ease; }
.foot-note{ margin-top: 48px; font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; color: var(--text-faint); }

@media (max-width: 640px){
  section, .proj-breadcrumb, .proj-nav, footer{ padding-left: 20px; padding-right: 20px; }
  section{ padding-top: 76px; padding-bottom: 76px; }
  footer{ padding-top: 76px; }
  .photo-grid{ grid-template-columns: repeat(2, 1fr); }
  .proj-foot{ flex-direction: column; }
  .venue{ text-align: left; }
  .skills-grid{ grid-template-columns: 1fr; }
  .proj-nav{ flex-direction: column; }
  .proj-nav .next{ text-align: left; align-items: flex-start; }
  .about-photo{ width: 160px; }
}
