/* ── Reset & Tokens ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #1c0f08;
  --surface: #7f594b;
  --border: #4a2d18;
  --text: #f5f0e8;
  --muted: #baa898;
  --accent: #ff7d65;
  --accent-light: #ff7d65;
  --accent-dim: rgba(255, 125, 101, 0.12);
  --radius: 4px;
  --font-display: "filson-soft", sans-serif;
  --font-stencil: "filson-soft", sans-serif;
  --font-serif: "filson-soft", sans-serif;
  --font-body: "filson-soft", sans-serif;
}

html { scroll-behavior: smooth; }

/* ── Custom cursor ───────────────────────────────────────────── */
* { cursor: none !important; }

#custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 99999;
  transition: opacity 0.2s ease;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

.top-gradient {
  display: none;
}


/* ── Utility ────────────────────────────────────────────────── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
}

.tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-light);
  border: 1.5px solid var(--accent-light);
  padding: 10px 22px;
  border-radius: 50px;
  margin-bottom: 24px;
}

/* ── Nav ────────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 48px;
  transition: background 0.3s, backdrop-filter 0.3s;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 32px;
}

nav.scrolled {
  background: rgba(24, 12, 7, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  font-family: "filson-soft", sans-serif;
  font-weight: 500;
  font-style: normal;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  position: relative;
  transition: color 0.2s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active { font-weight: 500; color: var(--text); }
.nav-links a.active::after { transform: scaleX(1); }

.nav-cta {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--bg);
  background: var(--accent);
  padding: 10px 22px;
  border-radius: 20px;
  text-decoration: none;
  border: none;
  transition: background 0.2s;
}

.nav-cta:hover { background: var(--accent-light); }

/* ── Hero ───────────────────────────────────────────────────── */
.hero-halftone {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
}

#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-bottom: 0;
  padding-top: 100px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero-grid-overlay {
  display: none;
}

.hero-glow {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 48px;
}

.hero-number {
  font-family: "filson-soft", sans-serif;
  font-weight: 200;
  font-style: normal;
  font-size: 16px;
  letter-spacing: 2pt;
  color: var(--accent-light);
  margin-bottom: 11px;
  text-align: center;
}

.hero-number-dot { color: var(--muted); }

.hero-headline {
  margin-top: -10px;
  margin-bottom: 11px;
  text-align: center;
}

.hero-c4c-logo {
  width: clamp(280px, 55vw, 760px);
  height: auto;
  display: block;
  margin: 0 auto;
}

.hero-headline .line { display: block; }

/* COOKIES — DM Serif Display */
.hero-headline .cookies {
  font-family: "filson-soft", sans-serif;
  font-weight: 200;
  font-style: normal;
  color: #ffffff;
  letter-spacing: 0.03em;
}

/* FOR CARL — DM Serif Display italic */
.hero-headline .for-carl {
  font-family: "filson-soft", sans-serif;
  font-weight: 200;
  font-style: italic;
  color: var(--accent);
  letter-spacing: 0.06em;
}

.hero-sub {
  font-family: "filson-soft", sans-serif;
  font-weight: 200;
  font-style: normal;
  font-size: 19px;
  letter-spacing: 2pt;
  color: var(--muted);
  margin-bottom: 48px;
  line-height: 1.7;
  text-align: center;
}

.scroll-cta {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.25em;
  transition: color 0.25s;
  margin-top: 8px;
}

.scroll-cta:hover { color: var(--muted); }

.scroll-cta-line {
  display: block;
  width: 1px;
  height: 56px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}

.scroll-cta-line::after {
  content: '';
  position: absolute;
  top: -40%;
  left: 0;
  width: 100%;
  height: 40%;
  background: var(--accent);
  border-radius: 1px;
  animation: line-sweep 1.8s ease-in-out infinite;
}

@keyframes line-sweep {
  0%   { top: -40%; opacity: 0.6; }
  30%  { opacity: 1; }
  100% { top: 140%; opacity: 0; }
}

/* ── Cookie scene ───────────────────────────────────────────── */
.cookie-scene {
  position: relative;
  width: 320px;
  height: 320px;
  margin: 0 auto 8px;
  overflow: visible;
}

.cookie-stage {
  position: relative;
  width: 100%;
  height: 100%;
}

.cookie-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.15s ease;
  user-select: none;
  pointer-events: none;
}

.cookie-layer.active { opacity: 1; }

.cookie-crumbs {
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  width: 90%;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-crumbs img {
  width: 100%;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

.cookie-crumbs.falling {
  opacity: 1;
  transform: translateX(-50%) translateY(8px);
}

.cookie-crumb {
  position: absolute;
  pointer-events: none;
  will-change: transform, opacity;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
  height: auto;
}

#cookie-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.crumble-text {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  z-index: 50;
}

.crumble-text__main {
  font-family: "filson-soft", sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: #f5f0e8;
  margin-bottom: 0.5rem;
}

.crumble-text__sub {
  font-family: "filson-soft", sans-serif;
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  font-weight: 200;
  color: #f5f0e8;
  opacity: 0.7;
  letter-spacing: 0.05em;
}

@media (max-width: 640px) {
  .cookie-scene { width: 240px; height: 240px; }
}

.btn-primary {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--bg);
  background: var(--accent);
  padding: 14px 32px;
  border-radius: 20px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

.btn-ghost {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}

.btn-ghost:hover { color: var(--text); }
.btn-ghost svg { transition: transform 0.2s; }
.btn-ghost:hover svg { transform: translateX(4px); }

.hero-stats {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 64px;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  justify-content: center;
}

.stat-number {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 40px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.stat-number span { color: var(--accent); }

.stat-label {
  font-family: "filson-soft", sans-serif;
  font-weight: 500;
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

/* ── Marquee ────────────────────────────────────────────────── */
.marquee-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  overflow: hidden;
  position: relative;
}

.marquee-track {
  display: flex;
  gap: 0;
  animation: marquee 28s linear infinite;
  width: max-content;
}

.marquee-item {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
}

.marquee-dot {
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Tagline block ──────────────────────────────────────────── */
.tagline-block {
  text-align: center;
  padding: 80px 0 160px;
  position: relative;
  overflow: hidden;
}

.tagline-halftone {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  transition: opacity 0.1s linear;
}

.tagline-line {
  position: relative;
  z-index: 1;
}

.tagline-line {
  font-family: "filson-soft", sans-serif;
  font-weight: 200;
  font-style: normal;
  font-size: clamp(21px, 3.3vw, 52px);
  line-height: 1.1;
  white-space: nowrap;
}

.tagline-white { color: var(--text); }
.tagline-coral { color: var(--accent); }
.tagline-gastromond { font-family: "filson-soft", sans-serif; font-weight: 500; font-style: italic; }

/* ── About ──────────────────────────────────────────────────── */
#about {
  padding: 70px 0 70px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 80px;
  align-items: center;
}

.about-tag {
  margin-bottom: 20px;
}

.about-left h2 {
  font-family: "synthemesc", "filson-soft", sans-serif;
  font-weight: 200;
  font-size: clamp(40px, 4.5vw, 64px);
  letter-spacing: 0.01em;
  line-height: 1.0;
  margin-bottom: 28px;
  color: var(--text);
}

.about-left p:not(.about-tag) {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-credentials {
  font-family: var(--font-body);
  font-size: 15px;
  font-style: italic;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 24px;
  margin-bottom: 0;
}

.about-stats {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
  padding-top: 0;
}

.about-bug-svg {
  width: clamp(80px, 10vw, 140px);
  height: auto;
  display: block;
}

.about-stat-number {
  font-family: "filson-soft", sans-serif;
  font-weight: 200;
  font-size: clamp(48px, 5vw, 72px);
  line-height: 1;
  color: var(--accent);
  margin-bottom: 8px;
}

.about-stat-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-right {
  position: relative;
}

.about-image-wrap {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  border-radius: 2px;
}

.about-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(30%);
  transition: filter 0.4s;
}

.about-image-wrap:hover img { filter: grayscale(0%); }

.about-image-badge {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: var(--accent);
  color: var(--bg);
  padding: 24px;
  border-radius: var(--radius);
}

.about-image-badge .num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 36px;
  line-height: 1;
}

.about-image-badge .label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ── Services ───────────────────────────────────────────────── */
#services {
  padding: 120px 0 80px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

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

#work .section-header,
#experiences .section-header {
  margin-bottom: 80px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(36px, 4vw, 56px);
  letter-spacing: 0.01em;
  line-height: 1.05;
}

.section-header h2 em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}

.gastromond-heading {
  font-family: "filson-soft", sans-serif;
  font-weight: 200;
}

.gastromond-heading em {
  font-style: normal;
  color: var(--accent);
}

.section-link {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.2s;
  white-space: nowrap;
  padding-bottom: 4px;
}

.section-link:hover { gap: 14px; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 40px 28px 24px;
  position: relative;
  overflow: hidden;
  cursor: default;
  transition: border-color 0.25s;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-dim);
  opacity: 0;
  transition: opacity 0.25s;
}

.service-card:hover { border-color: var(--accent); }
.service-card:hover::before { opacity: 1; }

.service-num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 32px;
  position: relative;
}

.service-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-dim);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
  transition: background 0.25s;
}

.service-card:hover .service-icon { background: var(--accent); }
.service-card:hover .service-icon svg { color: var(--bg); }

.service-icon svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
  transition: color 0.25s;
}

.service-card h3 {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: 22px;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
  position: relative;
}

.service-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
  position: relative;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  position: relative;
}

.service-tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--border);
  padding: 4px 10px;
  border-radius: 2px;
}

/* ── Work / Gallery ─────────────────────────────────────────── */
#work {
  padding: 80px 0 94px;
  position: relative;
  overflow: hidden;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.work-divider {
  position: relative;
  height: 2px;
  margin-top: 56px;
  overflow: visible;
}

.work-divider::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: #7f594b;
  transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.work-divider.grow::before {
  width: 100%;
}

#section-divider {
  margin: 0 0 90px;
}

#about-top-divider {
  margin: 80px 0 35px;
}

.work-card-wrap {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.work-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.25s;
}

.work-card-wrap:hover .work-card { border-color: var(--accent-light); }

.work-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-card-wrap:hover .work-card-bg { transform: scale(1.04); }

/* placeholder colored bg for demo cards */
.work-card-wrap:nth-child(1) .work-card-bg { background-image: url('Images/HMF.png'); background-size: cover; background-position: center top; }
.work-card-wrap:nth-child(2) .work-card-bg { background-image: url('Images/Twist.png'); background-size: cover; background-position: center top; }
.work-card-wrap:nth-child(3) .work-card-bg { background-image: url('Images/Chef Zach.png'); background-size: cover; background-position: center; }
.work-card-wrap:nth-child(4) .work-card-bg { background-image: url('Images/HHB.png'); background-size: cover; background-position: center top; }
.work-card-wrap:nth-child(5) .work-card-bg { background-image: url('Images/RSS.png'); background-size: cover; background-position: center top; }
.work-card-wrap:nth-child(6) .work-card-bg { background-image: url('Images/Boracle.png'); background-size: cover; background-position: center top; }

.work-card-caption {
  padding: 16px 4px 0;
}

.work-card-category {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 6px;
}

.work-card-caption h3 {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: 20px;
  line-height: 1.2;
  color: var(--text);
  transition: color 0.25s;
}

.work-card-wrap:hover .work-card-caption h3 { color: #ffffff; }

.work-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 125, 101, 0.18);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1;
}

.work-card-wrap:hover .work-card::after { opacity: 1; }

.work-card-hover-pill {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50px;
  padding: 10px 24px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  z-index: 2;
}

.work-card-wrap:hover .work-card-hover-pill {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ── Project Modal ───────────────────────────────────────────── */
.project-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 6, 2, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.project-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.project-modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: min(560px, 92vw);
  max-height: 92svh;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.project-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-light);
  background: var(--bg);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: border-color 0.2s, color 0.2s;
}

.project-modal-close:hover { border-color: var(--accent-light); color: var(--accent-light); }

.project-modal-image {
  width: 100%;
  aspect-ratio: 16/9;
  background-color: var(--bg);
  background-size: cover;
  background-position: center top;
}

.project-modal-image.logo-river-mode {
  background-image: none !important;
  background-color: #ffffff;
  overflow: hidden;
  display: flex;
  align-items: center;
  cursor: grab;
}

@keyframes logo-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.logo-river-track {
  display: flex;
  align-items: center;
  gap: 64px;
  padding: 0 32px;
  animation: logo-scroll 34s linear infinite;
  will-change: transform;
}

.logo-river-mode:hover .logo-river-track {
  animation-play-state: paused;
}

.logo-river-img {
  height: clamp(79px, 10.56vw, 145px);
  width: auto;
  flex-shrink: 0;
  opacity: 0.9;
  transition: opacity 0.2s, transform 0.2s;
}

.logo-river-img:hover {
  opacity: 1;
  transform: scale(1.08);
}

.logo-river-img[data-logo="360.svg"],
.logo-river-img[data-logo="monkey.svg"],
.logo-river-img[data-logo="rainy.svg"],
.logo-river-img[data-logo="moon.svg"] {
  height: clamp(95px, 12.67vw, 174px);
}

.project-modal-body {
  padding: 24px 28px 28px;
  background: #0d0704;
}

.project-modal-category {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 8px;
}

.project-modal-title {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(22px, 3vw, 30px);
  color: var(--text);
  margin-bottom: 12px;
}

.project-modal-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 24px;
}

.project-modal-link {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-light);
  text-decoration: none;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
  transition: opacity 0.2s;
}

.project-modal-link:hover { opacity: 0.75; }

.project-modal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-modal-prev,
.project-modal-next {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 8px 18px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.project-modal-prev:hover,
.project-modal-next:hover { color: var(--accent-light); border-color: var(--accent-light); }

.project-modal-count {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* ── Contact ────────────────────────────────────────────────── */
#contact {
  padding: 140px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-left h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(36px, 4vw, 52px);
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin-bottom: 24px;
}

.contact-left h2 em {
  font-style: normal;
  color: var(--accent);
}

.contact-left p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 48px;
}

.contact-info-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.contact-info-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-dim);
  border: 1px solid rgba(200,119,63,0.2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-info-icon svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.contact-info-item h4 {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.contact-info-item p {
  font-size: 14px;
  color: var(--text);
  margin: 0;
}

.contact-right form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: end;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-family: "filson-soft", sans-serif;
  font-weight: 500;
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s;
  resize: none;
  appearance: none;
  -webkit-text-fill-color: var(--text);
  color-scheme: dark;
}

/* Override browser autofill background */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--bg) inset;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--muted); }

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
  border-color: rgba(255, 96, 64, 0.45);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
}

.form-group textarea { min-height: 140px; }

.form-group select { cursor: pointer; }

.form-group select option { background: var(--bg); }

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 10px 22px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 24px;
  align-self: flex-start;
}

.btn-submit:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

.btn-submit svg { width: 16px; height: 16px; }

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  padding: 24px 0 0;
  background: #0d0704;
  position: relative;
}


.footer-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  column-gap: 80px;
  margin-bottom: 36px;
}

.footer-top {
  grid-column: 1;
  grid-row: 1;
  margin-top: 32px;
  margin-bottom: 32px;
}

.footer-columns {
  grid-column: 1;
  grid-row: 2;
}

.footer-right {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  padding-top: 0;
}

#footer-contact-form .form-group label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

#footer-contact-form .form-row + .form-group,
#footer-contact-form .form-group + .form-group {
  margin-top: 18px;
}

.footer-logo {
  font-family: "filson-soft", sans-serif;
  font-weight: 200;
  font-size: clamp(24px, 3.6vw, 52px);
  color: var(--text);
  text-decoration: none;
  display: block;
  line-height: 1.1;
  margin-bottom: 8px;
  white-space: nowrap;
}

.footer-logo-accent { color: var(--accent); font-style: italic; font-weight: 500; }

.footer-subtitle {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-columns {
  display: flex;
  gap: 120px;
  margin-bottom: 64px;
}

.footer-col-heading {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 24px;
}

.footer-col-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-col-list li,
.footer-col-list a {
  font-size: 15px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col-list a:hover { color: var(--text); }

.footer-connect-list { gap: 14px; }

.footer-connect-item {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s;
}

.footer-connect-item:hover { color: var(--text); }

.footer-connect-label { display: none; }

.footer-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: var(--surface);
  border-radius: 8px;
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 28px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-right: calc(clamp(120px, 14vw, 200px) + 16px);
}

@media (min-width: 901px) {
  .footer-bottom { margin-right: calc(clamp(120px, 14vw, 200px) - 115px); }
}

.footer-ooface {
  position: absolute;
  bottom: 0;
  right: 0;
  width: clamp(120px, 14vw, 200px);
  opacity: 0.08;
  pointer-events: none;
  display: block;
}

.mobile-br { display: none; }

.footer-copy {
  font-size: 12px;
  color: var(--muted);
}

.footer-made {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}


/* ── Parallax ───────────────────────────────────────────────── */
[data-parallax] {
  will-change: transform;
}

/* ── Scroll reveal ──────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Hamburger button ───────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 110;
  flex-shrink: 0;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s;
}

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

/* ── Mobile menu overlay ────────────────────────────────────── */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.mobile-menu ul a {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(36px, 9vw, 56px);
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.mobile-menu ul a:hover,
.mobile-menu ul a:active { color: var(--text); }

.mobile-menu-cta {
  font-family: "filson-soft", sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--bg);
  background: var(--accent);
  padding: 14px 36px;
  border-radius: 20px;
  text-decoration: none;
  border: none;
  transition: background 0.2s;
}

.mobile-menu-cta:hover { background: var(--accent-light); }

/* ── min-height: svh fallback for mobile browsers ──────────── */
#hero {
  min-height: 100svh;
}

/* ── Touch devices: fix cursor, hover states ────────────────── */
@media (hover: none) {
  * { cursor: auto !important; }
  #custom-cursor { display: none !important; }
  .work-card-hover-pill { display: none; }
  .work-card-wrap:active .work-card::after { opacity: 1; }
  .work-card-wrap:active .work-card { border-color: var(--accent-light); }
  .work-card-inner { transform: translateY(0); }
  .work-card p { opacity: 1; transform: translateY(0); }
}

/* ── Tablet landscape / small desktop (≤ 1100px) ───────────── */
@media (max-width: 1100px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: 40px; }
  .nav-links { gap: 24px; }
  .footer-main { column-gap: 48px; }
}

/* ── Tablet portrait (≤ 900px) ──────────────────────────────── */
@media (max-width: 900px) {
  nav { padding: 20px 24px; }
  .nav-right { display: none; }
  .nav-hamburger { display: flex; }

  #hero { padding-top: 88px; padding-bottom: 72px; }

  .hero-stats { gap: 24px 48px; flex-wrap: wrap; }
  .stat-number { font-size: 32px; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-stats { flex-direction: row; gap: 32px; flex-wrap: wrap; margin-top: 0; margin-bottom: 50px; }

  .services-grid { grid-template-columns: repeat(2, 1fr); }

  .work-grid { grid-template-columns: repeat(2, 1fr); }

  .section-header { flex-direction: column; align-items: flex-start; gap: 14px; }

  .footer-main { grid-template-columns: 1fr; grid-template-rows: auto; gap: 48px; }
  .footer-top { grid-row: 1; }
  .footer-columns { grid-row: 2; }
  .footer-right { grid-column: 1; grid-row: 3; padding-top: 0; }
  .footer-columns { gap: 48px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }

  .experience-section-heading { margin-bottom: 32px; }

  #about, #services, #work, #experiences { padding: 100px 0; }
}

@media (min-width: 641px) and (max-width: 900px) {
  .about-bug-svg { width: clamp(160px, 20vw, 280px); }
  .tagline-line { font-size: clamp(36px, 4vw, 56px); }
}

/* ── Large phone (≤ 640px) ──────────────────────────────────── */
@media (max-width: 640px) {
  .container { padding: 0 20px; }

  #services .section-header { padding-top: 32px; }

  #hero { padding-top: 80px; padding-bottom: 80px; }

  .hero-number { font-size: 12px; letter-spacing: 1pt; }

  .hero-sub { margin-bottom: 32px; }

  .hero-stats { gap: 20px 36px; }
  .stat-number { font-size: 28px; }
  .stat-label { font-size: 11px; }

  .tagline-block { padding: 60px 0 100px; }
  .tagline-line { white-space: normal; text-align: center; }

  .services-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }

  .about-grid { gap: 32px; }
  .about-stats { flex-direction: row; gap: 32px; justify-content: center; margin-bottom: 50px; }
  .desktop-br { display: none; }
  .tagline-line { font-size: clamp(28px, 9vw, 40px); }
  .about-bug-svg { width: clamp(110px, 36vw, 155px); }
  .about-left h2 { font-size: clamp(36px, 10vw, 52px); }

  .experience-section-heading { font-size: clamp(28px, 8vw, 42px); }

  .footer-top { margin-bottom: 16px; }
  .footer-columns { justify-content: center; }
  .footer-ooface { bottom: 40px; }
  .footer-columns { flex-direction: row; align-items: flex-start; gap: 85px; }
  .mobile-br { display: inline; }
  .footer-logo { font-size: clamp(28px, 8vw, 42px); text-align: center; white-space: normal; }

  .form-row { grid-template-columns: 1fr; }
  .btn-submit { width: 100%; }

  #about, #services, #work, #experiences { padding: 80px 0; }
}

/* ── Phone (≤ 430px — iPhone Pro Max and all Android flagships) */
@media (max-width: 430px) {
  nav { padding: 16px 20px; }
  .container { padding: 0 16px; }

  #hero { padding-top: 72px; padding-bottom: 64px; }

  .hero-stats { gap: 16px 28px; }
  .stat-number { font-size: 24px; }

  .service-card { padding: 28px 20px; }
  .work-card-inner { padding: 20px; }

  .experience-item { padding: 20px 0; }
  .experience-title { font-size: 14px; }

  .footer-connect-item { font-size: 13px; }
  .footer-icon-box { width: 36px; height: 36px; }

  #about, #services, #work, #experiences { padding: 64px 0; }

  .footer-copy, .footer-made { font-size: 11px; }
}

/* ── Small phone (≤ 375px — iPhone SE, older Androids) ─────── */
@media (max-width: 375px) {
  .hero-stats { flex-direction: column; align-items: center; gap: 20px; border-top: none; padding-top: 0; margin-top: 32px; }
  .hero-stats > div { display: flex; align-items: baseline; gap: 8px; }
  .stat-label { margin-top: 0; }

  .section-header h2 { font-size: clamp(28px, 9vw, 40px); }

  .mobile-menu ul a { font-size: 32px; }
}

/* ── Safe area insets (iPhone notch / Dynamic Island / home bar) */
@supports (padding: env(safe-area-inset-top)) {
  nav {
    padding-top: max(20px, env(safe-area-inset-top));
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
  }
  footer {
    padding-bottom: max(48px, calc(24px + env(safe-area-inset-bottom)));
  }
  .mobile-menu {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ── Contact Modal ───────────────────────────────────────────── */
.contact-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.contact-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.contact-modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 52px 52px 44px;
  max-width: 640px;
  width: 100%;
  position: relative;
  transform: translateY(16px);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.contact-modal-overlay.open .contact-modal-card {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #221308;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.modal-close:hover {
  background: var(--border);
  color: var(--text);
}

.modal-title {
  font-family: "filson-soft", sans-serif;
  font-weight: 200;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 16px;
}

.modal-subtitle {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 480px;
}

.modal-contact-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.modal-contact-row {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #221308;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.modal-contact-row:hover {
  border-color: rgba(255, 96, 64, 0.4);
  background: #271408;
}

.modal-contact-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--accent);
}

.modal-contact-icon svg {
  width: 100%;
  height: 100%;
}

.modal-contact-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-contact-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.modal-contact-value {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 200;
  color: var(--text);
}

.modal-social {
  display: flex;
  gap: 12px;
}

.modal-social-btn {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 10px 22px;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.modal-social-btn:hover {
  border-color: var(--accent-light);
  color: var(--accent-light);
}

/* ── Experience section ──────────────────────────────────────── */
#experiences {
  padding: 70px 0 140px;
}

.experience-section-tag {
  margin-bottom: 16px;
}

.experience-section-heading {
  font-family: "filson-soft", sans-serif;
  font-weight: 200;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: 0.02em;
  margin-bottom: 48px;
}

.experience-list {
  display: flex;
  flex-direction: column;
}

.experience-item {
  padding: 28px 0;
  border-top: 1px solid rgba(255, 125, 101, 0.25);
}

.experience-item:last-child {
  border-bottom: 1px solid rgba(255, 125, 101, 0.25);
}

/* ── Tools & Platforms ────────────────────────────────────── */
.tools-section {
  margin-top: -36px;
  margin-bottom: 20px;
  padding-top: 0;
  border-top: none;
}

.tools-heading {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 20px;
}

.tools-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tool-pill {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 200;
  color: var(--text);
  background: transparent;
  border: 1px solid #7f594b;
  border-radius: 50px;
  padding: 12px 24px;
  white-space: nowrap;
  letter-spacing: 0.01em;
  transition: color 0.2s ease, border-color 0.2s ease;
  cursor: default;
}

.tool-pill:hover {
  color: var(--accent-light);
  border-color: var(--accent-light);
}

.experience-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 10px;
}

.experience-title {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text);
  transition: color 0.2s;
}

.experience-item:hover .experience-title {
  color: var(--accent-light);
}

.experience-year {
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.experience-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 640px;
}

@media (max-width: 640px) {
  .hero-c4c-logo { width: 92vw; }

  .experience-row {
    flex-direction: column;
    gap: 4px;
  }

  .contact-modal-card {
    padding: 40px 28px 36px;
  }
}

@media (max-width: 430px) {
  .contact-modal-card {
    padding: 36px 20px 28px;
    border-radius: 16px;
  }

  .modal-contact-row {
    padding: 16px 18px;
  }

  .project-modal-body {
    padding: 20px;
  }

  .project-modal-card {
    border-radius: 12px;
    width: 96vw;
  }

  .hero-sub {
    font-size: 15px;
    letter-spacing: 1pt;
  }

  .project-modal-prev,
  .project-modal-next {
    padding: 8px 12px;
    font-size: 12px;
  }
}
