:root {
  color-scheme: dark;
  --bg: #090d18;
  --surface: rgba(13, 20, 36, 0.82);
  --panel: rgba(17, 27, 49, 0.82);
  --line: #26344e;
  --line-soft: rgba(151, 173, 220, 0.2);
  --text: #f2f6ff;
  --muted: #9fb0cc;
  --electric: #61a8ff;
  --mint: #5df2c4;
  --pulse: #9c7cff;
  --shadow: 0 16px 36px rgba(3, 8, 18, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.site-body {
  margin: 0;
  color: var(--text);
  font-family: "Inter", sans-serif;
  background: var(--bg);
  line-height: 1.62;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

.background-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(151, 173, 220, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(151, 173, 220, 0.07) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at 50% 40%, black 20%, transparent 82%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}

.orb-one {
  top: -160px;
  right: -180px;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(97, 168, 255, 0.45), transparent 70%);
}

.orb-two {
  bottom: -180px;
  left: -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(93, 242, 196, 0.22), transparent 70%);
}

.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid transparent;
  transition: background-color 180ms ease, border-color 180ms ease, backdrop-filter 180ms ease;
}

.site-header.scrolled {
  border-color: var(--line);
  background: rgba(9, 13, 24, 0.84);
  backdrop-filter: blur(10px);
}

.nav-row {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}

.brand {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  color: var(--mint);
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.88rem;
  color: var(--muted);
  position: relative;
  transition: color 180ms ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--electric), var(--mint));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.mobile-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: var(--surface);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  padding-bottom: 0.7rem;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu-panel {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(13, 20, 36, 0.95);
  padding: 0.8rem 0.95rem;
}

.mobile-menu-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.mobile-link {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
}

.mobile-link:hover {
  color: var(--text);
}

.section {
  position: relative;
  padding: 2.2rem 0;
  scroll-margin-top: 5rem;
}

.section + .section::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: min(1120px, 92vw);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(97, 168, 255, 0.28), transparent);
  opacity: 0.72;
}

.section-hero {
  padding-top: 6.9rem;
  padding-bottom: 2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.6rem;
  align-items: start;
}

.hero-badge {
  margin: 0 0 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--mint);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(13, 20, 36, 0.75);
  padding: 0.34rem 0.75rem;
}

.hero-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px rgba(93, 242, 196, 0.8);
}

.hero-title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 5.4vw, 3.8rem);
  line-height: 1.13;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(95deg, var(--electric) 0%, var(--pulse) 52%, var(--mint) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-description {
  margin: 0.95rem 0 0;
  max-width: 62ch;
  color: var(--muted);
}

.hero-description strong {
  color: var(--text);
}

.button-row {
  margin-top: 1.15rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.58rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.button-link:hover {
  transform: translateY(-2px);
}

.button-primary {
  border: 1px solid rgba(97, 168, 255, 0.5);
  background: rgba(97, 168, 255, 0.14);
  color: var(--electric);
}

.button-primary:hover {
  background: rgba(97, 168, 255, 0.24);
}

.button-secondary {
  border: 1px solid var(--line);
  background: rgba(13, 20, 36, 0.8);
  color: var(--text);
}

.button-secondary:hover {
  border-color: rgba(93, 242, 196, 0.6);
  color: var(--mint);
}

.hero-panel {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.panel-title {
  margin: 0 0 0.7rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88rem;
  color: #b8c7e4;
  letter-spacing: 0.06em;
}

.photo-holder-wrap {
  margin-bottom: 0.85rem;
}

.photo-holder-label {
  margin: 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #97a7c3;
}

.photo-holder-box {
  margin-top: 0.5rem;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 0.62rem;
  border: 1px dashed rgba(97, 168, 255, 0.45);
  background: rgba(9, 13, 24, 0.72);
  color: #97a7c3;
  font-size: 0.7rem;
  line-height: 1.3;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.62rem;
}

.photo-holder-path {
  display: block;
  margin-top: 0.18rem;
  color: var(--mint);
}

.panel-note-list {
  display: grid;
  gap: 0.55rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.panel-note-list p {
  margin: 0;
}

.panel-note-list span {
  color: var(--mint);
}

.mini-grid {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-card {
  border: 1px solid var(--line);
  border-radius: 0.72rem;
  background: var(--panel);
  padding: 0.68rem;
}

.mini-title {
  margin: 0;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.mini-card p:last-child {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--text);
}

.content-panel {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  padding: 1.1rem;
}

.section-kicker {
  margin: 0 0 0.5rem;
  color: var(--mint);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
}

.section-kicker-electric {
  color: var(--electric);
}

.section-title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.65rem, 3.8vw, 2.35rem);
  line-height: 1.2;
}

.section-text {
  margin: 0.7rem 0 0;
  color: var(--muted);
}

.about-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 0.75fr;
}

.info-stack {
  display: grid;
  gap: 0.65rem;
}

.info-card {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--panel);
  padding: 0.75rem;
}

.info-label {
  margin: 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.info-card p:last-child {
  margin: 0.35rem 0 0;
}

.section-header {
  margin-bottom: 0.75rem;
}

.projects-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--surface);
  padding: 1rem;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(97, 168, 255, 0.6);
  box-shadow: var(--shadow);
}

.card-badge {
  margin: 0 0 0.7rem;
  display: inline-flex;
  padding: 0.2rem 0.56rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
}

.badge-electric {
  border: 1px solid rgba(97, 168, 255, 0.45);
  background: rgba(97, 168, 255, 0.13);
  color: var(--electric);
}

.badge-pulse {
  border: 1px solid rgba(156, 124, 255, 0.45);
  background: rgba(156, 124, 255, 0.14);
  color: var(--pulse);
}

.badge-mint {
  border: 1px solid rgba(93, 242, 196, 0.45);
  background: rgba(93, 242, 196, 0.14);
  color: var(--mint);
}

.project-card h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.08rem;
}

.project-card p {
  margin: 0.6rem 0 0;
  color: var(--muted);
}

.project-card ul {
  margin: 0.58rem 0 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 0.25rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.project-card a {
  margin-top: 0.6rem;
  display: inline-flex;
  color: var(--mint);
  font-weight: 700;
  font-size: 0.87rem;
}

.project-card a:hover {
  color: var(--electric);
}

.project-note {
  font-size: 0.82rem;
  color: var(--muted);
}

.skills-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.skill-card {
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--surface);
  padding: 0.9rem;
}

.skill-card h3 {
  margin: 0 0 0.45rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
}

.skill-card ul {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.credentials-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.credential-panel {
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: var(--surface);
  padding: 1rem;
}

.small-title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.45rem;
}

.credential-stack {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.65rem;
}

.credential-stack.compact {
  gap: 0.55rem;
}

.credential-card {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--panel);
  padding: 0.72rem;
}

.credential-card h3 {
  margin: 0;
  font-size: 0.95rem;
}

.credential-card p {
  margin: 0.32rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.credential-footnote {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.github-panel {
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: var(--surface);
  padding: 1rem;
}

.github-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.9rem;
}

.github-head > a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
}

.github-head > a:hover {
  border-color: rgba(93, 242, 196, 0.6);
  color: var(--mint);
}

.stats-grid {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--panel);
  padding: 0.72rem;
}

.stat-label {
  margin: 0;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.stat-value {
  margin: 0.32rem 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.45rem;
}

.stat-date {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
}

.repo-area {
  margin-top: 0.8rem;
}

.repo-area h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
}

.repo-grid {
  margin-top: 0.65rem;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gh-repo-card {
  border: 1px solid var(--line);
  border-radius: 0.72rem;
  background: var(--panel);
  padding: 0.68rem;
}

.gh-repo-title {
  margin: 0;
  font-size: 0.9rem;
}

.gh-repo-desc {
  margin: 0.4rem 0 0;
  min-height: 2.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.gh-repo-meta {
  margin-top: 0.42rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
}

.gh-repo-link {
  margin-top: 0.5rem;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--mint);
}

.gh-repo-link:hover {
  color: var(--electric);
}

.section-contact {
  padding-bottom: 2.5rem;
}

.contact-panel {
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: var(--surface);
  text-align: center;
  padding: 1.1rem;
}

.contact-links {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

.contact-links a {
  border-radius: 999px;
  padding: 0.48rem 0.9rem;
  border: 1px solid var(--line);
  background: rgba(13, 20, 36, 0.9);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease;
}

.contact-links a:hover {
  transform: translateY(-2px);
  border-color: rgba(93, 242, 196, 0.58);
  color: var(--mint);
}

.contact-links a:last-child {
  border-color: rgba(97, 168, 255, 0.45);
  color: var(--electric);
  background: rgba(97, 168, 255, 0.14);
}

.contact-links a:last-child:hover {
  border-color: rgba(97, 168, 255, 0.7);
  color: var(--electric);
}

.site-footer {
  padding-bottom: 1.1rem;
  text-align: center;
  color: #7686a3;
  font-size: 0.84rem;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 380ms ease, transform 380ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #0a1120;
}

::-webkit-scrollbar-thumb {
  background: #2a3a57;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #38527d;
}

img {
  max-width: 100%;
  height: auto;
  display: block; /* Removes unwanted space at the bottom */
}
@media (max-width: 1040px) {
  .hero-grid,
  .about-grid,
  .credentials-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projects-grid,
  .repo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .mobile-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
  }

  .section {
    padding: 1.85rem 0;
  }

  .section-hero {
    padding-top: 5.7rem;
  }
}

@media (min-width: 861px) {
  .mobile-menu,
  .mobile-menu.open {
    display: none !important;
  }
}

@media (max-width: 680px) {
  .projects-grid,
  .skills-grid,
  .stats-grid,
  .repo-grid {
    grid-template-columns: 1fr;
  }

  .hero-title,
  .section-title {
    letter-spacing: -0.01em;
  }

  .hero-panel,
  .content-panel,
  .project-card,
  .skill-card,
  .credential-panel,
  .github-panel,
  .contact-panel {
    padding: 0.9rem;
  }

  .mini-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .project-card,
  .button-link,
  .contact-links a,
  .nav-link::after {
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
