/* Sonali Goel — personal site
   Quantum neon: dark-native, Space Grotesk + JetBrains Mono,
   cyan/magenta/violet accents, Bloch-sphere hero. */

:root {
  --bg: #06070c;
  --ink: #d9dee9;
  --bright: #eef3fa;
  --dim: #8a93a8;
  --cyan: #3ee9ff;
  --magenta: #ff4fd8;
  --violet: #8f7bff;
  --hair: rgba(140, 160, 220, 0.16);
  --glow-c: rgba(62, 233, 255, 0.25);
}

* { box-sizing: border-box; }

html { font-size: 16.5px; }

body {
  margin: 0 auto;
  max-width: 48rem;
  padding: 4.2rem 1.5rem 3rem;
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  line-height: 1.66;
  background-color: var(--bg);
  background-image:
    radial-gradient(56rem 32rem at 88% -8%, rgba(143, 123, 255, 0.11), transparent 60%),
    radial-gradient(44rem 28rem at -12% 24%, rgba(62, 233, 255, 0.07), transparent 60%),
    linear-gradient(rgba(120, 140, 220, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 140, 220, 0.045) 1px, transparent 1px);
  background-size: auto, auto, 100% 2.1rem, 2.1rem 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(255, 79, 216, 0.35); }

.mono, .role, .tagline, .links, .meta, .empty, h2, .fine, .post-back {
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.8rem;
  align-items: center;
}

h1 {
  margin: 0;
  font-size: 2.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: linear-gradient(93deg, var(--bright) 0%, var(--bright) 38%,
              var(--cyan) 62%, var(--violet) 82%, var(--magenta) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(62, 233, 255, 0.16));
}

.role {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--dim);
}

.tagline {
  margin: 1.25rem 0 0;
  font-size: 0.92rem;
  min-height: 2.9em;
  color: var(--ink);
}

.tagline .prompt { color: var(--magenta); }

.cursor {
  color: var(--cyan);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.links {
  margin-top: 1.1rem;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
}

.links a {
  color: var(--cyan);
  text-decoration: none;
  margin-right: 0.65rem;
  transition: text-shadow 140ms ease, color 140ms ease;
}

.links a:hover { text-shadow: 0 0 12px var(--glow-c); color: #9df3ff; }

#bloch {
  width: 300px;
  aspect-ratio: 1;
  display: block;
  justify-self: end;
}

/* ---------- intro ---------- */

.intro { margin-top: 2.4rem; }
.intro p { margin: 0; font-size: 1.0rem; }

em { font-style: normal; color: #b9abff; }

/* ---------- sections ---------- */

section { margin-top: 3rem; }

h2 {
  margin: 0 0 1.3rem;
  padding-top: 1.2rem;
  border-top: 1px solid;
  border-image: linear-gradient(90deg, rgba(62, 233, 255, 0.55),
                rgba(255, 79, 216, 0.25) 45%, transparent 80%) 1;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  color: var(--cyan);
  text-shadow: 0 0 16px var(--glow-c);
}

h2 .ket { color: var(--magenta); text-shadow: 0 0 14px rgba(255, 79, 216, 0.35); }

/* ---------- entries ---------- */

#research { counter-reset: entry; }

.entry { position: relative; margin: 0 0 1.9rem; }
#research .entry { counter-increment: entry; padding-left: 2.5rem; }
.entry:last-child { margin-bottom: 0; }

#research .entry::before {
  content: counter(entry, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.28rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  color: var(--violet);
  opacity: 0.9;
  transition: color 140ms ease, text-shadow 140ms ease;
}

.entry:hover::before { color: var(--cyan); text-shadow: 0 0 10px var(--glow-c); }

.entry h3 {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--bright);
  transition: text-shadow 140ms ease;
}

.entry:hover h3 { text-shadow: 0 0 14px var(--glow-c); }

.entry h3 a {
  color: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(62, 233, 255, 0.45);
  text-underline-offset: 4px;
}

.entry h3 a::after {
  content: " [" attr(data-link) " \2197]";
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 400;
  font-size: 0.72em;
  letter-spacing: 0.02em;
  color: var(--cyan);
  text-shadow: 0 0 12px var(--glow-c);
  white-space: nowrap;
}

.entry h3 a:hover {
  text-decoration-style: solid;
  text-decoration-color: var(--cyan);
}

.entry .meta {
  margin: 0.18rem 0 0.4rem;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  color: var(--dim);
}

.meta .hl { color: var(--magenta); }

.entry p { margin: 0; font-size: 0.95rem; }

.empty {
  margin: 0;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--dim);
}

.empty + .entry { margin-top: 1.4rem; }

/* ---------- portrait & gallery ---------- */

.about-flex {
  display: grid;
  grid-template-columns: 1fr 176px;
  gap: 1.7rem;
  align-items: start;
}

.about-flex p { margin: 0; }

.portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(120, 140, 220, 0.35);
  box-shadow: 0 0 0 1px rgba(62, 233, 255, 0.12), 0 0 30px rgba(143, 123, 255, 0.16);
  filter: saturate(0.8);
  transition: filter 160ms ease, box-shadow 160ms ease;
}

.portrait:hover {
  filter: none;
  box-shadow: 0 0 0 1px rgba(62, 233, 255, 0.3), 0 0 32px rgba(62, 233, 255, 0.2);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.gallery a { display: block; }

.videos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  margin-top: 1.1rem;
}

.clip-link {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--hair);
  background: #000;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.clip-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.clip-link .play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  padding-left: 0.2rem;
  border-radius: 50%;
  background: rgba(6, 7, 12, 0.6);
  border: 1px solid rgba(62, 233, 255, 0.35);
  color: #dffaff;
  font-size: 0.95rem;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.clip-link:hover {
  border-color: rgba(62, 233, 255, 0.5);
  box-shadow: 0 0 18px rgba(62, 233, 255, 0.15);
}

.clip-link:hover .play {
  background: rgba(6, 7, 12, 0.75);
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(62, 233, 255, 0.35);
}

.videos figure { margin: 0; }

.videos figcaption {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  margin-top: 0.45rem;
}

.clip-title {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.clip-stats {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.66rem;
  color: var(--dim);
}

.gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--hair);
  filter: saturate(0.8);
  transition: filter 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.gallery img:hover {
  filter: none;
  border-color: rgba(62, 233, 255, 0.5);
  box-shadow: 0 0 18px rgba(62, 233, 255, 0.15);
}

/* ---------- demo figure (disorder page) ---------- */

.demo { margin: 1.7rem 0 1.6rem; }

.demo a {
  display: block;
  border: 1px solid var(--hair);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.demo a:hover {
  border-color: rgba(62, 233, 255, 0.5);
  box-shadow: 0 0 18px rgba(62, 233, 255, 0.15);
}

.demo img { width: 100%; display: block; }

.demo figcaption {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--dim);
  margin-top: 0.55rem;
}

#disorder p { font-size: 0.98rem; margin: 0 0 1rem; }
#disorder .empty { margin-bottom: 0; }

/* ---------- links ---------- */

a {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(62, 233, 255, 0.35);
  transition: text-decoration-color 140ms ease, text-shadow 140ms ease;
}

a:hover { text-decoration-color: var(--cyan); text-shadow: 0 0 12px var(--glow-c); }

:focus-visible { outline: 1.5px solid var(--magenta); outline-offset: 3px; }

/* ---------- footer ---------- */

footer {
  margin-top: 3.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid;
  border-image: linear-gradient(90deg, rgba(62, 233, 255, 0.4), transparent 70%) 1;
  font-size: 0.82rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  color: var(--dim);
}

footer p { margin: 0; }
footer a { color: var(--cyan); text-decoration: none; }
.psi { color: var(--violet); }
.fine { font-size: 0.74rem; }

/* ---------- post pages ---------- */

.post-back {
  display: inline-block;
  margin-bottom: 2.4rem;
  font-size: 0.84rem;
  color: var(--cyan);
  text-decoration: none;
}

.post h1 { font-size: 1.75rem; }

.post .meta {
  margin: 0.4rem 0 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--dim);
}

.post-body { margin-top: 2rem; }
.post-body p { margin: 0 0 1rem; }

.post-body h2 {
  border: 0;
  padding: 0;
  margin: 2rem 0 0.6rem;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--bright);
  text-shadow: none;
}

.post-body code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.85em;
  color: #a7eeff;
  background: rgba(62, 233, 255, 0.07);
  border: 1px solid rgba(62, 233, 255, 0.16);
  padding: 0.06em 0.32em;
  border-radius: 4px;
}

/* ---------- small screens ---------- */

@media (max-width: 720px) {
  html { font-size: 16px; }
  body { padding-top: 3rem; }
  .hero { grid-template-columns: 1fr; }
  h1 { font-size: 2.05rem; }
  .about-flex { grid-template-columns: 1fr; }
  .portrait { order: -1; width: 156px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .videos { grid-template-columns: repeat(2, 1fr); }
  #bloch {
    position: absolute;
    top: -1.6rem;
    right: -1.8rem;
    width: 220px;
    opacity: 0.33;
    z-index: -1;
  }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
}
