/* ═══════════════════════════════════════════════════════════
   ALISTAIR SHARP — FILMMAKER PORTFOLIO
   Nostromo palette: dark industrial + CRT glow + status lights
   ═══════════════════════════════════════════════════════════ */

/* ── TOKENS ──────────────────────────────────────────────── */
:root {
  --bg:           #1c1e24;
  --bg-deep:      #141519;
  --surface:      #252830;
  --surface-hi:   #2d3040;
  --border:       #363a46;
  --border-hi:    #4a4f60;

  --text:         #dcdcd4;
  --text-muted:   #7a7d8a;
  --text-dim:     #4e5060;

  --red:          #cc2200;
  --red-hi:       #ff3311;
  --red-glow:     rgba(204, 34, 0, 0.18);

  --amber:        #c8640a;
  --amber-hi:     #f07d20;

  --crt:          #1a8fa0;
  --crt-hi:       #2ab8cc;

  --green:        #2a8c42;
  --green-hi:     #38b856;
  --amber-hi:     #f07d20;

  --font-display: 'VT323', 'Courier New', Courier, monospace;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'Space Mono', 'Courier New', Courier, monospace;

  --radius:       2px;
  --max-w:        860px;
  --section-gap:  5rem;
}

/* Dark theme is the only theme for this design — it commits to
   the Nostromo cockpit world deliberately. */

/* ── RESET ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img, video, iframe { display: block; max-width: 100%; }

/* ── BASE ─────────────────────────────────────────────────── */
body {
  background-color: #090911;  /* dark margin — shows outside page-wrap */
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

/* ── FILM STRIP BORDERS ───────────────────────────────────── */
/* Fixed vertical strips at viewport edges; only visible when
   viewport is wider than page-wrap. Sprocket holes via SVG tile. */
.film-strip {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 56px;
  z-index: 0;
  background-color: #09090e;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="56" height="40"><rect width="56" height="40" fill="%2309090e"/><rect x="11" y="9" width="34" height="22" rx="2" fill="%23550011"/><rect x="11" y="9" width="34" height="1" fill="%23880022" opacity="0.5"/></svg>');
  background-size: 56px 40px;
  background-position: center top;
  background-repeat: repeat-y;
}
.film-strip--l { left: 0; }
.film-strip--r { right: 0; }

/* ── FILM GRAIN ───────────────────────────────────────────── */
.film-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}
.film-grain::before {
  content: '';
  position: fixed;
  inset: 0;
  /* SVG feTurbulence noise — film grain texture */
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.88" numOctaves="4" stitchTiles="stitch"/><feColorMatrix type="saturate" values="0"/></filter><rect width="256" height="256" filter="url(%23n)" opacity="0.5"/></svg>');
  background-size: 256px 256px;
  opacity: 0.042;
  mix-blend-mode: screen;
}

/* ── FILM SCRATCHES — at the exact content panel borders ─────
   Using page-wrap pseudo-elements so they always track the panel
   edges regardless of viewport width.                           */
.page-wrap::before,
.page-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  pointer-events: none;
  z-index: 999;
  background: linear-gradient(to bottom,
    transparent            0%,
    rgba(255,255,255,0.55) 4%,
    rgba(255,255,255,0.85) 9%,
    rgba(255,255,255,0.65) 16%,
    transparent            22%,
    rgba(255,255,255,0.4)  28%,
    rgba(255,255,255,0.9)  35%,
    rgba(255,255,255,1.0)  41%,
    rgba(255,255,255,0.75) 48%,
    transparent            55%,
    rgba(255,255,255,0.5)  61%,
    rgba(255,255,255,0.8)  68%,
    rgba(255,255,255,0.95) 75%,
    rgba(255,255,255,0.6)  82%,
    transparent            88%,
    rgba(255,255,255,0.7)  93%,
    rgba(255,255,255,0.5)  97%,
    transparent            100%
  );
}

.page-wrap::before { left:  0; }
.page-wrap::after  { right: 0; }

/* ── CENTERED PAGE PANEL ──────────────────────────────────── */
.page-wrap {
  max-width: 980px;
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
  position: relative;
  z-index: 1;
  /* Dot grid — moved from body, sits inside the content panel */
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 28px 28px;
}

a { color: var(--red-hi); text-decoration: none; }
a:hover { color: var(--text); }
a:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* ── INDICATOR LIGHTS ─────────────────────────────────────── */
.ind {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ind--sm { width: 7px; height: 7px; }
.ind--red   { background: var(--red);   box-shadow: 0 0 5px var(--red); }
.ind--amber { background: var(--amber); box-shadow: 0 0 5px var(--amber); }
.ind--green { background: var(--green); box-shadow: 0 0 5px var(--green); }
.ind--blue  { background: var(--crt);   box-shadow: 0 0 5px var(--crt); }

.indicator-strip {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0.6rem 2rem;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
}

/* ── HEADER ───────────────────────────────────────────────── */
.site-header {
  border-bottom: 2px solid var(--border);
  background: var(--bg-deep);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
}

.header-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.site-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 6rem);
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 0.25rem;
  min-height: 1.1em; /* prevent layout jump while typing */
}

.cursor {
  color: var(--red);
  animation: blink 1.1s step-end infinite;
}
.cursor.done { animation: none; opacity: 0; }

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; opacity: 0; }
}

.site-subtitle {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  color: var(--red);
  margin-bottom: 1.5rem;
}

.header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.meta-sep {
  margin: 0 0.5rem;
  color: var(--border-hi);
}

.meta-tag { color: var(--amber); }

/* ── NAV ──────────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 0;
  overflow-x: auto;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  padding: 0.85rem 1.25rem;
  border-right: 1px solid var(--border);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.nav-link:first-child { border-left: 1px solid var(--border); }

.nav-link:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-link--active {
  color: var(--text);
  background: var(--surface);
  box-shadow: inset 0 -2px 0 var(--red);
}

.nav-link--cta {
  color: var(--red);
  margin-left: auto;
}
.nav-link--cta:hover { background: var(--red-glow); color: var(--red-hi); }

/* ── SECTIONS ─────────────────────────────────────────────── */
.section {
  padding: var(--section-gap) 2rem;
  border-bottom: 1px solid var(--border);
}

.section--dark { background: var(--bg-deep); }

.section > * { max-width: var(--max-w); margin-left: auto; margin-right: auto; }

.section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 0.5rem;
  text-wrap: balance;
}

.section-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 55ch;
}

/* ── FILM CARDS ───────────────────────────────────────────── */
.film-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.film-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}

.film-card:hover { border-color: var(--border-hi); }

/* Featured card (Film 01) */
.film-card--featured {
  border-color: var(--amber);
}

.film-award {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 1.5rem;
  background: rgba(200, 100, 10, 0.12);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--amber-hi);
}

/* Status badges */
.film-status {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius);
  border: 1px solid;
  margin-left: auto;
}

.film-status--complete {
  color: var(--green-hi);
  border-color: var(--green);
}

.film-status--progress {
  color: var(--amber-hi);
  border-color: var(--amber);
}

/* 16:9 embed wrapper */
.film-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
}

.film-embed iframe,
.film-embed video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

.embed-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.embed-standby {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-dim);
}

.standby-icon {
  font-size: 2rem;
  color: var(--border-hi);
}

.standby-text {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
}

.film-meta {
  padding: 1.5rem;
}

.film-meta-top {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.film-number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--red);
  letter-spacing: 0.1em;
}

.film-year,
.film-runtime {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.film-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 2rem);
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 0.6rem;
  text-wrap: balance;
}

.film-logline {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  max-width: 60ch;
}

.film-credits {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.35rem 1.5rem;
}

.credit-row {
  display: flex;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.4;
}

.credit-role {
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 7rem;
}

.credit-name { color: var(--text); }

/* ── ABOUT ────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

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

.about-bio p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.75;
  max-width: 60ch;
}

.skills-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.skills-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.skill-name { color: var(--text); }

/* ── PRE-PRODUCTION DOCS ──────────────────────────────────── */
.doc-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-width: var(--max-w);
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.doc-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.doc-card:last-child { border-bottom: none; }
.doc-card:hover { background: var(--surface-hi); }

.doc-icon {
  font-size: 1.4rem;
  color: var(--amber);
  flex-shrink: 0;
  width: 2rem;
  text-align: center;
}

.doc-info { flex: 1; }

.doc-type {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--amber);
  margin-bottom: 0.2rem;
}

.doc-title {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.doc-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.doc-link {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--red);
  border: 1px solid var(--red);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.doc-link:hover {
  background: var(--red-glow);
  color: var(--red-hi);
}

/* ── STATEMENT ────────────────────────────────────────────── */
.statement-body {
  max-width: var(--max-w);
  margin: 0 auto;
}

.statement-body p {
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
  color: var(--text);
  max-width: 62ch;
}

.statement-body p:last-child { margin-bottom: 0; }

/* ── CONTACT ──────────────────────────────────────────────── */
.contact-block {
  max-width: var(--max-w);
  margin: 0 auto;
}

.contact-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.contact-email {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  color: var(--text);
  letter-spacing: 0.04em;
  transition: color 0.15s;
  display: block;
}

.contact-email:hover { color: var(--red-hi); }

.contact-phone {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  display: block;
  margin-top: 0.5rem;
  transition: color 0.15s;
}

.contact-phone:hover { color: var(--text); }

/* ── FOOTER ───────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-deep);
  border-top: 2px solid var(--border);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.site-footer .indicator-strip {
  border-bottom: none;
  border-top: none;
  padding: 0.6rem 0;
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer-text {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

.footer-name   { color: var(--text-muted); }
.footer-sep    { color: var(--border-hi); }
.footer-studio { color: var(--red); letter-spacing: 0.14em; }

/* ── AWARD LAURELS ────────────────────────────────────────── */
.award-laurels {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  justify-content: center;
  margin: 1.25rem 0;
}

.laurel {
  height: 120px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(200, 100, 10, 0.25));
  transition: filter 0.2s;
}

.laurel:hover {
  filter: drop-shadow(0 0 10px rgba(200, 100, 10, 0.5));
}

/* ── FILM EXTERNAL LINKS ──────────────────────────────────── */
.film-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.film-ext-link {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius);
  transition: color 0.15s, border-color 0.15s;
}

.film-ext-link:hover {
  color: var(--red-hi);
  border-color: var(--red);
}

/* ── REEL BLOCK ───────────────────────────────────────────── */
.reel-block {
  max-width: var(--max-w);
  margin: 0 auto 3.5rem;
}

.reel-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--red);
  margin-bottom: 0.75rem;
}

.reel-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 0.4rem;
  text-wrap: balance;
}

.reel-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1.25rem;
}

/* ── SUBSECTION DIVIDER ───────────────────────────────────── */
.subsection-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 auto 2rem;
  max-width: var(--max-w);
}

.subsection-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  white-space: nowrap;
}

.subsection-rule {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── SKILL GROUPS (sidebar column) ───────────────────────── */
.skill-group {
  margin-bottom: 1.75rem;
}

.skill-group:last-child { margin-bottom: 0; }

/* ── SKILLS EXTENDED (3-col row) ─────────────────────────── */
.skills-extended {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: var(--max-w);
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 600px) {
  .skills-extended { grid-template-columns: 1fr; }
}

.skill-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.skill-block-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  margin-bottom: 0.85rem;
}

.skill-block-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ── MORPH TEAM ───────────────────────────────────────────── */
.morph-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 3rem;
  max-width: var(--max-w);
  margin: 0 auto;
  align-items: start;
}

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

.morph-poster-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-deep);
}

.morph-poster-img {
  width: 100%;
  height: auto;
  display: block;
}

.morph-desc {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 1rem;
  max-width: 55ch;
}

.morph-embed-wrap {
  margin-top: 1.75rem;
}

.morph-embed-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--amber);
  margin-bottom: 0.6rem;
}

.morph-downloads {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ── SCROLLBAR ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
