/* ============================================================
   MATTHEW PORTFOLIO — styles.css
   ============================================================ */

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-0:        #03030d;
  --bg-1:        #07071a;
  --bg-2:        #0b0b22;
  --bg-card:     rgba(255, 255, 255, 0.035);
  --purple:      #7b2ff7;
  --purple-dim:  rgba(123, 47, 247, 0.15);
  --cyan:        #00d4ff;
  --cyan-dim:    rgba(0, 212, 255, 0.12);
  --green:       #00ff88;
  --text:        #e2e2ff;
  --muted:       #7878a0;
  --grad:        linear-gradient(135deg, #7b2ff7, #00d4ff);
  --grad-text:   linear-gradient(135deg, #a066ff, #00d4ff);
  --glow-p:      0 0 24px rgba(123,47,247,0.55), 0 0 50px rgba(123,47,247,0.2);
  --glow-c:      0 0 24px rgba(0,212,255,0.55), 0 0 50px rgba(0,212,255,0.2);
  --font-h:      'Orbitron', sans-serif;
  --font-b:      'Space Grotesk', sans-serif;
  --radius:      14px;
  --maxw:        1160px;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-b);
  overflow-x: hidden;
  cursor: none;
  -webkit-font-smoothing: antialiased;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 2px; }

/* ===== CUSTOM CURSOR ===== */
.cursor {
  width: 10px;
  height: 10px;
  background: var(--cyan);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .25s, height .25s, background .25s;
  box-shadow: 0 0 12px var(--cyan), 0 0 24px rgba(0,212,255,.3);
}

.cursor-trail {
  width: 34px;
  height: 34px;
  border: 1.5px solid rgba(0,212,255,.35);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: border-color .3s;
}

.cursor.hovered {
  width: 20px;
  height: 20px;
  background: var(--purple);
  box-shadow: var(--glow-p);
}

.cursor-trail.hovered {
  border-color: rgba(123,47,247,.5);
  width: 44px;
  height: 44px;
}

/* ===== LEARNING BADGE ===== */
.learning-badge {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: rgba(7, 7, 26, 0.88);
  border: 1px solid rgba(0,212,255,.28);
  border-radius: 50px;
  font-size: 13px;
  font-family: var(--font-b);
  color: var(--muted);
  backdrop-filter: blur(20px);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}

.learning-badge.show {
  opacity: 1;
  transform: translateY(0);
  animation: floatBadge 4s ease-in-out infinite 0.7s;
}

.badge-dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulseCyan 2s ease-in-out infinite;
}

.badge-subject {
  color: var(--cyan);
  font-weight: 600;
}

@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

@keyframes pulseCyan {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,212,255,.45); }
  50%       { box-shadow: 0 0 0 7px rgba(0,212,255,0); }
}

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 56px;
  z-index: 800;
  transition: padding .4s, background .4s, border-color .4s;
}

#navbar.scrolled {
  padding: 14px 56px;
  background: rgba(3, 3, 13, 0.82);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(123,47,247,.18);
}

.nav-logo {
  font-family: var(--font-h);
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 2px;
  text-decoration: none;
}

.nav-logo .dot { color: var(--cyan); }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .8px;
  transition: color .3s;
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--grad);
  transition: width .35s;
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  font-size: 13px;
  color: var(--muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulseGreen 2s ease-in-out infinite;
}

@keyframes pulseGreen {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,255,136,.45); }
  50%       { box-shadow: 0 0 0 6px rgba(0,255,136,0); }
}

.nav-mobile-btn {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,.12);
  color: var(--muted);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  align-items: center;
  justify-content: center;
  transition: border-color .3s, color .3s;
}

.nav-mobile-btn:hover {
  border-color: var(--purple);
  color: var(--text);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(3, 3, 13, 0.97);
  z-index: 790;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s;
  backdrop-filter: blur(20px);
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu ul {
  list-style: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.mobile-menu a {
  font-family: var(--font-h);
  font-size: 26px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 2px;
  transition: color .3s;
}

.mobile-menu a:hover { color: var(--cyan); }

/* ===== HERO ===== */
#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#starCanvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 35%, rgba(3,3,13,.72) 100%);
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 820px;
  padding: 0 24px;
}

.hero-greeting {
  display: inline-block;
  font-size: 14px;
  color: var(--cyan);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp .8s ease forwards .3s;
}

.hero-title {
  font-family: var(--font-h);
  font-size: clamp(28px, 4.5vw, 62px);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  min-height: 1.3em;
  text-shadow: 0 0 50px rgba(123,47,247,.35);
  opacity: 0;
  animation: fadeUp .8s ease forwards .6s;
}

.cursor-blink {
  color: var(--cyan);
  animation: blink 1s step-end infinite;
  font-weight: 300;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-sub {
  margin-top: 18px;
  font-size: 15px;
  color: var(--muted);
  letter-spacing: 4px;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp .8s ease forwards .9s;
}

.hero-cta {
  margin-top: 52px;
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp .8s ease forwards 1.2s;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 34px;
  background: var(--grad);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .5px;
  transition: transform .3s, box-shadow .3s;
  box-shadow: var(--glow-p);
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 40px rgba(123,47,247,.75), 0 0 80px rgba(123,47,247,.25);
}

.btn-primary i { font-size: 13px; transition: transform .3s; }
.btn-primary:hover i { transform: translateX(4px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 34px;
  border: 1.5px solid rgba(0,212,255,.35);
  color: var(--cyan);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  background: rgba(0,212,255,.04);
  transition: transform .3s, box-shadow .3s, border-color .3s, background .3s;
}

.btn-ghost:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
  background: rgba(0,212,255,.1);
  box-shadow: var(--glow-c);
}

/* Hero Orbit Decoration */
.hero-orbit {
  position: absolute;
  right: 8%;
  top: 50%;
  transform: translateY(-50%);
  width: 220px;
  height: 220px;
  z-index: 2;
  opacity: 0;
  animation: fadeIn 1s ease forwards 1.6s;
}

.orbit-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(123,47,247,.25);
}

.ring-2 {
  inset: -30px;
  border-color: rgba(0,212,255,.15);
}

.ring-1 { animation: spinOrbit 10s linear infinite; }
.ring-2 { animation: spinOrbit 16s linear infinite reverse; }

@keyframes spinOrbit { to { transform: rotate(360deg); } }

.orbit-planet {
  position: absolute;
  border-radius: 50%;
}

.p1 {
  width: 10px;
  height: 10px;
  background: var(--purple);
  top: -5px;
  left: 105px;
  box-shadow: var(--glow-p);
  animation: spinOrbit 10s linear infinite;
  /* center of p1 = (110, 0); container center = (110, 110); origin = (5px, 115px) */
  transform-origin: 5px 115px;
}

.p2 {
  width: 7px;
  height: 7px;
  background: var(--cyan);
  top: -33.5px;
  left: 106.5px;
  box-shadow: var(--glow-c);
  animation: spinOrbit 16s linear infinite reverse;
  /* center of p2 = (110, -30); container center = (110, 110); origin = (3.5px, 143.5px) */
  transform-origin: 3.5px 143.5px;
}

.orbit-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  animation: floatCenter 6s ease-in-out infinite;
}

@keyframes floatCenter {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeUp .8s ease forwards 2s;
}

.scroll-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--cyan), transparent);
  animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-indicator span {
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--muted);
  text-transform: uppercase;
}

@keyframes scrollBounce {
  0%, 100% { opacity: .9; transform: scaleY(1); }
  50%       { opacity: .4; transform: scaleY(.7); }
}

/* ===== SECTION COMMONS ===== */
section {
  position: relative;
  padding: 120px 0;
}

.section-bg-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(123,47,247,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123,47,247,.04) 1px, transparent 1px);
  background-size: 64px 64px;
}

.section-header {
  text-align: center;
  margin: 0 auto 80px;
  max-width: var(--maxw);
  padding: 0 40px;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-h);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
}

.section-header h2 {
  font-family: var(--font-h);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
}

.highlight {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(44px);
  transition: opacity .75s ease, transform .75s ease;
  transition-delay: var(--delay, 0ms);
}

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

/* ===== ABOUT ===== */
#about { background: var(--bg-1); }

.about-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 80px;
  align-items: center;
}

/* Avatar */
.about-avatar {
  position: relative;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-glow {
  position: absolute;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(123,47,247,.35), transparent 70%);
  border-radius: 50%;
  animation: glowPulse 3.5s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { transform: scale(1); opacity: .6; }
  50%       { transform: scale(1.3); opacity: 1; }
}

.avatar-ring {
  position: absolute;
  border-radius: 50%;
  border-style: solid;
  border-color: rgba(0,212,255,.15);
  border-width: 1px;
}

.r1 {
  width: 210px;
  height: 210px;
  animation: spinOrbit 14s linear infinite;
}

.r2 {
  width: 270px;
  height: 270px;
  border-color: rgba(123,47,247,.1);
  animation: spinOrbit 20s linear infinite reverse;
}

.avatar-core {
  width: 150px;
  height: 150px;
  background: rgba(123,47,247,.12);
  border: 2px solid rgba(123,47,247,.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(10px);
  animation: floatCenter 6s ease-in-out infinite;
}

.avatar-orbit-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.d1 {
  background: var(--purple);
  box-shadow: var(--glow-p);
  /* Place dot centre at the top of r1 (radius 105px from avatar centre) */
  top: calc(50% - 110px);   /* 50% - radius(105) - half-dot(5) */
  left: calc(50% - 5px);    /* horizontally centred */
  animation: spinOrbit 14s linear infinite;
  /* origin = distance from dot's top-left to avatar centre = (5px right, 110px down) */
  transform-origin: 5px 110px;
}

.d2 {
  background: var(--cyan);
  box-shadow: var(--glow-c);
  /* Place dot centre at the top of r2 (radius 135px from avatar centre) */
  top: calc(50% - 140px);   /* 50% - radius(135) - half-dot(5) */
  left: calc(50% - 5px);
  animation: spinOrbit 20s linear infinite reverse;
  /* origin = distance from dot's top-left to avatar centre = (5px right, 140px down) */
  transform-origin: 5px 140px;
}

/* About Text */
.about-text p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
  margin-bottom: 22px;
}

.about-intro {
  font-size: 22px !important;
  color: var(--text) !important;
  font-weight: 500;
}

.about-text strong { color: #fff; }
.about-text em {
  color: var(--cyan);
  font-style: normal;
  font-weight: 500;
}

.tag {
  display: inline-block;
  background: rgba(123,47,247,.14);
  border: 1px solid rgba(123,47,247,.3);
  color: #c078ff;
  padding: 2px 10px;
  border-radius: 5px;
  font-size: 15px;
  font-weight: 500;
}

.about-stats {
  display: flex;
  gap: 44px;
  margin-top: 44px;
  padding-top: 36px;
  border-top: 1px solid rgba(255,255,255,.06);
}

.stat { display: flex; flex-direction: column; gap: 4px; }

.stat-number {
  font-family: var(--font-h);
  font-size: 34px;
  font-weight: 700;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-inf {
  -webkit-text-fill-color: transparent;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 1px;
}

/* ===== JOURNEY ===== */
#journey { background: var(--bg-0); }

.timeline {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 40px;
}

.timeline-line {
  position: absolute;
  left: 63px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--purple), var(--cyan), rgba(0,212,255,.05));
  z-index: 0;
}

.timeline-item {
  display: flex;
  gap: 28px;
  margin-bottom: 52px;
  position: relative;
  z-index: 1;
}

.timeline-icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 50%;
  border: 1.5px solid rgba(123,47,247,.35);
  /* Solid base so the vertical line can never bleed through */
  background: var(--bg-0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--muted);
  position: relative;
  z-index: 2;
  transition: border-color .35s, color .35s;
  /* Spread-shadow ring covers the line where it extends outside the circle */
  box-shadow: 0 0 0 5px var(--bg-0);
}

.timeline-item.completed .timeline-icon {
  /* Layer tinted color over the solid base — result is opaque */
  background: linear-gradient(rgba(123,47,247,.3), rgba(123,47,247,.3)), var(--bg-0);
  border-color: var(--purple);
  color: #c078ff;
  box-shadow: 0 0 0 5px var(--bg-0), var(--glow-p);
}

.timeline-item.active .timeline-icon {
  background: linear-gradient(rgba(0,212,255,.15), rgba(0,212,255,.15)), var(--bg-0);
  border-color: var(--cyan);
  color: var(--cyan);
  animation: iconPulse 2.5s ease-in-out infinite;
}

@keyframes iconPulse {
  /* Always keep the background ring so the line stays hidden */
  0%, 100% { box-shadow: 0 0 0 5px var(--bg-0), 0 0 8px rgba(0,212,255,.35); }
  50%       { box-shadow: 0 0 0 5px var(--bg-0), 0 0 30px rgba(0,212,255,.75), 0 0 60px rgba(0,212,255,.2); }
}

.timeline-content {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  padding: 24px 26px;
  backdrop-filter: blur(8px);
  transition: border-color .3s, transform .3s;
}

.timeline-content:hover {
  border-color: rgba(123,47,247,.3);
  transform: translateX(5px);
}

.tl-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.timeline-content h3 {
  font-family: var(--font-h);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.tl-status {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.tl-status.done        { color: var(--green);  background: rgba(0,255,136,.1); border: 1px solid rgba(0,255,136,.25); }
.tl-status.progress    { color: var(--cyan);   background: rgba(0,212,255,.1); border: 1px solid rgba(0,212,255,.25); }
.tl-status.starting    { color: #a0a0ff;       background: rgba(123,47,247,.1); border: 1px solid rgba(123,47,247,.25); }
.tl-status.planned     { color: var(--muted);  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.tl-status.destination { color: #ffcc44;       background: rgba(255,204,68,.08); border: 1px solid rgba(255,204,68,.2); }

.timeline-content p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
  margin-bottom: 16px;
}

.progress-bar {
  height: 3px;
  background: rgba(255,255,255,.07);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: var(--grad);
  border-radius: 2px;
  transition: width 1.6s cubic-bezier(.4, 0, .2, 1);
  box-shadow: 0 0 8px rgba(123,47,247,.6);
}

/* ===== PROJECTS ===== */
#projects { background: var(--bg-1); }

.projects-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 22px;
}

.project-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,.065);
  border-radius: var(--radius);
  padding: 32px 26px;
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: transform .4s cubic-bezier(.4,0,.2,1), border-color .4s, box-shadow .4s;
  cursor: default;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(123,47,247,.06), transparent 60%);
  opacity: 0;
  transition: opacity .4s;
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: rgba(123,47,247,.4);
  box-shadow: 0 30px 70px rgba(0,0,0,.35), 0 0 30px rgba(123,47,247,.08);
}

.project-card:hover::before { opacity: 1; }

.project-card.featured {
  border-color: rgba(0,212,255,.18);
}

.project-card.featured:hover {
  border-color: rgba(0,212,255,.5);
  box-shadow: 0 30px 70px rgba(0,0,0,.35), 0 0 30px rgba(0,212,255,.1);
}

.card-glow {
  position: absolute;
  top: -60%;
  left: -60%;
  width: 220%;
  height: 220%;
  background: radial-gradient(circle at center, rgba(123,47,247,.07), transparent 45%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}

.project-card:hover .card-glow { opacity: 1; }

.card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(0,212,255,.1);
  border: 1px solid rgba(0,212,255,.25);
  padding: 3px 10px;
  border-radius: 20px;
}

.card-icon {
  width: 50px;
  height: 50px;
  background: rgba(123,47,247,.13);
  border: 1px solid rgba(123,47,247,.28);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--cyan);
  margin-bottom: 20px;
  transition: background .3s, box-shadow .3s;
}

.project-card:hover .card-icon {
  background: rgba(123,47,247,.25);
  box-shadow: var(--glow-p);
}

.project-card h3 {
  font-family: var(--font-h);
  font-size: 16px;
  color: #fff;
  margin-bottom: 10px;
}

.project-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
  margin-bottom: 24px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  letter-spacing: 1px;
  background: rgba(123,47,247,.1);
  border: 1px solid rgba(123,47,247,.22);
  color: #a878ff;
}

.card-tag.cyan {
  background: rgba(0,212,255,.1);
  border-color: rgba(0,212,255,.22);
  color: var(--cyan);
}

.card-dots {
  display: flex;
  gap: 5px;
}

.card-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
}

.project-card:hover .card-dots span:nth-child(1) { background: var(--purple); animation: dotFade .6s ease .0s both; }
.project-card:hover .card-dots span:nth-child(2) { background: var(--purple); animation: dotFade .6s ease .1s both; }
.project-card:hover .card-dots span:nth-child(3) { background: var(--purple); animation: dotFade .6s ease .2s both; }

@keyframes dotFade {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

.projects-note {
  text-align: center;
  margin-top: 52px;
  color: var(--muted);
  font-size: 16px;
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.projects-note i { color: var(--purple); }

/* ===== HOBBIES ===== */
#hobbies { background: var(--bg-0); }

.hobbies-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}

.hobby-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,.065);
  border-radius: 20px;
  padding: 48px 32px 36px;
  text-align: center;
  overflow: hidden;
  cursor: pointer;
  transition: transform .5s cubic-bezier(.4,0,.2,1), border-color .5s, box-shadow .5s;
}

.hobby-card:hover {
  transform: translateY(-12px);
  border-color: rgba(123,47,247,.4);
  box-shadow: 0 30px 70px rgba(0,0,0,.4), 0 0 40px rgba(123,47,247,.1);
}

.hobby-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% -10%, rgba(123,47,247,.15), transparent 65%);
  opacity: 0;
  transition: opacity .5s;
}

.hobby-card:hover .hobby-bg { opacity: 1; }

.hobby-icon-wrap {
  margin-bottom: 18px;
  transition: transform .4s cubic-bezier(.4,0,.2,1);
}

.hobby-emoji {
  font-size: 54px;
  display: block;
}

.hobby-card:hover .hobby-icon-wrap {
  transform: scale(1.15) translateY(-4px);
}

.hobby-card h3 {
  font-family: var(--font-h);
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 14px;
}

.hobby-desc {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .55s cubic-bezier(.4,0,.2,1), opacity .45s ease;
}

.hobby-card:hover .hobby-desc {
  max-height: 320px;
  opacity: 1;
}

.hobby-desc p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
  margin-bottom: 18px;
}

.hobby-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.hobby-tags span {
  background: rgba(123,47,247,.12);
  border: 1px solid rgba(123,47,247,.22);
  color: #c078ff;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 12px;
}

/* ===== TECH BELT ===== */
#tech-belt {
  background: var(--bg-1);
  padding: 72px 0;
  overflow: hidden;
}

.tech-belt-header {
  text-align: center;
  margin-bottom: 44px;
}

.belt-subtitle {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 1px;
  margin-top: 6px;
}

.belt-wrapper {
  position: relative;
  width: 100%;
}

.belt-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 140px;
  z-index: 2;
  pointer-events: none;
}

.belt-fade-left  { left: 0;  background: linear-gradient(to right, var(--bg-1), transparent); }
.belt-fade-right { right: 0; background: linear-gradient(to left,  var(--bg-1), transparent); }

.belt-track {
  overflow: hidden;
  width: 100%;
}

.belt-inner {
  display: flex;
  gap: 64px;
  width: max-content;
  /* translate by -50%: one full set scrolls off, duplicate seamlessly replaces it */
  animation: beltScroll 40s linear infinite;
  align-items: center;
  padding: 8px 32px;
}

.belt-wrapper:hover .belt-inner {
  animation-play-state: paused;
}

@keyframes beltScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.belt-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0.28;
  transition: opacity .4s;
  user-select: none;
  flex-shrink: 0;
}

.belt-item:hover { opacity: 0.7; }

.belt-item img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.belt-item span {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* ===== CONTACT ===== */
#contact {
  background: var(--bg-0);
}

.contact-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
  align-items: start;
}

.contact-intro {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
  margin-bottom: 40px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 44px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 18px;
}

.contact-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: rgba(123,47,247,.1);
  border: 1px solid rgba(123,47,247,.25);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple);
  font-size: 16px;
}

.contact-label {
  display: block;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}

.contact-value {
  color: var(--text);
  font-size: 15px;
  text-decoration: none;
  transition: color .3s;
}

a.contact-value:hover { color: var(--cyan); }

.btn-resume {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  border: 1.5px solid rgba(0,212,255,.35);
  color: var(--cyan);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  background: rgba(0,212,255,.05);
  transition: transform .3s, box-shadow .3s, border-color .3s, background .3s;
}

.btn-resume:hover {
  transform: translateY(-3px);
  border-color: var(--cyan);
  background: rgba(0,212,255,.12);
  box-shadow: var(--glow-c);
}

/* Contact Form */
.contact-form {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,.065);
  border-radius: var(--radius);
  padding: 40px 36px;
  backdrop-filter: blur(10px);
}

.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font-b);
  font-size: 15px;
  outline: none;
  resize: none;
  transition: border-color .3s, box-shadow .3s;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(120,120,160,.5); }

.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(123,47,247,.5);
  box-shadow: 0 0 0 3px rgba(123,47,247,.08);
}

.btn-send {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--font-b);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .3s, box-shadow .3s, opacity .3s;
  box-shadow: var(--glow-p);
}

.btn-send:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 40px rgba(123,47,247,.75);
}

.btn-send:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

.form-success {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(0,255,136,.08);
  border: 1px solid rgba(0,255,136,.2);
  border-radius: 8px;
  color: var(--green);
  font-size: 14px;
}

.form-success.show { display: flex; }

/* ===== FOOTER ===== */
#footer {
  background: var(--bg-2);
  border-top: 1px solid rgba(255,255,255,.05);
  padding: 80px 0 44px;
  text-align: center;
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-logo {
  font-family: var(--font-h);
  font-size: 38px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.footer-tagline {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 36px;
}

.footer-socials {
  display: flex;
  gap: 16px;
  margin-bottom: 44px;
}

.social-link {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  font-size: 17px;
  transition: all .3s;
}

.social-link:hover {
  border-color: var(--purple);
  color: var(--cyan);
  box-shadow: var(--glow-p);
  transform: translateY(-4px);
}

.footer-divider {
  width: 60px;
  height: 1px;
  background: var(--grad);
  margin-bottom: 28px;
  border-radius: 1px;
}

.footer-copy {
  font-size: 13px;
  color: rgba(120,120,160,.5);
}

/* ===== KEYFRAME UTILS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  #navbar, #navbar.scrolled { padding-left: 32px; padding-right: 32px; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .about-avatar { height: 260px; }
  .about-stats  { justify-content: center; }

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

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-orbit { display: none; }
}

@media (max-width: 768px) {
  section { padding: 88px 0; }

  #navbar, #navbar.scrolled { padding-left: 20px; padding-right: 20px; }

  .nav-links, .nav-status { display: none; }
  .nav-mobile-btn { display: flex; }

  .section-header,
  .about-grid,
  .timeline,
  .projects-grid,
  .hobbies-grid,
  .contact-grid,
  .footer-inner,
  .projects-note { padding-left: 20px; padding-right: 20px; }

  .timeline-line { left: 43px; }

  .projects-grid { grid-template-columns: 1fr; }

  .hobbies-grid { grid-template-columns: 1fr; }

  .contact-form { padding: 28px 22px; }

  .about-stats { flex-direction: column; gap: 24px; }

  .hero-cta { flex-direction: column; align-items: center; }

  .learning-badge {
    bottom: 16px;
    right: 16px;
    font-size: 12px;
    padding: 8px 14px;
  }

  .hobby-card { padding: 36px 24px 28px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: clamp(22px, 7vw, 36px); }
  .tl-top     { flex-direction: column; align-items: flex-start; }
}

/* ===== SELECTION ===== */
::selection {
  background: rgba(123,47,247,.35);
  color: #fff;
}
