/* ============================
   TOKENS
   ============================ */
:root {
  --bg: #0b0b12;
  --bg-alt: #101018;
  --surface: #161620;
  --surface-2: #1c1c28;
  --border: rgba(255, 255, 255, 0.179);
  --border-2: rgba(255,255,255,0.14);

  --text: #f2f2f7;
  --text-dim: #9a9ab0;
  --text-faint: #5c5c72;

  --accent: #7c6ff7;
  --accent-soft: rgba(124,111,247,0.12);
  --teal: #2dd4bf;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 12px;
  --radius-lg: 18px;
  --ease: 0.2s ease;
  --max-width: 1080px;

  --gradient-accent: linear-gradient(135deg, var(--accent), var(--teal));
}

/* ============================
   RESET
   ============================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font-family: inherit; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 3px; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* Visible keyboard focus */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ============================
   SCROLL PROGRESS + CURSOR GLOW
   ============================ */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--gradient-accent);
  z-index: 200;
  transition: width 0.1s ease-out;
}
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle, rgba(124,111,247,0.16), transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  will-change: transform;
}
.cursor-glow.active { opacity: 1; }
@media (pointer: coarse) {
  .cursor-glow { display: none; }
}

/* ============================
   LAYOUT HELPERS
   ============================ */
section, header#top {
  padding: 88px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  scroll-margin-top: 85px;
  width: 100%;
  box-sizing: border-box;
}
.divider {
  height: 1px;
  background: var(--border);
  max-width: var(--max-width);
  margin: 0 auto;
}
.icon-accent {
  color: var(--accent);
  margin-left: 6px;
}
.label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding: 4px 10px;
  background: var(--accent-soft);
  border-radius: 4px;
}
.section-head { margin-bottom: 44px; max-width: 560px; }
.section-head.center { max-width: 560px; margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 38px);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}
.section-sub { color: var(--text-dim); font-size: 16px; }
.section-sub.center { margin: 0 auto; }

/* ============================
   FADE-IN ON SCROLL
   ============================ */
.fade-in { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ============================
   NAV
   ============================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(11,11,18,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: padding 0.3s ease, background 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.3px;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 30px;
  max-width: var(--max-width);
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  transition: color var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta {
  padding: 8px 18px;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--ease);
}
.nav-cta:hover { background: var(--surface); border-color: var(--accent); color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px; height: 32px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  width: 100%; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================
   HERO
   ============================ */
header#top {
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding-top: 140px;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-bg .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  animation: orbFloat 16s ease-in-out infinite;
}
.orb-1 {
  width: 380px; height: 380px;
  top: -80px; left: -60px;
  background: var(--accent);
  animation-delay: 0s;
}
.orb-2 {
  width: 320px; height: 320px;
  bottom: -100px; right: -40px;
  background: var(--teal);
  animation-delay: -5s;
}
.orb-3 {
  width: 240px; height: 240px;
  top: 40%; left: 60%;
  background: var(--accent);
  opacity: 0.18;
  animation-delay: -10s;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -25px) scale(1.08); }
  66% { transform: translate(-20px, 20px) scale(0.94); }
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent);
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg .orb { animation: none; }
}
.hero-inner { max-width: 680px; position: relative; z-index: 1; }
.typed-wrap { position: relative; display: inline; }
.typed-cursor {
  display: inline-block;
  width: 3px;
  height: 0.9em;
  margin-left: 3px;
  background: var(--accent);
  vertical-align: middle;
  animation: blinkCursor 0.9s step-end infinite;
}
@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid var(--border-2);
  border-radius: 100px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
  z-index: 1;
  transition: border-color var(--ease);
}
.scroll-cue:hover { border-color: var(--accent); }
.scroll-cue span {
  width: 4px; height: 8px;
  background: var(--accent);
  border-radius: 100px;
  animation: scrollCue 1.6s ease-in-out infinite;
}
@keyframes scrollCue {
  0% { opacity: 1; transform: translateY(0); }
  70% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 0; transform: translateY(0); }
}
@media (max-width: 720px) {
  .scroll-cue { display: none; }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 24px;
  padding: 6px 14px;
  border: 1px solid rgba(124,111,247,0.3);
  border-radius: 100px;
  background: var(--accent-soft);
}
.dot {
  width: 7px; height: 7px;
  background: var(--teal);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}
.accent-word {
  background: linear-gradient(90deg, var(--accent), var(--teal), var(--accent));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientShift 6s ease infinite;
}
@keyframes gradientShift {
  0% { background-position: 0% center; }
  50% { background-position: 100% center; }
  100% { background-position: 0% center; }
}
@media (prefers-reduced-motion: reduce) {
  .accent-word { animation: none; }
}
.hero-desc {
  color: var(--text-dim);
  font-size: 17px;
  max-width: 520px;
  margin-bottom: 36px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.btn {
  padding: 13px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--ease);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary { background: var(--accent); color: #fff; position: relative; overflow: hidden; }
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}
.btn-primary:hover::before { left: 130%; }
.btn-primary:hover { background: #8f83f9; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(124,111,247,0.3); }
.btn-secondary { background: transparent; border: 1px solid var(--border-2); color: var(--text); }
.btn-secondary:hover { background: var(--surface); transform: translateY(-2px); }
.hero-socials { display: flex; gap: 20px; flex-wrap: wrap; }
.hero-socials a {
  font-size: 14px;
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.hero-socials a:hover { color: var(--accent); border-color: var(--accent); }

/* ============================
   STATS STRIP
   ============================ */
.stats-section { padding-top: 0; padding-bottom: 48px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 20px;
  text-align: center;
  transition: transform var(--ease), border-color var(--ease);
}
.stat-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
@media (max-width: 720px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .stat-card { padding: 20px 12px; }
}

/* ============================
   ABOUT
   ============================ */
.about-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 56px;
  align-items: center;
}
.avatar-frame {
  width: 100%;
  aspect-ratio: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  transition: transform 0.5s ease;
}
.avatar-frame:hover .avatar {
  transform: scale(1.04);
}
.avatar-placeholder { font-size: 90px; opacity: 0.5; }
.about-text h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 34px);
  margin-bottom: 18px;
}
.about-text p {
  color: var(--text-dim);
  margin-bottom: 16px;
}
.about-text strong { color: var(--text); font-weight: 600; }

/* ============================
   SKILLS
   ============================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--ease), transform var(--ease);
}
.skill-card:hover { border-color: var(--border-2); transform: translateY(-3px); }
.skill-icon { font-size: 26px; display: block; margin-bottom: 10px; }
.skill-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 4px 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
}

/* ============================
   PROJECTS SHOWCASE
   ============================ */
.projects-showcase {
  display: flex;
  flex-direction: column;
  gap: 60px;
  margin-top: 20px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
.project-feature {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: start;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  padding: 30px;
  border-radius: var(--radius-lg);
  transition: border-color 0.3s ease;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.project-feature > * {
  min-width: 0;
  max-width: 100%;
}
.project-feature:hover {
  border-color: var(--border-2);
}

.project-media-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.project-media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  transform: translateZ(0);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  width: 100%;
  max-width: 100%;
}
.project-media:hover {
  transform: translateY(-2px);
}
.media-slider-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16/10;
  background: var(--surface-2);
  overflow: hidden;
}
.slider-track {
  display: flex;
  width: 100%;
  max-width: 100%;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}
.slider-slide {
  min-width: 100%;
  width: 100%;
  max-width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.project-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
iframe.project-img, iframe {
  width: 100%;
  height: 100%;
  max-width: 100%;
  border: 0;
  display: block;
  pointer-events: none;
}
.slider-slide:hover .project-img {
  transform: scale(1.04);
}
.media-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(11, 11, 18, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  backdrop-filter: blur(3px);
  transition: opacity 0.3s ease;
  cursor: pointer;
  z-index: 4;
}
.slider-slide:hover .media-overlay {
  opacity: 1;
}
.view-indicator {
  padding: 10px 20px;
  background: var(--accent);
  color: white;
  font-weight: 600;
  border-radius: 100px;
  transform: translateY(15px);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  gap: 8px;
}
.slider-slide:hover .view-indicator {
  transform: translateY(0);
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(11, 11, 18, 0.7);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.3s, background 0.3s, transform 0.2s;
  z-index: 5;
}
.slider-btn:hover {
  background: var(--accent);
  opacity: 1;
  transform: translateY(-50%) scale(1.08);
}
.slider-btn.prev-btn { left: 12px; }
.slider-btn.next-btn { right: 12px; }

.project-thumbnails {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}
.project-thumbnails::-webkit-scrollbar {
  height: 4px;
}
.project-thumbnails::-webkit-scrollbar-thumb {
  background: var(--surface-2);
  border-radius: 2px;
}
.thumbnail-item {
  width: 76px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.3s, border-color 0.3s;
  position: relative;
  flex-shrink: 0;
  border: 2px solid transparent;
  background: var(--surface);
}
.thumbnail-item iframe {
  pointer-events: none;
  border: 0;
  width: 100%;
  height: 100%;
}
.thumbnail-item.active, .thumbnail-item:hover {
  opacity: 1;
  border-color: var(--accent);
}
.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb-video-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 13px;
  z-index: 2;
  pointer-events: none;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(5, 5, 10, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.lightbox-content {
  position: relative;
  width: 92%;
  max-width: 1100px;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}
.lightbox-media-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}
.lightbox-video {
  width: 100%;
  max-width: 1000px;
  aspect-ratio: 16/9;
  max-height: 78vh;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  pointer-events: auto !important;
}
.lightbox-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 36px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s, transform 0.2s;
  z-index: 1002;
}
.lightbox-close:hover {
  color: var(--accent);
  transform: scale(1.1);
}
.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  z-index: 1002;
}
.lightbox-btn:hover {
  background: var(--accent);
  transform: translateY(-50%) scale(1.08);
}
.lightbox-btn.prev-btn { left: -60px; }
.lightbox-btn.next-btn { right: -60px; }

.project-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.project-type {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--teal);
  margin-bottom: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.project-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}
.project-desc {
  background: var(--surface);
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2;
  word-break: break-word;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
}
.project-tech span {
  padding: 2px 0;
  position: relative;
}
.project-tech span:not(:last-child)::after {
  content: '•';
  margin-left: 8px;
  color: var(--border-2);
}

.project-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.btn-sm {
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 8px;
}
.project-github {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color var(--ease);
}
.project-github:hover {
  color: var(--text);
}
.project-github i {
  font-size: 18px;
}

/* ============================
   JOURNEY / TIMELINE
   ============================ */
.timeline { position: relative; padding-left: 40px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 13px; top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(var(--border-2), var(--border-2) 85%, transparent);
}
.timeline-item { position: relative; padding-bottom: 40px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -40px; top: 0;
  width: 28px; height: 28px;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--accent);
  transition: transform var(--ease), box-shadow var(--ease);
}
.timeline-item:hover .timeline-dot {
  transform: scale(1.12);
  box-shadow: 0 0 0 5px var(--accent-soft);
}
.timeline-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: border-color var(--ease), transform var(--ease);
}
.timeline-item:hover .timeline-card { border-color: var(--border-2); transform: translateX(2px); }
.timeline-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  margin-bottom: 6px;
}
.timeline-card p { color: var(--text-dim); font-size: 14px; }
.timeline-card strong { color: var(--text); font-weight: 600; }

.current-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--teal);
  background: rgba(45, 212, 191, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.3);
  padding: 2px 8px;
  border-radius: 100px;
}
.timeline-current .timeline-dot {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-soft); }
  50% { box-shadow: 0 0 0 8px transparent; }
}
.timeline-current .timeline-card { border-color: rgba(124,111,247,0.4); }

/* ============================
   CONTACT
   ============================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 14px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all var(--ease);
}
.contact-item:hover { border-color: var(--accent); transform: translateX(4px); }
.contact-icon { font-size: 20px; }
.contact-label { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; }
.contact-value { font-size: 14px; color: var(--text); font-weight: 500; }

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; color: var(--text-dim); }
.form-group input, .form-group textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  resize: vertical;
  transition: border-color var(--ease);
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); outline: none; }
.form-submit { align-self: flex-start; }

/* ============================
   FOOTER
   ============================ */
footer {
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 13px;
}

/* ============================
   SCROLL TO TOP
   ============================ */
.scroll-top {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: all var(--ease);
  z-index: 90;
}
.scroll-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.scroll-top:hover { border-color: var(--accent); color: var(--accent); }

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .avatar-frame { max-width: 220px; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  
  .project-feature {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
    width: 100%;
    max-width: 100%;
  }
  .project-feature .project-desc {
    margin-left: 0;
    margin-top: 0;
  }
  .project-media-section, .project-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}

@media (max-width: 768px) {
  .lightbox-btn.prev-btn { left: 10px; }
  .lightbox-btn.next-btn { right: 10px; }
  .lightbox-close { top: -40px; right: 10px; }
}

@media (max-width: 720px) {
  nav {
    flex-wrap: wrap;
    padding: 16px 20px;
  }
  .nav-links, .nav-cta {
    display: none;
    width: 100%;
  }
  .nav-toggle { display: flex; }
  
  nav.open {
    background: rgba(11, 11, 18, 0.98);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  }
  nav.open .nav-links {
    display: flex;
    flex-direction: column;
    order: 3;
    gap: 14px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
  }
  nav.open .nav-cta {
    display: inline-block;
    order: 4;
    margin-top: 16px;
    text-align: center;
  }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  section, header#top { padding: 64px 18px; }
  .stats-section { padding-top: 0; padding-bottom: 32px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .btn { text-align: center; width: 100%; }
  .timeline { padding-left: 34px; }
  .timeline-dot { left: -34px; width: 24px; height: 24px; font-size: 11px; }
  .project-feature { padding: 16px; }
  .project-thumbnails { gap: 6px; }
  .thumbnail-item { width: 64px; height: 42px; }
  .project-links {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }
  .project-links .btn, .project-links .project-github {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}