/* ══════════════════════════════════════════════════
   HARSIMRAN SINGH — 3D PORTFOLIO
   Premium Corporate & Executive CSS Design System
   ══════════════════════════════════════════════════ */

/* ── Design Tokens ─────────────────────────────── */
:root {
  --bg-0: #050811;
  --bg-1: #0a0f20;
  --bg-2: #0e152d;
  --bg-card: rgba(255, 255, 255, 0.02);
  --bg-card-hover: rgba(255, 255, 255, 0.05);
  --bg-navbar: rgba(5, 8, 17, 0.85); /* Dark theme scrolled nav */
  
  /* Executive Gold & Deep Corporate Blue scheme */
  --gold: #d4a843;
  --gold-glow: rgba(212, 168, 67, 0.25);
  --blue: #3b82f6;
  --blue-glow: rgba(59, 130, 246, 0.2);
  --cyan: #06b6d4;
  --border: rgba(212, 168, 67, 0.12);
  --border-hover: rgba(212, 168, 67, 0.35);

  --text-1: #f8fafc;
  --text-2: #cbd5e1;
  --text-3: #64748b;

  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

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

/* Light Theme Variables */
body.light-theme {
  --bg-0: #f8fafc;
  --bg-1: #ffffff;
  --bg-2: #f1f5f9;
  --bg-card: rgba(15, 23, 42, 0.02);
  --bg-card-hover: rgba(15, 23, 42, 0.05);
  --bg-navbar: rgba(248, 250, 252, 0.85); /* Light theme scrolled nav */
  
  --gold: #b45309; /* Darker amber gold for visibility */
  --gold-glow: rgba(180, 83, 9, 0.12);
  --blue: #1d4ed8;
  --blue-glow: rgba(29, 78, 216, 0.12);
  --border: rgba(180, 83, 9, 0.18);
  --border-hover: rgba(180, 83, 9, 0.45);

  --text-1: #0f172a;
  --text-2: #334155;
  --text-3: #64748b;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) var(--bg-1);
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

body {
  font-family: var(--font-body);
  background-color: var(--bg-0);
  color: var(--text-1);
  line-height: 1.7;
  overflow-x: hidden;
}

img, svg { display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea { font-family: var(--font-body); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Fixed 3D canvas ───────────────────────────── */
#three-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
  display: block;
}

#navbar   { z-index: 1000; }
section   { position: relative; z-index: 1; }
#footer   { position: relative; z-index: 1; }

/* ── Gradient text ──────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--gold) 0%, #fcd34d 50%, var(--blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Buttons ────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  background: linear-gradient(135deg, var(--gold), #b48522);
  color: #050811;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 4px 15px var(--gold-glow);
  white-space: nowrap;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--gold-glow);
}
.btn-primary span, .btn-primary svg { position: relative; z-index: 1; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border: 1px solid var(--border-hover);
  color: var(--text-1);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.92rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(8px);
  transition: var(--transition);
}
.btn-ghost:hover {
  border-color: var(--gold);
  background: var(--gold-glow);
  transform: translateY(-2px);
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: var(--blue);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  background: rgba(59, 130, 246, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: var(--transition);
  white-space: nowrap;
}
.btn-download:hover {
  border-color: var(--blue);
  background: rgba(59, 130, 246, 0.15);
  box-shadow: 0 0 20px var(--blue-glow);
  transform: translateY(-2px);
}

.btn-download-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--blue);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  background: rgba(59, 130, 246, 0.04);
  transition: var(--transition-fast);
  white-space: nowrap;
}
.btn-download-nav:hover {
  border-color: var(--blue);
  background: rgba(59, 130, 246, 0.12);
  box-shadow: 0 0 12px var(--blue-glow);
}

.btn-full { width: 100%; justify-content: center; }

/* ── Theme Toggle Button ───────────────────────── */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-2);
  transition: var(--transition-fast);
  cursor: pointer;
}
.theme-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-glow);
  transform: scale(1.05);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
body.light-theme .theme-toggle .sun-icon { display: none; }
body:not(.light-theme) .theme-toggle .moon-icon { display: none; }

/* ── Section Shared ────────────────────────────── */
section { padding: 110px 0; position: relative; z-index: 1; }

#hero       { background: transparent; }
#about      { background: rgba(5, 8, 17, 0.85); backdrop-filter: blur(4px); }
#expertise  { background: rgba(10, 15, 32, 0.85); }
#projects   { background: rgba(14, 21, 45, 0.85); backdrop-filter: blur(4px); }
#experience { background: rgba(10, 15, 32, 0.85); }
#contact    { background: rgba(5, 8, 17, 0.85); backdrop-filter: blur(4px); }
#footer     { background: rgba(5, 8, 17, 0.95); border-top: 1px solid var(--border); }

/* Light Theme Section Overrides */
body.light-theme #about      { background: rgba(248, 250, 252, 0.82); }
body.light-theme #expertise  { background: rgba(255, 255, 255, 0.82); }
body.light-theme #projects   { background: rgba(241, 245, 249, 0.82); }
body.light-theme #experience { background: rgba(255, 255, 255, 0.82); }
body.light-theme #contact    { background: rgba(248, 250, 252, 0.82); }
body.light-theme #footer     { background: rgba(248, 250, 252, 0.94); }

.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 5px 14px;
  border: 1px solid rgba(212, 168, 67, 0.3);
  border-radius: 100px;
  background: rgba(212, 168, 67, 0.05);
  margin-bottom: 14px;
}
.section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
}
.section-desc {
  font-size: 1rem;
  color: var(--text-2);
  max-width: 520px;
  margin: 0 auto;
}

/* ── Tilt Card Base ─────────────────────────────── */
.tilt-card {
  transform-style: preserve-3d;
  will-change: transform;
}

/* ─── NAVIGATION ───────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; width: 100%;
  padding: 22px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: padding 0.3s, background 0.3s, border 0.3s;
  border-bottom: 1px solid transparent;
}
#navbar.scrolled {
  padding: 14px 48px;
  background: var(--bg-navbar);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.logo-svg {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.nav-logo:hover .logo-svg {
  transform: rotate(15deg) scale(1.08);
}
.logo-text {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-1);
  transition: var(--transition-fast);
}
.nav-logo:hover .logo-text {
  transform: scale(1.03);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-2);
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  height: 1px;
  width: 0;
  background: var(--gold);
  transition: width 0.3s;
}
.nav-link:hover { color: var(--text-1); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--gold); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text-1);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* Hamburger active transformations */
#navbar.menu-open .nav-hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#navbar.menu-open .nav-hamburger span:nth-child(2) { opacity: 0; }
#navbar.menu-open .nav-hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── HERO SECTION ─────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 950px;
  padding: 0 24px;
  padding-top: 80px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--gold);
  padding: 7px 16px;
  border: 1px solid rgba(212, 168, 67, 0.3);
  border-radius: 100px;
  background: rgba(212, 168, 67, 0.06);
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(20px);
}
.badge-dot {
  width: 7px; height: 7px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--gold);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(3.2rem, 9vw, 6.8rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
}
.name-line { display: block; opacity: 0; transform: translateY(30px); }

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(20px);
}
.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 36px;
  opacity: 0;
  transform: translateY(20px);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 44px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 24px 36px;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  opacity: 0;
  transform: translateY(20px);
  margin-bottom: 72px;
}
.stat {
  text-align: center;
  padding: 0 32px;
}
.stat-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}
.stat-num {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold), #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-prefix, .stat-suffix {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
}
.stat-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: 4px;
}
.stat-divider {
  width: 1px;
  height: 48px;
  background: linear-gradient(180deg, transparent, var(--border-hover), transparent);
  flex-shrink: 0;
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
}
.scroll-text {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-3);
}
.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(180deg, var(--border-hover), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-dot {
  position: absolute;
  top: 0; left: 50%;
  width: 3px; height: 3px;
  background: var(--gold);
  border-radius: 50%;
  transform: translateX(-50%);
  animation: scrollAnim 2s infinite;
}
@keyframes scrollAnim {
  0% { top: 0; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* ─── ABOUT SECTION ────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: center;
}
.about-visual {
  display: flex;
  justify-content: center;
  position: relative;
}
.avatar-card {
  position: relative;
  width: 360px; height: 360px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(20px);
}
.avatar-ring-outer, .avatar-ring-inner {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
}
.avatar-ring-outer {
  width: 270px; height: 270px;
  border-color: rgba(212, 168, 67, 0.2);
  animation: ringRotate 25s linear infinite;
}
.avatar-ring-inner {
  width: 210px; height: 210px;
  border-color: rgba(59, 130, 246, 0.25);
  animation: ringRotate 16s linear infinite reverse;
}
@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.avatar-center {
  position: relative;
  width: 160px; height: 160px;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-0));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(212, 168, 67, 0.35);
  box-shadow: 0 0 25px rgba(212, 168, 67, 0.15);
  z-index: 2;
  overflow: hidden; /* crop the image border */
}
.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 50%;
  z-index: 1;
}
.avatar-initials {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold), #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.avatar-glow {
  position: absolute;
  inset: -15px;
  background: radial-gradient(circle at center, rgba(212, 168, 67, 0.08), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.floating-badge {
  position: absolute;
  padding: 6px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  border: 1px solid var(--border-hover);
  border-radius: 6px;
  background: rgba(5, 8, 17, 0.85);
  backdrop-filter: blur(4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 3;
}
.badge-top    { top: 40px; left: -20px; }
.badge-right  { top: 50%; right: -30px; transform: translateY(-50%); }
.badge-bottom { bottom: 40px; left: -10px; }

.about-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.about-intro {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-1);
  line-height: 1.6;
}
.about-body {
  color: var(--text-2);
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ─── TOOLS SECTOR (Grid representation of software tools) ─── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 15px;
}
.tool-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-2);
  transition: var(--transition-fast);
}
.tool-pill:hover {
  border-color: var(--gold);
  background: rgba(212, 168, 67, 0.06);
  color: var(--text-1);
}
.tool-icon {
  width: 14px; height: 14px;
  color: var(--gold);
}

/* ─── EXPERTISE (Services Offered) ───────────────── */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.expertise-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.35s, box-shadow 0.35s;
}
.expertise-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border-hover);
}
.exp-icon {
  width: 48px; height: 48px;
  color: var(--gold);
  margin-bottom: 24px;
}
.expertise-card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.expertise-card p {
  color: var(--text-2);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ─── FEATURED PROJECTS SECTION ─────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.35s, box-shadow 0.35s;
}
.project-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4), 0 0 0 1px var(--border-hover);
}
.project-header-visual {
  height: 140px;
  background: linear-gradient(135deg, #0e152d, #0a0f20);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.project-glow-spot {
  position: absolute;
  width: 80px; height: 80px;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  pointer-events: none;
}
.project-icon {
  width: 42px; height: 42px;
  color: var(--gold);
  position: relative;
  z-index: 1;
}
.project-info {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.proj-cat {
  color: var(--gold);
}
.proj-budget {
  color: var(--blue);
  background: rgba(59, 130, 246, 0.08);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(59, 130, 246, 0.15);
}
.project-info h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
}
.project-desc {
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.6;
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  margin-top: auto;
  transition: gap 0.2s;
}
.project-link:hover {
  gap: 10px;
}

/* ─── TIMELINE / EXPERIENCE ───────────────────── */
.history-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 40px;
  align-items: start;
}
.history-column {
  display: flex;
  flex-direction: column;
}
.column-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.col-title-icon {
  width: 22px; height: 22px;
  color: var(--gold);
}

.timeline {
  position: relative;
  width: 100%;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 32px;
  width: 1px;
  background: linear-gradient(180deg, var(--gold), rgba(59, 130, 246, 0.4) 60%, transparent);
}
.timeline-item {
  position: relative;
  padding-left: 80px;
  margin-bottom: 48px;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: 24px; top: 6px;
  width: 18px; height: 18px;
  background: var(--bg-0);
  border: 3px solid var(--gold);
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 10px var(--gold-glow);
}
.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  transition: border-color 0.3s;
}
.timeline-card:hover { border-color: var(--border-hover); }

.time-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.time-role h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
}
.time-company {
  font-size: 0.88rem;
  color: var(--gold);
  font-weight: 500;
}
.time-period {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-3);
  background: rgba(255,255,255,0.03);
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid var(--border);
}
.timeline-card p {
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.6;
}

/* ─── CONTACT SECTION ───────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.contact-item {
  display: flex;
  gap: 16px;
  align-items: center;
}
.ci-icon {
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  flex-shrink: 0;
}
.ci-icon svg { width: 20px; height: 20px; }
.ci-text h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.ci-text p, .ci-text a {
  font-size: 0.9rem;
  color: var(--text-2);
}
.ci-text a:hover { color: var(--gold); }

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
}
.form-group input, .form-group textarea {
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--gold);
}
.form-success {
  color: #10b981;
  font-size: 0.88rem;
  font-weight: 500;
  text-align: center;
}

/* ─── FOOTER ───────────────────────────────────── */
.footer-inner {
  padding: 48px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-name {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-2);
}
.footer-copy, .footer-tagline {
  font-size: 0.8rem;
  color: var(--text-3);
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-link {
  font-size: 0.8rem;
  color: var(--text-3);
  transition: var(--transition-fast);
}
.footer-link:hover {
  color: var(--gold);
}
.footer-link-separator {
  font-size: 0.8rem;
  color: var(--border-hover);
  user-select: none;
}

/* ─── RESPONSIVE MEDIA QUERIES ────────────────── */

/* === Tablet (≤ 1024px) === */
@media (max-width: 1024px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .expertise-grid, .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .tools-grid { grid-template-columns: repeat(3, 1fr); }
  .history-split-grid { grid-template-columns: 1fr; gap: 40px; }
  #navbar { padding: 20px 24px; }
  #navbar.scrolled { padding: 12px 24px; }
  section { padding: 80px 0; }
  .container { padding: 0 24px; }
  .hero-stats { padding: 20px 24px; }
  .stat { padding: 0 20px; }
  .stat-num { font-size: 1.8rem; }
  .stat-prefix, .stat-suffix { font-size: 1.1rem; }

  /* ── Mobile Nav: hide links and show hamburger ── */
  .nav-links {
    position: fixed;
    top: 0; right: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-1);
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 32px 40px;
    gap: 8px;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: -8px 0 30px rgba(0,0,0,0.4);
    overflow-y: auto;
  }
  .nav-links li { width: 100%; }
  .nav-links .nav-link {
    display: block;
    padding: 14px 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
    width: 100%;
  }
  #navbar.menu-open .nav-links {
    transform: translateX(0);
  }

  /* Overlay behind mobile menu */
  #navbar.menu-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
  }

  .nav-hamburger {
    display: flex;
    z-index: 1001;
  }

  /* Nav-right: hide desktop CTA buttons on mobile */
  .btn-download-nav { display: none; }
  .nav-cta { display: none; }
  .nav-right { gap: 8px; }
}

/* === Mobile-landscape / Small tablets (≤ 768px) === */
@media (max-width: 768px) {
  .expertise-grid, .projects-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }

  /* Hero adjustments */
  section { padding: 60px 0; }
  .hero-content { padding: 0 16px; padding-top: 60px; }
  .hero-name { font-size: clamp(2.6rem, 10vw, 4rem); }
  .hero-actions { flex-direction: column; gap: 12px; }
  .hero-actions .btn-primary,
  .hero-actions .btn-ghost,
  .hero-actions .btn-download { width: 100%; justify-content: center; }

  /* Hero Stats — stack vertically */
  .hero-stats {
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    border-radius: var(--radius-lg);
  }
  .stat-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-hover), transparent);
  }
  .stat { padding: 8px 0; }

  /* Section headers */
  .section-header { margin-bottom: 36px; }

  /* About */
  .about-visual { margin-bottom: 20px; }
  .avatar-card { width: 300px; height: 300px; }
  .avatar-ring-outer { width: 230px; height: 230px; }
  .avatar-ring-inner { width: 180px; height: 180px; }
  .avatar-center { width: 130px; height: 130px; }
  .floating-badge { font-size: 0.65rem; padding: 4px 10px; }
  .badge-top { top: 30px; left: -10px; }
  .badge-right { right: -20px; }
  .badge-bottom { bottom: 30px; left: -5px; }

  /* Timeline */
  .timeline::before { left: 16px; }
  .timeline-item { padding-left: 48px; margin-bottom: 32px; }
  .timeline-dot { left: 8px; top: 4px; width: 16px; height: 16px; }
  .timeline-card { padding: 18px 20px; }
  .time-header { flex-direction: column; gap: 4px; }
  .column-title { font-size: 1.1rem; margin-bottom: 20px; }

  /* Contact */
  .contact-form { padding: 24px; }
  .contact-info { gap: 20px; }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  .footer-brand { justify-content: center; }

  /* Scroll indicator hidden on mobile */
  .scroll-indicator { display: none; }
}

/* === Small phones (≤ 480px) === */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  #navbar { padding: 14px 16px; }
  #navbar.scrolled { padding: 10px 16px; }
  .logo-text { font-size: 0.95rem; }
  .logo-svg { width: 28px; height: 28px; }

  section { padding: 48px 0; }
  .hero-content { padding-top: 48px; }
  .hero-badge { font-size: 0.7rem; padding: 5px 12px; }
  .hero-title { margin-bottom: 12px; }
  .hero-subtitle { margin-bottom: 24px; font-size: 0.9rem; }

  .stat-num { font-size: 1.5rem; }
  .stat-prefix, .stat-suffix { font-size: 1rem; }
  .stat-label { font-size: 0.68rem; }

  .tools-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tool-pill { padding: 8px 10px; font-size: 0.72rem; gap: 6px; }

  .expertise-card { padding: 24px; }
  .expertise-card h3 { font-size: 1.1rem; }
  .exp-icon { width: 38px; height: 38px; margin-bottom: 16px; }

  .project-info { padding: 18px; gap: 10px; }
  .project-header-visual { height: 110px; }

  .about-intro { font-size: 1rem; }
  .about-body { font-size: 0.88rem; }
  .avatar-card { width: 255px; height: 255px; }
  .avatar-ring-outer { width: 190px; height: 190px; }
  .avatar-ring-inner { width: 150px; height: 150px; }
  .avatar-center { width: 110px; height: 110px; }
  .badge-top { top: 20px; left: -10px; }
  .badge-right { right: -15px; }
  .badge-bottom { bottom: 20px; left: -5px; }

  .contact-form { padding: 18px; gap: 16px; }
  .ci-text h3 { font-size: 0.9rem; }
  .ci-text a, .ci-text p { font-size: 0.8rem; }
  .ci-icon { width: 38px; height: 38px; }
  .ci-icon svg { width: 16px; height: 16px; }

  .btn-primary, .btn-ghost, .btn-download {
    padding: 11px 20px;
    font-size: 0.85rem;
  }
}

/* === Performance: reduce Three.js canvas on mobile === */
@media (max-width: 768px) {
  #three-canvas {
    opacity: 0.4;
  }
}
@media (max-width: 480px) {
  #three-canvas {
    opacity: 0.25;
  }
}

/* ─── GLOBAL MODALS (Privacy / Terms / Info) ───── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 17, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-content {
  position: relative;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  transform: scale(0.92);
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal-overlay.active .modal-content {
  transform: scale(1);
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-1);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-fast);
}
.modal-close:hover {
  background: var(--gold-glow);
  border-color: var(--gold);
  color: var(--gold);
}

