/* ============================================================
   Paprika Cybernetics — liquid-glass single page
   Layers: aurora background → grain → glass UI on top.
   Tokens first, then top→bottom. Flat and debuggable.
   ============================================================ */

:root {
  --ink:     #0E0D0C;
  --ink-2:   #17120F;
  --bone:    #F0ECE4;
  --paprika: #C0463A;   /* slightly brighter than print red for screen glow */
  --ember:   #D98A3F;
  --gold:    #E6B873;
  --mute:    #9A938A;

  --bone-soft: rgba(240, 236, 228, 0.72);
  --bone-dim:  rgba(240, 236, 228, 0.50);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-serif:   "Instrument Serif", Georgia, serif;
  --font-body:    "Inter", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  --maxw: 920px;
  --radius: 22px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);

  /* glass tuning */
  --glass-bg: linear-gradient(135deg, rgba(240,236,228,0.10), rgba(240,236,228,0.025));
  --glass-border: rgba(240,236,228,0.14);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  line-height: 1.6;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

/* ============================================================
   Background: drifting aurora blobs
   ============================================================ */
.aurora {
  position: fixed;
  inset: -20vmax;
  z-index: 0;
  pointer-events: none;
  filter: blur(70px) saturate(125%);
  /* deep base so blobs read as glow, not flat fills */
  background:
    radial-gradient(60% 60% at 50% 120%, rgba(192,70,58,0.10), transparent 70%),
    var(--ink);
}
.blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.55;
  mix-blend-mode: screen;
  will-change: transform;
}
.b1 { width: 46vmax; height: 46vmax; left: -6vmax; top: -4vmax;
      background: radial-gradient(circle, rgba(192,70,58,0.85), transparent 62%);
      animation: drift1 26s ease-in-out infinite; }
.b2 { width: 40vmax; height: 40vmax; right: -8vmax; top: 6vmax;
      background: radial-gradient(circle, rgba(217,138,63,0.65), transparent 62%);
      animation: drift2 32s ease-in-out infinite; }
.b3 { width: 50vmax; height: 50vmax; left: 10vmax; bottom: -16vmax;
      background: radial-gradient(circle, rgba(120,32,40,0.85), transparent 60%);
      animation: drift3 38s ease-in-out infinite; }
.b4 { width: 30vmax; height: 30vmax; right: 4vmax; bottom: -6vmax;
      background: radial-gradient(circle, rgba(230,184,115,0.30), transparent 60%);
      animation: drift1 30s ease-in-out infinite reverse; }

@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); }
                    50% { transform: translate(8vmax, 6vmax) scale(1.12); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1); }
                    50% { transform: translate(-7vmax, 9vmax) scale(1.08); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); }
                    50% { transform: translate(6vmax, -8vmax) scale(1.15); } }

/* Fine film grain for material realism */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   Accessibility
   ============================================================ */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--paprika); color: #fff;
  padding: 0.6rem 1rem; border-radius: 0 0 10px 0;
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* ============================================================
   Shell — centered column, full use of width
   ============================================================ */
.shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(1rem, 3vh, 2rem) var(--gutter) clamp(1.5rem, 4vh, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1.1rem, 3vh, 1.75rem);
}

/* ============================================================
   Liquid glass — shared surface
   ============================================================ */
.glass {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow:
    0 10px 40px rgba(0,0,0,0.45),
    0 2px 8px rgba(0,0,0,0.30),
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -1px 0 rgba(0,0,0,0.25);
  overflow: hidden;
}
/* top-edge refraction highlight */
.glass::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), transparent 32%);
}
/* cursor-tracked specular shine (set via JS: --mx/--my, --shine) */
.glass[data-shine]::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: var(--shine, 0);
  transition: opacity 0.4s ease;
  background: radial-gradient(
    220px circle at var(--mx, 50%) var(--my, 0%),
    rgba(240,236,228,0.16), transparent 60%);
}
/* graceful fallback if backdrop-filter unsupported */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(22,18,15,0.78); }
}

/* ============================================================
   Topbar
   ============================================================ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.15rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.65rem; }
.brand .mark { width: auto; height: 1.05rem; opacity: 0.95; }
.brand-name {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--bone-soft);
}
.topbar-link {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bone-dim);
  padding: 0.3rem 0.2rem;
  transition: color 0.2s ease;
}
.topbar-link:hover { color: var(--paprika); }

/* ============================================================
   Hero — centered, fills the column
   ============================================================ */
.hero {
  flex: 1 1 auto;
  min-width: 0;                 /* let flex children shrink, no overflow */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(1rem, 3vh, 2.5rem) 0;
}
.wordmark {
  margin: 0;
  max-width: 100%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.9rem, 14vw, 12rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  /* animated metallic sheen */
  background: linear-gradient(
    100deg,
    var(--bone) 12%, #ffffff 28%, var(--gold) 44%,
    var(--ember) 58%, var(--paprika) 70%, var(--bone) 92%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: sheen 9s ease-in-out infinite;
  filter: drop-shadow(0 4px 30px rgba(192,70,58,0.25));
}
@keyframes sheen {
  0%,100% { background-position: 0% 0; }
  50%     { background-position: 100% 0; }
}
.thesis {
  margin: clamp(1rem, 3vh, 1.75rem) 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.6rem, 1rem + 3vw, 3rem);
  line-height: 1.15;
  letter-spacing: 0.005em;
  color: var(--bone);
  max-width: 25ch;
}
.lede {
  margin: clamp(1.25rem, 3vh, 1.75rem) auto 0;
  max-width: 50ch;
  color: var(--bone-soft);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
}

/* ============================================================
   Recognition — a quiet credential line, no glass
   ============================================================ */
.recognition {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: clamp(1.5rem, 4vh, 2.5rem) 0 0;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--mute);
}
.recognition .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--paprika);
  box-shadow: 0 0 10px 1px rgba(192,70,58,0.8);
  animation: pulse 3.2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 0.55; } 50% { opacity: 1; } }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding: 1.1rem 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--mute);
}
.footer p { margin: 0; }
.contact .label {
  text-transform: uppercase; letter-spacing: 0.18em;
  margin-right: 0.8rem; color: var(--mute);
}
.contact a {
  color: var(--bone); text-decoration: none;
  border-bottom: 1px solid rgba(192,70,58,0.6);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.contact a:hover, .contact a:focus-visible {
  color: var(--paprika); border-color: var(--paprika);
}

/* ============================================================
   Motion preference — calm everything, keep composition
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .blob { animation: none !important; }
  .wordmark { animation: none; background-position: 30% 0; }
  .recognition .dot { animation: none; opacity: 1; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Narrow screens
   ============================================================ */
@media (max-width: 560px) {
  .brand-name { font-size: 0.6rem; letter-spacing: 0.2em; }
  .topbar-link { display: none; }      /* contact lives in footer on mobile */
  .footer { flex-direction: column; gap: 0.5rem; }
}
