/* ====================================================
   PORTFOLIO.CSS — Justin Dhillon  2025
   ==================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #04040f;
  --bg-2:         #08081a;
  --surface:      rgba(255,255,255,0.028);
  --surface-hi:   rgba(255,255,255,0.045);
  --border:       rgba(255,255,255,0.07);
  --border-hi:    rgba(0,212,255,0.28);
  --cyan:         #00d4ff;
  --purple:       #7928ca;
  --cyan-dim:     rgba(0,212,255,0.08);
  --purple-dim:   rgba(121,40,202,0.08);
  --text:         #b8c8dc;
  --muted:        #4e6070;
  --white:        #f0f6ff;
  --grad:         linear-gradient(135deg, #00d4ff 0%, #7928ca 100%);
  --font-head:    'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --radius:       14px;
  --radius-lg:    22px;
  --t:            0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-w:        1200px;
  --glow-cyan:    0 0 40px rgba(0,212,255,0.15), 0 0 80px rgba(0,212,255,0.06);
  --glow-purple:  0 0 40px rgba(121,40,202,0.15), 0 0 80px rgba(121,40,202,0.06);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--grad);
  z-index: 9998;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(0,212,255,0.5);
}

/* Cursor glow */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,212,255,0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  will-change: transform;
  mix-blend-mode: screen;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--cyan), var(--purple)); border-radius: 10px; }

img { max-width: 100%; display: block; }
a { text-decoration: none; }
ul { list-style: none; }

/* ---- GRADIENT TEXT ---- */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- FADE-IN ---- */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.16,1,0.3,1) var(--delay, 0s),
              transform 0.75s cubic-bezier(0.16,1,0.3,1) var(--delay, 0s);
}
.fade-in.visible { opacity: 1; transform: none; }

/* ================================================
   NAVBAR
   ================================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.25rem 2rem;
  transition: all 0.4s ease;
}
#navbar.scrolled {
  background: rgba(6,6,18,0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 2rem;
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.nav-logo {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.nav-links li a {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--t);
}
.nav-links li a:hover,
.nav-links li a.active { color: var(--white); }

.nav-cta {
  border: 1px solid rgba(0,212,255,0.25) !important;
  padding: 0.4rem 1.2rem;
  border-radius: 100px;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: border-color var(--t), box-shadow var(--t) !important;
}
.nav-cta:hover {
  border-color: var(--cyan) !important;
  box-shadow: 0 0 28px rgba(0,212,255,0.2) !important;
  color: transparent !important;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 10;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--t);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ================================================
   HERO
   ================================================ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7rem 2rem 4rem;
  overflow: hidden;
}
#bg-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.6;
}
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
}
.hero-glow-1 {
  width: 700px; height: 700px;
  background: rgba(0,212,255,0.06);
  top: -150px; left: -150px;
  animation: drift 14s ease-in-out infinite alternate;
}
.hero-glow-2 {
  width: 600px; height: 600px;
  background: rgba(121,40,202,0.07);
  bottom: -150px; right: -150px;
  animation: drift 18s ease-in-out infinite alternate-reverse;
}
@keyframes drift {
  from { transform: translate(0, 0); }
  to   { transform: translate(70px, 50px); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 5rem;
  align-items: center;
}

/* Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--cyan-dim);
  border: 1px solid rgba(0,212,255,0.2);
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  animation: blink-dot 2s ease-in-out infinite;
}
@keyframes blink-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--cyan); }
  50%       { opacity: 0.35; box-shadow: none; }
}

.hero-name {
  font-family: var(--font-head);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
}

.hero-sub {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--cyan);
  margin-bottom: 1.5rem;
  min-height: 1.6rem;
  display: flex;
  align-items: center;
}
.hero-prefix { color: var(--muted); margin-right: 0.3rem; }
.cursor {
  color: var(--cyan);
  animation: blink-cursor 1s step-end infinite;
  margin-left: 1px;
}
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 490px;
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-social {
  display: flex;
  gap: 0.75rem;
}
.social-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all var(--t);
}
.social-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 22px rgba(0,212,255,0.2);
  transform: translateY(-3px);
}

/* Profile Image */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.profile-scene {
  position: relative;
  width: 310px; height: 310px;
}
.profile-ring {
  width: 310px; height: 310px;
  border-radius: 50%;
  background: var(--grad);
  padding: 3px;
  box-shadow:
    0 0 40px rgba(0,212,255,0.25),
    0 0 80px rgba(121,40,202,0.15);
  animation: profile-pulse 4s ease-in-out infinite;
}
@keyframes profile-pulse {
  0%, 100% {
    box-shadow: 0 0 40px rgba(0,212,255,0.25), 0 0 80px rgba(121,40,202,0.15);
  }
  50% {
    box-shadow: 0 0 60px rgba(0,212,255,0.45), 0 0 120px rgba(121,40,202,0.3);
  }
}
.profile-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg);
}
.profile-inner img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  display: block;
}

/* Floating tags */
.float-tag {
  position: absolute;
  background: rgba(6,6,18,0.92);
  border: 1px solid rgba(0,212,255,0.3);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  pointer-events: none;
}
.tag-1 { top: 8%;   right: -30px; animation: float-a 4s ease-in-out infinite; }
.tag-2 { bottom: 18%; right: -40px; animation: float-b 5s ease-in-out infinite; }
.tag-3 { top: 32%;  left: -35px;  animation: float-a 4.5s ease-in-out infinite 0.5s; }
.tag-4 { bottom: 8%; left: -20px; animation: float-b 6s ease-in-out infinite 1s; }
@keyframes float-a {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-9px); }
}
@keyframes float-b {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(7px); }
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  animation: bounce-hint 2.5s ease-in-out infinite;
}
.scroll-mouse {
  width: 24px; height: 38px;
  border: 2px solid var(--muted);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.scroll-wheel {
  width: 4px; height: 8px;
  background: var(--cyan);
  border-radius: 2px;
  animation: scroll-roll 2s ease-in-out infinite;
}
@keyframes scroll-roll {
  0%   { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}
@keyframes bounce-hint {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}

/* ================================================
   BUTTONS
   ================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 100px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all var(--t);
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--grad);
  color: var(--white);
  box-shadow: 0 4px 24px rgba(0,212,255,0.25), inset 0 1px 0 rgba(255,255,255,0.15);
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 42px rgba(0,212,255,0.42), inset 0 1px 0 rgba(255,255,255,0.2);
  color: var(--white);
}
.btn-primary:hover::after { opacity: 1; }
.btn-primary:active { transform: translateY(-1px); }

.btn-ghost {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  border-color: rgba(0,212,255,0.4);
  color: var(--cyan);
  background: rgba(0,212,255,0.06);
  box-shadow: 0 0 24px rgba(0,212,255,0.12), inset 0 1px 0 rgba(0,212,255,0.1);
  transform: translateY(-2px);
}
.btn-lg { padding: 1rem 2.5rem; font-size: 1rem; }

/* ================================================
   SECTION COMMON
   ================================================ */
section { padding: 7rem 2rem; }
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.section-header { margin-bottom: 3.5rem; }
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 0.85rem;
}
.section-eyebrow::before {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: var(--cyan);
  opacity: 0.6;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.025em;
  line-height: 1.1;
}

/* ================================================
   STATS
   ================================================ */
#stats {
  padding: 4rem 2rem;
  background: linear-gradient(135deg, rgba(0,212,255,0.02), rgba(121,40,202,0.03));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t), background var(--t);
}
.stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,212,255,0.06) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--t);
}
.stat-card:hover {
  border-color: rgba(0,212,255,0.22);
  transform: translateY(-5px);
  background: var(--surface-hi);
  box-shadow: 0 20px 48px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,212,255,0.08);
}
.stat-card:hover::after { opacity: 1; }
.stat-num-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.1rem;
  margin-bottom: 0.5rem;
}
.stat-num {
  font-family: var(--font-head);
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-unit {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.stat-desc { color: var(--muted); font-size: 0.78rem; }

/* ================================================
   TECH STACK
   ================================================ */
#stack { background: var(--bg-2); }

.stack-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.stack-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t), background var(--t);
}
.stack-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.stack-card:hover {
  border-color: rgba(0,212,255,0.2);
  transform: translateY(-4px);
  background: var(--surface-hi);
  box-shadow: 0 20px 48px rgba(0,0,0,0.35);
}
.stack-card:hover::before { transform: scaleX(1); }
.stack-card-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--cyan-dim);
  border: 1px solid rgba(0,212,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  margin-bottom: 1rem;
  flex-shrink: 0;
}
.stack-card h3 {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-tag {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  transition: all var(--t);
  cursor: default;
  user-select: none;
}
.skill-tag:hover {
  background: var(--cyan-dim);
  border-color: rgba(0,212,255,0.3);
  color: var(--cyan);
}

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

/* Featured */
.project-featured {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 3rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid rgba(0,212,255,0.14);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
.project-featured::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--grad);
  opacity: 0.7;
  transition: opacity var(--t);
}
.project-featured::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 0% 0%, rgba(0,212,255,0.04) 0%, transparent 60%);
  pointer-events: none;
}
.project-featured:hover {
  border-color: rgba(0,212,255,0.3);
  box-shadow: 0 32px 80px rgba(0,0,0,0.45), 0 0 0 1px rgba(0,212,255,0.08);
  background: var(--surface-hi);
}
.project-featured:hover::before { opacity: 1; }
.project-featured-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.project-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: var(--cyan-dim);
  border: 1px solid rgba(0,212,255,0.2);
  padding: 0.25rem 0.8rem;
  border-radius: 100px;
}
.project-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--border);
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  transition: all var(--t);
}
.project-link-btn:hover { color: var(--cyan); border-color: var(--cyan); }

.project-featured-title {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.project-featured-desc {
  color: var(--muted);
  line-height: 1.75;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.project-metrics {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.metric { display: flex; flex-direction: column; }
.metric-val {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.metric-label { font-size: 0.72rem; color: var(--muted); margin-top: 0.2rem; }

.project-tech-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.project-tech-tags span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.project-featured-img {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
}
.project-featured-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.65) saturate(0.7);
  transition: filter var(--t);
  display: block;
}
.project-featured:hover .project-featured-img img {
  filter: brightness(0.85) saturate(1);
}
.featured-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,212,255,0.08), rgba(121,40,202,0.1));
  pointer-events: none;
}

/* Project grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
  transform-style: preserve-3d;
  transform-origin: center;
  will-change: transform;
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,212,255,0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--t);
}
.project-card:hover {
  border-color: rgba(0,212,255,0.22);
  box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,212,255,0.07);
  background: var(--surface-hi);
}
.project-card:hover::before { transform: scaleX(1); }
.project-card:hover::after { opacity: 1; }

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.project-card-icon { font-size: 2rem; line-height: 1; }
.project-card-gh {
  color: var(--muted);
  transition: color var(--t);
  display: flex;
  align-items: center;
}
.project-card-gh:hover { color: var(--cyan); }

.project-card h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.65rem;
  letter-spacing: -0.01em;
}
.project-card p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.7;
  flex: 1;
  margin-bottom: 1.25rem;
}
.project-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}
.project-card-tags span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

/* ================================================
   EXPERIENCE / TIMELINE
   ================================================ */
#experience { background: var(--bg-2); }

.timeline { position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 12px; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--cyan) 0%, var(--purple) 65%, transparent 100%);
}

.timeline-item {
  position: relative;
  padding-left: 3rem;
  padding-bottom: 2.5rem;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-marker {
  position: absolute;
  left: 0; top: 6px;
}
.timeline-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--cyan);
  border: 3px solid var(--bg-2);
  box-shadow: 0 0 16px rgba(0,212,255,0.5);
  transition: box-shadow var(--t);
}
.timeline-dot.dot-purple {
  background: var(--purple);
  box-shadow: 0 0 16px rgba(121,40,202,0.55);
}
.timeline-dot.dot-edu {
  background: #10b981;
  box-shadow: 0 0 16px rgba(16,185,129,0.5);
}
.timeline-item:hover .timeline-dot {
  box-shadow: 0 0 28px rgba(0,212,255,0.75);
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t), background var(--t);
}
.timeline-card::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--grad);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.timeline-card:hover {
  border-color: rgba(0,212,255,0.2);
  transform: translateX(6px);
  background: var(--surface-hi);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}
.timeline-card:hover::after { transform: scaleY(1); }

.timeline-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.timeline-card h3 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.2rem;
}
.timeline-company {
  color: var(--cyan);
  font-size: 0.85rem;
  font-weight: 500;
}
.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
}

.timeline-bullets { margin-bottom: 1rem; }
.timeline-bullets li {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.65;
  padding: 0.3rem 0 0.3rem 1.3rem;
  position: relative;
}
.timeline-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0; top: 0.35rem;
  color: var(--cyan);
  font-size: 0.65rem;
}

.timeline-tech { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.timeline-tech span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
}
.timeline-edu-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.nested-role {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.nested-role-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.nested-role h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading-color);
  opacity: 0.92;
}
@media (max-width: 720px) {
  .nested-role-top { flex-direction: column; gap: 0.25rem; }
}

/* ================================================
   CONTACT
   ================================================ */
#contact {
  background: linear-gradient(180deg, var(--bg) 0%, rgba(121,40,202,0.05) 40%, rgba(0,212,255,0.02) 70%, var(--bg) 100%);
  border-top: 1px solid var(--border);
  position: relative;
}
#contact::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(ellipse, rgba(121,40,202,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.contact-content { text-align: center; }
.contact-content .section-eyebrow {
  display: inline-flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.contact-title {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
}
.contact-desc {
  color: var(--muted);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
}
.contact-links {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  margin-top: 2rem;
}
.contact-links a {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--t);
}
.contact-links a:hover { color: var(--white); }

/* ================================================
   FOOTER
   ================================================ */
footer {
  padding: 2.5rem 2rem;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
footer p { color: var(--muted); font-size: 0.82rem; }
.footer-sub { font-size: 0.78rem; opacity: 0.5; }
.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  transition: color var(--t);
}
.footer-links a:hover { color: var(--white); }

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr 360px; gap: 3rem; }
}

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 3rem; }
  .hero-visual { order: -1; }
  .profile-scene { width: 240px; height: 240px; }
  .profile-ring { width: 240px; height: 240px; }
  .hero-text { text-align: center; }
  .hero-desc { margin: 0 auto 2.5rem; }
  .hero-cta { justify-content: center; }
  .hero-social { justify-content: center; }
  .hero-badge { display: inline-flex; }
  .project-featured { grid-template-columns: 1fr; }
  .project-featured-img { max-height: 260px; }
  .float-tag { display: none; }
}

@media (max-width: 768px) {
  section { padding: 5rem 1.5rem; }
  #stats { padding: 3rem 1.5rem; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .stack-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: -2rem; right: -2rem;
    background: rgba(6,6,18,0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 1.5rem 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border);
    border-top: 1px solid var(--border);
  }
  .nav-links.open li a { font-size: 1rem; }
  .hamburger { display: flex; }
  .timeline-card-top { flex-direction: column; gap: 0.5rem; }
  .timeline-date { align-self: flex-start; }
  .contact-links { flex-wrap: wrap; gap: 1.5rem; }
}

@media (max-width: 480px) {
  .stats-inner { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-name { font-size: 2.75rem; }
  .contact-links { flex-direction: column; gap: 1rem; align-items: center; }
  .project-featured { padding: 1.5rem; }
  .project-metrics { gap: 1rem; }
}
