:root{
  --bg: #121212;
  --surface: #1B1B1B;
  --surface-2: #202020;
  --border: #2A2A2A;
  --text: #F2F2F0;
  --text-muted: #9A9990;
  --accent: #FF7A3D;
  --live: #3ECF8E;
  --live-bg: rgba(62,207,142,0.12);
  --soon-bg: rgba(255,255,255,0.06);

  --font: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --wrap: 1720px;
  --gutter: 40px;
}

*{ box-sizing: border-box; }
[hidden]{ display: none !important; }

html{ scroll-snap-type: y proximity; }
.work-section{ scroll-snap-align: start; }
/* the section is a flex column, so its wrap needs telling to fill it */
.work-section > .wrap,
.detail > .wrap{ width: 100%; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-snap-type: none; }
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap{ max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
a{ color: inherit; }
:focus-visible{ outline: 2px solid var(--accent); outline-offset: 3px; }

/* Header */
/* no bar - the name just sits over the top of the hero */
.site-head{
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  padding: 22px 0;
}
/* the gradient sits behind the glyphs the whole time; hover just lets it through */
.mark,
.foot-name{
  text-decoration: none;
  background-image: linear-gradient(95deg, var(--accent), #FFC46B 48%, #8E7BFF);
  -webkit-background-clip: text;
  background-clip: text;
  transition: color 0.3s ease;
}
.mark:hover,
.mark:focus-visible,
.foot-name:hover,
.foot-name:focus-visible{ color: transparent; }

.mark{
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--text);
  /* drop-shadow rather than text-shadow, so it still reads once the fill is the gradient */
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5)) drop-shadow(0 1px 12px rgba(0,0,0,0.6));
}

/* Hero */
.hero{
  position: relative;
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}
.hero-video{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-content{
  position: relative;
  z-index: 2;
  padding: 64px 24px;
}
@media (prefers-reduced-motion: reduce){
  .hero-video{ display: none; }
}
.headline{
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  text-shadow: 0 2px 18px rgba(0,0,0,0.55), 0 1px 3px rgba(0,0,0,0.5);
}
.lede{
  color: rgba(242,242,240,0.92);
  font-size: 18px;
  max-width: 52ch;
  margin: 0 auto;
  text-shadow: 0 1px 12px rgba(0,0,0,0.6), 0 1px 2px rgba(0,0,0,0.5);
}

/* Work section */
.work-section{
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  padding: 72px 0 64px;
}

.filters{
  display:flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 32px;
}
.filter-chip{
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.filter-chip:hover{ color: var(--text); border-color: #444; }
.filter-chip.is-active{
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}

/* Card */
.card{
  perspective: 900px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.card.is-visible{ opacity: 1; transform: translateY(0); }
.card.is-hidden{ display:none; }

.card-tilt{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
  will-change: transform;
}
.card-tilt:hover{
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
}

.card-media{
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  overflow: hidden;
}
.card-media video{
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.card-body{ padding: 14px 16px 16px; }
.card-title{
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 2px;
  letter-spacing: -0.01em;
}
.card-category{
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.status{
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  text-decoration: none;
}
.status-live{
  background: var(--live-bg);
  color: var(--live);
}
.status-live:hover{ background: rgba(62,207,142,0.2); }
.status-soon{
  background: var(--soon-bg);
  color: var(--text-muted);
}

/* Contact */
.contact{
  position: relative;
  padding: 110px 0 92px;
  border-top: 1px solid var(--border);
  text-align: center;
  overflow: hidden;
}
/* a soft glow so the page does not end on flat black */
.contact::before{
  content: '';
  position: absolute;
  top: -140px;
  left: 50%;
  width: min(900px, 130%);
  height: 560px;
  transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(142,123,255,0.17), rgba(255,122,61,0.07) 45%, transparent 70%);
  pointer-events: none;
}
.contact > .wrap{ position: relative; z-index: 1; }
.contact-inner{ max-width: 620px; margin-inline: auto; }
.contact-status{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  font-size: 13px;
  font-weight: 500;
  color: var(--live);
  background: var(--live-bg);
  padding: 6px 14px;
  border-radius: 999px;
}
.contact-status::before{
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--live);
}
.contact-title{
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.contact-sub{
  margin: 0 0 28px;
  font-size: 16px;
  color: var(--text-muted);
  max-width: 56ch;
  margin-inline: auto;
}
.contact-actions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
}
.contact-mail{
  display: inline-flex;
  align-items: center;
  font-size: clamp(15px, 1.5vw, 18px);
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 22px;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.contact-mail:hover{
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(255,122,61,0.08);
}
.contact-copy{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 16px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.contact-copy:hover{ color: var(--text); border-color: var(--text-muted); }
.contact-copy.is-done{ color: var(--live); border-color: var(--live); }
.contact-note{ margin: 0; font-size: 13px; color: var(--text-muted); }

/* Footer */
.site-foot{
  border-top: 1px solid var(--border);
  padding: 20px 0;
}
.site-foot-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.foot-copy{
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
}
.foot-name{ color: var(--text-muted); font-weight: 500; }
.foot-links{
  display: flex;
  gap: 20px;
}
.foot-links a{
  font-size: 12.5px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.foot-links a:hover{ color: var(--text); }

@media (max-width: 640px){
  .hero-content{ padding: 48px 20px; }
  .work-section{ padding: 48px 0; }
  /* two up, so the phone shows more than one project at a time */
  .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .card-body{ padding: 11px 12px 13px; }
  .card-title{ font-size: 13.5px; }
  .card-category{ font-size: 11.5px; margin-bottom: 8px; }
  .status{ font-size: 11px; padding: 4px 8px; gap: 4px; }

  .contact{ padding: 76px 0 60px; }
  .contact-mail{ font-size: 14.5px; padding: 11px 16px; word-break: break-all; }
  .contact-actions{ gap: 8px; }
  .site-foot-row{ flex-direction: column; gap: 10px; text-align: center; }

  /* filters: one swipeable row instead of a ragged wrap */
  .filters{
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* bleed to the screen edges so chips scroll under them */
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
  }
  .filters::-webkit-scrollbar{ display: none; }
  .filter-chip{
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
}


/* Detail view — one project large, the rest around it */
.detail{ padding: 92px 0 72px; }
.detail-layout{
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(280px, 22vw, 400px);
  gap: 20px;
  /* both columns share one row, so the shortlist ends level with the panel */
  align-items: stretch;
}

/* the featured project: video on the left, its details in the same panel */
.detail-panel{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}
.detail-media{
  position: relative;
  min-width: 0;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
}
.detail-media video{ width: 100%; height: 100%; object-fit: cover; display: block; }

/* floats over the video, the way the reference does it */
.detail-back{
  position: absolute;
  top: 14px;
  left: 14px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--text);
  background: rgba(18, 18, 18, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.detail-back:hover{ background: rgba(18, 18, 18, 0.85); }

.detail-meta{ padding: 26px 24px; }
.detail-title{ font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 8px; }
.detail-title:focus{ outline: none; }
.detail-category{ font-size: 14px; color: var(--text-muted); margin: 0 0 22px; }

/* two cards that split the panel height between them */
/* Two cards that split the panel height between them. height:0 + min-height
   keeps this column out of the row's height calculation, so the panel sets the
   height and never stretches past its own video. */
.detail-side{
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 20px;
  height: 0;
  min-height: 100%;
}
.detail-side .thumb{ display: flex; flex-direction: column; min-height: 0; }
.detail-side .thumb-media{ flex: 1 1 auto; aspect-ratio: auto; min-height: 0; }
/* the rest run the full width underneath, in complete rows */
.detail-strip{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.thumb{
  font: inherit;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  width: 100%;
  display: block;
}
.thumb-media{
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.thumb:hover .thumb-media{ border-color: var(--text-muted); transform: translateY(-2px); }
.thumb-media video{ width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-text{ display: block; padding: 11px 2px 0; }
.thumb-title{ display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.thumb-cat{ display: block; font-size: 13px; color: var(--text-muted); margin-top: 1px; }

/* the grid cards are clickable now */
.card{ cursor: pointer; }

@media (max-width: 980px){
  /* the details column has no room beside the video, so it drops underneath */
  .detail-panel{ grid-template-columns: minmax(0, 1fr); }
  .detail-meta{ padding: 22px 22px 26px; }
}

/* Side by side only where two side cards are genuinely as tall as the panel;
   narrower than this the column either squashes or leaves a gap, so it stacks. */
@media (max-width: 1359px){
  .detail-layout{ grid-template-columns: minmax(0, 1fr); gap: 18px; }
  /* stacked, the shortlist is just more cards */
  .detail-side{
    grid-template-rows: none;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 18px;
    height: auto;
    min-height: 0;
  }
  .detail-side .thumb{ display: block; }
  .detail-side .thumb-media{ flex: none; aspect-ratio: 4 / 3; }
}

@media (max-width: 640px){
  :root{ --gutter: 20px; }
  .detail{ padding: 78px 0 56px; }
  .detail-title{ font-size: 23px; }
  .detail-side,
  .detail-strip{ grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 14px; }
  .detail-strip{ margin-top: 14px; }
  .thumb-title{ font-size: 13.5px; }
  .thumb-cat{ font-size: 12px; }
}
