/* ====================================================================
   DESIGN TOKENS
==================================================================== */
:root {
  --cyan: #00D9FF;
  --purple: #6C63FF;
  --dark-bg: #0F172A;
  --glass-bg: rgba(15, 23, 42, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --text-main: #E5E9F0;
  --text-muted: #94A3B8;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --section-pad: clamp(60px, 10vw, 120px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--dark-bg);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

::selection { background: var(--cyan); color: var(--dark-bg); }

/* Subtle grid background across the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: -2;
}

/* ====================================================================
   KEYFRAMES
==================================================================== */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(0,217,255,0.35), 0 0 0px rgba(108,99,255,0); }
  50% { box-shadow: 0 0 22px rgba(0,217,255,0.6), 0 0 36px rgba(108,99,255,0.35); }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

@keyframes textGlow {
  0%, 100% { text-shadow: 0 0 12px rgba(0,217,255,0.35); }
  50% { text-shadow: 0 0 22px rgba(0,217,255,0.65), 0 0 8px rgba(108,99,255,0.4); }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scrollCue {
  0% { top: 6px; opacity: 1; }
  80% { top: 28px; opacity: 0; }
  100% { top: 28px; opacity: 0; }
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ====================================================================
   NAVIGATION — floating glassmorphic
==================================================================== */
.navbar {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(94%, 980px);
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  border-color: rgba(0,217,255,0.18);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.nav-logo .dot { color: var(--cyan); }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  position: relative;
  padding: 4px 2px;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  border-radius: 2px;
  transition: width 0.25s ease;
}

.nav-link:hover { color: var(--text-main); }

.nav-link.active {
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(0,217,255,0.5);
}

.nav-link.active::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-main);
  border-radius: 2px;
  transition: all 0.25s ease;
}

@media (max-width: 800px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 4px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 14px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s ease;
  }
  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .nav-link { display: block; padding: 10px 8px; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ====================================================================
   SECTION SHELL
==================================================================== */
.section {
  position: relative;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--section-pad) 24px;
}

.section-head { margin-bottom: 48px; }

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.muted { color: var(--text-muted); font-size: 0.92rem; }

/* ====================================================================
   HERO
==================================================================== */
#neural-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
  display: block;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 0;
}

.hero-content {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  animation: floatY 7s ease-in-out infinite;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  color: var(--purple);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
}

.hero-name {
  display: block;
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  background: linear-gradient(90deg, #fff 30%, var(--cyan) 70%, var(--purple) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textGlow 4s ease-in-out infinite;
}

.hero-role {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.4vw, 1.4rem);
  font-weight: 500;
  color: var(--cyan);
  min-height: 1.6em;
}

.hero-role::after {
  content: "|";
  margin-left: 4px;
  animation: blink 0.9s step-end infinite;
  color: var(--purple);
}

.hero-desc {
  color: var(--text-muted);
  font-size: clamp(0.95rem, 1.4vw, 1.08rem);
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 14px 28px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: #04101F;
  animation: glowPulse 3.5s ease-in-out infinite;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 0 28px rgba(0,217,255,0.55);
}

.btn-outline {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-color: var(--glass-border);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 0 18px rgba(0,217,255,0.25);
}

.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.scroll-cue span {
  position: relative;
  width: 22px;
  height: 36px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  display: block;
}

.scroll-cue span::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--cyan);
  border-radius: 2px;
  animation: scrollCue 1.8s ease-in-out infinite;
}

.scroll-cue p {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ====================================================================
   SCROLL REVEAL
==================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ====================================================================
   ABOUT
==================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 18px;
}

.about-cards {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.info-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 20px 22px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.info-card:hover {
  border-color: rgba(0,217,255,0.3);
  transform: translateY(-2px);
}

.info-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--cyan);
  margin-bottom: 6px;
}

.info-card p { color: var(--text-main); font-size: 0.95rem; margin-bottom: 4px; }

/* Timeline */
.timeline {
  position: relative;
  padding-left: 28px;
  border-left: 2px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.timeline-item { position: relative; }

.timeline-dot {
  position: absolute;
  left: -35px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--dark-bg);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 12px rgba(0,217,255,0.6);
}

.timeline-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 18px 20px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.timeline-card:hover {
  transform: translateY(-3px);
  border-color: rgba(108,99,255,0.35);
  box-shadow: 0 0 20px rgba(108,99,255,0.18);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--purple);
  letter-spacing: 0.1em;
}

.timeline-card h4 {
  font-family: var(--font-display);
  margin: 6px 0 6px;
  font-size: 1.05rem;
}

.timeline-card p { color: var(--text-muted); font-size: 0.92rem; }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ====================================================================
   SKILLS
==================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.skill-cat-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 18px;
  color: var(--text-main);
  position: relative;
  padding-bottom: 10px;
}

.skill-cat-title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 36px; height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
}

.skill-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skill-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 14px 16px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.skill-card:hover {
  transform: translateY(-3px) scale(1.015);
  border-color: rgba(0,217,255,0.35);
  box-shadow: 0 0 18px rgba(0,217,255,0.18);
}

.skill-card-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  margin-bottom: 10px;
}

.skill-pct {
  font-family: var(--font-mono);
  color: var(--cyan);
  font-size: 0.82rem;
}

.skill-bar {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.skill-card.in-view .skill-fill {
  width: var(--target-width);
}

/* ====================================================================
   PROJECTS
==================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
}

.project-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0,217,255,0.35);
  box-shadow: 0 12px 32px rgba(0,217,255,0.12), 0 0 24px rgba(108,99,255,0.12);
}

.project-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-icon { font-size: 1.8rem; }

.project-link {
  color: var(--text-muted);
  transition: color 0.25s ease, transform 0.25s ease;
}

.project-link:hover {
  color: var(--cyan);
  transform: scale(1.15);
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tags span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
}

.project-cta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--cyan);
  margin-top: 6px;
  transition: letter-spacing 0.25s ease, text-shadow 0.25s ease;
}

.project-cta:hover {
  letter-spacing: 0.04em;
  text-shadow: 0 0 10px rgba(0,217,255,0.5);
}

/* ====================================================================
   EXPERIENCE (empty state)
==================================================================== */
.experience-empty {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px dashed var(--glass-border);
  border-radius: 18px;
  padding: 48px 32px;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.experience-empty-icon {
  font-size: 2.4rem;
  margin-bottom: 14px;
}

.experience-empty h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--cyan);
}

.experience-empty p {
  color: var(--text-muted);
  margin-bottom: 10px;
}

.experience-empty a {
  color: var(--purple);
  text-decoration: underline;
}

/* ====================================================================
   CERTIFICATIONS
==================================================================== */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 26px;
}

.cert-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.cert-card:hover {
  transform: translateY(-6px);
  border-color: rgba(108,99,255,0.35);
  box-shadow: 0 12px 30px rgba(108,99,255,0.18);
}

.cert-img-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
}

.cert-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.cert-card:hover .cert-img-wrap img { transform: scale(1.06); }

.cert-info { padding: 18px 20px; }

.cert-info h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.cert-info p { color: var(--text-muted); font-size: 0.88rem; }

/* ====================================================================
   CONTACT
==================================================================== */
.contact-wrap { text-align: center; }

.contact-intro {
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 36px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 20px;
  text-align: left;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.contact-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--cyan);
  box-shadow: 0 0 22px rgba(0,217,255,0.25);
}

.contact-icon {
  color: var(--cyan);
  flex-shrink: 0;
}

.contact-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.88rem;
  color: var(--text-muted);
  overflow: hidden;
}

.contact-text strong {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-main);
}

.contact-text span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-arrow {
  margin-left: auto;
  color: var(--purple);
  transition: transform 0.25s ease;
}

.contact-card:hover .contact-arrow { transform: translateX(4px); }

/* ====================================================================
   FOOTER
==================================================================== */
.footer {
  border-top: 1px solid var(--glass-border);
  padding: 28px 24px;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.footer-links a {
  color: var(--text-muted);
  transition: color 0.25s ease;
}

.footer-links a:hover { color: var(--cyan); }

.back-to-top {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.back-to-top:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-3px);
  box-shadow: 0 0 16px rgba(0,217,255,0.3);
}

/* ====================================================================
   FOCUS STATES (accessibility)
==================================================================== */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}
