:root {
  --bg: #070707;
  --bg-soft: #101010;
  --panel: #0f0f10;
  --panel-2: #0a0a0b;
  --text: #f5f7fb;
  --muted: #9ca8bb;
  --line: rgba(255, 255, 255, 0.08);
  --cyan: #17e8ff;
  --blue: #4988ff;
  --pink: #ff2d9a;
  --lime: #b4ff5f;
  --gold: #f4b860;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  --radius: 20px;
  --max-width: 1260px;
}

body[data-theme="light"] {
  --bg: #f2f4fa;
  --bg-soft: #e5eaf7;
  --panel: #ffffff;
  --panel-2: #eef3fb;
  --text: #0b1220;
  --muted: #4f5d73;
  --line: rgba(0, 0, 0, 0.08);
  --shadow: 0 24px 60px rgba(40, 61, 102, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
.brand-copy strong {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

body.cursor-ready {
  cursor: none;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 999;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--cyan);
}

.cursor-ring {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(23, 232, 255, 0.65);
  transition: width 160ms ease, height 160ms ease, border-color 160ms ease;
}

.cursor-ring.hovering {
  width: 58px;
  height: 58px;
  border-color: rgba(255, 45, 154, 0.72);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 0.9rem 0 0;
}

.header-inner,
.page-shell,
.site-footer {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 7, 7, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: none;
}

body[data-theme="light"] .header-inner {
  background: rgba(255, 255, 255, 0.84);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 1px solid rgba(23, 232, 255, 0.45);
  color: var(--cyan);
  font-weight: 700;
}

.brand-copy {
  display: grid;
}

.brand-copy strong {
  font-size: 1rem;
}

.brand-copy small {
  font-size: 0.82rem;
}

.brand-copy small,
.site-nav a,
.theme-toggle,
.hero-summary,
.summary-card p,
.feature-card p,
.info-panel p,
.gallery-meta span,
.mini-list,
.site-footer {
  color: var(--muted);
  padding-bottom: 1.5rem;
}

.site-footer p {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.site-nav a,
.theme-toggle,
.hero-summary,
.summary-card p,
.feature-card p,
.info-panel p,
.gallery-meta span,
.mini-list,
.status-pill,
.button {
  font-family: "Segoe UI", "Aptos", sans-serif;
}

.site-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem 1rem;
}

.site-nav a,
.theme-toggle {
  border: 0;
  background: transparent;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

.site-nav a.active,
.site-nav a:hover,
.theme-toggle:hover {
  color: var(--cyan);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.58rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.page-shell {
  display: grid;
  gap: 1.3rem;
  padding: 2.5rem 0 3rem;
}

.full-width-shell {
  width: min(100%, calc(100% - 2rem));
}

.hero-panel,
.about-hero-panel,
.page-hero,
.page-intro,
.feature-card,
.terminal-card,
.summary-card,
.info-panel,
.gallery-card,
.social-card,
.project-tile,
.panel,
.pdf-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(17, 21, 28, 0.96), rgba(12, 16, 22, 0.96));
  box-shadow: var(--shadow);
}

body[data-theme="light"] .hero-panel,
body[data-theme="light"] .about-hero-panel,
body[data-theme="light"] .page-hero,
body[data-theme="light"] .page-intro,
body[data-theme="light"] .feature-card,
body[data-theme="light"] .terminal-card,
body[data-theme="light"] .summary-card,
body[data-theme="light"] .info-panel,
body[data-theme="light"] .gallery-card,
body[data-theme="light"] .social-card,
body[data-theme="light"] .project-tile,
body[data-theme="light"] .panel,
body[data-theme="light"] .pdf-frame {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
}

.hero-panel,
.about-hero-panel {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.4rem;
  min-height: calc(100vh - 7.5rem);
  padding: 2rem;
}

.page-hero,
.panel,
.pdf-frame,
.social-card,
.project-tile {
  padding: 1.5rem;
}

.hero-main,
.about-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-side {
  display: grid;
  align-content: center;
  gap: 1rem;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.status-row,
.about-pills,
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(23, 232, 255, 0.24);
  background: rgba(23, 232, 255, 0.08);
  color: var(--lime);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

h1 {
  margin: 0.5rem 0 0;
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.45;
  font-weight: 400;
}

h3 {
  margin: 0.2rem 0 0;
  font-size: 1.05rem;
  line-height: 1.45;
  font-weight: 400;
}

.hero-tagline {
  margin: 1.15rem 0 0;
  font-size: clamp(1.18rem, 2vw, 1.55rem);
  line-height: 1.6;
  max-width: 34ch;
  color: var(--text);
}

.hero-summary {
  max-width: 60ch;
  font-size: 1rem;
  line-height: 1.9;
}

.page-hero h1,
.about-hero-panel h1 {
  max-width: 22ch;
  font-size: clamp(1.7rem, 2.7vw, 2.35rem);
  line-height: 1.3;
}

.page-hero .lead {
  max-width: 56ch;
  margin: 1rem 0 0;
  color: var(--muted);
  font-family: "Segoe UI", "Aptos", sans-serif;
  font-size: 0.98rem;
  line-height: 1.8;
}

.cta-row {
  margin-top: 1.75rem;
}

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.4rem;
  padding: 0 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 160ms ease, box-shadow 160ms ease;
  overflow: hidden;
}

.button::before,
.interactive-surface::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: radial-gradient(
    220px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.12),
    transparent 42%
  );
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.button:hover,
.interactive-surface:hover {
  transform: translateY(-4px);
}

.button:hover::before,
.interactive-surface:hover::before {
  opacity: 1;
}

.button-primary {
  background: linear-gradient(135deg, var(--cyan), #12c4ec);
  color: #051018;
}

.button-secondary {
  background: #121317;
  border-color: rgba(73, 136, 255, 0.4);
}

.button-tertiary {
  background: #121317;
  border-color: rgba(255, 45, 154, 0.38);
}

.terminal-card,
.summary-card,
.info-panel {
  padding: 1.5rem;
}

.terminal-dots {
  display: flex;
  gap: 0.75rem;
}

.terminal-dots span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.terminal-dots span:nth-child(1) {
  background: var(--pink);
}

.terminal-dots span:nth-child(2) {
  background: var(--lime);
}

.terminal-dots span:nth-child(3) {
  background: var(--cyan);
}

.terminal-line {
  margin-top: 2rem;
  color: var(--cyan);
  font-family: "Consolas", monospace;
  font-size: clamp(1.4rem, 2vw, 2.1rem);
}

.terminal-copy {
  margin-top: 5rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  line-height: 1.5;
}

.mini-list {
  padding-left: 1.1rem;
  line-height: 1.8;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card {
  display: block;
  padding: 1.35rem;
  text-decoration: none;
}

.feature-card span {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text);
  font-weight: 400;
  font-size: 1.1rem;
}

.academic-tagline {
  color: var(--text);
}

.profile-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(13, 13, 15, 0.98), rgba(9, 9, 10, 0.98));
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
}

.profile-image {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  object-position: center 18%;
}

.profile-card-copy {
  padding: 1.25rem 1.35rem 1.4rem;
}

.profile-card-copy p {
  margin: 0 0 1rem;
  line-height: 1.7;
}

.home-shell {
  gap: 2rem;
}

.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.75fr);
  gap: 3rem;
  align-items: start;
  min-height: calc(100vh - 10rem);
}

.home-intro-copy {
  padding-top: 2.4rem;
}

.academic-profile {
  align-self: start;
  grid-template-rows: auto auto;
}

.academic-profile-image {
  width: 100%;
  min-height: 0;
  aspect-ratio: 0.9;
  object-position: center 16%;
}

.academic-profile-copy {
  padding: 1.15rem 1.25rem 1.25rem;
}

.academic-profile-copy p {
  margin: 0 0 0.95rem;
}

.home-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem 1.1rem;
}

.minimal-link {
  display: grid;
  gap: 0.22rem;
  padding: 1rem 0;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.minimal-link span {
  font-size: 1.08rem;
  color: var(--text);
}

.minimal-link small {
  color: var(--muted);
  font-family: "Segoe UI", "Aptos", sans-serif;
  font-size: 0.92rem;
}

.about-visual {
  display: grid;
  place-items: center;
  padding: 1rem;
}

.hologram-frame {
  position: relative;
  width: min(100%, 520px);
  min-height: 620px;
  border-radius: 28px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(8, 12, 18, 0.95), rgba(8, 12, 18, 0.98)),
    var(--panel-2);
  border: 1px solid rgba(23, 232, 255, 0.22);
}

.hologram-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(23, 232, 255, 0.12), transparent 26%),
    repeating-linear-gradient(
      180deg,
      rgba(23, 232, 255, 0.08) 0,
      rgba(23, 232, 255, 0.08) 1px,
      transparent 1px,
      transparent 5px
    );
  pointer-events: none;
}

.hologram-face {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.portrait-base {
  filter: grayscale(0.35) contrast(1.18) brightness(0.92) saturate(0.7) hue-rotate(150deg);
  mix-blend-mode: screen;
  opacity: 0.88;
}

.portrait-ghost {
  transform: translate3d(8px, 0, 0);
  filter: grayscale(1) contrast(1.5) brightness(1.05) hue-rotate(10deg);
  opacity: 0.13;
  mix-blend-mode: screen;
}

.portrait-ghost-2 {
  transform: translate3d(-8px, 0, 0);
  filter: grayscale(1) contrast(1.4) brightness(1.05) hue-rotate(180deg);
  opacity: 0.2;
}

.hologram-overlay {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  justify-content: space-between;
  color: var(--cyan);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.content-grid,
.gallery-grid {
  display: grid;
  gap: 1rem;
}

.card-grid,
.project-grid,
.split-layout,
.connect-grid {
  display: grid;
  gap: 1rem;
}

.card-grid,
.project-grid,
.split-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.connect-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tag-grid,
.stack-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.tag-grid li,
.stack-list li {
  padding: 0.75rem 0.9rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.stack-list {
  display: grid;
  gap: 0.75rem;
}

.timeline {
  position: relative;
  display: grid;
  gap: 1rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 0.9rem;
  width: 1px;
  background: linear-gradient(180deg, var(--cyan), transparent);
}

.timeline-item {
  position: relative;
  margin-left: 1.75rem;
  padding: 1.2rem 1.2rem 1.2rem 1.4rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 1.25rem;
  left: -1.35rem;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
}

.timeline-date,
.date-pill {
  color: var(--cyan);
  font-size: 0.84rem;
}

.social-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: center;
  text-decoration: none;
}

.social-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  color: #061018;
  font-weight: 800;
}

.pdf-frame {
  height: 78vh;
}

.pdf-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.content-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.page-intro {
  padding: 2rem;
}

.gallery-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery-card {
  overflow: hidden;
}

.gallery-card img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.gallery-placeholder {
  min-height: 420px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(23, 232, 255, 0.08), rgba(255, 45, 154, 0.07)),
    linear-gradient(180deg, var(--panel), var(--panel-2));
}

.gallery-meta {
  padding: 1.25rem;
}

.social-card,
.project-tile {
  padding: 1.2rem;
}

.game-panel {
  padding: 1.2rem;
  display: grid;
  gap: 1rem;
}

.game-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.nn-output {
  display: grid;
  justify-items: end;
}

.slider-grid {
  display: grid;
  gap: 0.75rem;
}

.slider-grid label {
  display: grid;
  gap: 0.4rem;
}

.slider-grid input[type="range"] {
  width: 100%;
  accent-color: var(--cyan);
}

#snake-canvas {
  width: 100%;
  max-width: 320px;
  justify-self: center;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.cursor-arena {
  position: relative;
  min-height: 280px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.cursor-target {
  position: absolute;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .header-inner {
    grid-template-columns: 1fr;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .home-intro,
  .hero-panel,
  .about-hero-panel {
    grid-template-columns: 1fr;
  }

  .home-links,
  .feature-strip,
  .content-grid,
  .connect-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-image {
    min-height: 320px;
  }
}

@media (max-width: 760px) {
  body.cursor-ready {
    cursor: auto;
  }

  .cursor-dot,
  .cursor-ring {
    display: none;
  }

  .header-inner,
  .page-shell,
  .site-footer {
    width: min(100% - 1rem, var(--max-width));
  }

  .hero-panel,
  .about-hero-panel {
    min-height: auto;
    padding: 1.25rem;
  }

  .home-intro {
    gap: 1.5rem;
    min-height: auto;
  }

  .home-intro-copy {
    padding-top: 0.5rem;
  }

  .home-links,
  .feature-strip,
  .content-grid,
  .gallery-grid,
  .card-grid,
  .project-grid,
  .split-layout,
  .connect-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }

  .hero-tagline {
    font-size: clamp(1.05rem, 4.8vw, 1.35rem);
  }

  .hologram-frame {
    min-height: 480px;
  }
}
