/* ============================================================
   ELESH KAPRI — Hybrid Modern Portfolio
   Design Tokens, Typography, Custom Scrollbar, Preloader,
   Floating Glass Navbar, Continuous Marquee, Modern Buttons,
   Original Hero & Projects, Career Track & Initiate Connection
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=Instrument+Serif:ital@1&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ============== TOKENS ============== */
:root {
  --bg: #0a0c12;
  --bg-soft: #0d1018;
  --surface: #11141e;
  --surface-2: #161926;
  --surface-3: #1c2032;
  --border: rgba(255, 255, 255, 0.07);
  --border-soft: rgba(255, 255, 255, 0.04);
  --border-hover: rgba(255, 255, 255, 0.16);
  --text: #eef0f6;
  --text-1: #ececea;
  --text-2: rgba(236, 236, 234, 0.65);
  --text-muted: #939bb0;
  --text-dim: #5c6378;
  --accent: #8b6bff;
  --accent-bright: #a78bfa;
  --accent-soft: rgba(139, 107, 255, 0.12);
  --amber: #ffb454;
  --amber-soft: rgba(255, 180, 84, 0.12);
  --emerald: #4ade80;
  --emerald-soft: rgba(74, 222, 128, 0.12);
  --ivory: #ececea;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 999px;
  --maxw: 1140px;
  --container-max: 1140px;
  --container-px: clamp(16px, 4vw, 48px);
  --display: 'Space Grotesk', sans-serif;
  --body: 'Inter', sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'JetBrains Mono', monospace;
  --shadow-soft: 0 20px 50px rgba(0, 0, 0, 0.45);
  --shadow-lift: 0 30px 80px rgba(0, 0, 0, 0.65);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 0.25s;
  --dur-med: 0.5s;
}

/* ============== RESET & BASE ============== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: auto;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  width: 100%;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 18%, #000 0 34%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 18%, #000 0 34%, transparent 75%);
  animation: grid-drift 36s linear infinite;
}
@keyframes grid-drift { from { background-position: 0 0, 0 0; } to { background-position: 72px 72px, 72px 72px; } }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
section { position: relative; width: 100%; }

::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; border-radius: 4px; }

/* ============== 1. CUSTOM SCROLLBAR ============== */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #232838; border-radius: 4px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #353c52; }

/* ============== FILM GRAIN OVERLAY ============== */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 8s steps(6) infinite;
}
@keyframes grainShift {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-2%, 2%); }
  40% { transform: translate(2%, -1%); }
  60% { transform: translate(-1%, -2%); }
  80% { transform: translate(1%, 1%); }
}

/* ============== 2. PRELOADER INTRO LOADER ============== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #09090b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.75s var(--ease), opacity 0.75s ease;
}
.preloader.dismissed {
  transform: translateY(-100%);
  pointer-events: none;
}
.preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  padding: 0 20px;
}
.preloader-logo {
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-1);
}
.preloader-logo span { color: var(--accent); }
.preloader-count {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 400;
  color: var(--text-1);
  line-height: 1;
  min-width: 120px;
}
.preloader-bar-wrap {
  width: 160px;
  height: 2px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}
.preloader-bar-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--amber));
  transition: width 0.08s linear;
}

/* ============== AMBIENT BACKGROUND FX ============== */
.bg-fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-fx .orb { position: absolute; border-radius: 50%; filter: blur(80px); will-change: transform; }
.orb-1 { width: 450px; height: 450px; left: -140px; top: -100px; background: radial-gradient(circle, var(--accent) 0%, transparent 72%); opacity: 0.22; animation: drift1 26s ease-in-out infinite alternate; }
.orb-2 { width: 400px; height: 400px; right: -150px; top: 28%; background: radial-gradient(circle, var(--amber) 0%, transparent 72%); opacity: 0.14; animation: drift2 32s ease-in-out infinite alternate; }
.orb-3 { width: 360px; height: 360px; left: 18%; bottom: -180px; background: radial-gradient(circle, var(--accent-bright) 0%, transparent 72%); opacity: 0.10; animation: drift3 38s ease-in-out infinite alternate; }

@keyframes drift1 { from { transform: translate(0,0) scale(1); } to { transform: translate(70px, 50px) scale(1.18); } }
@keyframes drift2 { from { transform: translate(0,0) scale(1); } to { transform: translate(-60px, 40px) scale(0.88); } }
@keyframes drift3 { from { transform: translate(0,0) scale(1); } to { transform: translate(50px, -40px) scale(1.12); } }

.star { position: absolute; pointer-events: none; opacity: 0; animation: twinkle ease-in-out infinite; }
.star svg { display: block; width: 100%; height: 100%; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(0.5) rotate(0deg); } 50% { opacity: var(--peak, 0.85); transform: scale(1) rotate(25deg); } }

/* ============== LAYOUT WRAPPER & HEADINGS ============== */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; width: 100%; }
.section-pad { padding: 90px 0; }

.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(24px, 4vw, 40px);
  letter-spacing: -0.015em;
  margin-bottom: 10px;
  color: var(--text-1);
}
.section-head p { color: var(--text-muted); font-size: 15px; max-width: 540px; }

.label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-bright);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.label::before {
  content: '';
  width: 16px;
  height: 1.5px;
  background: var(--accent-bright);
  border-radius: 2px;
}
.serif-accent {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--text-1);
  font-size: 1.06em;
}

/* ============== 3. FLOATING GLASS NAVBAR ============== */
.nav-wrapper {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 16px 24px;
  transition: transform var(--dur-med) var(--ease), padding var(--dur-med) var(--ease);
}
.nav-wrapper.nav-hidden { transform: translateY(-110%); }
.nav-wrapper.scrolled { padding: 10px 24px; }

.nav-bar {
  max-width: var(--maxw);
  margin: 0 auto;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-radius: var(--radius-full);
  background: rgba(14, 16, 24, 0.78);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  transition: border-color var(--dur-fast) var(--ease);
}
.nav-bar:hover { border-color: var(--border-hover); }

.nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-1);
}
.nav-logo-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--surface-2), var(--accent-soft));
  border: 1px solid var(--border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-bright);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav-links a {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  position: relative;
  padding: 4px 0;
  transition: color var(--dur-fast) var(--ease);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--accent-bright);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-med) var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-cta {
  padding: 7px 16px;
  font-size: 0.76rem;
  border-radius: var(--radius-full);
}
.nav-mobile-toggle {
  display: none;
  width: 36px;
  height: 36px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  align-items: center;
  cursor: pointer;
  padding: 0;
}
.nav-mobile-toggle span {
  width: 18px;
  height: 1.5px;
  background: var(--text-1);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s ease;
}
.nav-mobile-toggle.active span:nth-child(1) {
  transform: translateY(3.25px) rotate(45deg);
}
.nav-mobile-toggle.active span:nth-child(2) {
  transform: translateY(-3.25px) rotate(-45deg);
}

.nav-mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(9, 11, 16, 0.98);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 24px;
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a {
  font-family: var(--mono);
  font-size: 1.15rem;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 8px;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.nav-mobile-menu a:hover, .nav-mobile-menu a:active {
  color: var(--text-1);
  background: var(--surface-2);
}

/* ============== 4. MODERN BUTTONS ============== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--mono);
  font-size: 0.84rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  transition: transform var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              box-shadow var(--dur-med) var(--ease),
              color var(--dur-fast) var(--ease);
  white-space: nowrap;
  will-change: transform;
  overflow: hidden;
  cursor: pointer;
}
.btn-primary {
  background: var(--ivory);
  color: #0c0c0d;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 8px 24px rgba(0, 0, 0, 0.4);
}
.btn-primary:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 12px 32px rgba(139, 107, 255, 0.3);
}
.btn-ghost {
  border: 1px solid var(--border-hover);
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}
.btn-large { padding: 14px 28px; font-size: 0.88rem; }

.live-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  position: relative;
  display: inline-block;
  flex: none;
}
.live-pulse-dot::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: #4ade80;
  animation: pulsePing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes pulsePing {
  0% { transform: scale(1); opacity: 0.8; }
  75%, 100% { transform: scale(2.8); opacity: 0; }
}

/* ============== HERO SECTION ============== */
#home { padding: 140px 0 90px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.badge {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 12px; color: var(--text-muted);
  border: 1px solid var(--border); padding: 6px 14px; border-radius: 999px;
  margin-bottom: 24px; background: var(--surface);
}

.hero-pretitle {
  font-family: var(--display); font-weight: 500; font-size: clamp(18px, 2.8vw, 26px);
  color: var(--text-dim);
  margin-bottom: 4px;
}
.hero-name {
  font-family: var(--display); font-weight: 700; letter-spacing: -0.02em;
  font-size: clamp(34px, 6vw, 64px); line-height: 1.05;
  background: linear-gradient(120deg, var(--text) 35%, var(--accent-bright) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 16px;
}
.hero-tagline {
  font-family: var(--display); font-weight: 600; font-size: clamp(17px, 2vw, 22px);
  color: var(--amber); margin-bottom: 16px;
}
.hero-bio { color: var(--text-muted); font-size: 15.5px; max-width: 520px; margin-bottom: 30px; line-height: 1.65; }
.hero-bio b { color: var(--text); font-weight: 600; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-photo-wrap {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 340px;
  width: 100%;
}
.hero-rings { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 0; pointer-events: none; }
.hero-rings svg { width: 380px; height: 380px; max-width: 90vw; max-height: 90vw; flex: none; opacity: 0.55; will-change: transform; animation: spin-slow 120s linear infinite; }
@keyframes spin-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.photo-frame {
  position: relative; z-index: 1; width: 210px; height: 210px;
  border-radius: var(--radius);
  padding: 7px;
  background: linear-gradient(135deg, rgba(139,107,255,0.35), rgba(255,180,84,0.15) 60%, rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 48px -12px rgba(0,0,0,0.7), 0 0 0 1px rgba(139,107,255,0.25);
}
.photo-frame img {
  width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--radius) - 6px);
}
.photo-frame .corner {
  position: absolute; width: 12px; height: 12px;
  border-color: var(--accent-bright); border-style: solid; pointer-events: none;
}
.photo-frame .corner.tl { top: -4px; left: -4px; border-width: 2px 0 0 2px; }
.photo-frame .corner.br { bottom: -4px; right: -4px; border-width: 0 2px 2px 0; }

.float-chip {
  position: absolute; z-index: 2;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  padding: 5px 11px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  animation: chipFloat 5s ease-in-out infinite alternate;
  white-space: nowrap;
}
.chip-1 { top: 12%; left: 8%; animation-delay: 0s; color: var(--accent-bright); }
.chip-2 { bottom: 14%; left: 4%; animation-delay: 1.5s; color: var(--amber); }
.chip-3 { top: 20%; right: 6%; animation-delay: 3s; color: #4ade80; }
@keyframes chipFloat { from { transform: translateY(0); } to { transform: translateY(-8px); } }

/* ============== 5. CONTINUOUS MARQUEE TICKER ============== */
.marquee-wrapper {
  padding: 20px 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  overflow: hidden;
  position: relative;
  width: 100%;
}
.marquee-wrapper::before, .marquee-wrapper::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 60px; z-index: 2; pointer-events: none;
}
.marquee-wrapper::before { left: 0; background: linear-gradient(90deg, var(--bg-soft), transparent); }
.marquee-wrapper::after { right: 0; background: linear-gradient(270deg, var(--bg-soft), transparent); }

.marquee-track {
  display: flex; width: max-content; will-change: transform;
  transform: translate3d(0, 0, 0);
  animation: marqueeScroll 28s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }
@keyframes marqueeScroll { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }

.marquee-item {
  display: inline-flex; align-items: center; gap: 16px; padding: 0 16px;
  font-family: var(--mono); font-size: 0.82rem; color: var(--text-2);
  letter-spacing: 0.03em; white-space: nowrap;
}
.marquee-item i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent-bright);
  box-shadow: 0 0 8px var(--accent-bright); display: inline-block; flex: none;
}

/* ============== FEATURED PROJECTS ============== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 24px;
}
.project-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.3s var(--ease-out), border-color 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover {
  transform: translateY(-4px); border-color: var(--border-hover);
  box-shadow: var(--shadow-lift);
}
.project-visual {
  height: 190px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.project-visual .project-image {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.project-card:hover .project-visual .project-image { transform: scale(1.04); }
.project-visual .win-dots {
  position: absolute; top: 12px; left: 14px; display: flex; gap: 6px; z-index: 2;
}
.project-visual .win-dots span {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.25);
}
.project-visual .glyph { font-size: 2.6rem; z-index: 1; }
.project-visual .file-tag {
  position: absolute; bottom: 12px; right: 14px;
  font-family: var(--mono); font-size: 11px; color: #fff;
  background: rgba(0,0,0,0.6); padding: 4px 10px; border-radius: 6px;
  backdrop-filter: blur(8px);
}
.project-body {
  padding: 22px; display: flex; flex-direction: column; gap: 12px; flex: 1;
}
.project-meta {
  font-family: var(--mono); font-size: 11.5px; color: var(--text-dim);
}
.project-meta .cat { color: var(--accent-bright); font-weight: 500; }
.project-body h3 {
  font-family: var(--display); font-size: 19px; font-weight: 600; color: var(--text);
}
.project-body ul {
  display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; color: var(--text-muted);
}
.project-body ul li {
  display: flex; align-items: flex-start; gap: 8px;
}
.project-body ul li::before { content: "›"; color: var(--accent); font-weight: 700; }
.project-link { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border-soft); font-family: var(--mono); font-size: 12px; }
.project-link a { color: var(--accent-bright); font-weight: 500; transition: color .2s; }
.project-link a:hover { color: #fff; }
.project-link .soon { color: var(--text-dim); }

.project-more {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 32px; padding: 18px 22px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 13.5px; flex-wrap: wrap; gap: 14px;
}

/* ============== 6. CAREER TRACK ============== */
.timeline-grid {
  display: flex; flex-direction: column; gap: 14px;
}
.timeline-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 24px 28px;
  display: grid; grid-template-columns: 60px 220px 1fr; gap: 20px; align-items: center;
  transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.timeline-card:hover {
  border-color: var(--border-hover); background: var(--surface-2); transform: translateX(3px);
}
.timeline-index {
  font-family: var(--mono); font-size: 1.05rem; color: var(--text-dim); font-weight: 600;
}
.timeline-meta { display: flex; flex-direction: column; gap: 3px; }
.timeline-date { font-family: var(--mono); font-size: 0.76rem; color: var(--accent-bright); }
.timeline-org { font-size: 0.92rem; color: var(--text); font-weight: 500; }
.timeline-body h4 { font-size: 1.08rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.timeline-body p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.55; }

/* ============== ACHIEVEMENTS ============== */
.ach-card {
  min-width: 270px; max-width: 310px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 18px 20px; margin: 0 10px; display: inline-flex; flex-direction: column; gap: 8px;
  vertical-align: top;
}
.ach-card .ico { font-size: 1.5rem; }
.ach-card h4 { font-family: var(--display); font-size: 15px; font-weight: 600; color: var(--text); }
.ach-card .issuer { font-family: var(--mono); font-size: 11px; color: var(--amber); }
.ach-card p { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }

/* ============== BACKGROUND & ABOUT ============== */
.about-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 24px;
}

.about-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 30px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 22px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.about-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lift);
}
.about-card-glow {
  position: absolute; top: -80px; right: -80px; width: 240px; height: 240px;
  border-radius: 50%; background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
.about-sub { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 20px; }
.about-title-row { display: flex; align-items: flex-start; gap: 14px; }
.about-title-row.compact { margin-top: 4px; }
.about-icon {
  font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--accent-bright);
  background: var(--surface-2); border: 1px solid var(--border);
  width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  flex: none;
}
.about-title-row h3 { font-family: var(--display); font-size: 1.2rem; font-weight: 600; color: var(--text); }
.about-title-row .lead { font-size: 0.85rem; color: var(--text-muted); }

/* Left Card: Tech Stack & Location */
.toolbox-grid-wrap {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0;
}
.tool-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 0.76rem; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 5px 11px; border-radius: 7px;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.tool-chip:hover {
  border-color: var(--accent-bright);
  transform: translateY(-2px);
}
.tool-chip .ab { color: var(--accent-bright); font-weight: 600; }

.about-metrics-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 15px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-family: var(--mono); font-size: 0.76rem; color: var(--text-muted);
}
.about-metrics-bar span b { color: var(--text-1); font-weight: 600; }

.map-block { display: flex; flex-direction: column; gap: 10px; margin-top: 2px; }
.map-frame { height: 160px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.map-frame iframe { width: 100%; height: 100%; border: none; filter: invert(90%) hue-rotate(180deg) contrast(1.1); }
.map-label { font-family: var(--mono); font-size: 0.74rem; color: var(--text-dim); display: flex; align-items: center; gap: 6px; }

/* Right Card: Companion Feature Rows */
.companion-features {
  display: flex; flex-direction: column; gap: 11px;
}
.companion-feature {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 15px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}
.companion-feature:hover {
  border-color: var(--border-hover); background: rgba(255,255,255,0.03); transform: translateX(3px);
}
.companion-feature-num {
  font-family: var(--mono); font-size: 0.74rem; font-weight: 600; color: var(--accent-bright);
  background: var(--accent-soft); padding: 3px 7px; border-radius: 6px; line-height: 1; flex: none;
}
.companion-feature-content h5 {
  font-size: 0.88rem; font-weight: 600; color: var(--text-1); margin-bottom: 2px;
}
.companion-feature-content p {
  font-size: 0.78rem; color: var(--text-muted); line-height: 1.45;
}

.hobby-strip-bottom {
  display: flex; flex-wrap: wrap; gap: 7px; margin-top: 2px; padding-top: 12px; border-top: 1px solid var(--border-soft);
}
.hobby-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.76rem; color: var(--text-muted); background: var(--surface-2);
  border: 1px solid var(--border); padding: 4px 11px; border-radius: var(--radius-full);
  transition: color 0.2s, border-color 0.2s;
}
.hobby-chip:hover { color: var(--text); border-color: var(--border-hover); }

/* ============== 7. INITIATE CONNECTION ============== */
.cta-card {
  position: relative;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(40px, 7vw, 76px) 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.cta-card::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 480px;
  height: 280px;
  background: radial-gradient(circle, rgba(139, 107, 255, 0.22), transparent 70%);
  pointer-events: none;
}
.heading-lg {
  font-size: clamp(1.8rem, 3.8vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text-1);
}
.body-lg {
  font-size: clamp(0.98rem, 1.3vw, 1.15rem);
  line-height: 1.7;
  color: var(--text-2);
}
.cta-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  z-index: 2;
}
.caption { font-family: var(--mono); font-size: 0.8rem; color: var(--text-dim); }

/* ============== FOOTER ============== */
footer {
  padding: 40px 0; border-top: 1px solid var(--border-soft); background: var(--bg-soft);
}
footer .wrap {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; font-family: var(--mono); font-size: 12px; color: var(--text-dim);
}
.foot-links { display: flex; gap: 18px; }
.foot-links a { color: var(--text-muted); transition: color .2s; }
.foot-links a:hover { color: var(--text); }

/* ============== 8. SCROLL REVEALS & MOTION ============== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-media {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
}
.reveal-media.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   9. COMPREHENSIVE RESPONSIVE & MOBILE DESIGN (PHONES / TABLETS)
   ============================================================ */

@media (max-width: 920px) {
  .about-grid { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: flex; }
  .timeline-card {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 20px 22px;
  }
}

@media (max-width: 768px) {
  .section-pad { padding: 64px 0; }
  .wrap { padding: 0 18px; }

  /* Navbar on mobile */
  .nav-wrapper { padding: 10px 14px; }
  .nav-wrapper.scrolled { padding: 8px 14px; }
  .nav-bar { height: 48px; padding: 0 12px; }
  .nav-logo { font-size: 0.84rem; gap: 7px; }
  .nav-logo-icon { width: 24px; height: 24px; font-size: 0.72rem; }

  /* Hero on mobile: stacked, centered, perfectly proportioned */
  #home { padding: 100px 0 60px; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }

  .badge { margin: 0 auto 20px; }
  .hero-bio { margin: 0 auto 24px; }
  .btn-row { justify-content: center; width: 100%; }

  .hero-photo-wrap {
    min-height: 280px;
    width: 100%;
    overflow: hidden;
  }
  .hero-rings svg {
    width: 290px;
    height: 290px;
  }
  .photo-frame {
    width: 170px;
    height: 170px;
  }

  /* Keep chips tightly bound around photo so they never overflow */
  .float-chip { font-size: 10px; padding: 4px 9px; }
  .chip-1 { top: 8%; left: calc(50% - 130px); }
  .chip-2 { bottom: 8%; left: calc(50% - 120px); }
  .chip-3 { top: 16%; right: calc(50% - 130px); }

  /* Section heads */
  .section-head { margin-bottom: 30px; text-align: left; }

  /* Projects & About */
  .project-grid { gap: 18px; }
  .about-card { padding: 22px 18px; }

  /* Contact CTA */
  .cta-card { padding: 42px 20px; }
}

@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .nav-cta { display: none; } /* give max room to logo and hamburger */

  /* Buttons on very small phones */
  .btn { width: 100%; justify-content: center; }
  .btn-row { flex-direction: column; width: 100%; }
  .cta-actions { flex-direction: column; width: 100%; }

  .about-metrics-bar {
    flex-wrap: wrap;
    gap: 8px 14px;
    justify-content: center;
  }

  footer .wrap {
    flex-direction: column;
    text-align: center;
    gap: 14px;
    justify-content: center;
  }
  .foot-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .reveal-media { opacity: 1 !important; transform: none !important; }
  .preloader { display: none !important; }
}
