/* ============================================
   HANSONFLIX — Netflix-Style Interactive Resume
   Design System: HansOn Master Template (spectrum tokens, dark scheme) — Netflix-style layout
   Typography: Inter (Google Fonts)
   ============================================ */

:root {
  /* Spectrum theme — the HansOn master template signature.
     --t is a continuous theme position: 0 = light, 0.5 = neutral grey, 1 = dark.
     Every token interpolates in OKLCH between its light and dark stops,
     so the whole palette travels one perceptual path through grey.
     Default (and pre-JS paint) is Dark, t = 1. */
  --t: 1;

  /* Color Palette — each token: color-mix(in oklch, <light>, <dark> t) */
  --hf-red: color-mix(in oklch, #111113, #F5F5F4 calc(var(--t) * 100%)); /* --accent */
  --hf-red-hover: color-mix(in oklch, #000000, #FFFFFF calc(var(--t) * 100%)); /* accent hover */
  --hf-black: color-mix(in oklch, #F2F2F3, #0A0A0B calc(var(--t) * 100%)); /* --bg */
  --hf-dark: color-mix(in oklch, #FFFFFF, #131315 calc(var(--t) * 100%)); /* --surface */
  --hf-card: color-mix(in oklch, #E9E9EB, #1D1D20 calc(var(--t) * 100%)); /* --surface-raised */
  --hf-border: color-mix(in oklch, #D8D8DB, #2A2A2E calc(var(--t) * 100%)); /* --border */
  --hf-white: color-mix(in oklch, #111113, #F5F5F4 calc(var(--t) * 100%)); /* --text-primary */
  --hf-gray-100: color-mix(in oklch, #26262B, #E9E9EB calc(var(--t) * 100%)); /* near-primary text */
  --hf-gray-200: color-mix(in oklch, #5C5C63, #A7A7AE calc(var(--t) * 100%)); /* --text-secondary */
  --hf-gray-300: color-mix(in oklch, #8E8E96, #6E6E76 calc(var(--t) * 100%)); /* --text-faint */
  --hf-gray-400: color-mix(in oklch, #B9B9BE, #3D3D43 calc(var(--t) * 100%)); /* --border-strong */
  --hf-green: color-mix(in oklch, #16A34A, #4ADE80 calc(var(--t) * 100%)); /* --success */
  --hf-on-accent: color-mix(in oklch, #FFFFFF, #111113 calc(var(--t) * 100%)); /* --text-on-accent */
  --hf-focus: color-mix(in oklch, #2563EB, #7DD3FC calc(var(--t) * 100%)); /* --focus */
  --hf-sunken: color-mix(in oklch, #EFEFEF, #0E0E10 calc(var(--t) * 100%)); /* --surface-sunken */

  /* Spacing — Apple HIG 8pt grid */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Typography Scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.5rem;

  /* Transitions — Apple-style spring feel */
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* Layout */
  --nav-height: 64px;
  --content-padding: 4%;
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--hf-black);
  color: var(--hf-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ============================================
   NAVBAR — Fixed, with glassmorphism on scroll
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--nav-height);
  padding: 0 var(--content-padding);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
  transition: background-color var(--duration-normal) var(--ease-out),
              backdrop-filter var(--duration-normal) var(--ease-out);
}

.navbar.scrolled {
  background: color-mix(in oklch, var(--hf-black) 92%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hf-border);
}

.navbar-brand {
  color: var(--hf-red);
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: 2px;
  flex-shrink: 0;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-link {
  color: var(--hf-gray-200);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: color var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--hf-white);
}

.nav-link-cta {
  background: var(--hf-red);
  color: var(--hf-on-accent);
  padding: var(--space-sm) var(--space-md);
  border-radius: 4px;
  font-weight: 600;
  transition: background var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}

.nav-link-cta:hover {
  background: var(--hf-red-hover);
  color: var(--hf-on-accent);
  transform: scale(1.03);
}

/* Contact Dropdown */
.nav-contact-container {
  position: relative;
}

.contact-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: color-mix(in oklch, var(--hf-card) 95%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--hf-border);
  border-radius: 12px;
  padding: var(--space-md);
  min-width: 240px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all var(--duration-normal) var(--ease-spring);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  z-index: 1000;
}

.nav-contact-container:hover .contact-dropdown,
.nav-contact-container:focus-within .contact-dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.contact-dropdown p {
  font-size: var(--text-sm);
  margin-bottom: var(--space-sm);
  color: var(--hf-gray-200);
}

.contact-dropdown p strong {
  color: var(--hf-white);
  margin-right: var(--space-xs);
}

.contact-dropdown a {
  color: var(--hf-red);
  font-weight: 600;
}

.contact-dropdown a:hover {
  text-decoration: underline;
}

/* Navigation Controls */
.nav-controls {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-icon-btn {
  background: none;
  border: none;
  color: var(--hf-white);
  padding: var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--duration-fast) var(--ease-out);
}

.nav-icon-btn:hover {
  background: color-mix(in oklch, var(--hf-white) 10%, transparent);
}

/* Hamburger — hidden on desktop */
.hamburger {
  display: none;
  background: none;
  border: none;
  padding: var(--space-sm);
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  z-index: 1001;
}

.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--hf-white);
  border-radius: 2px;
  transition: transform var(--duration-normal) var(--ease-out),
              opacity var(--duration-fast) var(--ease-out);
}

.hamburger.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.hamburger.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   HERO SECTION — Video background
   ============================================ */
.hero {
  position: relative;
  min-height: 95vh;
  width: 100%;
  display: block; /* Switched from flex to block to ensure natural flow */
  overflow: hidden;
  padding-top: 10vh;
}

.hero-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center 30%;
  z-index: 0;
  animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background:
    linear-gradient(to top, var(--hf-black) 0%, transparent 50%),
    linear-gradient(to right, rgba(0, 0, 0, 0.75) 0%, transparent 65%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, transparent 15%);
}

.hero-content {
  position: relative;
  z-index: 5;
  padding: 0 var(--content-padding) 150px; /* Massive bottom padding to prevent overlap */
  max-width: 650px;
  margin-bottom: 100px;
}

/* Hero profile — Avatar + text side by side */
.hero-profile {
  display: flex;
  align-items: flex-end;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}



.hero-profile-text {
  flex: 1;
}

.hero-maturity-badge {
  display: inline-block;
  background: var(--hf-red);
  color: var(--hf-on-accent);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: var(--space-xs) var(--space-md);
  border-radius: 3px;
  margin-bottom: var(--space-md);
  text-transform: uppercase;
}

.hero-title {
  font-size: var(--text-5xl);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.04em;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-subtitle {
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--hf-gray-100);
  margin-bottom: var(--space-md);
}

.hero-description {
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--hf-gray-200);
  margin-bottom: var(--space-lg);
  max-width: 520px;
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: 300px !important; /* Increased space to prevent overlap with content below */
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 28px;
  font-size: var(--text-base);
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.btn-play {
  background-color: var(--hf-white);
  color: var(--hf-black);
}

.btn-play:hover {
  background-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.02);
}

.btn-info {
  background-color: rgba(109, 109, 110, 0.7);
  color: var(--hf-white);
}

.btn-info:hover {
  background-color: rgba(109, 109, 110, 0.5);
  transform: scale(1.02);
}

/* ============================================
   CONTENT ROWS
   ============================================ */
main {
  margin-top: 0 !important; 
  padding-top: 250px !important; /* Large padding to ensure clear separation from hero */
  position: relative;
  z-index: 10;
  padding-bottom: var(--space-3xl);
  background-color: var(--hf-black); /* Ensure solid background to cover hero overlap if any */
}

.row {
  margin-bottom: var(--space-2xl);
  padding-left: var(--content-padding);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.row.row-visible {
  opacity: 1;
  transform: translateY(0);
}

.row-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-top: var(--space-xl); /* Added breathing room at the top of rows */
  margin-bottom: var(--space-lg); /* Increased from space-md */
  color: var(--hf-gray-100);
  letter-spacing: -0.01em;
}

.row-posters {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  padding: var(--space-sm) 0;
  padding-right: var(--content-padding);
  gap: var(--space-md);
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.row-posters::-webkit-scrollbar {
  display: none;
}

/* ============================================
   POSTER CARDS
   ============================================ */
.poster {
  flex: 0 0 280px;
  height: 158px;
  background-color: var(--hf-card);
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}

.poster:hover {
  transform: scale(1.05);
  z-index: 20;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.poster-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.poster-content {
  position: relative;
  z-index: 2;
  padding: var(--space-md);
}

.poster-match {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--hf-green);
  margin-bottom: var(--space-xs);
}

.poster-title {
  font-weight: 700;
  font-size: var(--text-sm);
  line-height: 1.3;
  margin-bottom: 2px;
}

.poster-company {
  font-size: var(--text-xs);
  color: var(--hf-gray-200);
}

/* Large posters for portfolio row */
.row-posters-lg .poster {
  flex: 0 0 320px;
  height: 180px;
}

/* ============================================
   MODAL — Netflix detail view
   ============================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 5vh;
  pointer-events: none;
  transition: background-color var(--duration-normal) var(--ease-out);
  overflow-y: auto;
}

.modal-overlay.active {
  background-color: rgba(0, 0, 0, 0.7);
  pointer-events: auto;
}

.modal-content {
  background-color: var(--hf-dark);
  width: 92%;
  max-width: 850px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.7);
  transform: scale(0.9) translateY(30px);
  opacity: 0;
  transition: transform var(--duration-slow) var(--ease-spring),
              opacity var(--duration-normal) var(--ease-out);
  margin-bottom: 5vh;
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: color-mix(in oklch, var(--hf-black) 75%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--hf-white);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: transform var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
}

.modal-close:hover {
  transform: scale(1.1);
  background: color-mix(in oklch, var(--hf-card) 90%, transparent);
}

.modal-header {
  height: 320px;
  background-color: var(--hf-gray-400);
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: var(--space-xl);
}

.modal-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, var(--hf-dark) 5%, transparent 60%);
}

.modal-header-content {
  position: relative;
  z-index: 2;
}

.modal-title {
  font-size: var(--text-3xl);
  font-weight: 800;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.modal-meta {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  font-size: var(--text-sm);
  font-weight: 600;
}

.match-score {
  color: var(--hf-green);
}

.hd-badge {
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.modal-body {
  padding: var(--space-xl);
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-xl);
}

.modal-desc {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--hf-gray-100);
}

.modal-tags {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.tag-group {
  font-size: var(--text-sm);
}

.tag-label {
  color: var(--hf-gray-300);
}

.tag-values {
  color: var(--hf-white);
  font-weight: 500;
}

/* ============================================
   TOAST — replaces alert()
   ============================================ */
.toast {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  background: color-mix(in oklch, var(--hf-dark) 92%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--hf-border);
  border-radius: 12px;
  padding: var(--space-lg);
  z-index: 3000;
  transform: translateY(120%);
  opacity: 0;
  transition: transform var(--duration-slow) var(--ease-spring),
              opacity var(--duration-normal) var(--ease-out);
  min-width: 260px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.toast-body p {
  font-size: var(--text-sm);
  line-height: 1.8;
  color: var(--hf-gray-100);
}

.toast-body strong {
  color: var(--hf-white);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--hf-border);
  padding: var(--space-3xl) var(--content-padding) var(--space-xl);
}

.footer-content {
  max-width: 900px;
}

.footer-brand {
  color: var(--hf-red);
  font-size: var(--text-base);
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: var(--space-md);
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.footer-links a {
  color: var(--hf-gray-300);
  font-size: var(--text-sm);
  transition: color var(--duration-fast) var(--ease-out);
}

.footer-links a:hover {
  color: var(--hf-white);
}

.footer-qr-codes {
  display: flex;
  gap: var(--space-xl);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.qr-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.qr-item img {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  border: 1px solid var(--hf-border);
  padding: 4px;
  background-color: var(--hf-black);
}

.qr-item span {
  font-size: var(--text-xs);
  color: var(--hf-gray-300);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-copy {
  font-size: var(--text-xs);
  color: var(--hf-gray-400);
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-row {
  margin-bottom: var(--space-3xl);
  padding-right: var(--content-padding);
}

.about-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  background-color: var(--hf-card);
  border-radius: 12px;
  overflow: hidden;
  gap: var(--space-xl);
  padding: var(--space-xl);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.about-image {
  flex: 0 0 300px;
  max-width: 300px;
  border-radius: 8px;
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--hf-border);
}

.about-content-text {
  flex: 1;
  color: var(--hf-gray-100);
}

.about-subtitle {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--hf-white);
  letter-spacing: -0.01em;
}

.about-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.about-list li {
  position: relative;
  padding-left: var(--space-lg);
  font-size: var(--text-base);
  line-height: 1.6;
}

.about-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--hf-red);
  font-weight: 700;
}

/* ============================================
   RESPONSIVE — Mobile-first adjustments
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
  .poster {
    flex: 0 0 240px;
    height: 135px;
  }
  .row-posters-lg .poster {
    flex: 0 0 280px;
    height: 158px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --nav-height: 56px;
  }

  /* Hamburger visible */
  .hamburger {
    display: flex;
  }

  /* Dropdown menu */
  .navbar-nav {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: color-mix(in oklch, var(--hf-black) 97%, transparent);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    padding: var(--space-lg) var(--content-padding);
    gap: 0;
    border-bottom: 1px solid var(--hf-border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--duration-normal) var(--ease-out),
                opacity var(--duration-fast) var(--ease-out);
  }

  .navbar-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    display: block;
    padding: var(--space-md) 0;
    font-size: var(--text-base);
    border-bottom: 1px solid var(--hf-border);
  }

  .nav-link-cta {
    margin-top: var(--space-md);
    text-align: center;
    border-bottom: none;
    width: 100%;
  }

  .nav-contact-container {
    width: 100%;
  }

  .contact-dropdown {
    position: static;
    opacity: 1;
    transform: none;
    box-shadow: none;
    background: transparent;
    border: none;
    padding: var(--space-md) 0 0 0;
    pointer-events: auto;
  }

  .about-container {
    flex-direction: column;
    text-align: center;
    padding: var(--space-md);
  }

  .about-image {
    max-width: 200px;
    margin: 0 auto;
  }

  .about-list li {
    text-align: left;
  }

  /* Hero */
  .hero {
    height: auto; /* Removed fixed 75vh which caused overlaps */
    min-height: 85vh;
    padding-bottom: 80px;
  }

  .hero-title {
    font-size: var(--text-3xl);
  }

  .hero-subtitle {
    font-size: var(--text-base);
  }

  .hero-description {
    font-size: var(--text-sm);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero-content {
    max-width: 100%;
    padding-right: var(--content-padding);
    padding-bottom: 80px; /* Added space for buttons on mobile */
  }

  /* Posters */
  .poster {
    flex: 0 0 200px;
    height: 113px;
  }

  .row-posters-lg .poster {
    flex: 0 0 240px;
    height: 135px;
  }

  .poster-title {
    font-size: var(--text-xs);
  }

  /* Modal */
  .modal-overlay {
    padding-top: 0;
    align-items: flex-end;
  }

  .modal-content {
    width: 100%;
    border-radius: 12px 12px 0 0;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-header {
    height: 240px;
  }

  .modal-title {
    font-size: var(--text-2xl);
  }

  .modal-body {
    grid-template-columns: 1fr;
    padding: var(--space-lg);
  }

  /* Toast */
  .toast {
    left: var(--space-md);
    right: var(--space-md);
    bottom: var(--space-md);
    min-width: auto;
  }

  /* Footer */
  .footer-links {
    flex-direction: column;
    gap: var(--space-md);
  }
}

/* Small phones */
@media (max-width: 375px) {
  .hero-title {
    font-size: var(--text-2xl);
  }

  .btn {
    padding: 8px 16px;
    font-size: var(--text-sm);
  }

  .poster {
    flex: 0 0 170px;
    height: 96px;
  }
}

.contact-link {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.contact-link:hover {
  color: var(--hf-red);
  text-decoration: underline;
}

/* ============================================
   HANSON MASTER TEMPLATE — signature details
   ============================================ */
::selection {
  background: var(--hf-white);
  color: var(--hf-on-accent);
}

:focus-visible {
  outline: 2px solid var(--hf-focus);
  outline-offset: 2px;
}

/* The spectrum: light -> grey -> dark, the HansOn theme slider as a hairline */
.spectrum-bar {
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, #F2F2F3 0%, #A7A7AE 38%, #6E6E76 68%, #2A2A2E 100%);
}

/* ============================================
   THEME CONTROL — spectrum slider + presets
   ============================================ */
.theme-control {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* The mobile-menu duplicate stays hidden until the hamburger layout */
.theme-control--mobile {
  display: none;
}

.theme-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 120px;
  height: 6px;
  border-radius: 3px;
  border: 1px solid var(--hf-gray-400);
  background: linear-gradient(90deg, #F2F2F3 0%, #8E8E96 50%, #0A0A0B 100%);
  outline-offset: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.theme-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--hf-white);
  border: 2px solid var(--hf-gray-400);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.theme-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--hf-white);
  border: 2px solid var(--hf-gray-400);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.theme-slider::-moz-range-track {
  background: transparent;
}

.theme-presets {
  display: flex;
  gap: 4px;
}

.theme-preset {
  background: transparent;
  border: 1px solid var(--hf-border);
  color: var(--hf-gray-200);
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1;
  padding: 6px 9px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
}

.theme-preset:hover {
  color: var(--hf-white);
  border-color: var(--hf-gray-400);
}

.theme-preset.active {
  background: var(--hf-red);
  border-color: var(--hf-red);
  color: var(--hf-on-accent);
}

/* Keep the wider navbar from overflowing on smaller desktops */
@media (max-width: 1280px) {
  .theme-slider {
    width: 72px;
  }

  .theme-preset {
    padding: 6px 7px;
  }
}

/* Inside the hamburger menu: swap to the full-width duplicate */
@media (max-width: 768px) {
  .theme-control--nav {
    display: none;
  }

  .theme-control--mobile {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-md);
    width: 100%;
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--hf-border);
  }

  .theme-control--mobile .theme-slider {
    width: 100%;
  }

  .theme-control--mobile .theme-presets {
    justify-content: space-between;
  }

  .theme-control--mobile .theme-preset {
    flex: 1;
    padding: 8px 4px;
    text-align: center;
  }
}

/* ============================================
   CONTACT FORM
   ============================================ */
.contact-form {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.contact-form label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--hf-gray-200);
  margin-top: var(--space-md);
}

.contact-form label:first-of-type {
  margin-top: 0;
}

.contact-form input,
.contact-form textarea {
  background-color: var(--hf-dark);
  border: 1px solid var(--hf-border);
  border-radius: 8px;
  color: var(--hf-white);
  padding: 12px 14px;
  font: inherit;
  font-size: var(--text-base);
  width: 100%;
  box-sizing: border-box;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--hf-focus);
  outline-offset: 1px;
  border-color: var(--hf-gray-400);
}

.contact-form textarea {
  resize: vertical;
}

.contact-submit {
  align-self: flex-start;
  margin-top: var(--space-md);
}

.contact-status {
  min-height: 1.4em;
  font-size: var(--text-sm);
  color: var(--hf-gray-200);
  margin: 0;
}

.contact-status.success {
  color: var(--hf-green);
}
