/* ═══════════════════════════════════════════════════════════
   ZION STUDIO — Stylesheet
   ═══════════════════════════════════════════════════════════ */

/* ─── Variables ─────────────────────────────────────────── */
:root {
  --dark:         #090909;
  --dark-2:       #111111;
  --dark-3:       #1a1a1a;

  --light:        #f3f0e8;
  --light-2:      #ece8df;
  --light-3:      #d8d4ca;

  --text-light:   #f0ece4;
  --text-dim:     rgba(240, 236, 228, 0.42);
  --text-dark:    #0c0c0c;
  --text-muted:   #7e7870;

  --accent:       #8c7355;   /* warm amber — old school anchor */
  --accent-pale:  rgba(140, 115, 85, 0.22);

  --rule-dark:    rgba(240, 236, 228, 0.09);
  --rule-light:   rgba(12, 12, 12, 0.1);

  --font-display: 'Bebas Neue', sans-serif;
  --font-serif:   'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;

  --ease-silk:    cubic-bezier(0.76, 0, 0.24, 1);
  --ease-out:     cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in:      cubic-bezier(0.76, 0, 0.24, 1);
}

/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--dark);
  color: var(--text-light);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  cursor: none;
}

button {
  background: none;
  border: none;
  font-family: inherit;
  color: inherit;
  cursor: none;
  padding: 0;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

.font-mono { font-family: var(--font-mono); }

/* ─── Anim-in initial state (before JS runs) ────────────── */
.anim-in { opacity: 0; }

/* ─── Custom Cursor ─────────────────────────────────────── */
#cursor-ring {
  position: fixed;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(240, 236, 228, 0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9000;
  transform: translate(-50%, -50%);
  transition: width 0.35s var(--ease-silk),
              height 0.35s var(--ease-silk),
              border-color 0.3s ease,
              background-color 0.3s ease;
  will-change: left, top;
}

#cursor-dot {
  position: fixed;
  width: 4px;
  height: 4px;
  background: var(--text-light);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9001;
  transform: translate(-50%, -50%);
  transition: background-color 0.3s ease;
  will-change: left, top;
}

body.panel-open #cursor-ring {
  border-color: rgba(12, 12, 12, 0.3);
}
body.panel-open #cursor-dot {
  background: var(--dark);
}
body.cursor-hover #cursor-ring {
  width: 56px;
  height: 56px;
  background-color: rgba(240, 236, 228, 0.07);
}
body.panel-open.cursor-hover #cursor-ring {
  background-color: rgba(12, 12, 12, 0.05);
}

/* ─── Three.js Canvas ────────────────────────────────────── */
#three-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: block;
}

/* ─── Hero ───────────────────────────────────────────────── */
#hero {
  position: fixed;
  inset: 0;
  z-index: 1;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: clamp(22px, 3.5vw, 52px) clamp(26px, 5.5vw, 80px);
}

/* Header bar */
.hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  padding-bottom: clamp(16px, 2vh, 24px);
}

.logo-mark {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--text-dim);
}

.header-right {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
}

/* Main content */
.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(18px, 2.5vh, 32px);
  padding: clamp(16px, 3vh, 40px) 0;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(76px, 13vw, 196px);
  line-height: 0.88;
  letter-spacing: -0.005em;
  color: var(--text-light);
  /* Permanent subtle print misregistration — warm amber offset */
  text-shadow:
    -1px 0 rgba(140, 115, 85, 0.28),
    1px 0 rgba(240, 236, 228, 0.07);
}

.t-line {
  display: block;
  will-change: transform; /* GPU layer for GSAP glitch */
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 500px;
}

.hero-tagline {
  font-size: clamp(10px, 1vw, 12px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-subtitle {
  font-size: clamp(13px, 1.15vw, 15px);
  font-weight: 300;
  line-height: 1.72;
  color: var(--text-dim);
  letter-spacing: 0.01em;
}

/* ─── Navigation ─────────────────────────────────────────── */
.main-nav { flex-shrink: 0; }

.nav-rule {
  height: 1px;
  background: var(--rule-dark);
  margin-bottom: 0;
}

.nav-entry {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 24px);
  width: 100%;
  padding: clamp(9px, 1.2vh, 14px) 0;
  border-bottom: 1px solid var(--rule-dark);
  position: relative;
  overflow: hidden;
  text-align: left;
}

/* Poster sweep line — shoots across on hover, left → right */
.nav-entry::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleX(0);
  transform-origin: left center;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    rgba(140, 115, 85, 0.5) 55%,
    transparent 100%
  );
  opacity: 0.55;
  transition: transform 0.50s var(--ease-silk);
  pointer-events: none;
}
.nav-entry:hover::before { transform: translateY(-50%) scaleX(1); }

/* Background fill sweep */
.nav-entry::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(240, 236, 228, 0.025);
  transform: translateX(-100%);
  transition: transform 0.45s var(--ease-silk);
}
.nav-entry:hover::after { transform: translateX(0); }

.nav-num {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  min-width: 26px;
  flex-shrink: 0;
  transition: color 0.3s ease, transform 0.44s var(--ease-silk);
}

.nav-label {
  font-size: clamp(14px, 1.6vw, 20px);
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex: 1;
  transition: transform 0.45s var(--ease-silk), letter-spacing 0.45s ease;
}

.nav-arrow {
  font-size: 13px;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.3s ease, transform 0.4s var(--ease-silk);
}

/* Misregistration split: number goes left, label goes right */
.nav-entry:hover .nav-num    { color: var(--accent); transform: translateX(-5px); }
.nav-entry:hover .nav-label  { transform: translateX(7px); letter-spacing: 0.09em; }
.nav-entry:hover .nav-arrow  { opacity: 1; transform: translateX(0); }

/* ─── Hero Footer ────────────────────────────────────────── */
.hero-footer {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: clamp(10px, 1.5vh, 20px);
}

.footer-copy {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
}

.footer-hint {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0.55;
}

/* ─── Panel ──────────────────────────────────────────────── */
#panel {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: var(--light);
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  overflow: hidden;
}

.panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(18px, 2.5vw, 36px) clamp(26px, 5.5vw, 80px);
  border-bottom: 1px solid var(--rule-light);
  flex-shrink: 0;
  background: var(--light);
}

.panel-back {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  transition: color 0.3s ease;
  cursor: none;
}
.panel-back:hover { color: var(--text-dark); }

.back-arrow {
  display: inline-block;
  transition: transform 0.35s var(--ease-silk);
}
.panel-back:hover .back-arrow { transform: translateX(-4px); }

.back-text {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.panel-label {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.panel-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.panel-content {
  padding: clamp(40px, 6vh, 88px) clamp(26px, 5.5vw, 80px) clamp(60px, 10vh, 120px);
  max-width: 1160px;
}

/* ─── Section shared ─────────────────────────────────────── */
.s-intro { margin-bottom: clamp(36px, 6vh, 68px); }

.s-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.s-num {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--accent);
}

.s-cat {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.s-title {
  font-family: var(--font-display);
  font-size: clamp(56px, 9vw, 128px);
  line-height: 0.87;
  color: var(--text-dark);
  margin-bottom: 22px;
  letter-spacing: -0.01em;
}

.s-lead {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(15px, 1.7vw, 21px);
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 520px;
}

.s-rule {
  height: 1px;
  background: var(--rule-light);
  margin: clamp(28px, 4.5vh, 52px) 0;
}

/* ─── Content grid ───────────────────────────────────────── */
.c-grid {
  display: grid;
  gap: clamp(22px, 3.5vw, 44px);
}
.c-grid.col-2 { grid-template-columns: repeat(2, 1fr); }
.c-grid.col-3 { grid-template-columns: repeat(3, 1fr); }

.c-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.c-text {
  font-size: clamp(13px, 1.1vw, 15px);
  font-weight: 300;
  line-height: 1.8;
  color: var(--text-muted);
}

.c-list li {
  font-size: clamp(13px, 1.1vw, 14px);
  font-weight: 300;
  color: var(--text-muted);
  padding: 7px 0;
  border-bottom: 1px solid var(--rule-light);
  letter-spacing: 0.02em;
}
.c-list li:last-child { border-bottom: none; }

/* ─── Style tags ─────────────────────────────────────────── */
.style-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.style-tag {
  border: 1px solid var(--rule-light);
  padding: 5px 13px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dark);
  transition: border-color 0.3s ease, color 0.3s ease;
}
.style-tag:hover { border-color: var(--accent); color: var(--accent); }

/* ─── Media placeholders ──────────────────────────────────── */
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: clamp(28px, 4vh, 48px);
}

.media-item {
  background: var(--light-2);
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: flex-end;
  padding: 12px 14px;
  position: relative;
  overflow: hidden;
}

.media-item::before {
  content: '+';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 18px;
  color: rgba(0, 0, 0, 0.12);
}

.media-item.wide { grid-column: span 2; aspect-ratio: 16 / 9; }
.media-item.tall { grid-row: span 2; }

.ph-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.28);
}

/* ─── Fitness stats ──────────────────────────────────────── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.stat-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ─── Project list (Design) ──────────────────────────────── */
.project-list { margin-top: 12px; }

.project-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 22px;
  align-items: start;
  padding: clamp(18px, 2.8vh, 30px) 0;
  border-bottom: 1px solid var(--rule-light);
}

.project-year {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding-top: 3px;
}

.project-name {
  font-family: var(--font-serif);
  font-size: clamp(15px, 1.7vw, 20px);
  font-weight: 400;
  color: var(--text-dark);
  margin-bottom: 5px;
  letter-spacing: 0.01em;
}

.project-desc {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.65;
}

.project-type {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-pale);
  padding: 4px 9px;
  white-space: nowrap;
  margin-top: 3px;
}

/* ─── Career layout ──────────────────────────────────────── */
.career-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: clamp(28px, 4.5vw, 60px);
  align-items: start;
}

.cv-section { margin-bottom: clamp(28px, 4vh, 44px); }

.cv-section-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--accent-pale);
}

.cv-item { margin-bottom: 18px; }

.cv-item-name {
  font-family: var(--font-serif);
  font-size: clamp(14px, 1.4vw, 17px);
  font-weight: 400;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.cv-item-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.cv-item-desc {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
}

.skill-group { margin-bottom: 14px; }

.skill-group-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.skill-tag {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-dark);
  padding: 3px 9px;
  border: 1px solid var(--rule-light);
  letter-spacing: 0.04em;
}

.contact-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 300;
  color: var(--text-muted);
  padding: 8px 0;
  border-bottom: 1px solid var(--rule-light);
}
.contact-line a { color: var(--accent); }

.btn-cv {
  display: inline-block;
  margin-top: 20px;
  padding: 11px 26px;
  border: 1px solid var(--text-dark);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dark);
  cursor: none;
  transition: background 0.3s ease, color 0.3s ease;
}
.btn-cv:hover { background: var(--text-dark); color: var(--light); }

/* ─── Archive ─────────────────────────────────────────────── */
.keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 16px;
}

.kw {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(14px, 1.6vw, 19px);
  color: var(--text-muted);
  transition: color 0.25s ease;
}
.kw:hover { color: var(--text-dark); }
.kw.em {
  font-style: normal;
  font-weight: 600;
  color: var(--text-dark);
  font-size: clamp(16px, 2vw, 24px);
}

.palette-strip {
  display: flex;
  height: 44px;
  gap: 2px;
  margin-top: 16px;
}

.ps-swatch {
  flex: 1;
  position: relative;
}

.ps-label {
  position: absolute;
  bottom: -17px;
  left: 0;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.archive-mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 160px;
  gap: 2px;
  margin-top: 16px;
}

.am-cell {
  background: var(--light-2);
  display: flex;
  align-items: flex-end;
  padding: 10px 12px;
  overflow: hidden;
}
.am-cell.c2 { grid-column: span 2; }
.am-cell.r2 { grid-row: span 2; }

.am-cell-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.28);
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  body { cursor: auto; }
  #cursor-ring, #cursor-dot { display: none; }

  .c-grid.col-2,
  .c-grid.col-3      { grid-template-columns: 1fr; }

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

  .media-grid        { grid-template-columns: 1fr 1fr; }
  .media-item.tall   { grid-row: span 1; }
  .media-item.wide   { grid-column: span 2; }

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

  .project-item      { grid-template-columns: 60px 1fr; }
  .project-type      { grid-column: 2; }

  .archive-mosaic    { grid-template-columns: repeat(2, 1fr); }
  .am-cell.c2        { grid-column: span 1; }
}

@media (max-width: 480px) {
  .stat-row          { grid-template-columns: 1fr; }
  .project-item      { grid-template-columns: 1fr; }
  .project-year      { display: none; }
}

/* ─── Nav number flash (poster colour inversion) ─────────── */
@keyframes num-flash {
  0%   { color: #ffffff; opacity: 0.3; }
  18%  { color: #ffffff; opacity: 1; }
  100% { color: var(--accent); opacity: 1; }
}

.nav-num.is-flashing {
  animation: num-flash 0.20s ease-out forwards;
}

/* ─── Click flash overlay — old print / projector cut ─────── */
.js-click-flash {
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0;
  background: var(--light);
  /* Barely-there paper grain — NOT scan lines, just texture */
  background-image: repeating-linear-gradient(
    0deg,
    transparent 0px, transparent 3px,
    rgba(0, 0, 0, 0.022) 3px, rgba(0, 0, 0, 0.022) 4px
  );
}
