/* ─────────────────────────────────────────────────────────────
   All theme values live in :root{} — edit freely.
═══════════════════════════════════════════════════════════════ */

/* ─── CSS Variables ─── */
:root {
  /* Palette — dark cinematic with warm ivory accents */
  --ink:          #0c0b09;
  --ink-soft:     #161410;
  --ink-mid:      #201d18;
  --ink-lift:     #2a2620;
  --ivory:        #f5ede0;
  --ivory-dim:    #b5a99a;
  --ivory-ghost:  #5a5248;
  --amber:        #d4943a;
  --amber-bright: #f0b050;
  --amber-dim:    #7a5520;
  --red:          #b83428;
  --teal:         #3a8a78;

  /* Typography */
  --f-display: 'Playfair Display', serif;
  --f-ui:      'Syne', sans-serif;
  --f-mono:    'Space Mono', monospace;

  /* Layout */
  --max-w:     1168px;
  --section-pad: clamp(80px, 10vw, 140px);
  --header-h:  72px;
}

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

body {
  background: var(--ink);
  color: var(--ivory-dim);
  font-family: var(--f-display);
  font-size: 18px;
  line-height: 1.75;
  overflow-x: hidden;
  cursor: none;
	/* Accessibility: Show focus outline ONLY when navigating with a keyboard */
*:focus-visible {
  outline: 2px dashed var(--amber);
  outline-offset: 4px;
}
	
}

/* Noise grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9990;
  mix-blend-mode: overlay;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar       { width: 3px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--amber-dim); }

/* ─── Custom Cursor ─── */
#cursor {
  position: fixed;
  width: 10px; height: 10px;
  background: var(--amber);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%,-50%);
  transition: transform .08s ease, width .2s, height .2s;
  mix-blend-mode: difference;
}
#cursor-trail {
  position: fixed;
  width: 36px; height: 36px;
  border: 1px solid rgba(212,148,58,.35);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%,-50%);
  transition: all .18s ease;
}
body.cursor-hover #cursor { transform: translate(-50%,-50%) scale(2.5); }
body.cursor-hover #cursor-trail { border-color: rgba(212,148,58,.7); transform: translate(-50%,-50%) scale(1.3); }

/* ═══════════════════════════
   LOADING SCREEN
═══════════════════════════ */
#loading-screen {
  position: fixed; inset: 0;
  background: var(--ink);
  z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .4s ease;
}
#loading-screen.done { opacity:0; pointer-events: none; }

.load-content { text-align: center; }

.load-letters {
  margin-bottom: 24px;
  display: flex; gap: 4px; justify-content: center;
}
.load-letters span {
  font-family: var(--f-ui);
  font-weight: 700;
  font-size: clamp(48px, 8vw, 90px);
  color: var(--ivory);
  letter-spacing: 8px;
  animation: letterPop .6s cubic-bezier(.2,1,.4,1) both;
}
.load-letters span:nth-child(1) { animation-delay: 0s; }
.load-letters span:nth-child(2) { animation-delay: .08s; }
.load-letters span:nth-child(3) { animation-delay: .16s; }

@keyframes letterPop {
  from { opacity: 0; transform: translateY(20px) scale(.9); }
  to   { opacity: 1; transform: none; }
}

.load-rule {
  width: 80px; height: 1px;
  background: var(--amber);
  margin: 0 auto 16px;
  animation: expandRule .5s .4s both;
}
@keyframes expandRule {
  from { width: 0; opacity: 0; }
  to   { width: 80px; opacity: 1; }
}

.load-sub {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--ivory-ghost);
  margin-bottom: 20px;
  animation: fadeUp .4s .5s both;
}

.load-progress {
  width: 160px; height: 1px;
  background: var(--ink-lift);
  margin: 0 auto;
  overflow: hidden;
}
#load-bar {
  height: 100%;
  background: var(--amber);
  width: 0;
  transition: width .3s ease;
}

/* ═══════════════════════════
   SITE HEADER
═══════════════════════════ */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 64px);
  z-index: 100;
  background: rgba(12,11,9,.0);
  transition: background .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
  transition: all .4s;
}
#site-header.scrolled {
  background: rgba(12,11,9,.92);
  backdrop-filter: blur(20px);
  border-bottom-color: rgba(212,148,58,.12);
}

.header-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--ivory-dim);
  text-decoration: none;
}
.brand-monogram {
  font-family: var(--f-ui);
  font-weight: 800;
  font-size: 18px;
  color: var(--amber);
  letter-spacing: 3px;
}
.brand-slash { color: var(--ivory-ghost); }
.brand-name  { color: var(--ivory-ghost); font-size: 9px; letter-spacing: 2px; }

.header-nav { display: flex; gap: 8px; }
.hn {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ivory-ghost);
  text-decoration: none;
  padding: 8px 14px;
  transition: color .2s;
  position: relative;
}
.hn::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 14px; right: 14px;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transition: transform .25s;
}
.hn:hover { color: var(--ivory); }
.hn:hover::after { transform: scaleX(1); }

/* Mobile hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none;
  cursor: pointer; padding: 8px;
}
.menu-toggle span {
  display: block; width: 24px; height: 1px;
  background: var(--ivory-dim);
  transition: all .3s;
}

/* Mobile drawer */
#mobile-menu {
  position: fixed; inset: 0;
  /* CHANGED: Switched to rgba and added backdrop-filter */
  background: rgba(22, 20, 16, 0.95); /* This is --ink-soft with 95% opacity */
  backdrop-filter: blur(15px);
  z-index: 200;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 32px;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
#mobile-menu.open { opacity: 1; pointer-events: all; }
.mobile-close {
  position: absolute; top: 28px; right: 28px;
  font-size: 20px; background: none; border: none;
  color: var(--ivory-dim); cursor: pointer;
}
.mm-link {
  font-family: var(--f-ui); font-weight: 700;
  font-size: 40px; color: var(--ivory);
  text-decoration: none; letter-spacing: 2px;
  transition: color .2s;
}
.mm-link:hover { color: var(--amber); }

/* ═══════════════════════════
   SECTION SHARED STYLES
═══════════════════════════ */
section {
  position: relative;
  padding: var(--section-pad) clamp(24px, 7vw, 100px);
  overflow: hidden;
}

.section-label {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: clamp(32px, 5vw, 64px);
}
.sl-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border: 1px solid var(--amber-dim);
  font-size: 10px;
  color: var(--amber);
  border-radius: 50%;
  flex-shrink: 0;
}
.sl-text::before {
  content: '';
  display: inline-block;
  width: 32px; height: 1px;
  background: var(--amber-dim);
  margin-right: 12px;
  vertical-align: middle;
}

.section-title {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(40px, 6vw, 88px);
  line-height: .95;
  color: var(--ivory);
  letter-spacing: -1px;
}
.section-title em { color: var(--amber); font-style: italic; }

/* ═══════════════════════════
   HERO SECTION
═══════════════════════════ */
#hero {
  min-height: 90vh;
  padding-top: calc(var(--header-h) + 40px);
  display: grid;
  /* CHANGED: Increased the max width of the photo column from 400px to 540px */
  grid-template-columns: 1fr minmax(280px, 540px);
  grid-template-rows: 1fr auto;
  gap: 0 clamp(20px, 4vw, 60px); 
  align-items: center;
  background: var(--ink-soft);
  overflow: hidden;
}
/* Film strip decoration */
.filmstrip {
  position: absolute;
  top: 0; left: 0;
  width: 38px;
  height: 100%;
  background: var(--ink);
  border-right: 1px solid rgba(212,148,58,.1);
  display: flex; flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 20px 0;
  z-index: 1;
}
.fs-hole {
  width: 12px; height: 10px;
  background: var(--ink-soft);
  border-radius: 2px;
  border: 1px solid rgba(212,148,58,.15);
  flex-shrink: 0;
}

.hero-inner {
  padding-left: 52px;
  z-index: 2;
  animation: heroIn 1s .2s both;
}

@keyframes heroIn {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: none; }
}

.hero-label-row {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ivory-ghost);
  margin-bottom: 28px;
}
.frame-count { color: var(--amber-dim); }
.hero-label  { color: var(--amber); }
.hero-headline {
  display: flex; flex-direction: column;
  font-family: var(--f-ui);
  font-weight: 800;
  /* CHANGED: Lowered max size to 82px (was 100px) and adjusted scaling */
  font-size: clamp(30px, 4.5vw, 82px); 
  line-height: .9;
  letter-spacing: -1px;
  color: var(--ivory);
  margin-bottom: 28px;
  word-break: break-word;
  overflow-wrap: break-word;
}
.hn-line {
  overflow: hidden;
  display: block;
  animation: slideUpLine .8s cubic-bezier(.2,1,.4,1) both;
}
.hn-line:nth-child(1) { animation-delay: .1s; }
.hn-line:nth-child(2) { animation-delay: .2s; }
.hn-line:nth-child(3) { animation-delay: .3s; }
.hn-line.accent { color: var(--amber); }

@keyframes slideUpLine {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.hero-role-strip {
  margin-bottom: 40px;
  animation: fadeUp .8s .5s both;
}
.role-pill {
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(16px, 2vw, 22px);
  color: var(--ivory-dim);
  font-weight: 400;
}

.hero-stats-row {
  display: flex; align-items: center; gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  animation: fadeUp .8s .65s both;
}
.hs { text-align: center; }
.hs-val {
  font-family: var(--f-ui);
  font-weight: 800;
  font-size: 32px;
  color: var(--amber);
  line-height: 1;
}
.hs-label {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ivory-ghost);
  margin-top: 4px;
}
.hs-divider { width: 1px; height: 36px; background: var(--ink-lift); }

.hero-cta-row {
  display: flex; gap: 16px; flex-wrap: wrap;
  animation: fadeUp .8s .8s both;
}

/* ─── Buttons ─── */
.btn-primary {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--amber);
  padding: 16px 32px;
  text-decoration: none;
  transition: background .25s, transform .2s;
  display: inline-block;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}
.btn-primary:hover { background: var(--amber-bright); transform: translateY(-2px); }

.btn-ghost {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid var(--amber-dim);
  padding: 16px 32px;
  text-decoration: none;
  transition: all .25s;
  display: inline-block;
}
.btn-ghost:hover { border-color: var(--amber); background: rgba(212,148,58,.06); color: var(--ivory); }

/* Hero Photo */
.hero-photo-zone {
  z-index: -1;
  animation: fadeIn .5s .2s both;
  align-self: center;
}
.photo-border-frame {
  position: relative;
  aspect-ratio: 19/9; /* Keeping your cinematic wide ratio */
  /* CHANGED: Set to 100% so it fully fills the new 540px grid space */
  max-width: 100%; 
  width: 100%;
  margin: 0 auto;
  background: var(--ink);
}
.photo-border-frame::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--amber) 0%, transparent 60%, var(--amber-dim) 100%);
  z-index: -1;
}
#hero-photo {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: contrast(1.05) sepia(8%);
  transition: filter .4s;
}
#hero-photo:hover { filter: contrast(1.1) sepia(0%); }

.photo-placeholder {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 32px;
  background: var(--ink-mid);
  width: 100%; height: 100%;
  border: 1px dashed var(--amber-dim);
}
.ph-icon { font-size: 48px; color: var(--amber-dim); }
.photo-placeholder p {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ivory-ghost);
  line-height: 1.8;
}
.photo-placeholder code { color: var(--amber); }

.photo-tag {
  position: absolute;
  bottom: -20px; left: 0; right: 0;
  text-align: center;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ivory-ghost);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.pt-dot {
  width: 5px; height: 5px;
  background: var(--amber);
  border-radius: 50%;
  animation: dotPulse 2s infinite;
}
@keyframes dotPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(.6); }
}

/* Hero scroll cue */
.hero-scroll-cue {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--ivory-ghost);
  padding-bottom: 40px;
  padding-left: 52px;
  animation: fadeIn 1s 1.4s both;
}
.scroll-bar {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--amber), transparent);
  animation: scrollPulse 2s infinite;
}
@keyframes scrollPulse {
  0%,100% { opacity: .4; }
  50%      { opacity: 1; }
}

/* ═══════════════════════════
   ABOUT SECTION
═══════════════════════════ */
#about { background: var(--ink); }

.about-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: clamp(40px, 8vw, 100px);
  align-items: start;
  margin-bottom: clamp(60px, 8vw, 100px);
}

.about-left .section-title { position: sticky; top: 120px; }

.about-lead {
  font-size: clamp(19px, 2.2vw, 26px);
  font-weight: 400;
  color: var(--ivory);
  line-height: 1.6;
  margin-bottom: 28px;
  font-style: italic;
}
.about-body {
  font-size: 17px;
  font-weight: 300;
  color: var(--ivory-dim);
  line-height: 1.85;
  margin-bottom: 20px;
}
.about-body em { color: var(--amber); font-style: italic; }

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 40px;
  border-top: 1px solid rgba(212,148,58,.1);
}
.ig-item {
  padding: 16px 0;
  border-bottom: 1px solid rgba(212,148,58,.1);
}
.ig-label {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ivory-ghost);
  margin-bottom: 4px;
}
.ig-val {
  font-size: 15px;
  color: var(--ivory);
  font-weight: 400;
}

/* Skills */
.skills-section {
  border-top: 1px solid rgba(212,148,58,.1);
  padding-top: 60px;
}
.skills-heading {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 40px;
  display: flex; align-items: center; gap: 16px;
}
.skills-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(212,148,58,.15);
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 60px;
}
.skill-item {}
.sk-header {
  display: flex; justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ivory-ghost);
  margin-bottom: 10px;
}
.sk-pct { color: var(--amber-dim); }
.sk-track {
  height: 1px;
  background: var(--ink-lift);
  position: relative;
  overflow: visible;
}
.sk-fill {
  position: absolute;
  top: 0; left: 0;
  height: 1px;
  background: var(--amber);
  width: 0;
  transition: width 1.4s cubic-bezier(.2,1,.4,1);
  box-shadow: 0 0 8px rgba(212,148,58,.5);
}
.sk-fill::after {
  content: '';
  position: absolute;
  right: 0; top: -3px;
  width: 7px; height: 7px;
  background: var(--amber);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(212,148,58,.8);
}
.sk-fill.animated { width: var(--w); }

/* ═══════════════════════════
   PROJECTS SECTION
═══════════════════════════ */
#projects { background: var(--ink-soft); }

.projects-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.filter-row {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.fb {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ivory-ghost);
  background: none;
  border: 1px solid rgba(212,148,58,.15);
  padding: 8px 16px;
  cursor: pointer;
  transition: all .2s;
}
.fb:hover { color: var(--amber); border-color: var(--amber-dim); }
.fb.active { color: var(--ink); background: var(--amber); border-color: var(--amber); }

/* Masonry-ish grid */
.projects-masonry {
  columns: 3;
  column-gap: 2px;
}
@media (max-width: 1000px) { .projects-masonry { columns: 2; } }
@media (max-width: 640px)  { .projects-masonry { columns: 1; } }

/* Loading dots */
.projects-loading {
  column-span: all;
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  padding: 80px;
}
.load-dot {
  width: 8px; height: 8px;
  background: var(--amber-dim);
  border-radius: 50%;
  animation: dotBounce .9s infinite;
}
.load-dot:nth-child(2) { animation-delay: .15s; }
.load-dot:nth-child(3) { animation-delay: .3s; }
@keyframes dotBounce {
  0%,80%,100% { transform: scale(1); opacity: .4; }
  40%          { transform: scale(1.5); opacity: 1; }
}

/* Project Card */
.project-card {
  break-inside: avoid;
  margin-bottom: 2px;
  background: var(--ink-mid);
  border: 1px solid rgba(212,148,58,.08);
  padding: 28px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s, transform .5s, background .3s, border-color .3s;
}
.project-card.vis { opacity: 1; transform: none; }
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--amber);
  transform: scaleX(0) translateZ(0);
  transition: transform .4s;
  transform-origin: left;
}
.project-card:hover { background: var(--ink-lift); border-color: rgba(212,148,58,.2); }
.project-card:hover::before { transform: scaleX(1); }

/* Card with image */
.project-card.has-image .proj-thumb {
  width: calc(100% + 56px);
  margin: -28px -28px 24px;
  height: 200px;
  object-fit: cover;
  display: block;
  filter: grayscale(20%) contrast(1.05);
  transition: filter .4s, transform .4s;
}
.project-card.has-image:hover .proj-thumb { filter: grayscale(0%) contrast(1.1); transform: scale(1.02); }

/* Overflow clip for image scale */
.project-card.has-image { overflow: hidden; }

.proj-num {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--amber-dim);
  margin-bottom: 8px;
}
.proj-cat {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ivory-ghost);
  margin-bottom: 12px;
}
.cat-pip {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pip-film     { background: #e8963a; }
.pip-writing  { background: #4a8fd4; }
.pip-doc      { background: #5aaa72; }
.pip-research { background: #b86090; }
.pip-perf     { background: #8a60c8; }

.proj-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(22px, 2.5vw, 32px);
  color: var(--ivory);
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}
.proj-desc {
  font-size: 14px;
  font-style: italic;
  font-weight: 300;
  color: var(--ivory-ghost);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 20px;
}
.proj-foot {
  display: flex; align-items: center; justify-content: space-between;
}
.proj-tag {
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--amber-dim);
  border: 1px solid var(--amber-dim);
  padding: 3px 10px;
}
.proj-arrow {
  color: var(--amber);
  font-size: 18px;
  transition: transform .3s;
  display: inline-block;
}
.project-card:hover .proj-arrow { transform: translate(4px,-4px); }

/* ═══════════════════════════
   TIMELINE SECTION
═══════════════════════════ */
#timeline { background: var(--ink); }

.timeline-track {
  position: relative;
  max-width: 860px;
  padding-left: 24px;
  margin-top: 60px;
}
.timeline-track::before {
  content: '';
  position: absolute;
  left: 0; top: 14px; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--amber) 0%, var(--amber-dim) 60%, transparent 100%);
}

.tl-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 32px;
  margin-bottom: 56px;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity .6s, transform .6s;
}
.tl-item.vis { opacity: 1; transform: none; }

.tl-marker {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding-top: 2px;
}
.tl-year {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--amber);
  text-align: center;
  white-space: nowrap;
}
.tl-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--amber);
  margin-left: -5px;
  position: relative;
  left: -24px;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(212,148,58,.4);
}

.tl-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--ivory);
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}
.tl-desc {
  font-size: 16px;
  font-weight: 300;
  font-style: italic;
  color: var(--ivory-dim);
  line-height: 1.8;
}
.tl-desc em { color: var(--amber); font-style: normal; }

.tl-future .tl-dot { border-style: dashed; opacity: .6; }
.tl-future .tl-title { color: var(--ivory-ghost); }

/* ═══════════════════════════
   CONTACT SECTION
═══════════════════════════ */
#contact { background: var(--ink-soft); }

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(40px, 8vw, 100px);
  align-items: start;
}

.contact-headline {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(50px, 7vw, 100px);
  line-height: .92;
  color: var(--ivory);
  letter-spacing: -2px;
  margin-bottom: 48px;
}
.contact-headline em { color: var(--amber); font-style: italic; display: block; }

.contact-details { display: flex; flex-direction: column; }
.cd-item {
  display: flex; align-items: center; gap: 18px;
  color: var(--ivory-dim);
  text-decoration: none;
  font-size: 16px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(212,148,58,.1);
  transition: color .2s;
}
.cd-item:hover { color: var(--ivory); }
.cd-icon {
  width: 42px; height: 42px;
  border: 1px solid rgba(212,148,58,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: border-color .2s, background .2s;
}
.cd-item:hover .cd-icon { border-color: var(--amber); background: rgba(212,148,58,.06); }

.contact-form-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 24px;
}

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.cf-row       { display: flex; gap: 16px; }
.cf-row.two > * { flex: 1; }
.cf-group { display: flex; flex-direction: column; gap: 6px; }
.cf-group label {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ivory-ghost);
}
.cf-group input,
.cf-group textarea {
  background: var(--ink);
  border: 1px solid rgba(212,148,58,.12);
  color: var(--ivory);
  padding: 14px 16px;
  font-family: var(--f-display);
  font-size: 16px;
  outline: none;
  /* CHANGED: Added box-shadow to the transition */
  transition: border-color .2s, box-shadow .2s; 
  resize: vertical;
  width: 100%;
}
.cf-group input:focus,
.cf-group textarea:focus { 
  border-color: var(--amber-dim); 
  /* ADDED: Subtle amber glow on focus */
  box-shadow: 0 0 12px rgba(212,148,58,.15); 
}
.btn-send {
  align-self: flex-start;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: none;
  border: 1px solid var(--amber);
  color: var(--amber);
  padding: 16px 36px;
  cursor: pointer;
  transition: all .25s;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}
.btn-send:hover { background: var(--amber); color: var(--ink); }
.btn-send:disabled { opacity: .5; cursor: not-allowed; }

.form-feedback {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--amber);
  display: none;
}
.form-feedback.vis { display: block; }
.form-feedback.err { color: var(--red); }

/* ═══════════════════════════
   FOOTER
═══════════════════════════ */
#site-footer {
  background: var(--ink);
  border-top: 1px solid rgba(212,148,58,.1);
  padding: 32px clamp(24px, 7vw, 100px);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.f-left { display: flex; align-items: center; gap: 16px; }
.f-monogram {
  font-family: var(--f-ui);
  font-weight: 800;
  font-size: 20px;
  color: var(--amber);
  letter-spacing: 3px;
}
.f-tagline {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ivory-ghost);
}
.f-right {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--ivory-ghost);
  letter-spacing: 2px;
}

/* ═══════════════════════════
   PROJECT MODAL
═══════════════════════════ */
#modal-overlay {
  position: fixed; inset: 0;
  background: rgba(12,11,9,.94);
  z-index: 500;
  display: none;
  align-items: center; justify-content: center;
  padding: 40px;
  backdrop-filter: blur(12px);
}
#modal-overlay.open { display: flex; }

#modal-box {
  background: var(--ink-mid);
  border: 1px solid rgba(212,148,58,.2);
  max-width: 740px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 52px;
  position: relative;
  animation: modalIn .4s cubic-bezier(.2,1,.4,1);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
}
#modal-box::-webkit-scrollbar { width: 3px; }
#modal-box::-webkit-scrollbar-thumb { background: var(--amber-dim); }

@keyframes modalIn {
  from { opacity: 0; transform: scale(.96) translateY(20px); }
  to   { opacity: 1; transform: none; }
}

#modal-close {
  position: absolute; top: 20px; right: 24px;
  background: none; border: none;
  color: var(--ivory-ghost);
  font-size: 20px; cursor: pointer;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent;
  transition: all .2s;
}
#modal-close:hover { color: var(--amber); border-color: rgba(212,148,58,.2); }

#modal-eyebrow {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 14px;
}
#modal-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 56px);
  color: var(--ivory);
  line-height: 1;
  letter-spacing: -1px;
  margin-bottom: 28px;
}
#modal-image-wrap img {
  width: 100%; max-height: 340px;
  object-fit: cover;
  margin-bottom: 28px;
  filter: contrast(1.05);
}
#modal-body {
  font-size: 16px;
  color: var(--ivory-dim);
  line-height: 1.9;
  font-weight: 300;
}
#modal-body p { margin-bottom: 16px; }
#modal-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid rgba(212,148,58,.1);
}
.modal-tag {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--amber-dim);
  border: 1px solid var(--amber-dim);
  padding: 4px 12px;
}
.modal-file-link {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 20px;
  padding: 12px 24px;
  border: 1px solid var(--amber-dim);
  color: var(--amber);
  text-decoration: none;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: all .2s;
}
.modal-file-link:hover { background: var(--amber); color: var(--ink); }

/* ═══════════════════════════
   ANIMATIONS (SHARED)
═══════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
/* ═══════════════════════════
   RESPONSIVE
═══════════════════════════ */
@media (max-width: 1100px) {
  #hero { 
    grid-template-columns: 1fr; 
    grid-template-rows: auto auto auto;
    grid-template-areas: 
      "content" 
      "photo" 
      "scrollcue";
    padding-right: clamp(24px, 5vw, 60px); 
  }
  
  /* Bring the photo back on tablets */
  .hero-photo-zone { 
    display: block !important; 
    margin-top: 60px;
	  margin-right:20 px;
    width: 100%;
  }
  
  .about-layout { grid-template-columns: 1fr; }
  .about-left .section-title { position: static; }
  .skills-grid { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  body { cursor: auto; }
  #cursor, #cursor-trail { display: none; }
  .header-nav { display: none; }
  .menu-toggle { display: flex; }
  .brand-name { display: none; }
  .tl-item { grid-template-columns: 64px 1fr; gap: 16px; }
  .cf-row.two { flex-direction: column; }
  #modal-box { padding: 28px; }
  .filmstrip { display: none; }
  .info-grid { grid-template-columns: 1fr; }

  /* Hero Container - Mobile */
  #hero { 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    min-height: 100vh; 
    height: auto; 
    padding-top: calc(var(--header-h) + 24px); 
    padding-bottom: 60px; 
    padding-left: 20px; 
    padding-right: 20px; 
    gap: 0; 
    overflow-x: hidden; 
  }
  
  .hero-inner { padding-left: 0; padding-right: 0; width: 100%; }
  .hero-scroll-cue { display: none; } 

/* Bring the photo back on mobile and scale it nicely */
  .hero-photo-zone {
    display: block !important;
    margin-top: 32px;
    width: 100%;
    z-index: 10;
    flex-shrink: 0; /* Prevents flexbox from squeezing the container */
  }
  
  .photo-border-frame {
    width: 100%;
    max-width: 100%; 
    /* Use a square or portrait ratio so it stands tall on narrow screens */
    aspect-ratio: 1/1; 
    min-height: 350px; /* Guarantees it never gets too small */
    height: auto;
  }

  /* Fix name overflow on mobile (Made smaller) */
  .hero-headline {
    font-size: clamp(24px, 8vw, 30px) !important;
    letter-spacing: -1px;
    overflow: visible;
    margin-bottom: 24px;
  }
  .hn-line { overflow: visible; }

  /* Fix hero label row wrapping */
  .hero-label-row { flex-wrap: wrap; gap: 8px; font-size: 9px; }

  /* Fix stats row */
  .hero-stats-row { gap: 16px; }
  .hero-stat-num  { font-size: clamp(32px, 8vw, 52px); }

  /* Fix CTA buttons */
  .hero-cta-row { flex-wrap: wrap; gap: 12px; }
  .btn-primary, .btn-ghost { width: 100%; justify-content: center; font-size: 10px; padding: 16px 20px; }
  .hero-role-strip { overflow: hidden; }
}

/* ═══════════════════════════
   PROJECT CARD — PLACEHOLDER IMAGE
═══════════════════════════ */
.proj-thumb-placeholder {
  width: calc(100% + 56px);
  margin: -28px -28px 24px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ink-mid) 0%, var(--ink-soft) 100%);
  border-bottom: 1px solid rgba(212,148,58,.12);
  position: relative;
  overflow: hidden;
}
.proj-thumb-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 40%, rgba(212,148,58,.08) 0%, transparent 65%);
}
.proj-thumb-placeholder span {
  font-family: var(--f-display);
  font-size: 64px;
  font-weight: 700;
  color: rgba(212,148,58,.18);
  line-height: 1;
  letter-spacing: -2px;
  position: relative;
  z-index: 1;
}
.proj-thumb-placeholder[data-cat="film"]     { --ph-tint: rgba(90,140,196,.08); }
.proj-thumb-placeholder[data-cat="writing"]  { --ph-tint: rgba(108,173,126,.08); }
.proj-thumb-placeholder[data-cat="doc"]      { --ph-tint: rgba(212,148,58,.08); }
.proj-thumb-placeholder[data-cat="research"] { --ph-tint: rgba(155,107,207,.08); }
.proj-thumb-placeholder[data-cat="perf"]     { --ph-tint: rgba(192,107,138,.08); }
.project-card.has-image .proj-thumb-placeholder {
  transition: filter .4s, transform .4s;
}
.project-card.has-image:hover .proj-thumb-placeholder {
  filter: brightness(1.15);
  transform: scale(1.02);
}

/* ═══════════════════════════
   MODAL — INLINE FILE VIEWER
═══════════════════════════ */
.modal-file-viewer {
  margin-top: 28px;
  border: 1px solid rgba(212,148,58,.2);
  overflow: hidden;
}
.modal-file-viewer-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(212,148,58,.06);
  border-bottom: 1px solid rgba(212,148,58,.15);
  gap: 12px;
}
.mfv-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--ivory-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.modal-dl-btn {
  flex-shrink: 0;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid var(--amber-dim);
  padding: 4px 12px;
  text-decoration: none;
  white-space: nowrap;
  transition: all .2s;
}
.modal-dl-btn:hover { background: var(--amber); color: var(--ink); }
.modal-pdf-embed {
  width: 100%;
  height: 520px;
  border: none;
  display: block;
  background: #fff;
}
.modal-file-img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  display: block;
  background: #000;
}
@media (max-width: 600px) {
  .modal-pdf-embed { height: 360px; }
}

/* ═══════════════════════════
   MOBILE — PROJECT CARDS & MODAL
═══════════════════════════ */
@media (max-width: 480px) {
  .project-card { padding: 20px; }
  .project-card.has-image .proj-thumb,
  .project-card.has-image .proj-thumb-placeholder {
    width: calc(100% + 40px);
    margin: -20px -20px 18px;
  }

  #modal-overlay { padding: 0; align-items: flex-end; }
  #modal-box {
    max-height: 92vh;
    padding: 24px 20px;
    clip-path: none;
    border-radius: 12px 12px 0 0;
  }
  #modal-title { font-size: clamp(28px, 8vw, 42px); }
  .modal-pdf-embed { height: 300px; }
  .modal-file-viewer-hd { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ═══════════════════════════
   ACCESSIBILITY
═══════════════════════════ */
/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}