/* ===== Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* ===== Design Tokens — Monochrome + Accent ===== */
:root {
  --black: #0d0d0d;
  --dark: #151515;
  --dark-2: #1a1a1a;
  --dark-3: #222222;
  --gray-1: #333333;
  --gray-2: #555555;
  --gray-3: #888888;
  --gray-4: #aaaaaa;
  --gray-5: #cccccc;
  --light: #e8e8e8;
  --white: #f4f4f4;

  --accent: #ff4d2a;
  --accent-dark: #cc3d22;
  --accent-light: #ff6e4f;
  --accent-glow: rgba(255, 77, 42, 0.25);

  --bg: var(--black);
  --bg-elevated: var(--dark);
  --bg-card: var(--dark-2);
  --bg-card-hover: var(--dark-3);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --text-1: var(--white);
  --text-2: var(--gray-4);
  --text-3: var(--gray-3);

  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 72px;

  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg: #f7f7f5;
  --bg-elevated: #efefe9;
  --bg-card: #ffffff;
  --bg-card-hover: #fafaf8;
  --border: rgba(0, 0, 0, 0.06);
  --border-hover: rgba(0, 0, 0, 0.12);
  --text-1: #111111;
  --text-2: #555555;
  --text-3: #888888;
}

/* ===== Reset ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
  /* GSAP handles scroll */
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  overflow-x: hidden;
  line-height: 1.6;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  line-height: 1.08;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 200;
  display: flex;
  align-items: center;
  background: rgba(13, 13, 13, 0.6);
  backdrop-filter: blur(30px) saturate(1.2);
  -webkit-backdrop-filter: blur(30px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s var(--ease);
}

[data-theme="light"] .header {
  background: rgba(247, 247, 245, 0.65);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}

.logo .dot {
  color: var(--accent);
}

.controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ctrl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  min-width: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: all 0.25s var(--ease);
}

.ctrl-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-1);
  background: var(--bg-card);
}

.ctrl-btn.icon-only {
  padding: 0;
  font-size: 1.05rem;
}

/* ===== Video Hero ===== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-video-wrap video,
.hero-video-wrap .hero-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-video-wrap video {
  filter: grayscale(1) contrast(1.1);
}

.hero-fallback {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-3) 50%, var(--dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-2);
  font-size: 0.85rem;
  font-weight: 500;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to bottom, rgba(13, 13, 13, 0.3) 0%, transparent 40%),
    linear-gradient(to top, var(--bg) 0%, transparent 50%);
  pointer-events: none;
}

[data-theme="light"] .hero-overlay {
  background:
    linear-gradient(to bottom, rgba(247, 247, 245, 0.3) 0%, transparent 40%),
    linear-gradient(to top, var(--bg) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-bottom: clamp(60px, 10vh, 120px);
  max-width: 800px;
}

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 20px;
  opacity: 0;
}

.hero-title {
  font-size: clamp(2.4rem, 7vw, 5rem);
  letter-spacing: -0.04em;
  margin-bottom: 24px;
  opacity: 0;
}

.hero-title em {
  font-style: normal;
  color: var(--accent);
}

.hero-desc {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  color: var(--text-2);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 36px;
  opacity: 0;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  opacity: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s var(--ease);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-1);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--border-hover);
  background: var(--bg-card);
  transform: translateY(-2px);
}

.btn svg {
  width: 16px;
  height: 16px;
}

/* ===== Stats Marquee ===== */
.stats-bar {
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.stats-row {
  display: flex;
  gap: clamp(40px, 8vw, 100px);
  justify-content: center;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-num {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--accent);
  line-height: 1;
}

.stat-lbl {
  font-size: 0.75rem;
  color: var(--text-3);
  font-weight: 500;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ===== Parallax Sections ===== */
.parallax-section {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
}

.parallax-img-wrap {
  position: absolute;
  inset: -20% 0;
  z-index: 0;
}

.parallax-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.parallax-mask {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to bottom, var(--bg) 0%, transparent 15%, transparent 85%, var(--bg) 100%);
  pointer-events: none;
}

.parallax-content {
  position: relative;
  z-index: 2;
  padding: 120px 0;
}

/* ===== Section Headings ===== */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-tag::before {
  content: '';
  width: 32px;
  height: 2px;
  background: var(--accent);
}

.section-heading {
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  margin-bottom: 56px;
}

/* ===== 3D Tilt Project Cards ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.tilt-card {
  perspective: 900px;
}

.card-inner {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease);
  transform-style: preserve-3d;
  will-change: transform;
}

.card-inner:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.card-shine {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  z-index: 5;
}

.card-inner:hover .card-shine {
  opacity: 1;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}

.card-num {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 3rem;
  color: var(--accent);
  opacity: 0.15;
  line-height: 1;
}

.card-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  position: relative;
  z-index: 2;
  filter: grayscale(1) brightness(2);
  transition: filter 0.3s var(--ease);
}

.card-inner:hover .card-logo {
  filter: grayscale(0) brightness(1);
}

[data-theme="light"] .card-logo {
  filter: grayscale(1) brightness(0.5);
}

[data-theme="light"] .card-inner:hover .card-logo {
  filter: grayscale(0) brightness(1);
}

.card-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.card-badge.done {
  border-color: var(--gray-2);
  color: var(--gray-3);
}

.card-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 4px;
  position: relative;
  z-index: 2;
}

.card-role {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.65;
  position: relative;
  z-index: 2;
}

.card-tags {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 2;
}

.tag {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-3);
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid var(--border);
}

/* ===== Masked Transition Dividers ===== */
.mask-transition {
  position: relative;
  height: 40vh;
  min-height: 250px;
  overflow: hidden;
}

.mask-transition-img {
  position: absolute;
  inset: 0;
}

.mask-transition-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.8) contrast(1.1);
}

[data-theme="light"] .mask-transition-img img {
  filter: grayscale(0.6) contrast(1.05);
}

.mask-transition-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.mask-top,
.mask-bottom {
  position: absolute;
  left: 0;
  right: 0;
  height: 50%;
  background: var(--bg);
  z-index: 2;
  will-change: transform;
}

.mask-top {
  top: 0;
  transform-origin: top;
}

.mask-bottom {
  bottom: 0;
  transform-origin: bottom;
}

/* ===== Timeline ===== */
.timeline-section {
  padding: 120px 0;
}

.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), var(--gray-2), transparent);
}

.tl-item {
  padding-bottom: 48px;
  position: relative;
}

.tl-item:last-child {
  padding-bottom: 0;
}

.tl-item::before {
  content: '';
  position: absolute;
  left: -44.5px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--bg);
  transition: all 0.3s var(--ease);
}

.tl-item:hover::before {
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}

.tl-date {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.tl-logos {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.tl-logo {
  height: 28px;
  width: auto;
  margin-bottom: 8px;
  filter: grayscale(1) brightness(2);
  transition: filter 0.3s var(--ease);
}

.tl-item:hover .tl-logo {
  filter: grayscale(0) brightness(1);
}

[data-theme="light"] .tl-logo {
  filter: grayscale(1) brightness(0.4);
}

[data-theme="light"] .tl-item:hover .tl-logo {
  filter: grayscale(0) brightness(1);
}

.tl-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.tl-role {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.tl-desc {
  font-size: 0.86rem;
  color: var(--text-2);
  line-height: 1.65;
}

.tl-desc li {
  padding-left: 18px;
  position: relative;
  margin-bottom: 4px;
}

.tl-desc li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ===== Footer ===== */
.footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.footer-brand .dot {
  color: var(--accent);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-3);
}

.footer-links {
  display: flex;
  gap: 10px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
  border: 1px solid var(--border);
  transition: all 0.25s var(--ease);
}

.footer-link:hover {
  border-color: var(--border-hover);
  color: var(--text-1);
  transform: translateY(-2px);
}

.footer-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ===== Reveals ===== */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .parallax-content {
    padding: 80px 0;
  }

  .mask-transition {
    height: 25vh;
    min-height: 160px;
  }

  .timeline {
    padding-left: 28px;
  }

  .tl-item::before {
    left: -32.5px;
    width: 8px;
    height: 8px;
  }

  .footer-inner {
    flex-direction: column;
  }

  .stats-row {
    gap: 30px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .projects-grid {
    gap: 16px;
  }

  .card-inner {
    padding: 24px;
  }
}