@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

/* Register animated custom properties */
@property --gAngle { syntax: "<angle>";      initial-value: 0deg;  inherits: true; }
@property --gx     { syntax: "<percentage>"; initial-value: 0%;    inherits: true; }
@property --gy     { syntax: "<percentage>"; initial-value: 50%;   inherits: true; }

/* Global tokens */
:root {
  --neon-radius: 10px;

  /* Shared glow state (animated) */
  --gAngle: 0deg;
  --gx: 0%;
  --gy: 50%;
  animation: glow-sweep 12s linear infinite;
}

@keyframes glow-sweep {
  0%   { --gAngle: 0deg;   --gx: 0%;   --gy: 50%; }
  33%  { --gAngle: 120deg; --gx: 100%; --gy: 40%; }
  66%  { --gAngle: 240deg; --gx: 0%;   --gy: 60%; }
  100% { --gAngle: 360deg; --gx: 100%; --gy: 50%; }
}

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

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
}

body {
  background-color: #000;
  font-family: 'Roboto', sans-serif;
  color: #fff;
}

.main-layout {
  display: flex;
  flex-direction: row;
  align-content: center;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

@media (max-width: 800px) {
  .main-layout {
    flex-direction: column;
    height: auto;
    padding: 20px;
  }
}

/* default boxes: just border, no animated glow */
.glow-box {
  position: relative;
  border-radius: var(--neon-radius);
  padding: 2px;
  max-width: 360px;
  width: 100%;
  border: 1px solid rgba(93, 220, 255, 0.3);
}

/* kill glow layers on normal boxes */
.glow-box::before,
.glow-box::after {
  content: none;
}

/* glowing version (only for About Me) */
.glow-box.glow-active::before,
.glow-box.glow-active::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--neon-radius);
  background: linear-gradient(var(--gAngle), #5ddcff, #3c67e3 43%, #4e00c2);
  background-size: 300% 300%;
  background-position: var(--gx) var(--gy);
  z-index: -1;
  pointer-events: none;
  will-change: background-position, background-image;
}

/* soft outer glow for the active one */
.glow-box.glow-active::after {
  filter: blur(20px);
  z-index: -2;
}


/* Card / content styling (unchanged) */
.card-content {
  background-color: #141414;
  border-radius: var(--neon-radius);
  overflow: hidden;
  text-align: center;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
}

.card-content img.cover {
  width: 100%;
  height: auto;
}

.card-content figcaption {
  padding: 30px 20px 20px;
  position: relative;
}

.profile-photo {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #fff;
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #000;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.profile-photo:hover {
  transform: translateX(-50%) scale(1.05);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

h2 {
  margin-top: 60px;
  font-size: 1.4em;
  font-weight: 400;
}

h2 span {
  display: block;
  font-size: 0.85em;
  color: #5ddcff;
  font-weight: 300;
  margin-top: 5px;
}

.card-content p {
  font-size: 0.9em;
  margin: 15px 0;
  color: #aaa;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.card-content a {
  padding: 8px 12px;
  border: 1px solid #5ddcff;
  color: #5ddcff;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.7em;
  letter-spacing: 1px;
  border-radius: 4px;
  transition: 0.3s ease;
}

.card-content a:hover {
  background-color: #5ddcff;
  color: #000;
}

.download-cv { margin-top: 15px; }

.info-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 360px;
}

.glow-content {
  position: relative;
  background-color: #141414;
  padding: 1px;
  border-radius: var(--neon-radius);
  text-align: center;
}

.glow-content h3 {
  display: block;
  color: #5ddcff;
  line-height: 0;
}

.glow-content p {
  color: #ccc;
  line-height: 1.5;
  padding: 0;
  margin-bottom: 5px;
}

.github-stats {
  width: 100%;
  height: fit-content;
  border: none;
  padding: 0;
  margin: 0;
  display: block;
}

#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -20;
  display: block;
  background: black;
}

#py-output::-webkit-scrollbar { width: 6px; }
#py-output::-webkit-scrollbar-track { background: transparent; }
#py-output::-webkit-scrollbar-thumb { background-color: #5ddcff; border-radius: 3px; }

#plot-loading {
  text-align: center;
  font-size: 1.1em;
  padding: 20px;
  color: #666;
}

#py-output div[id^="matplotlib_"] {
  width: 100%;
  text-align: center;
}



/* --- Compact scrollable sections --- */
.scrollbox {
  max-height: 240px;            /* ← adjust to taste (e.g., 200–300px) */
  overflow: auto;
  padding: 6px;           /* space for scrollbar */
  overscroll-behavior: contain; /* prevent page scroll chaining */
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(93, 220, 255, 0.12);
}

/* nicer thin scrollbars */
.scrollbox::-webkit-scrollbar { width: 8px; height: 8px; }
.scrollbox::-webkit-scrollbar-thumb {
  background: rgba(93,220,255,.35);
  border-radius: 10px;
}
.scrollbox::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
}

/* list layout stays elegant */
.list-elegant { display: grid; gap: 10px; }

/* entries: slightly tighter for small boxes */
.entry {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(93, 220, 255, 0.18);
  border-radius: 12px;
  padding: 10px 12px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.entry:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,.35), 0 0 18px rgba(93,220,255,.08);
  border-color: rgba(93, 220, 255, 0.32);
}

/* remove the old overlay line & pin-dot if you added them earlier */
.entry.tl:before     { content: none !important; }

/* header row + date pill, tags */
.entry .top { display:flex; align-items:baseline; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.pill {
  font-size: .76rem; padding: 2px 7px; border: 1px solid rgba(93,220,255,.35);
  border-radius: 999px; color: #9bdcff; background: linear-gradient(180deg, rgba(93,220,255,.10), rgba(93,220,255,.04));
  white-space: nowrap;
}
.title { font-weight: 700; letter-spacing: .2px; color: #e8f3ff; }
.meta  { font-size: .88rem; color: #9fb5d1; margin-left: 6px; font-weight: 500; }

.entry .desc { margin-top: 4px; color: #cfe5ff; line-height: 1.5; }
.tags { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.tag  { font-size:.74rem; padding:2px 7px; border-radius:8px; border:1px solid rgba(146,186,255,.25); color:#b9d6ff; background:rgba(146,186,255,.06); }

/* section mini-subtitle */
.subtle-h4 { margin: 6px 0 8px; font-size: .92rem; letter-spacing:.3px; color:#a8c7ff; opacity:.9; }

/* optional: make the whole glow-content tighter since we have scrollboxes inside */
.glow-content { padding: 14px; }


/* Stop global animation; keep static defaults */
:root {
  --gAngle: 0deg;
  --gx: 0%;
  --gy: 50%;
  animation: none;
}

/* Run the sweep ONLY on the glowing box (About Me) */
.glow-box.glow-active {
  --gAngle: 0deg;
  --gx: 0%;
  --gy: 50%;
  animation: glow-sweep 12s linear infinite;
}

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

/* Sticky school header inside scrollbox */
.school-head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 6px 10px;
  margin: 0 0 8px;
  border: 1px solid #5ddcff;
  border-radius: 8px;
  font-weight: 700;
  letter-spacing: .2px;
  color: #e8f3ff;
  background: linear-gradient(180deg, rgba(8,16,32,.85), rgba(8,16,32,.70));
  backdrop-filter: blur(4px);
}
.school-block { margin-bottom: 12px; }
.school-block .list-elegant { margin-top: 6px; }
