/* PacificBloom - Light Theme · Unique Typography */

/* ─── Fonts: Fraunces (display) · Syne (sans) · DM Mono ─────────────────── */
@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,300;1,9..144,400;1,9..144,600&family=Syne:wght@400;500;600;700;800&family=DM+Mono:ital,wght@0,400;0,500;1,400&display=swap");

/* ─── Design Tokens ──────────────────────────────────────────────────────── */
:root {
  /* Brand */
  --brand-primary:   #F97316;
  --brand-secondary: #7C3AED;

  /* Surfaces */
  --bg-base:    #FAFAF8;
  --bg-surface: #FFFFFF;
  --bg-muted:   #F2F1EC;
  --bg-panel:   #EEEEE8;

  /* Text */
  --text-heading: #0E0E0C;
  --text-body:    #3A3A36;
  --text-muted:   #7A7A72;
  --text-faint:   #B0B0A6;

  /* Borders */
  --border-default: #DFE0D8;
  --border-strong:  #C8C9C0;
  --border-brand:   rgba(249,115,22,.35);

  /* Shadow */
  --shadow-sm:  0 1px 3px rgba(14,14,12,.06), 0 1px 2px rgba(14,14,12,.04);
  --shadow-md:  0 4px 16px rgba(14,14,12,.08), 0 2px 6px rgba(14,14,12,.05);
  --shadow-lg:  0 12px 40px rgba(14,14,12,.10), 0 4px 12px rgba(14,14,12,.06);
  --shadow-brand: 0 8px 24px rgba(249,115,22,.22);

  /* Typography */
  --font-display: "Fraunces", Georgia, serif;
  --font-sans:    "Syne", system-ui, sans-serif;
  --font-mono:    "DM Mono", "Fira Mono", monospace;

  /* Motion */
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:    cubic-bezier(0, 0, 0.2, 1);
}

/* ─── Reset & Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  color-scheme: light;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.65;
}

/* ─── Typography Scale ───────────────────────────────────────────────────── */
h1, h2, h3, h4, .font-serif, .font-display {
  font-family: var(--font-display);
  color: var(--text-heading);
  letter-spacing: -0.02em;
  line-height: 1;
}

.font-mono, code, kbd, pre {
  font-family: var(--font-mono);
}

/* Fraunces optical size enhancement at large sizes */
h1 { font-variation-settings: "opsz" 72; }
h2 { font-variation-settings: "opsz" 48; }
h3 { font-variation-settings: "opsz" 24; }

/* ─── Scrollbar ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 7px; }
::-webkit-scrollbar-track { background: var(--bg-muted); }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── Selection ──────────────────────────────────────────────────────────── */
::selection {
  background: var(--brand-primary);
  color: #fff;
}

/* ─── Grid Pattern ───────────────────────────────────────────────────────── */
.bg-grid-pattern {
  background-image:
    linear-gradient(to right, rgba(14,14,12,.04) 1px, transparent 1px),
    linear-gradient(to bottom,  rgba(14,14,12,.04) 1px, transparent 1px);
  background-size: 3.5rem 3.5rem;
  background-position: center top;
}

/* ─── Ambient Glows ──────────────────────────────────────────────────────── */
.glow-blur {
  position: absolute;
  filter: blur(100px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.18;
}

/* ─── Animations ─────────────────────────────────────────────────────────── */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.animate-marquee {
  display: inline-flex;
  animation: marquee 32s linear infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}
.animate-float { animation: float 6s ease-in-out infinite; }

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0   rgba(249,115,22,.4); }
  70%  { box-shadow: 0 0 0 8px rgba(249,115,22,0); }
  100% { box-shadow: 0 0 0 0   rgba(249,115,22,0); }
}

/* ─── Reveal System ──────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity  0.75s var(--ease-out),
    transform 0.75s var(--ease-out);
}
.reveal.visible         { opacity: 1; transform: translateY(0); }
.reveal--left           { transform: translateX(-28px); }
.reveal--right          { transform: translateX(28px); }
.reveal--left.visible,
.reveal--right.visible  { transform: translateX(0); }

/* ─── Navigation ─────────────────────────────────────────────────────────── */
#nav {
  transition:
    padding     0.3s var(--ease-smooth),
    background  0.3s var(--ease-smooth),
    box-shadow  0.3s var(--ease-smooth),
    border-color 0.3s var(--ease-smooth);
}
#nav.scrolled {
  padding-top:    0.75rem;
  padding-bottom: 0.75rem;
  background: rgba(250,250,248,.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border-default);
  box-shadow: 0 1px 0 0 var(--border-default), var(--shadow-sm);
}

/* ─── Underline Hover ────────────────────────────────────────────────────── */
.hover-underline { position: relative; }
.hover-underline::after {
  content: "";
  position: absolute;
  width: 0; height: 1.5px;
  bottom: -4px; left: 0;
  background: var(--brand-primary);
  transition: width 0.28s var(--ease-smooth);
}
.hover-underline:hover::after { width: 100%; }

/* ─── Burger Menu ────────────────────────────────────────────────────────── */
.burger-line {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-heading);
  transition: transform 0.3s var(--ease-smooth);
  transform-origin: center;
  border-radius: 1px;
}
#burgerBtn.open .burger-line:first-child { transform: translateY(5px) rotate(45deg); }
#burgerBtn.open .burger-line:last-child  { transform: translateY(-5px) rotate(-45deg); }

#mobileMenu {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.35s var(--ease-smooth);
}
#mobileMenu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ─── Card Lift ──────────────────────────────────────────────────────────── */
.card-lift {
  transition: transform 0.25s var(--ease-smooth), box-shadow 0.25s var(--ease-smooth);
}
.card-lift:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* ─── Work Tab Active ────────────────────────────────────────────────────── */
.work-tab.active {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}

/* ─── Dot Badge Pulse ────────────────────────────────────────────────────── */
.dot-live {
  width: 7px; height: 7px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-ring 2.2s cubic-bezier(0.215,0.61,0.355,1) infinite;
}

/* ─── Utilities ──────────────────────────────────────────────────────────── */
.text-balance { text-wrap: balance; }

/* Fraunces italic pull - makes italic headings feel elegant */
em, .italic-accent {
  font-family: var(--font-display);
  font-style: italic;
  font-variation-settings: "opsz" 48;
}

/* ─── Section Labels ─────────────────────────────────────────────────────── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-primary);
}

/* ─── Form Focus ─────────────────────────────────────────────────────────── */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-primary) !important;
  box-shadow: 0 0 0 3px rgba(249,115,22,.12);
}