@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garant:ital,wght@0,400;0,600;0,700;1,400;1,600&family=DM+Sans:wght@300;400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:   #FFF8F1;
  --cream2:  #FCEEE1;
  --card:    #FBEBDC;
  --terra:   #FB4D3D;
  --amber:   #FFB02E;
  --forest:  #0FAE96;
  --plum:    #7C3AED;
  --dark:    #16141F;
  --muted:   #6E645C;
  --white:   #FFFFFF;
  --ink2:    #221F2E;
  --nav-h:   70px;
  --r:       18px;
  --max:     1180px;
  --hard:    6px 6px 0 var(--dark);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background-color: var(--cream);
  background-image: radial-gradient(color-mix(in oklab, var(--dark) 8%, transparent) 1.3px, transparent 1.3px);
  background-size: 22px 22px;
  color: var(--dark);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

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

/* ── TYPE ── */
h1, h2, h3, .serif { font-family: 'Cormorant Garant', serif; }
h1 { font-size: clamp(3.3rem, 8vw, 7rem); font-weight: 700; line-height: 0.98; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem);  font-weight: 700; line-height: 1.06; letter-spacing: -0.015em; }
h3 { font-size: 1.4rem; font-weight: 600; }

.eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  display: inline-block; margin-bottom: 1rem; white-space: nowrap;
  color: var(--white); background: var(--terra);
  padding: 0.42rem 0.85rem; border-radius: 8px;
}
.eyebrow::before { content: none; }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  background: color-mix(in oklab, var(--cream) 90%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid color-mix(in oklab, var(--dark) 8%, transparent);
  transition: box-shadow 0.3s;
}
nav.scrolled { box-shadow: 0 2px 20px color-mix(in oklab, var(--dark) 8%, transparent); }

.nav-logo {
  font-family: 'Cormorant Garant', serif; font-weight: 700; font-size: 1.4rem;
  color: var(--dark); text-decoration: none; letter-spacing: -0.02em;
  display: flex; align-items: baseline; gap: 2px;
}
.nav-logo em { color: var(--terra); font-style: normal; }

.nav-links { display: flex; gap: 0; list-style: none; }
.nav-links a {
  font-size: 0.88rem; font-weight: 500; color: var(--muted);
  text-decoration: none; padding: 0.45rem 0.85rem; border-radius: 99px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover  { color: var(--dark); }
.nav-links a.active { color: var(--terra); font-weight: 600; }

.nav-right { display: flex; gap: 0.5rem; align-items: center; }
.lang-btn {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.38rem 0.8rem; border-radius: 99px;
  border: 1.5px solid color-mix(in oklab, var(--dark) 20%, transparent);
  background: transparent; cursor: pointer; color: var(--muted); transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.lang-btn.active { background: var(--dark); color: var(--cream); border-color: var(--dark); }
.lang-btn:not(.active):hover { color: var(--dark); border-color: var(--dark); }

/* ── PAGE WRAPPER ── */
.page-top { padding-top: var(--nav-h); }
.inner { max-width: var(--max); margin: 0 auto; padding: 0 clamp(1.5rem, 5vw, 4rem); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: 'DM Sans', sans-serif; font-size: 0.88rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.85rem 1.9rem; border-radius: 99px; text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
  border: none; cursor: pointer;
}
.btn-primary {
  background: var(--terra); color: var(--white);
  box-shadow: 0 6px 0 color-mix(in oklab, var(--terra) 55%, var(--dark));
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 9px 0 color-mix(in oklab, var(--terra) 55%, var(--dark)); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 color-mix(in oklab, var(--terra) 55%, var(--dark)); }
.btn-outline {
  border: 2px solid var(--dark); color: var(--dark); background: transparent;
}
.btn-outline:hover { background: var(--dark); color: var(--cream); transform: translateY(-3px); }
.btn-outline-cream {
  border: 1.5px solid color-mix(in oklab, var(--cream) 30%, transparent);
  color: var(--cream); background: transparent;
}
.btn-outline-cream:hover { background: color-mix(in oklab, var(--cream) 15%, transparent); }

/* ── CARD (shared lift) ── */
.lift { transition: transform 0.28s cubic-bezier(.22,.61,.36,1), box-shadow 0.28s, border-color 0.28s; }
.lift:hover { transform: translateY(-6px); }

/* ── SCROLL PROGRESS BAR ── */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--terra); z-index: 1200;
  box-shadow: 0 0 12px color-mix(in oklab, var(--terra) 60%, transparent);
}

/* ── MARQUEE TICKER ── */
.marquee {
  overflow: hidden; background: var(--terra); color: var(--white);
  padding: 1.1rem 0; white-space: nowrap; display: flex;
  border-top: 3px solid var(--dark); border-bottom: 3px solid var(--dark);
}
.marquee-track { display: inline-flex; align-items: center; gap: 2.4rem; padding-left: 2.4rem; animation: marquee 30s linear infinite; will-change: transform; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  font-family: 'Cormorant Garant', serif; font-style: italic;
  font-size: clamp(1.35rem, 2.6vw, 2.1rem); font-weight: 700;
  display: inline-flex; align-items: center; gap: 2.4rem; color: var(--white);
}
.marquee-item .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--dark); display: inline-block; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── 3D TILT ── */
.tilt { transform-style: preserve-3d; will-change: transform; }

/* ── SECTION HEADER ── */
.section-header { margin-bottom: 3rem; }
.section-header h2 { margin-top: 0.4rem; }

/* ── FOOTER ── */
footer {
  background: var(--dark); color: color-mix(in oklab, var(--cream) 45%, transparent);
  padding: 2.5rem clamp(1.5rem, 5vw, 4rem);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem; font-size: 0.82rem;
}
.ft-logo {
  font-family: 'Cormorant Garant', serif; font-weight: 700; font-size: 1.3rem;
  color: color-mix(in oklab, var(--cream) 70%, transparent); text-decoration: none;
}
.ft-logo em { color: var(--terra); font-style: normal; }
footer a { color: inherit; text-decoration: none; transition: color 0.2s; }
footer a:hover { color: var(--cream); }
.ft-links { display: flex; gap: 1.5rem; }

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  background: var(--dark);
  color: var(--cream);
  padding: 6rem clamp(1.5rem, 5vw, 4rem) 4rem;
  position: relative; overflow: hidden;
}
.page-hero .eyebrow { background: var(--amber); color: var(--dark); }
.page-hero .eyebrow::before { content: none; }
.page-hero h1 { color: var(--cream); margin-top: 0.5rem; }
.page-hero p {
  color: color-mix(in oklab, var(--cream) 65%, transparent);
  max-width: 520px; margin-top: 1.25rem; font-size: 1.05rem;
}
.page-hero-deco { position: absolute; pointer-events: none; }
.page-hero-deco.d1 {
  width: 360px; height: 360px; right: -70px; top: -90px; border-radius: 50%;
  border: 2px solid color-mix(in oklab, var(--terra) 70%, transparent);
  animation: spinSlow 26s linear infinite;
}
.page-hero-deco.d1::after {
  content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  background: var(--terra); top: -8px; left: calc(50% - 8px);
}
.page-hero-deco.d2 {
  width: 90px; height: 90px; left: 40%; bottom: -30px; border-radius: 50%;
  background: color-mix(in oklab, var(--forest) 85%, transparent);
  animation: blobFloat 12s ease-in-out infinite;
}

@keyframes spinSlow { to { transform: rotate(360deg); } }
@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(0, -22px); }
}

/* ── FADE IN ── */
.fi { opacity: 0; transform: translateY(30px) scale(0.985); transition: opacity 0.7s cubic-bezier(.22,.61,.36,1), transform 0.7s cubic-bezier(.22,.61,.36,1); }
.fi.vis { opacity: 1; transform: none; }
.fi-d1 { transition-delay: 0.08s; }
.fi-d2 { transition-delay: 0.16s; }
.fi-d3 { transition-delay: 0.24s; }
.fi-d4 { transition-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) {
  .fi { transition: none; opacity: 1; transform: none; }
  .page-hero-deco, .marquee-track, .photo-img, .badge, .hero-bg-circle { animation: none !important; }
}

/* ── GLOBAL MOBILE RESPONSIVE ── */
@media (max-width: 860px) {
  /* About teaser */
  #about-teaser {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }
  .at-left { display: block !important; }
  .at-photo-main { aspect-ratio: 3/2 !important; max-width: 340px; margin: 0 auto; }

  /* About hero photo */
  .about-hero {
    grid-template-columns: 1fr !important;
  }
  .ah-right { display: flex !important; justify-content: center; }
  .ah-photo-stage { max-width: 260px !important; }

  /* Hero right */
  .hero-right { display: flex !important; justify-content: center; }
  .photo-stage { max-width: 260px !important; }

  /* Create grid */
  .create-grid {
    grid-template-columns: 1fr !important;
  }
  .create-featured { grid-column: 1 !important; }

  /* Video section dual grid */
  #video-dual-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }

  /* Contact strip */
  .contact-strip-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }

  /* Skills grid (about page) */
  .skills-cats { grid-template-columns: 1fr !important; }

  /* Portfolio grids */
  .video-grid { grid-template-columns: 1fr !important; }
  .id-grid    { grid-template-columns: 1fr !important; }
  .img-grid   { grid-template-columns: repeat(2, 1fr) !important; }

  /* Contact form row */
  .form-row { grid-template-columns: 1fr !important; }

  /* Contact location inner */
  .loc-inner {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }

  /* About section grid */
  .section-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* Skills grid (index) */
  .skills-grid { grid-template-columns: 1fr !important; }

  /* Port grid */
  .port-grid { grid-template-columns: 1fr !important; }

  /* ── Tab bars & filter bars: wrap instead of scroll ── */
  .filter-inner,
  .tabs-inner {
    flex-wrap: wrap !important;
    overflow-x: visible !important;
    gap: 0.25rem !important;
    padding-bottom: 0.5rem !important;
  }
  .filter-btn,
  .tab-link {
    padding: 0.6rem 0.85rem !important;
    font-size: 0.78rem !important;
  }
}

/* ── HAMBURGER BUTTON ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none; border: none; cursor: pointer;
  padding: 4px; border-radius: 8px;
  transition: background 0.2s;
  z-index: 1001;
}
.nav-hamburger:hover { background: color-mix(in oklab, var(--dark) 7%, transparent); }
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--dark); border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

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

/* ── MOBILE DRAWER ── */
@media (max-width: 860px) {
  h1 { font-size: clamp(2.8rem, 12vw, 4rem); }

  .nav-hamburger { display: flex; }

  .nav-links {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: color-mix(in oklab, var(--cream) 97%, transparent);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid color-mix(in oklab, var(--dark) 8%, transparent);
    padding: 1rem 1.5rem 1.5rem;
    gap: 0.25rem;
    box-shadow: 0 8px 32px color-mix(in oklab, var(--dark) 10%, transparent);
    /* hidden by default */
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 899;
  }
  .nav-links.mobile-open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
  }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 10px;
  }
  .nav-links a:hover { background: color-mix(in oklab, var(--dark) 5%, transparent); }
  .nav-links a.active { background: color-mix(in oklab, var(--terra) 8%, transparent); }
}

/* ── FOOTER (new pages use .footer-inner) ── */
.footer-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.ft-copy { font-size: 0.82rem; }

/* ── TOOL CHIP ── */
.tool-chip {
  font-size: 0.8rem; font-weight: 500;
  color: color-mix(in oklab, var(--cream) 75%, transparent);
  background: color-mix(in oklab, var(--cream) 8%, transparent);
  border: 1px solid color-mix(in oklab, var(--cream) 12%, transparent);
  border-radius: 99px; padding: 0.4rem 1rem; white-space: nowrap;
}

/* ── PULSE ── */
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.6;transform:scale(0.85)} }
.pulse-dot { animation: pulse 2s ease-in-out infinite; }

/* ── TIMELINE ── */
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item {
  display: grid; grid-template-columns: 24px 1fr;
  gap: 1.25rem; padding-bottom: 2.5rem; position: relative;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-dot-col { display: flex; flex-direction: column; align-items: center; padding-top: 0.35rem; }
.tl-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--terra); border: 3px solid var(--cream);
  box-shadow: 0 0 0 2px var(--terra);
  flex-shrink: 0;
}
.tl-line {
  width: 1px; flex: 1; margin-top: 4px;
  background: color-mix(in oklab, var(--dark) 12%, transparent);
}
.tl-item:last-child .tl-line { display: none; }
.tl-date {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--terra); margin-bottom: 0.3rem;
}
.tl-title {
  font-family: 'Cormorant Garant', serif; font-size: 1.2rem; font-weight: 600;
  line-height: 1.3; margin-bottom: 0.2rem;
}
.tl-org { font-size: 0.88rem; color: var(--muted); margin-bottom: 0.6rem; font-style: italic; }
.tl-desc { font-size: 0.9rem; color: var(--muted); line-height: 1.75; }
