/* ==================== ROOT VARIABLES & BASE STYLES ==================== */
:root {
  --bg: #faf4f3;
  --ink: #140808;
  --muted: #6a4f52;
  --line: #e6d3d2;
  --card: #f2e3e1;
  --red: #c8102e;
  --red2: #8f0b20;
  --red3: #5c0715;
  --on: #fff;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0506;
    --ink: #f7eceb;
    --muted: #c3a3a5;
    --line: #2f1a1d;
    --card: #1d0a0d;
  }
}

:root[data-theme="dark"] {
  --bg: #0e0506;
  --ink: #f7eceb;
  --muted: #c3a3a5;
  --line: #2f1a1d;
  --card: #1d0a0d;
}

html {
  scroll-padding-top: 80px;
  scroll-behavior: smooth;
}

*,
*:before,
*:after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 Poppins, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

/* ==================== TYPOGRAPHY & LAYOUT ==================== */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.serif {
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ==================== HEADER & NAVIGATION ==================== */
header.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
}

nav .logo {
  background: transparent;
  border-radius: 0;
  padding: 0;
  display: block;
  line-height: 0;
  align-self: flex-start;
  padding-top: 8px;
}

nav .logo img {
  height: 80px;
  width: auto;
  display: block;
}

nav .links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.95rem;
  font-weight: 500;
}

nav .links a {
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

nav .links a:hover {
  color: var(--red);
}

/* ==================== MOBILE NAVIGATION ==================== */
.nav-toggle {
  display: none;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.nav-hamburger span {
  width: 24px;
  height: 2.5px;
  background: var(--ink);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.nav-toggle:checked ~ .nav-hamburger span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.nav-toggle:checked ~ .nav-hamburger span:nth-child(2) {
  opacity: 0;
}

.nav-toggle:checked ~ .nav-hamburger span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

nav .pill {
  background: var(--red);
  color: #fff;
  padding: 11px 22px;
  font-size: 0;
  position: relative;
}

nav .pill::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-left: 6px solid #fff;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

nav .pill:hover {
  background: var(--red2);
  color: #fff;
  padding: 11px 22px;
}

/* ==================== BUTTONS & PILLS ==================== */
.pill {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 0;
  background: var(--ink);
  color: var(--bg);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.15s;
  position: relative;
}

.pill:hover {
  background: var(--red);
  color: transparent;
}

.pill:hover::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-left: 12px solid #fff;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.pill.ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.pill.ghost:hover {
  background: var(--ink);
  color: var(--bg);
}

/* ==================== HERO SECTION (STAGE) ==================== */
.stage {
  position: relative;
  overflow: hidden;
  background: #000;
  min-height: 600px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
}

.wall {
  position: absolute;
  inset: -25%;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  align-content: center;
  transform: rotate(-14deg);
}

.shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.5) 65%, rgba(0, 0, 0, 0.85)), linear-gradient(#000 0%, transparent 22%, transparent 78%, #000);
}

.stage-in {
  position: relative;
  padding: 90px 24px;
  max-width: 780px;
}

.stage h1 {
  max-width: 14ch;
  margin: 0 auto 18px;
  color: #fff;
  text-align: center;
}

.stage p {
  font-size: 1.3rem;
  margin: 0 0 30px;
  color: #f3dcdc;
}

.pill.red {
  background: var(--red);
  color: #fff;
  padding: 17px 34px;
  font-size: 1.1rem;
  font-weight: 600;
}

.pill.red:hover {
  color: transparent;
}

.tile {
  position: relative;
  display: flex;
  align-items: flex-end;
  aspect-ratio: 16/9;
  padding: 12px;
  color: #fff;
  text-decoration: none;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  transition: transform 0.2s;
}

.tile:before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background: repeating-linear-gradient(135deg, #fff 0 2px, transparent 2px 14px),
    repeating-linear-gradient(45deg, #fff 0 2px, transparent 2px 14px);
}

.tile.has-thumb:before {
  display: none;
}

.tile:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.75));
}

.tile span {
  position: relative;
  z-index: 1;
  font: 400 1.1rem/1.15 Poppins, system-ui, sans-serif;
}

.wall .tile span {
  font-size: 0.85rem;
}

a.tile:hover {
  transform: scale(1.04);
  z-index: 2;
}

.hero {
  padding: 84px 0 56px;
}

h1 {
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  line-height: 1.02;
  margin: 0 auto 24px;
  max-width: 15ch;
  text-align: center;
}

.lead {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 71ch;
  margin: 0 auto 32px;
  text-align: center;
}

.btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.panel {
  margin-top: 64px;
  border-radius: 0;
  background: var(--red);
  min-height: 340px;
  display: grid;
  place-items: center;
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.panel:before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.13;
  background: repeating-linear-gradient(135deg, #fff 0 2px, transparent 2px 16px),
    repeating-linear-gradient(45deg, #fff 0 2px, transparent 2px 16px);
}

.panel img {
  position: relative;
  width: min(620px, 100%);
  height: auto;
  display: block;
}

/* ==================== SECTIONS ==================== */
section {
  padding: 84px 0 0;
}

.head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.05;
  margin: 0 auto;
  max-width: 16ch;
  text-align: center;
}

.head p {
  margin: 0;
  color: var(--muted);
  max-width: 80ch;
  text-align: center;
}

/* ==================== LIBRARY & WATCH SECTION ==================== */
.library h3 {
  font-size: 1.6rem;
  margin: 34px 0 14px;
}

.rail-wrap {
  position: relative;
}

.rail {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 6px 2px 14px;
  scrollbar-width: none;
}

.rail::-webkit-scrollbar {
  display: none;
}

.rail .tile {
  flex: 0 0 min(320px, 78%);
}

/* Previous / next arrows */
.rail-btn {
  position: absolute;
  top: calc(50% - 4px);
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: var(--red);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.rail-btn:hover {
  background: var(--red2);
}

.rail-btn.prev {
  left: -10px;
}

.rail-btn.next {
  right: -10px;
}

.rail-btn svg {
  width: 20px;
  height: 20px;
}

.rail-btn:disabled {
  opacity: 0;
  pointer-events: none;
}

/* ==================== VLOGS SECTION (DEPRECATED) ==================== */
.vlogs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.vlog {
  text-decoration: none;
  display: block;
}

.thumb {
  aspect-ratio: 4/3;
  border-radius: 0;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  transition: transform 0.2s;
}

.vlog:hover .thumb {
  transform: scale(0.985);
}

.play {
  width: 60px;
  height: 60px;
  border-radius: 0;
  background: #fff;
  display: grid;
  place-items: center;
}

.play:after {
  content: "";
  border-left: 18px solid #c8102e;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  margin-left: 5px;
}

.vlog h3 {
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0 0 4px;
}

.vlog span {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Thumbnail colors */
.t1 {
  background: var(--red);
}

.t2 {
  background: var(--red3);
}

.t3 {
  background: #140808;
}

/* ==================== PROJECTS LIST SECTION ==================== */
.list {
  border-top: 1px solid var(--line);
}

.row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.sw {
  width: 72px;
  height: 72px;
  border-radius: 0;
}

.row h3 {
  font-size: 1.5rem;
  margin: 0;
  line-height: 1.2;
}

.row small {
  color: var(--muted);
  font-size: 0.95rem;
  text-align: right;
}

/* Project swatches with striped patterns */
.p1 {
  background: repeating-linear-gradient(90deg, #c8102e 0 9px, #a30d25 9px 11px);
}

.p2 {
  background: repeating-linear-gradient(0deg, #8f0b20 0 9px, #6e0818 9px 11px);
}

.p3 {
  background: repeating-linear-gradient(90deg, #140808 0 9px, #2b1215 9px 11px);
}

.p4 {
  background: repeating-linear-gradient(0deg, #e8626f 0 9px, #d04a58 9px 11px);
}

.p5 {
  background: repeating-linear-gradient(90deg, #5c0715 0 9px, #450510 9px 11px);
}

.p6 {
  background: repeating-linear-gradient(0deg, #f3b8bd 0 9px, #e19ca3 9px 11px);
}

/* ==================== ABOUT SECTION ==================== */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.about .big {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  line-height: 1.2;
  margin: 0 auto;
  text-align: left;
}

.about p {
  color: var(--muted);
  margin: 0 0 16px;
}

.vs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 48px 0;
}

.vs1, .vs2 {
  padding: 24px;
  background: var(--card);
  border-radius: 0;
}

.vs h3 {
  font-size: 1.4rem;
  margin: 0 0 12px;
}

.vs p {
  font-size: 0.95rem;
  margin: 0;
}

.close {
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0;
  color: var(--muted);
}

/* ==================== FOLLOW SECTION ==================== */
.follow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.fc {
  --fc-bg: var(--red);
  border-radius: 0;
  padding: 24px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  color: #fff;
  background: var(--fc-bg);
  transition: transform 0.2s;
}

.fc:hover {
  transform: translateY(-3px);
}

.fc-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.fc-icon {
  width: 40px;
  height: 40px;
  flex: none;
}

.fc h3 {
  font-size: 1.5rem;
  line-height: 1.1;
  margin: 0;
}

.fc-handle {
  font-size: 0.9rem;
  opacity: 0.8;
}

.fc-desc {
  margin: 0;
  opacity: 0.9;
}

.fc-stat {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: -8px;
}

.fc-stat:empty {
  display: none;
}

.fc-cta {
  margin-top: auto;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.fc-arrow {
  display: inline-block;
  transition: transform 0.2s;
}

.fc:hover .fc-arrow {
  transform: translateX(4px);
}

/* Follow card colors */
.f2 {
  --fc-bg: var(--red3);
}

.f3 {
  --fc-bg: #2b1215;
  box-shadow: inset 0 0 0 1.5px var(--red);
}

/* ==================== FOOTER ==================== */
footer {
  background: #140808;
  color: #f3dcdc;
  margin-top: 96px;
  padding: 48px 0;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
}

footer .footer-logo {
  display: inline-block;
  line-height: 0;
}

footer img {
  height: 40px;
  width: auto;
  display: block;
}

footer a:not(.footer-logo) {
  margin-left: 22px;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.95rem;
}

footer a:hover {
  color: #ff6b7a;
}

/* ==================== RESPONSIVE & ACCESSIBILITY ==================== */
@media (max-width: 760px) {
  .stage {
    min-height: 500px;
  }

  .wall {
    grid-template-columns: repeat(4, 1fr);
  }

  .rail {
    gap: 10px;
  }

  .rail .tile {
    flex: 0 0 min(240px, 85%);
  }

  nav {
    height: auto;
    flex-wrap: wrap;
    position: relative;
  }

  .nav-hamburger {
    display: flex;
    order: 2;
    padding: 8px;
  }

  /* Hidden visually but still reachable with Tab; Space toggles the menu */
  .nav-toggle {
    display: block;
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
  }

  .nav-toggle:focus-visible ~ .nav-hamburger {
    outline: 3px solid var(--red);
    outline-offset: 3px;
  }

  nav .logo {
    order: 1;
  }

  nav .links {
    order: 3;
    width: 100%;
    flex-direction: column;
    gap: 16px;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.3s ease, visibility 0s 0.3s;
  }

  .nav-toggle:checked ~ .links {
    max-height: 300px;
    visibility: visible;
    transition: max-height 0.3s ease;
    padding: 20px 0;
    margin-top: 16px;
    border-top: 1px solid var(--line);
  }

  .about {
    grid-template-columns: 1fr;
  }

  .vs {
    grid-template-columns: 1fr;
  }

  .row {
    grid-template-columns: 56px 1fr;
  }

  .sw {
    width: 56px;
    height: 56px;
  }

  .row small {
    grid-column: 2;
    text-align: left;
  }

  .hero {
    padding-top: 48px;
  }

  footer img {
    height: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}
