/* ============================================================
   SYNTHABILITY — base.css
   Palette, typography, layout, social icons, the animated bio
   panel, decorative effect layers, accessibility + reduced-motion.
   The "Balanced" look is layered on top by css/balanced.css.
   ============================================================ */

/* ---------- Pixel display font ----------------------------------
   Ships working immediately via Google Fonts "Press Start 2P".
   To use the exact Commodore 64 / Amstrad CPC face later, drop a
   woff2 into assets/fonts/ and UNCOMMENT the @font-face below —
   it will override Press Start 2P with zero other changes. */
/*
@font-face {
  font-family: "Pixel";
  src: url("../assets/fonts/commodore.woff2") format("woff2");
  font-display: swap;
}
*/

:root {
  --bg:        #050815;
  --pink:      #FF3DAA;
  --cyan:      #12E6FF;
  --ink:       #E8ECFF;   /* readable body text — never neon */
  --ink-dim:   #9AA6C8;

  --pink-rgb:  255, 61, 170;
  --cyan-rgb:  18, 230, 255;

  --font-pixel: "Press Start 2P", "Courier New", monospace;
  --font-body:  "Exo 2", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --maxw: 880px;
  --gap:  clamp(1.75rem, 4.5vw, 3.25rem);

  /* neon glow recipes */
  --glow-pink: 0 0 4px rgba(var(--pink-rgb), .95), 0 0 11px rgba(var(--pink-rgb), .7),
               0 0 24px rgba(var(--pink-rgb), .5), 0 0 44px rgba(var(--pink-rgb), .32);
  --glow-cyan: 0 0 4px rgba(var(--cyan-rgb), .95), 0 0 11px rgba(var(--cyan-rgb), .7),
               0 0 24px rgba(var(--cyan-rgb), .5), 0 0 44px rgba(var(--cyan-rgb), .32);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ============================================================
   DECORATIVE BACKGROUND  (subtle vignette only — the synthwave
   sun, grid floor and starfield/meteor effects were removed)
   ============================================================ */
.fx-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
/* gentle edge darkening for depth on the flat background */
.vignette {
  z-index: 2;
  background: radial-gradient(120% 95% at 50% 40%,
    transparent 58%, rgba(0,0,0,.5) 100%);
}

/* ============================================================
   CONTENT
   ============================================================ */
.stage {
  position: relative;
  z-index: 5;
  isolation: isolate;
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3.5rem, 9vh, 7rem) clamp(1.1rem, 5vw, 2.5rem) 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap);
  text-align: center;
}

/* ---------- Logo ---------- */
.hero { width: 100%; }
.logo { margin: 0; line-height: 1; }
.logo-img {
  width: min(92vw, 760px);
  height: auto;
  margin: 0 auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 8px rgba(var(--pink-rgb), .55))
          drop-shadow(0 0 26px rgba(var(--cyan-rgb), .35));
}
/* pixel-text fallback shown only when assets/logo.png is missing */
.logo-text {
  display: none;
  font-family: var(--font-pixel);
  /* SYNTHABILITY is one word — never wrap; scale to always fit one line */
  white-space: nowrap;
  font-size: clamp(1rem, 6.4vw, 4rem);
  letter-spacing: 0.04em;
  line-height: 1.1;
}
.logo-fallback .logo-img  { display: none; }
.logo-fallback .logo-text { display: inline-block; }
.px-pink { color: var(--pink); text-shadow: var(--glow-pink); }
.px-cyan { color: var(--cyan); text-shadow: var(--glow-cyan); }

/* ---------- Social row ---------- */
.socials ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(0.5rem, 2.4vw, 1.25rem);
}
.socials a,
.socials button {
  display: grid;
  place-items: center;
  min-width: 46px;
  min-height: 46px;
  padding: 8px;
  border-radius: 12px;
  color: var(--cyan);
  text-decoration: none;
  transition: transform .18s ease, color .18s ease, filter .18s ease;
}
.socials button {            /* reset so the contact button matches the icon links */
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}
.socials a svg,
.socials button svg { width: 26px; height: 26px; fill: currentColor; }
.socials a:hover,
.socials a:focus-visible,
.socials button:hover,
.socials button:focus-visible {
  color: var(--pink);
  transform: translateY(-4px) scale(1.12);
  filter: drop-shadow(0 0 6px rgba(var(--pink-rgb), .85))
          drop-shadow(0 0 16px rgba(var(--pink-rgb), .55));
}

/* ---------- Sections: "Available on" + "Bio" ---------- */
.available,
.bio { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }

/* simple, NON-neon section heading — blue, no separator line */
.section-heading {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1rem, 2.8vw, 1.35rem);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cyan);
}

/* pixel label (contact popup title) — blue, but NOT neon (no glow) */
.section-label {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: clamp(0.85rem, 2.6vw, 1.25rem);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cyan);
}
/* Registered angle so the conic-gradient can interpolate/rotate.
   MUST be at stylesheet top level (never inside :root or a selector). */
@property --bio-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.bio-panel {
  position: relative;
  isolation: isolate;            /* local stacking context for the pseudo layers */
  width: min(100%, 70ch);
  text-align: left;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  --bw: 1px;                     /* ring thickness (thin) */
  border: none;                  /* the animated ring is the only colour here */
  border-radius: 14px;
  /* --bg at 70% opacity — the page/road behind shows through the panel,
     but NO colour fills the interior; only the border is animated/coloured */
  background: rgba(5, 8, 21, 0.7);
  color: var(--ink);
}
.bio-panel p { margin: 0 0 1.05em; }
.bio-panel p:last-child { margin-bottom: 0; }
/* keep all real content above both pseudo layers */
.bio-panel > * { position: relative; z-index: 2; }

/* ---- CRISP rotating ring (::before) -------------------------------
   A conic sweep masked to a --bw frame: only the perimeter paints, the
   interior is punched out so the translucent panel bg shows through and
   bio text contrast is untouched. Above the panel bg, below the text. */
.bio-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;                    /* above panel bg (0), below text (2) */
  border-radius: inherit;        /* follow the 14px corners */
  padding: var(--bw);
  pointer-events: none;          /* never block selection / clicks */
  background: conic-gradient(from var(--bio-angle),
    var(--pink), var(--cyan), var(--pink), var(--cyan), var(--pink));
  /* ring-only cutout: full box minus content-box => a --bw frame */
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
          mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;        /* legacy WebKit/Blink */
          mask-composite: exclude;    /* standard */
  filter: drop-shadow(0 0 2px rgba(var(--cyan-rgb), .55));
  animation: bio-border-spin 6s linear infinite;
}

/* the ring rotates the registered angle (no transform => fixed bounds) */
@keyframes bio-border-spin { to { --bio-angle: 360deg; } }

/* Static fallback for engines WITHOUT @property: pin a pleasing frame
   (gated OFF in modern browsers by @supports). */
@supports not (background: conic-gradient(from var(--bio-angle), red, red)) {
  .bio-panel::before { --bio-angle: 135deg; }
}
/* Reduced motion: global rule freezes the spin; pin a nice static angle. */
@media (prefers-reduced-motion: reduce) {
  .bio-panel::before { --bio-angle: 135deg; }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 1.5rem 1rem 2rem;
  color: var(--ink-dim);
  font-size: .85rem;
  letter-spacing: .03em;
}

/* ============================================================
   ENTRANCE REVEALS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   ACCESSIBILITY HELPERS + FOCUS
   ============================================================ */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ============================================================
   CONTACT FORM POPUP (<dialog>)
   ============================================================ */
.contact-dialog {
  width: min(92vw, 460px);
  border: none;
  border-radius: 16px;
  padding: 0;
  background: transparent;          /* the form draws the visible panel */
  color: var(--ink);
}
.contact-dialog::backdrop {
  background: rgba(2, 4, 12, .72);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.contact-dialog[open] { animation: cf-pop .22s ease; }
@keyframes cf-pop {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.contact-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  max-height: 86vh;
  overflow-y: auto;
  padding: clamp(1.4rem, 4vw, 2rem);
  border-radius: 16px;
  background: rgba(5, 8, 21, .97);
  border: 1px solid rgba(var(--cyan-rgb), .45);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .6),
              0 0 34px rgba(var(--cyan-rgb), .16);
  text-align: left;
}
.contact-form .section-label {
  margin: 0 0 .7rem;
  font-size: clamp(0.8rem, 3.6vw, 1.05rem);
}
.contact-form label {
  font-size: .8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(var(--cyan-rgb), .3);
  border-radius: 9px;
  padding: .6rem .7rem;
  margin-bottom: .4rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.contact-form textarea { resize: vertical; min-height: 96px; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px var(--cyan), 0 0 14px rgba(var(--cyan-rgb), .35);
}
.cf-hp {                            /* honeypot — hidden from people */
  position: absolute !important;
  left: -9999px; width: 1px; height: 1px; opacity: 0;
}
.contact-send {
  margin-top: .5rem;
  font-family: var(--font-pixel);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #06121a;
  background: var(--cyan);
  border: 0;
  border-radius: 10px;
  padding: .85rem 1rem;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.contact-send:hover:not(:disabled),
.contact-send:focus-visible {
  background: var(--pink);
  color: #fff;
  box-shadow: 0 0 18px rgba(var(--pink-rgb), .6);
  transform: translateY(-1px);
}
.contact-send:disabled { opacity: .6; cursor: progress; }
.contact-close {
  position: absolute;
  top: 8px; right: 10px;
  width: 36px; height: 36px;
  font-size: 26px; line-height: 1;
  color: var(--ink-dim);
  background: none; border: 0; cursor: pointer;
  border-radius: 8px;
  transition: color .15s ease;
}
.contact-close:hover,
.contact-close:focus-visible { color: var(--cyan); }
.contact-status {
  margin: .5rem 0 0;
  min-height: 1.2em;
  font-size: .88rem;
  color: var(--ink-dim);
}
.contact-status[data-state="ok"]  { color: var(--cyan); }
.contact-status[data-state="err"] { color: var(--pink); }

/* ============================================================
   RESPONSIVE — tuned across breakpoints. The layout is fluid
   (clamp/min/vw) by default, so most bands need no override; the
   rules below refine the edges:
     wide desktop  >= 1600px
     desktop       1280-1599px   (defaults)
     laptop        1024-1279px   (defaults)
     landscape tab 900-1023px    (defaults)
     portrait tab  601-899px     (defaults)
     landscape mobile  orientation:landscape & short height
     portrait mobile   <= 600px  (and <= 380px for tiny phones)
   ============================================================ */

/* Wide desktop — give the content a bit more room */
@media (min-width: 1600px) {
  :root { --maxw: 1000px; }
}

/* Portrait mobile */
@media (max-width: 600px) {
  .stage { padding-left: 14px; padding-right: 14px; }
  .socials ul { gap: 8px; }
  .socials a, .socials button { min-width: 42px; padding: 6px; }
  .socials a svg, .socials button svg { width: 24px; height: 24px; }
}

/* Tiny portrait phones — keep all 7 icons on one row */
@media (max-width: 380px) {
  .socials ul { gap: 6px; }
  .socials a, .socials button { min-width: 36px; padding: 5px; }
  .socials a svg, .socials button svg { width: 21px; height: 21px; }
}

/* Landscape phones / very short viewports — compress the hero so the
   logo + socials + start of the bio fit without a giant top gap */
@media (orientation: landscape) and (max-height: 540px) {
  .stage { padding-top: clamp(2rem, 10vh, 3.5rem); gap: clamp(0.9rem, 3.5vh, 1.8rem); }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}
