/*  Variables  */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #8b5cf6;
  --accent-cyan: #22d3ee;
  --accent-green: #34d399;
  --accent-pink: #f472b6;

  --bg: #07070f;
  --bg-2: #0d0d1c;
  --bg-card: rgba(255,255,255,0.035);
  --bg-card-hover: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(99,102,241,0.4);

  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #475569;

  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;

  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 40px rgba(99,102,241,0.15);
  --shadow-card: 0 1px 0 rgba(255,255,255,0.05), 0 4px 24px rgba(0,0,0,0.3);

  --transition: 0.35s cubic-bezier(0.4,0,0.2,1);
  --transition-fast: 0.2s cubic-bezier(0.4,0,0.2,1);
}

/*  Reset & Base  */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; width: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  cursor: none;
}

@media (hover: none) and (pointer: coarse) {
  /* Touch devices have no mouse pointer, so the custom cursor dots
     would otherwise sit uselessly at 0,0 and the real cursor stays hidden */
  body { cursor: auto; }
  .cursor, .cursor-follower { display: none; }
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: none; border: none; background: none; font-family: inherit; }

.mono { font-family: var(--font-mono); }

/*  Noise Overlay  */
.noise-overlay {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  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)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
}

/*  Custom Cursor  */
.cursor {
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 10000;
  transform: translate(-50%, -50%);
  transition: transform 0.1s, background 0.2s;
}
.cursor-follower {
  width: 32px; height: 32px;
  border: 1.5px solid rgba(99,102,241,0.5);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.25s cubic-bezier(0.23,1,0.32,1), opacity 0.2s;
}
.cursor.hover { transform: translate(-50%, -50%) scale(2.5); background: var(--accent-cyan); }
.cursor-follower.hover { opacity: 0; }

/*  Scrollbar  */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary-dark); border-radius: 2px; }

/*  Section Base  */
.section { padding: 100px 0; position: relative; }
.section-container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

.section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--primary-light);
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
}
.section-label::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--primary);
  display: inline-block;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 60px;
  line-height: 1.15;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/*  Buttons  */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px;
  border-radius: 50px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.08);
  opacity: 0;
  transition: var(--transition-fast);
}
.btn:hover::after { opacity: 1; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 4px 20px rgba(99,102,241,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99,102,241,0.5);
}
.btn-ghost {
  border: 1.5px solid var(--border-hover);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary-light);
  transform: translateY(-2px);
}
.btn-lg { padding: 16px 36px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; border-radius: var(--radius-sm); }

.btn-sm { display: inline-flex; align-items: center; padding: 8px 18px; font-family: var(--font-body); font-size: 0.8rem; font-weight: 500; border-radius: 50px; transition: var(--transition); }
.btn-primary-sm { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; }
.btn-primary-sm:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(99,102,241,0.4); }
.btn-ghost-sm { border: 1px solid var(--border); color: var(--text-muted); }
.btn-ghost-sm:hover { border-color: var(--border-hover); color: var(--text); }

/*  Scroll Reveal  */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.reveal.reveal-right {
  transform: translateX(30px);
}
.reveal.visible {
  opacity: 1;
  transform: translate(0);
}

/*  NAVBAR  */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 18px 0;
  transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: rgba(7,7,15,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: var(--border);
}
.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.logo-bracket { color: var(--primary); }
.logo-slash { color: var(--accent-cyan); }

.nav-links {
  display: flex; align-items: center; gap: 32px;
  list-style: none;
}
.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute; bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-fast);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { transform: scaleX(1); }

.nav-cta {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 600;
}
.nav-cta::after { display: none; }
.nav-cta:hover { opacity: 0.9; color: #fff !important; }

.hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition-fast);
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/*  HERO  */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center;
  position: relative;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.hero-orb-1 { width: 500px; height: 500px; background: rgba(99,102,241,0.12); top: -100px; left: -100px; }
.hero-orb-2 { width: 400px; height: 400px; background: rgba(139,92,246,0.1); top: 10%; right: -50px; }
.hero-orb-3 { width: 300px; height: 300px; background: rgba(34,211,238,0.06); bottom: 0; left: 30%; }

.hero-content {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.3);
  padding: 6px 16px;
  border-radius: 50px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--primary-light);
  margin-bottom: 20px;
  width: fit-content;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}
.hero-name {
  background: linear-gradient(135deg, var(--primary-light), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 20px;
  min-height: 2em;
  display: flex; align-items: center;
}
.typing-text { color: var(--primary-light); }
.typing-cursor {
  color: var(--primary);
  animation: blink 1s infinite;
  margin-left: 3px;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

.hero-stats {
  display: flex; align-items: center; gap: 20px;
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.stat-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stat-divider { width: 1px; height: 36px; background: var(--border); }

/* Hero Visual */
.hero-visual { display: flex; justify-content: center; align-items: center; }

.hero-card-wrapper {
  position: relative;
  /* Scales smoothly with the viewport instead of jumping between
     hardcoded breakpoint widths, and never exceeds its container. */
  width: min(320px, 100%);
  /* height is intentionally NOT fixed: the card's real content
     (avatar + name + role + tags) is taller than any hand-picked
     number, and a mismatched fixed height pushes the floating
     code chips (positioned relative to this wrapper) up into the
     card's text instead of sitting below/around it. Auto lets the
     wrapper always match the card exactly, at every screen size. */
  height: auto;
  margin: 0 auto;
}

.hero-avatar-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px 24px;
  text-align: center;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}


.avatar-img {
  /* Percentage + aspect-ratio instead of a fixed px square: the
     circle now always scales to fit the card at any width instead
     of overflowing it on smaller screens. */
  width: 78%;
  max-width: 240px;
  aspect-ratio: 1 / 1;
  height: auto;
  margin: 0 auto 20px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-2);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

.avatar-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 4px;
}
.avatar-role {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.avatar-tags { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.atag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 3px 10px;
  border-radius: 50px;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.3);
  color: var(--primary-light);
}

/* Floating chips */
.float-chip {
  position: absolute;
  background: rgba(13,13,28,0.9);
  border: 1px solid var(--border-hover);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  color: var(--text-muted);
  backdrop-filter: blur(10px);
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  z-index: 2;
}
.chip-kw { color: var(--primary-light); }
.chip-str { color: var(--accent-green); }
.chip-1 { top: -20px; right: -40px; animation: float 5s 0.5s ease-in-out infinite; }
.chip-2 { bottom: 60px; left: -50px; animation: float 6s 1s ease-in-out infinite; }
.chip-3 { bottom: -10px; right: -30px; animation: float 4.5s 1.5s ease-in-out infinite; }

/* Scroll indicator */
.scroll-indicator {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text-dim); font-size: 0.72rem; font-family: var(--font-mono);
  letter-spacing: 0.1em;
  animation: fadeInUp 1s 1.5s both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.scroll-mouse {
  width: 22px; height: 36px;
  border: 2px solid var(--border);
  border-radius: 11px;
  display: flex; justify-content: center; padding-top: 6px;
}
.scroll-wheel {
  width: 3px; height: 8px;
  background: var(--primary);
  border-radius: 2px;
  animation: scroll-anim 2s ease-in-out infinite;
}
@keyframes scroll-anim {
  0%,100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.4; }
}

/*  ABOUT  */
.about-section { background: var(--bg-2); }

.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 60px;
  align-items: center;
}

.about-img-frame {
  position: relative;
  width: 240px;
}
.about-img-inner {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  width: 240px;
  height: 300px;
}
.img-decoration {
  position: absolute;
  border-radius: var(--radius);
  z-index: -1;
}
.img-dec-1 {
  width: 60px; height: 60px;
  background: var(--primary);
  opacity: 0.3;
  top: -16px; left: -16px;
  border-radius: var(--radius-sm);
}
.img-dec-2 {
  width: 40px; height: 40px;
  background: var(--accent-cyan);
  opacity: 0.2;
  bottom: -12px; right: -12px;
  border-radius: var(--radius-sm);
}

.about-heading {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}
.about-bio {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 16px;
}

.about-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.info-item { display: flex; flex-direction: column; gap: 4px; }
.info-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.info-value { font-size: 0.9rem; font-weight: 500; color: var(--text); }

/*  SKILLS  */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 20px;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}
.skill-category:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

.skill-cat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
}
.skill-cat-icon {
  width: 36px; height: 36px;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary-light);
}

.skill-badges { display: flex; flex-wrap: wrap; gap: 10px; }

.skill-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  transition: var(--transition-fast);
  cursor: default;
}
.skill-badge:hover { transform: scale(1.05); border-color: var(--primary-light); }

.badge-icon {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(99,102,241,0.3);
  width: 26px; height: 20px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
}

.badge-orange { background: rgba(251,146,60,0.1); border-color: rgba(251,146,60,0.2); }
.badge-orange .badge-icon { background: rgba(251,146,60,0.3); }
.badge-orange:hover { border-color: #fb923c; }

.badge-blue { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.2); }
.badge-blue .badge-icon { background: rgba(59,130,246,0.3); }
.badge-blue:hover { border-color: #3b82f6; }

.badge-red { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.2); }
.badge-red .badge-icon { background: rgba(239,68,68,0.3); }
.badge-red:hover { border-color: #ef4444; }

.badge-dark { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); }
.badge-dark .badge-icon { background: rgba(255,255,255,0.15); }

.badge-teal { background: rgba(20,184,166,0.1); border-color: rgba(20,184,166,0.2); }
.badge-teal .badge-icon { background: rgba(20,184,166,0.3); }
.badge-teal:hover { border-color: #14b8a6; }

.badge-indigo { background: rgba(99,102,241,0.1); border-color: rgba(99,102,241,0.2); }
.badge-pink { background: rgba(244,114,182,0.1); border-color: rgba(244,114,182,0.2); }
.badge-pink .badge-icon { background: rgba(244,114,182,0.3); }
.badge-pink:hover { border-color: #f472b6; }

/*  PROJECTS  */
.projects-section { background: var(--bg); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex; flex-direction: column;
}
.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow), var(--shadow);
}
.project-card-inner {
  display: flex; flex-direction: column;
  height: 100%;
}

.project-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 20px 0;
}
.project-num {
  font-size: 0.7rem;
  color: var(--primary-light);
  letter-spacing: 0.1em;
}
.project-links-top {
  display: flex; gap: 10px;
}
.proj-icon-link {
  color: var(--text-dim);
  transition: color var(--transition-fast);
  display: flex;
}
.proj-icon-link:hover { color: var(--primary-light); }

.project-thumb {
  margin: 16px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.project-body {
  padding: 0 20px; flex: 1;
}
.project-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.project-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}

.project-techs {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 20px;
}
.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 3px 10px;
  border-radius: 50px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.project-footer {
  display: flex; gap: 10px;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/*  EDUCATION  */
.education-section { background: var(--bg-2); }

.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 18px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), transparent);
}

.timeline-item {
  position: relative;
  padding: 0 0 40px 56px;
}

.timeline-dot {
  position: absolute;
  left: 10px; top: 6px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg-2);
  box-shadow: 0 0 0 2px var(--primary);
  z-index: 1;
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}
.timeline-card:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.timeline-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--primary-light);
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.2);
  padding: 3px 12px;
  border-radius: 50px;
  display: inline-block;
  margin-bottom: 12px;
}

.timeline-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.timeline-inst {
  font-size: 0.85rem;
  color: var(--primary-light);
  font-weight: 500;
  margin-bottom: 6px;
}
.timeline-detail {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.timeline-gpa {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-green);
}
.timeline-gpa strong { font-weight: 700; }

.timeline-tag {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 50px;
  background: rgba(52,211,153,0.12);
  border: 1px solid rgba(52,211,153,0.3);
  color: var(--accent-green);
}

/*  ACHIEVEMENTS  */
.achievements-section { background: var(--bg); }

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 20px;
}

.achievement-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.achievement-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.achievement-card:hover { transform: translateY(-6px); border-color: var(--border-hover); }
.achievement-card:hover::before { transform: scaleX(1); }

.ach-icon { font-size: 2rem; margin-bottom: 16px; }
.ach-title {
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 1rem;
}
.ach-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
}

.ach-bar-wrap {
  height: 4px;
  background: rgba(255,255,255,0.07);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}
.ach-bar {
  height: 100%;
  width: var(--bar-w);
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s 0.3s cubic-bezier(0.4,0,0.2,1);
}
.achievement-card.visible .ach-bar { transform: scaleX(1); }
.ach-percent {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

/*  RESUME  */
.resume-section { background: var(--bg-2); }

.resume-wrapper {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 60px;
  align-items: center;
  max-width: 700px;
  margin: 0 auto;
}

.resume-preview {
  position: relative;
  width: 200px;
  flex-shrink: 0;
}
.resume-preview-inner {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  height: 270px;
}
.resume-preview-overlay {
  position: absolute; inset: 0;
  border-radius: var(--radius);
  background: rgba(7,7,15,0.6);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: var(--transition);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
  cursor: none;
}
.resume-preview:hover .resume-preview-overlay { opacity: 1; }

.resume-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
}
.resume-role {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--primary-light);
  margin-bottom: 24px;
}
.resume-highlights {
  list-style: none;
  margin-bottom: 28px;
  display: flex; flex-direction: column; gap: 10px;
}
.resume-highlights li {
  font-size: 0.88rem;
  color: var(--text-muted);
}
.resume-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 14px;
}

/*  CONTACT  */
.contact-section { background: var(--bg); }

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-tagline {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 36px;
}

.contact-links {
  display: flex; flex-direction: column; gap: 14px;
}
.contact-link {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.contact-link:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}
.contact-link-icon {
  width: 40px; height: 40px;
  background: rgba(99,102,241,0.12);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary-light);
  flex-shrink: 0;
}
.clink-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.clink-value { font-size: 0.88rem; color: var(--text); font-weight: 500; }

/* Contact Form */
.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.form-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.form-input {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  resize: none;
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.form-input::placeholder { color: var(--text-dim); }
.form-input.error { border-color: #ef4444; }
.form-error {
  display: block;
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 4px;
  font-family: var(--font-mono);
}

/* Success Message */
.success-message {
  display: none;
  text-align: center;
  padding: 40px 20px;
}
.success-message.show { display: block; }
.success-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: rgba(52,211,153,0.15);
  border: 2px solid var(--accent-green);
  color: var(--accent-green);
  font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.success-message h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.success-message p { color: var(--text-muted); font-size: 0.9rem; }

/*  FOOTER  */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 40px 0 0;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-tagline { font-size: 0.82rem; color: var(--text-dim); margin-top: 6px; }

.footer-nav {
  display: flex; gap: 28px; flex-wrap: wrap;
}
.footer-nav a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}
.footer-nav a:hover { color: var(--text); }

.footer-socials { display: flex; gap: 12px; }
.social-btn {
  width: 40px; height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}
.social-btn:hover {
  border-color: var(--border-hover);
  color: var(--primary-light);
  transform: translateY(-3px);
  background: rgba(99,102,241,0.1);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 20px 24px;
}
.footer-bottom p {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/*  SKILL CARDS (new card-based layout)  */
.skill-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ============================================================
   RESPONSIVE — laptop / tablet / mobile
   Breakpoints: 1024 (small laptop), 900 (tablet landscape),
   768 (tablet portrait), 600 (large phone), 400 (small phone)
   ============================================================ */

/* ---------- ≤1024px : small laptops / tablet landscape ---------- */
@media (max-width: 1024px) {
  .section-container { padding: 0 20px; }
  .hero-content { gap: 40px; }
  .about-grid { grid-template-columns: 220px 1fr; gap: 40px; }
  .skill-cards-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- ≤900px : tablets in portrait ---------- */
@media (max-width: 900px) {
  .hero { padding: 110px 20px 64px; }
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 48px;
    max-width: 560px;
  }
  .hero-badge { margin-left: auto; margin-right: auto; }
  .hero-desc { margin: 0 auto 32px; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; flex-wrap: wrap; row-gap: 16px; }
  .hero-visual { order: -1; }

  .about-grid { grid-template-columns: 1fr; text-align: center; gap: 32px; }
  .about-image-col { display: flex; justify-content: center; }
  .about-info-grid { text-align: left; }

  .resume-wrapper { grid-template-columns: 1fr; text-align: center; gap: 32px; max-width: 480px; }
  .resume-preview { margin: 0 auto; }
  .resume-highlights { text-align: left; }

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

/* ---------- ≤768px : tablet portrait / large phones ---------- */
@media (max-width: 768px) {
  .section { padding: 72px 0; }
  .section-title { margin-bottom: 40px; }

  /* Nav mobile */
  .hamburger { display: flex; }
  .nav-links {
    position: fixed; inset: 0; top: 70px;
    background: rgba(7,7,15,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
    overflow-y: auto;
    padding: 40px 24px;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-link { font-size: 1.2rem; }

  /* Hero */
  /* wrapper/avatar now scale on their own via min()/aspect-ratio,
     no fixed-size override needed here */
  .float-chip { font-size: 0.66rem; padding: 6px 10px; }

  /* Skills */
  .skill-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .hobby-cards-grid { grid-template-columns: repeat(2, 1fr); }

  /* Footer */
  .footer-container { flex-direction: column; text-align: center; }
  .footer-nav { justify-content: center; }
  .footer-socials { justify-content: center; }
}

/* ---------- ≤600px : phones ---------- */
@media (max-width: 600px) {
  .section-container { padding: 0 18px; }
  .nav-container { padding: 0 18px; }

  .hero-title { letter-spacing: -0.02em; }
  /* Chips use negative offsets to peek outside the card; on narrow
     phones there isn't enough side margin left for that, so they'd
     start clipping/causing overflow. Hide them below this width. */
  .float-chip { display: none; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { justify-content: center; }
  .hero-stats { gap: 14px; }
  .stat-divider { height: 30px; }

  .about-info-grid { grid-template-columns: 1fr 1fr; gap: 14px; }

  .projects-grid { grid-template-columns: 1fr; }
  .achievements-grid { grid-template-columns: 1fr; }
  .skill-cards-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .hobby-cards-grid { grid-template-columns: 1fr; }

  .timeline-item { padding-left: 44px; }
  .timeline::before { left: 12px; }
  .timeline-dot { left: 4px; width: 16px; height: 16px; }

  .resume-wrapper { grid-template-columns: 1fr; }
  .resume-preview { width: 160px; }
  .resume-preview-inner { height: 216px; }

  .contact-form-card { padding: 24px 20px; }
  .contact-link { padding: 12px 14px; }

  .soft-skills-wrap { padding: 22px 20px; }

  .footer-nav { gap: 18px; row-gap: 10px; }
}

/* ---------- ≤400px : small phones ---------- */
@media (max-width: 400px) {
  .hero { padding: 100px 16px 56px; }
  .hero-avatar-card { padding: 24px 16px 20px; }

  .hero-stats { flex-direction: column; align-items: center; gap: 14px; }
  .stat-divider { display: none; }

  .about-img-frame, .about-img-inner { width: 200px; }
  .about-img-inner { height: 250px; }
  .about-info-grid { grid-template-columns: 1fr; }

  .skill-cards-grid { grid-template-columns: 1fr; gap: 14px; }

  .resume-wrapper { text-align: center; }
  .resume-preview { width: 140px; }
  .resume-preview-inner { height: 190px; }

  .btn { padding: 12px 20px; font-size: 0.85rem; }
  .btn-lg { padding: 14px 26px; }
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.skill-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, rgba(99,102,241,0.08) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.skill-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 40px rgba(99,102,241,0.15);
}
.skill-card:hover::before { opacity: 1; }

.skill-card-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}
.skill-card:hover .skill-card-icon {
  background: rgba(99,102,241,0.1);
  border-color: rgba(99,102,241,0.3);
  transform: scale(1.08);
}

.skill-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

.skill-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/*  HOBBIES SECTION  */
.hobbies-section { background: var(--bg-2); }

.hobby-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1100px) {
  .hobby-cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .hobby-cards-grid { grid-template-columns: 1fr; }
}

.hobby-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.hobby-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.hobby-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 40px rgba(99,102,241,0.12);
}
.hobby-card:hover::after { transform: scaleX(1); }

.hobby-card-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
  transition: var(--transition);
}
.hobby-card:hover .hobby-card-icon {
  background: rgba(99,102,241,0.16);
  border-color: rgba(99,102,241,0.4);
  transform: scale(1.1) rotate(5deg);
  color: var(--accent-cyan);
}

.hobby-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.hobby-card-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/*  SOFT SKILLS STRIP  */
.soft-skills-wrap {
  margin-top: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
}

.soft-skills-header {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-light);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.soft-skills-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.soft-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 100px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.25);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: default;
}

.soft-pill:hover {
  background: rgba(99,102,241,0.2);
  border-color: rgba(99,102,241,0.5);
  transform: translateY(-2px);
  color: var(--primary-light);
}
/* ============================================
   FONT AWESOME SKILL ICON COLORS
   ============================================ */

/* Skill card icon color themes */
.skill-icon-js i       { color: #f7df1e; }
.skill-icon-react i    { color: #61dafb; }
.skill-icon-html i     { color: #e34c26; }
.skill-icon-node i     { color: #68a063; }
.skill-icon-express i  { color: #94a3b8; }
.skill-icon-mongo i    { color: #47a248; }
.skill-icon-python i   { color: #3776ab; }
.skill-icon-java i     { color: #f97316; }
.skill-icon-c i        { color: #a8b9cc; }
.skill-icon-git i      { color: #f05032; }
.skill-icon-vscode i   { color: #007acc; }
.skill-icon-postman i  { color: #ff6c37; }

/* Skill card icon backgrounds matching the language color */
.skill-icon-js        { background: rgba(247,223,30,0.10);  border-color: rgba(247,223,30,0.2); }
.skill-icon-react     { background: rgba(97,218,251,0.10);  border-color: rgba(97,218,251,0.2); }
.skill-icon-html      { background: rgba(227,76,38,0.10);   border-color: rgba(227,76,38,0.2); }
.skill-icon-node      { background: rgba(104,160,99,0.10);  border-color: rgba(104,160,99,0.2); }
.skill-icon-express   { background: rgba(148,163,184,0.08); border-color: rgba(148,163,184,0.15); }
.skill-icon-mongo     { background: rgba(71,162,72,0.10);   border-color: rgba(71,162,72,0.2); }
.skill-icon-python    { background: rgba(55,118,171,0.10);  border-color: rgba(55,118,171,0.2); }
.skill-icon-java      { background: rgba(249,115,22,0.10);  border-color: rgba(249,115,22,0.2); }
.skill-icon-c         { background: rgba(168,185,204,0.08); border-color: rgba(168,185,204,0.15); }
.skill-icon-git       { background: rgba(240,80,50,0.10);   border-color: rgba(240,80,50,0.2); }
.skill-icon-vscode    { background: rgba(0,122,204,0.10);   border-color: rgba(0,122,204,0.2); }
.skill-icon-postman   { background: rgba(255,108,55,0.10);  border-color: rgba(255,108,55,0.2); }

/* Skill card hover: restore the brand colour glow */
.skill-card:hover .skill-icon-js     { background: rgba(247,223,30,0.18);  border-color: rgba(247,223,30,0.4); }
.skill-card:hover .skill-icon-react  { background: rgba(97,218,251,0.18);  border-color: rgba(97,218,251,0.4); }
.skill-card:hover .skill-icon-html   { background: rgba(227,76,38,0.18);   border-color: rgba(227,76,38,0.4); }
.skill-card:hover .skill-icon-node   { background: rgba(104,160,99,0.18);  border-color: rgba(104,160,99,0.4); }
.skill-card:hover .skill-icon-express{ background: rgba(148,163,184,0.15); border-color: rgba(148,163,184,0.3); }
.skill-card:hover .skill-icon-mongo  { background: rgba(71,162,72,0.18);   border-color: rgba(71,162,72,0.4); }
.skill-card:hover .skill-icon-python { background: rgba(55,118,171,0.18);  border-color: rgba(55,118,171,0.4); }
.skill-card:hover .skill-icon-java   { background: rgba(249,115,22,0.18);  border-color: rgba(249,115,22,0.4); }
.skill-card:hover .skill-icon-c      { background: rgba(168,185,204,0.15); border-color: rgba(168,185,204,0.3); }
.skill-card:hover .skill-icon-git    { background: rgba(240,80,50,0.18);   border-color: rgba(240,80,50,0.4); }
.skill-card:hover .skill-icon-vscode { background: rgba(0,122,204,0.18);   border-color: rgba(0,122,204,0.4); }
.skill-card:hover .skill-icon-postman{ background: rgba(255,108,55,0.18);  border-color: rgba(255,108,55,0.4); }

/* Project footer button gap */
.btn-sm i { font-size: 0.8rem; }

/* Resume highlights with FA check icons */
.resume-highlights li { display: flex; align-items: center; gap: 10px; }
.resume-highlights li i { color: var(--accent-green); font-size: 0.8rem; flex-shrink: 0; }

/* Contact link icon size */
.contact-link-icon i { font-size: 1.1rem; }

/* Success icon */
.success-icon i { font-size: 2rem; }

/* Soft pill icons */
.soft-pill i { font-size: 0.85rem; opacity: 0.8; }

/* Soft skills header icon */
.soft-skills-header i { font-size: 1rem; }

/* proj-icon-link FA size */
.proj-icon-link i { font-size: 1rem; }

/* social-btn FA size */
.social-btn i { font-size: 1rem; }

/* Hero CTA arrow icon */
.btn i { font-size: 0.85rem; }