/* =================================================================
   Palette pulled from Jake's own renders:
   - ProceduralLandscape_01 → cyan sky, lavender haze, magenta ridges,
     violet foreground
   - ArtisticViewOfEditorTool → hot magenta + electric blue on near-black
   ================================================================= */
:root {
  /* base — deep indigo-black, not the usual neutral slate */
  --bg:        #08061a;
  --bg-2:      #0d0a24;
  --surface:   #141033;
  --surface-2: #1c1642;
  --border:    #2e2560;
  --border-lit:#4a3a9e;

  --text:      #eee9ff;
  --text-dim:  #a79ccb;
  --text-mute: #7264a0;

  /* accents straight off the landscape ramp */
  --magenta:   #e34ff0;
  --violet:    #7b3cff;
  --indigo:    #5a2fe0;
  --cyan:      #4fd6e8;
  --lavender:  #b58cff;

  --grad-hot:  linear-gradient(120deg, var(--magenta), var(--violet));
  --grad-sky:  linear-gradient(120deg, var(--cyan), var(--lavender), var(--magenta));

  --radius:    10px;
  --radius-sm: 8px;
  --max:       1120px;
  --shadow:    0 18px 50px rgba(4,2,16,.7);

  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* faint editor-style grid over the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(122,60,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122,60,255,.05) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 25%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 28px; }

a { color: var(--magenta); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: "Space Grotesk", "Inter", sans-serif; line-height: 1.12; margin: 0; }

section[id] { scroll-margin-top: 16px; }

/* ===== Section 1 · Demo reel ===== */
.reel {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(8,6,26,.50) 0%, rgba(8,6,26,.76) 45%, rgba(8,6,26,.93) 78%, var(--bg) 100%),
    url("assets/procedural-landscape.png") center 20% / cover no-repeat;
}
/* horizon scanlines over the render */
.reel::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.028) 0 1px, transparent 1px 4px);
  pointer-events: none;
}
.reel-inner { position: relative; z-index: 1; padding: 72px 28px 76px; }
.reel-head { text-align: center; max-width: 820px; margin: 0 auto 40px; }
.reel-head h1 {
  font-size: clamp(46px, 7.5vw, 88px);
  font-weight: 700; letter-spacing: -2.5px;
  background: var(--grad-sky);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  padding-bottom: .06em;
}

.eyebrow {
  font-family: var(--mono);
  text-transform: uppercase; letter-spacing: .22em; font-size: 11.5px; font-weight: 500;
  color: var(--cyan); margin: 0 0 18px;
}
.lead { color: var(--text-dim); font-size: 18.5px; margin: 20px auto 0; max-width: 60ch; }
.lead strong { color: var(--text); font-weight: 600; }

/* credential strip */
.cred-row {
  list-style: none; padding: 0; margin: 30px auto 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}
.cred-row li {
  display: flex; align-items: center; gap: 10px;
  background: rgba(20,16,51,.72);
  border: 1px solid var(--border);
  backdrop-filter: blur(6px);
  padding: 8px 16px 8px 8px;
  color: var(--text-dim); font-size: 13px; line-height: 1.3;
  border-radius: var(--radius-sm);
}
.cred-row strong { color: var(--text); }
.cred-key {
  font-family: var(--mono);
  font-weight: 700; font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: #fff; background: var(--grad-hot);
  padding: 4px 10px; white-space: nowrap;
}

/* reel stage — framed like a viewport */
.reel-stage {
  position: relative;
  background: rgba(13,10,36,.78);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-lit);
  border-radius: var(--radius);
  padding: 14px;
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 70px rgba(122,60,255,.20);
}
/* thin spectrum line along the top edge of the frame */
.reel-stage::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad-sky);
  border-radius: var(--radius) var(--radius) 0 0;
  pointer-events: none;
}

.reel-caption { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 14px 6px 4px; }
.reel-caption p { margin: 0; color: var(--text-dim); font-size: 14px; }
.reel-caption strong { color: var(--text); }

.reel-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }

/* ===== Buttons — cut corners instead of the usual pill ===== */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 26px;
  font-family: var(--mono);
  font-weight: 600; font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer; border: 1px solid transparent;
  border-radius: 8px;
  transition: transform .18s ease, filter .18s ease, background .18s ease, color .18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--grad-hot); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 10px 26px rgba(227,79,240,.4); }
.btn-ghost { background: rgba(28,22,66,.7); color: var(--text); border-color: var(--border-lit); }
.btn-ghost:hover { background: var(--surface-2); color: #fff; box-shadow: 0 10px 24px rgba(122,60,255,.26); }

/* ===== Content blocks ===== */
.content { position: relative; z-index: 1; padding: 72px 28px 24px; }
.block { margin-bottom: 76px; }

/* numbered, editor-style section headers */
.block-title {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono);
  font-size: 12.5px; text-transform: uppercase; letter-spacing: .2em;
  color: var(--text-dim); font-weight: 500;
  margin-bottom: 26px; padding-bottom: 0; border: 0;
}
.block-title::before {
  content: attr(data-index);
  color: var(--magenta); font-weight: 700; letter-spacing: .05em;
}
.block-title::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border-lit), transparent);
}

.prose { color: var(--text-dim); font-size: 16.5px; max-width: 72ch; margin: 0; }
.prose + .prose { margin-top: 16px; }
.prose strong { color: var(--text); font-weight: 600; }
.section-intro { margin-bottom: 30px; }

/* ===== Section 2 · About ===== */
.about-inner { display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: center; }
.about-photo { position: relative; padding: 10px; }
/* gradient frame offset behind the photo */
.about-photo::before {
  content: ""; position: absolute; inset: 0;
  background: var(--grad-sky); opacity: .5;
  border-radius: 14px;
}
.about-photo img {
  position: relative;
  width: 100%; height: auto; display: block;
  object-fit: cover; aspect-ratio: 1;
  border-radius: 6px;
}
.contact-row { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 24px; padding: 0; margin: 24px 0 0; font-family: var(--mono); font-size: 13px; }
.contact-row li { position: relative; }
.contact-row li + li::before { content: "/"; position: absolute; left: -14px; color: var(--text-mute); }
.contact-row a { color: var(--text-dim); }
.contact-row a:hover { color: var(--cyan); }

/* ===== Section 3 · Work history ===== */
.timeline { display: flex; flex-direction: column; gap: 20px; }
.job {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 28px 30px 28px 32px;
  border-radius: var(--radius);
  transition: background .2s ease;
}
/* gradient rail instead of a flat left border */
.job::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--cyan), var(--violet));
  border-radius: var(--radius) 0 0 var(--radius);
}
.job.is-key {
  background: linear-gradient(120deg, rgba(227,79,240,.10), rgba(122,60,255,.05) 45%, transparent 70%), var(--surface);
  border-color: var(--border-lit);
}
.job.is-key::before { width: 4px; background: var(--grad-hot); }

.job-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 14px; }
.job-head h3 { font-size: 20px; }
.job-head .at {
  background: var(--grad-sky);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 700;
}
.job-dates {
  font-family: var(--mono); font-size: 12px; letter-spacing: .05em;
  color: var(--text-mute); white-space: nowrap;
}
.job-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.job ul { margin: 0; padding-left: 20px; color: var(--text-dim); display: flex; flex-direction: column; gap: 9px; }
.job ul li { font-size: 15px; }
.job ul li::marker { color: var(--violet); }
.job strong { color: var(--text); font-weight: 600; }

/* ===== Video embeds — shared by the hero reel and project heroes ===== */
.video-embed { position: relative; aspect-ratio: 16/9; background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* click-to-load YouTube facade — no player scripts until the user asks for one */
.lite-yt {
  position: absolute; inset: 0;
  width: 100%; height: 100%; padding: 0;
  border: 0; background: #000; cursor: pointer; display: block;
}
.lite-yt img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .4s ease, opacity .2s ease;
}
.lite-yt:hover img { transform: scale(1.03); opacity: .82; }
.lite-yt .play-badge { pointer-events: none; }
.lite-yt:hover .play-badge { transform: scale(1.1); }
.lite-yt:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }

/* ===== Section 4 · Projects — vertical list, one hero image each ===== */
.project-list { display: flex; flex-direction: column; gap: 20px; }

.project {
  display: grid; grid-template-columns: 0.55fr 1fr; gap: 24px; align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.project:hover {
  border-color: var(--border-lit);
  background: linear-gradient(120deg, rgba(122,60,255,.07), transparent 55%), var(--surface);
  box-shadow: 0 16px 34px rgba(4,2,16,.45);
}

/* hero image (or click-to-play facade) */
.project-media {
  position: relative; overflow: hidden;
  aspect-ratio: 16/9;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #000;
}
.project-media > img {
  width: 100%; height: 100%; display: block;
  object-fit: cover;
  transition: transform .5s ease;
}
.project:hover .project-media > img { transform: scale(1.03); }

/* phone captures: letterbox instead of cropping the frame to ribbons */
.project-media.is-portrait { background: var(--bg-2); }
.project-media.is-portrait img { object-fit: contain; }
.project:hover .project-media.is-portrait > img { transform: scale(1.02); }

/* entries with no hero image yet — single column, tighter */
.project.is-text { grid-template-columns: 1fr; padding: 20px 24px; }
.project.is-text .project-desc { max-width: 70ch; }

.project-body { display: flex; flex-direction: column; align-items: flex-start; }
.project-name { font-size: 21px; letter-spacing: -.3px; margin-bottom: 8px; }
.project-desc { color: var(--text-dim); font-size: 14.5px; line-height: 1.55; margin: 0; }
.project-date {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cyan); margin: 12px 0 0;
}
.project-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.project .btn { padding: 10px 18px; font-size: 12px; }

.play-badge {
  position: absolute; inset: 0; margin: auto;
  width: 62px; height: 62px;
  display: grid; place-items: center;
  background: var(--grad-hot); color: #fff; font-size: 20px; padding-left: 3px;
  border-radius: 50%;
  transition: transform .2s ease;
}

/* ===== Tags ===== */
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-dim); background: rgba(28,22,66,.8);
  border: 1px solid var(--border); border-radius: 5px; padding: 4px 11px;
}
.tag-new { color: #fff; background: var(--grad-hot); border-color: transparent; }
.tag-vr { color: var(--cyan); background: rgba(79,214,232,.08); border-color: rgba(79,214,232,.42); }
.tag-ai { color: var(--lavender); background: rgba(181,140,255,.10); border-color: rgba(181,140,255,.45); }

.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }

/* ===== References ===== */
.refs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.ref-card {
  background: var(--surface); border: 1px solid var(--border);
  padding: 20px 22px;
  border-radius: var(--radius-sm);
  transition: border-color .2s ease;
}
.ref-card:hover { border-color: var(--border-lit); }
.ref-name { font-weight: 700; margin: 0 0 2px; font-family: "Space Grotesk", sans-serif; }
.ref-role { color: var(--text-dim); font-size: 13.5px; margin: 0 0 12px; }
.ref-card a { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); }
.note { color: var(--text-mute); font-size: 13px; margin-top: 18px; font-family: var(--mono); }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px; position: relative; z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(122,60,255,.07));
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  padding: 32px 28px; color: var(--text-mute);
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em;
}
.footer-links { list-style: none; display: flex; gap: 24px; padding: 0; margin: 0; }
.footer-links a { color: var(--text-dim); text-transform: uppercase; }
.footer-links a:hover { color: var(--cyan); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .about-inner { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .about-photo { max-width: 240px; margin: 0 auto; }
  .about-text .prose { margin: 0 auto; }
  .contact-row { justify-content: center; }
  .refs-grid { grid-template-columns: repeat(2, 1fr); }
  .project { grid-template-columns: 1fr; gap: 22px; }
  .reel-head h1 { letter-spacing: -1.5px; }
}
@media (max-width: 520px) {
  .refs-grid { grid-template-columns: 1fr; }
  .cred-row li { width: 100%; }
  .reel-inner { padding: 46px 22px 52px; }
  .reel-stage { padding: 8px; }
  .job { padding: 24px 22px; }
  .project { padding: 16px; }
  .project-name { font-size: 23px; }
  .job-head { flex-direction: column; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .project-media > img { transition: none; }
}
