:root {
  --bg: #0b1020;
  --bg-2: #0b1020;
  --text: #e8ecff;
  --muted: #a4b1d9;

  /* Neon accents: blue/purple/cyan gradient */
  --acc-1: #00e5ff;
  --acc-2: #7c4dff;
  --acc-3: #00d1ff;
  --accent: #00e5ff;
  --accent-grad: linear-gradient(135deg, var(--acc-1), var(--acc-2) 40%, var(--acc-3));

  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
  --shadow-strong: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 60px rgba(0, 229, 255, 0.08);

  --radius: 16px;
  --blur: 4px;
  --max: 1200px;

  --headerH: 80px; /* default, JS updates this */
}

* { box-sizing: border-box; }
html, body { height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(1200px 800px at 20% -10%, rgba(0, 229, 255, 0), transparent 60%),
              radial-gradient(1000px 700px at 80% 110%, rgba(124, 77, 255, 0), transparent 60%),
              var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.7;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 20px 0;
  position: relative;
  z-index: 20;
  /* prevent header from cutting content on anchor jump */
  scroll-margin-top: calc(var(--headerH) + 12px);
}

/* Centered section titles + centered glow underline */
.section-title {
  font-family: Orbitron, Inter, sans-serif;
  font-size: 32px;
  letter-spacing: 0.6px;
  margin: 0 auto 28px; /* center the title block */
  position: none;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}
.section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: var(--accent-grad);
  filter: drop-shadow(0 0 10px rgba(0,229,255,0.6));
  border-radius: 2px;
  display: none;
}

/* Background canvas */
#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}

/* Orbs */
.orb {
  position: fixed;
  width: 500px; height: 500px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.2;
  z-index: 0;
  pointer-events: none;
}
.orb-1 { background: #00e5ff; top: -150px; left: -120px; }
.orb-2 { background: #7c4dff; bottom: -180px; right: -120px; }
.orb-3 { background: #00d1ff; top: 40%; left: 55%; transform: translate(-50%, -50%); opacity: 0.15; }

/* Glass nav */
.glass-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;      /* keep it above other content */
  backdrop-filter: blur(12px); /* optional: glass effect */
}

.nav-inner {
  display: flex; align-items: center; gap: 16px; padding: 14px 0;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand-badge {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 10px;
  background: var(--accent-grad);
  color: #061018;
  font-weight: 800;
  font-family: Orbitron, Inter, sans-serif;
  box-shadow: 0 0 20px rgba(0,229,255,0.5), inset 0 0 20px rgba(255,255,255,0.2);
}
@media (max-width: 576px) {
  .brand-badge {
    margin-left: 20px; /* move right slightly */
    /* OR for more control: */
    /* transform: translateX(8px); */
  }
}
.brand-name { font-weight: 700; letter-spacing: 0.4px; }

.nav { margin-left: auto; display: flex; gap: 18px; }
.nav-link {
  color: var(--muted); text-decoration: none; font-weight: 500; position: relative;
  padding: 6px 10px; border-radius: 10px; transition: color .25s;
}
.nav-link:hover, .nav-link.active { color: var(--text); }

/* Centered underline for nav links on hover/active */
.nav-link.active::after, .nav-link:hover::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 2px;
  background: var(--accent-grad);
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(0,229,255,0.8);
}

.menu-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 22px; }

/* Buttons */
.btn {
  --pad-x: 18px;
  appearance: none;
  border: 1px solid var(--glass-border);
  padding: 12px var(--pad-x);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  color: var(--text);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 10px;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .3s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.btn-small { padding: 10px 14px; --pad-x: 14px; font-size: 14px; }
.btn-primary {
  background: var(--accent-grad);
  color: #061018;
  border-color: transparent;
  box-shadow:
    0 10px 35px rgba(0,229,255,0.25),
    0 0 18px rgba(124,77,255,0.2);
}
.btn-primary:hover { transform: translateY(-2px) scale(1.01); box-shadow: 0 14px 40px rgba(0,229,255,0.35), 0 0 22px rgba(124,77,255,0.3); }
.btn-ghost { background: rgba(255,255,255,0.04); }
.btn-ghost:hover { border-color: rgba(255,255,255,0.22); transform: translateY(-2px); }

@media (max-width: 768px) {
  .btn {
    font-size: 14px;
    padding: 8px 14px;
    gap: 6px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .btn {
    width: 25%;        /* full width */
    justify-content: center;  /* center contents */
    font-size: 10px;
    padding: 10px;
  }
  .btn i {
    margin-bottom: 4px;       /* if stacked */
  }
  .btn span {
    display: block;
  }
}
/* Hero */
.hero { padding-top: 120px; }
.grid-2 { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 30px; align-items: center; }
.headline {
  font-family: Orbitron, Inter, sans-serif;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  margin: 0 0 14px;
  width: 700px;
}
@media (max-width: 992px) {
  .headline {
    width: 90%;          /* shrink width */
    font-size: clamp(32px, 6vw, 56px);
    text-align: center;  /* center on smaller screens */
    margin: 0 auto 14px; /* center horizontally */
  }
}

/* Mobile screens */
@media (max-width: 576px) {
  .headline {
    width: 100%;         /* full width */
    font-size: clamp(26px, 8vw, 42px);
    text-align: center;
    margin: 0 auto 12px;
  }
  .tagline{
    width: 100%;
    color: var(--muted); font-size: 18px; margin-bottom: 22px;

  }
}
.glow-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 22px rgba(0,229,255,0.35);
}
.tagline { color: var(--muted); font-size: 18px; margin-bottom: 22px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }

.socials { display: flex; gap: 12px; }
.social-link {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 12px; color: var(--text); text-decoration: none;
  background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border);
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}
.social-link:hover {
  transform: translateY(-3px);
  background: rgba(0,229,255,0.08);
  border-color: rgba(0,229,255,0.35);
  box-shadow: 0 0 24px rgba(0,229,255,0.35);
}

.hero-visual { display: grid; gap: 18px; justify-items: center; }
.pfp-wrap {
  width: min(320px, 80%); aspect-ratio: 1/1; border-radius: 50%;
  padding: 6px; position: relative;
  background: radial-gradient(120px 120px at 70% 30%, rgba(255,255,255,0.3), transparent),
              var(--accent-grad);
  box-shadow: 0 0 35px rgba(0,229,255,0.35);
}
.pfp-wrap::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(124,77,255,0.25), transparent 60%);
  filter: blur(18px);
  z-index: -1;
}
.pfp {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 50%;
  border: 6px solid rgba(255,255,255,0.07);
  box-shadow: inset 0 0 30px rgba(0,0,0,0.5);
}

.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  padding: 14px 18px; border-radius: 16px; text-align: center;
}
.stats .metric { display: block; font-weight: 800; font-size: 20px; }
.stats .label { display: block; color: var(--muted); font-size: 12px; }

.scroll-indicator {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  color: var(--muted); text-decoration: none; font-size: 18px; opacity: 0.8;
  animation: floaty 2.5s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -8px); }
}

/* About */
.about { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 26px; }
.stack-icons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.stack-icon {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 12px; font-weight: 600; font-size: 14px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
  box-shadow: inset 0 0 12px rgba(0,229,255,0.05);
}
.about-media img { width: 100%; border-radius: 18px; display: block; }

/* Glass card */
.glass-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow-strong);
  padding: 20px;
}

/* Projects */
.projects-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.project-card {
  position: relative; border-radius: 18px; overflow: hidden; transform-style: preserve-3d;
  transition: transform .25s ease;
  
}

.project-card:hover { transform: translateY(-4px); }
.project-media {
  width: 100%; height: 200px; background-size: cover; background-position: center;
  filter: saturate(1.1);
}
.project-content {
  position: relative; margin-top: -40px; border-top-left-radius: 18px; border-top-right-radius: 18px;
}
.project-content h3 { margin: 4px 0 6px; font-family: Orbitron, Inter, sans-serif; }
.project-content p { margin: 0 0 10px; color: var(--muted); }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.project-tags span {
  font-size: 12px; padding: 6px 10px; border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04);
}
.project-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Skills */
.skills-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.skill .skill-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.skill .skill-value { color: var(--muted); font-weight: 600; }
.skill-bar {
  position: relative; height: 12px; border-radius: 999px; overflow: hidden;
  background: rgba(255,255,255,0.06); border: 1px solid var(--glass-border);
}
.skill-bar .fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0%; border-radius: inherit;
  background: var(--accent-grad);
  box-shadow: 0 0 18px rgba(0,229,255,0.45);
  transition: width 1.2s cubic-bezier(.2,.7,.2,1);
}

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.input-group { display: grid; gap: 8px; margin-bottom: 14px; }
label { color: var(--muted); font-size: 14px; }
input, textarea {
  width: 100%; color: var(--text); font: inherit;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input::placeholder, textarea::placeholder { color: #8fa0c9; }
input:focus, textarea:focus {
  border-color: rgba(0,229,255,0.45);
  box-shadow: 0 0 24px rgba(0,229,255,0.25);
  background: rgba(255,255,255,0.06);
}
.form-note { color: var(--muted); font-size: 12px; margin-top: 8px; }
.contact-meta h3 { margin: 0 0 10px; font-family: Orbitron, Inter, sans-serif; }
.contact-meta p { color: var(--muted); }
.contact-socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text);
  padding: 10px 12px; border-radius: 999px; font-weight: 600;
  border: 1px solid var(--glass-border); background: rgba(255,255,255,0.05);
  transition: transform .2s, border-color .2s, box-shadow .2s, background .2s;
}
.chip:hover {
  transform: translateY(-2px);
  border-color: rgba(0,229,255,0.45);
  box-shadow: 0 0 24px rgba(0,229,255,0.25);
  background: rgba(0,229,255,0.08);
}

/* Footer */
.footer {
  padding: 26px 0; border-top: 1px solid var(--glass-border);
  background: linear-gradient(180deg, rgba(11,16,32,0.5), rgba(11,16,32,0.85));
  backdrop-filter: blur(8px);
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.made-with { color: var(--muted); }
.heart { filter: drop-shadow(0 0 10px rgba(255,64,129,0.6)); }
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 9;
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.05); color: var(--text);
  display: grid; place-items: center; cursor: pointer; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s, background .25s, border-color .25s;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover {
  transform: translateY(-2px);
  border-color: rgba(0,229,255,0.45);
  box-shadow: 0 0 24px rgba(0,229,255,0.25);
  background: rgba(0,229,255,0.08);
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px) scale(0.98); transition: all .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in-view { opacity: 1; transform: translateY(0) scale(1); }

/* Responsive */
@media (max-width: 1024px) {
  .grid-2, .about { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
  .menu-toggle { display: inline-grid; place-items: center; }
  .glass-nav.open .nav {
    position: absolute; top: calc(var(--headerH) - 14px); right: 24px; left: 24px; display: grid; gap: 8px; padding: 12px;
    background: var(--glass); border: 1px solid var(--glass-border); border-radius: 12px;
  }
}
@media (max-width: 680px) {
  .projects-grid, .skills-grid, .contact-grid { grid-template-columns: 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Utility */
.about-photo { padding: 0; overflow: hidden; }