/* ─────────────────────────────────────────────────────────────────────────
   CV Portfolio · style.css
   ───────────────────────────────────────────────────────────────────────── */

/* ── 1. CSS CUSTOM PROPERTIES (DESIGN TOKENS) ────────────────────────── */
:root {
  /* Palette */
  --clr-bg:          #0d0f14;
  --clr-bg-alt:      #111318;
  --clr-surface:     #181b22;
  --clr-surface-2:   #1e2128;
  --clr-border:      #2a2d36;
  --clr-accent:      #6c63ff;
  --clr-accent-2:    #00d4aa;
  --clr-accent-glow: rgba(108, 99, 255, 0.25);
  --clr-text:        #e8eaf0;
  --clr-text-muted:  #8b8fa8;
  --clr-text-dim:    #4a4d5e;

  /* Typography */
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'Fira Code', 'Courier New', monospace;

  /* Spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-24: 6rem;

  /* Radii */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.6);
  --shadow-accent: 0 0 30px var(--clr-accent-glow);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 150ms;
  --dur-base: 300ms;
  --dur-slow: 500ms;

  /* Layout */
  --nav-height: 64px;
  --container: 1100px;
}

/* ── 2. RESET & BASE ──────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; }

img { max-width: 100%; display: block; }

/* ── 3. UTILITY CLASSES ──────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

/* ── 4. BUTTONS ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dur-base) var(--ease);
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--clr-accent);
  color: #fff;
  border-color: var(--clr-accent);
  box-shadow: 0 0 20px var(--clr-accent-glow);
}
.btn-primary:hover {
  background: #7b74ff;
  box-shadow: 0 0 30px var(--clr-accent-glow);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--clr-text);
  border-color: var(--clr-border);
}
.btn-ghost:hover {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--clr-accent);
  border-color: var(--clr-accent);
}
.btn-outline:hover {
  background: var(--clr-accent);
  color: #fff;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
}

.btn-icon { font-size: 1rem; }

/* ── 5. NAVIGATION ───────────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: background var(--dur-base) var(--ease),
              box-shadow   var(--dur-base) var(--ease);
}

#navbar.scrolled {
  background: rgba(13, 15, 20, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  border-bottom: 1px solid var(--clr-border);
}

.nav-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-6);
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--clr-accent);
  letter-spacing: 0.05em;
  transition: opacity var(--dur-fast);
}
.nav-logo:hover { opacity: 0.8; }

.nav-links {
  display: flex;
  gap: var(--sp-6);
  flex: 1;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  transition: color var(--dur-fast);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--clr-accent);
  transition: width var(--dur-base) var(--ease);
}
.nav-link:hover,
.nav-link.active {
  color: var(--clr-text);
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: all var(--dur-base) var(--ease);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: rgba(13, 15, 20, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--clr-border);
  z-index: 999;
  padding: var(--sp-6);
  transform: translateY(-10px);
  opacity: 0;
  transition: all var(--dur-base) var(--ease);
  pointer-events: none;
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}
.mobile-menu ul { display: flex; flex-direction: column; gap: var(--sp-4); }
.mobile-link {
  font-size: 1rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  padding: var(--sp-2) 0;
  display: block;
  transition: color var(--dur-fast);
}
.mobile-link:hover { color: var(--clr-accent); }

/* ── 6. HERO SECTION ─────────────────────────────────────────────────── */
#hero {
  min-height: 0;
  padding-bottom: var(--sp-8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-inline: var(--sp-6);
  padding-top: var(--nav-height);
  max-width: var(--container);
  margin-inline: auto;
  position: relative;
}

/* Subtle dot-grid background */
.hero-bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle at 25% 35%, rgba(108,99,255,0.08) 0%, transparent 55%),
    radial-gradient(circle at 75% 65%, rgba(0,212,170,0.06) 0%, transparent 55%),
    radial-gradient(var(--clr-border) 1px, transparent 1px);
  background-size: auto, auto, 28px 28px;
  pointer-events: none;
}

.hero-greeting {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--clr-accent-2);
  margin-bottom: var(--sp-3);
  animation: fadeInDown 0.6s var(--ease) both;
}

.hero-name {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--clr-text) 40%, var(--clr-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInDown 0.7s 0.1s var(--ease) both;
}

.hero-title {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 400;
  color: var(--clr-text-muted);
  margin-top: var(--sp-3);
  animation: fadeInDown 0.7s 0.2s var(--ease) both;
}

.hero-tagline {
  max-width: 540px;
  margin-top: var(--sp-4);
  color: var(--clr-text-muted);
  font-size: 1rem;
  line-height: 1.8;
  animation: fadeInDown 0.7s 0.3s var(--ease) both;
}

.hero-location {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  animation: fadeInDown 0.7s 0.35s var(--ease) both;
}
.hero-location::before {
  content: '📍';
  font-size: 0.9rem;
}

.hero-cta {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-top: var(--sp-8);
  animation: fadeInUp 0.7s 0.4s var(--ease) both;
}

.hero-socials {
  display: flex;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
  animation: fadeInUp 0.7s 0.5s var(--ease) both;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--clr-border);
  color: var(--clr-text-muted);
  transition: all var(--dur-base) var(--ease);
  font-size: 1rem;
}
.social-icon:hover {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-accent);
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: var(--sp-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--clr-text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeInUp 1s 1s var(--ease) both;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--clr-border), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ── 7. SECTION LAYOUT ───────────────────────────────────────────────── */
.section {
  padding-block: var(--sp-24);
}
.section-alt {
  background: var(--clr-bg-alt);
}

.section-header {
  margin-bottom: var(--sp-12);
}
.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--clr-accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: block;
  margin-bottom: var(--sp-2);
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  position: relative;
  padding-bottom: var(--sp-4);
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-accent), var(--clr-accent-2));
  border-radius: var(--radius-full);
}

/* ── 8. ABOUT ────────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--sp-12);
  align-items: start;
}

/* ---- Avatar ---- */
.about-image {
  display: flex;
  justify-content: center;
}

.avatar-wrap {
  position: relative;
  width: 240px;
  height: 240px;
  flex-shrink: 0;
}

/* Decorative rotating ring behind the image */
.avatar-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(
    var(--clr-accent) 0%,
    var(--clr-accent-2) 40%,
    transparent 60%
  );
  animation: ringRotate 6s linear infinite;
  z-index: 0;
}

@keyframes ringRotate {
  to { transform: rotate(360deg); }
}

.avatar-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--clr-bg);
  box-shadow: var(--shadow-lg);
  /* Shown only when src is set; hidden placeholder otherwise */
  background: var(--clr-surface-2);
}

/* Fallback silhouette when no image is provided */
.avatar-img::after {
  content: '';
}

/* ---- Body (text + stats) ---- */
.about-body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
}

.about-text {
  color: var(--clr-text-muted);
  font-size: 1.05rem;
  line-height: 1.85;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

.stat-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  text-align: center;
  transition: all var(--dur-base) var(--ease);
}
.stat-card:hover {
  border-color: var(--clr-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-accent);
}
.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--clr-accent);
  font-family: var(--font-mono);
  display: block;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--clr-text-muted);
  margin-top: var(--sp-1);
}

/* ── 9. SKILLS ───────────────────────────────────────────────────────── */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: var(--sp-2) var(--sp-4);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-full);
  color: var(--clr-text-muted);
  cursor: default;
  transition: all var(--dur-base) var(--ease);
  opacity: 0;
  transform: translateY(10px);
}
.skill-tag.visible {
  opacity: 1;
  transform: translateY(0);
}
.skill-tag:hover {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
  background: var(--clr-accent-glow);
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 4px 14px var(--clr-accent-glow);
}

/* ── 10. EXPERIENCE TIMELINE ─────────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: var(--sp-8);
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--clr-accent), var(--clr-border));
}

.timeline-item {
  position: relative;
  margin-bottom: var(--sp-12);
}
.timeline-item:last-child { margin-bottom: 0; }

/* Dot on the line */
.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--sp-8) + 2px);
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--clr-accent);
  border: 3px solid var(--clr-bg);
  box-shadow: 0 0 12px var(--clr-accent-glow);
  transform: translateX(-50%);
}

.timeline-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  transition: all var(--dur-base) var(--ease);
}
.timeline-card:hover {
  border-color: var(--clr-accent);
  transform: translateX(6px);
  box-shadow: var(--shadow-accent);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}
.timeline-role {
  font-size: 1.1rem;
  font-weight: 600;
}
.timeline-period {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--clr-accent-2);
  background: rgba(0,212,170,0.1);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.timeline-company {
  font-size: 0.9rem;
  color: var(--clr-accent);
  margin-bottom: var(--sp-3);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.timeline-company::after {
  content: '·';
  color: var(--clr-text-dim);
}
.timeline-location {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
}
.timeline-desc {
  color: var(--clr-text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: var(--sp-4);
}
.timeline-highlights {
  padding-left: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.timeline-highlights li {
  font-size: 0.88rem;
  color: var(--clr-text-muted);
  position: relative;
}
.timeline-highlights li::before {
  content: '▸';
  color: var(--clr-accent);
  position: absolute;
  left: calc(-1 * var(--sp-4));
}

/* ── 11. PROJECT CARDS ───────────────────────────────────────────────── */
.projects-status {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  color: var(--clr-text-muted);
  font-size: 0.9rem;
  padding: var(--sp-4) 0;
}
.projects-status.hidden { display: none; }

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--clr-border);
  border-top-color: var(--clr-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Skeleton loading cards */
.skeleton-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  height: 160px;
  position: relative;
  overflow: hidden;
}
.skeleton-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.04) 50%, transparent 100%);
  animation: shimmer 1.4s ease-in-out infinite;
}
.skeleton-line {
  background: var(--clr-border);
  border-radius: 4px;
  height: 12px;
  opacity: 0.8;
}
.skeleton-line.short  { width: 40%; }
.skeleton-line.medium { width: 65%; }
.skeleton-line.long   { width: 90%; }
.skeleton-line.icon   { width: 28px; height: 28px; border-radius: 6px; }

@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-6);
}

.project-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  transition: border-color var(--dur-base) var(--ease), transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
  text-decoration: none;
  color: inherit;
  animation: cardEnter 0.45s var(--ease) both;
}
@keyframes cardEnter {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.project-card:hover {
  border-color: var(--clr-accent);
  transform: translateY(-6px);
  box-shadow: var(--shadow-accent), var(--shadow-md);
}

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.project-icon {
  font-size: 1.3rem;
}
.project-stars {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--clr-text-muted);
}
.project-stars::before { content: '★'; color: #f5c518; }

.project-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--clr-text);
  transition: color var(--dur-fast);
}
.project-card:hover .project-name { color: var(--clr-accent); }

.project-desc {
  font-size: 0.88rem;
  color: var(--clr-text-muted);
  line-height: 1.65;
  flex: 1;
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}
.project-lang {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-full);
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  color: var(--clr-text-muted);
}
.project-link {
  font-size: 0.8rem;
  color: var(--clr-accent);
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  transition: gap var(--dur-fast);
}
.project-link:hover { gap: var(--sp-2); }

.projects-footer {
  margin-top: var(--sp-8);
  text-align: center;
}

/* ── 12. FEATURED PROJECT CARDS ──────────────────────────────────────── */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
  gap: var(--sp-6);
}

.featured-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--sp-8);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  transition: all var(--dur-base) var(--ease);
  position: relative;
  overflow: hidden;
}

.featured-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--clr-accent), var(--clr-accent-2));
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease);
}

.featured-card:hover {
  border-color: var(--clr-accent);
  transform: translateY(-6px);
  box-shadow: var(--shadow-accent), var(--shadow-md);
}

.featured-card:hover::before { opacity: 1; }

.featured-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-4);
}

.featured-title-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.featured-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--clr-text);
}

.featured-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px var(--sp-3);
  border-radius: var(--radius-full);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.status-progress {
  background: rgba(245, 197, 24, 0.12);
  color: #f5c518;
  border: 1px solid rgba(245, 197, 24, 0.3);
}

.status-active {
  background: rgba(0, 212, 170, 0.12);
  color: var(--clr-accent-2);
  border: 1px solid rgba(0, 212, 170, 0.3);
}

.status-done {
  background: rgba(108, 99, 255, 0.12);
  color: var(--clr-accent);
  border: 1px solid rgba(108, 99, 255, 0.3);
}

.featured-links {
  display: flex;
  gap: var(--sp-2);
  flex-shrink: 0;
}

.featured-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--clr-border);
  color: var(--clr-text-muted);
  transition: all var(--dur-base) var(--ease);
  font-size: 1rem;
}

.featured-link:hover {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
  background: var(--clr-accent-glow);
}

.featured-desc {
  font-size: 0.95rem;
  color: var(--clr-text-muted);
  line-height: 1.75;
}

.featured-highlights {
  list-style: none;
  padding-left: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.featured-highlights li {
  font-size: 0.88rem;
  color: var(--clr-text-muted);
  position: relative;
}

.featured-highlights li::before {
  content: '▸';
  color: var(--clr-accent-2);
  position: absolute;
  left: calc(-1 * var(--sp-4));
}

.featured-tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 3px var(--sp-3);
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-full);
  color: var(--clr-accent);
}

/* ── ALL GITHUB REPOS SECTION ─────────────────────────────────────────── */
.github-all-section {
  border-top: 1px solid var(--clr-border);
}

.github-section-note {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--clr-text-dim);
  margin-bottom: var(--sp-6);
  padding: var(--sp-2) var(--sp-4);
  background: var(--clr-surface);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--clr-border);
}

/* ── 13. EDUCATION ───────────────────────────────────────────────────── */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--sp-6);
}

.edu-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  transition: all var(--dur-base) var(--ease);
  position: relative;
  overflow: hidden;
}
.edu-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-accent), var(--clr-accent-2));
}
.edu-card:hover {
  border-color: var(--clr-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-accent);
}
.edu-degree {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--sp-2);
}
.edu-institution {
  font-size: 0.9rem;
  color: var(--clr-accent);
  margin-bottom: var(--sp-2);
}
.edu-period {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--clr-accent-2);
  margin-bottom: var(--sp-3);
}
.edu-details {
  font-size: 0.88rem;
  color: var(--clr-text-muted);
  line-height: 1.65;
}

/* ── 13. CONTACT ─────────────────────────────────────────────────────── */
.contact-container {
  text-align: center;
  max-width: 640px;
}
.contact-intro {
  color: var(--clr-text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: var(--sp-8);
}
.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-4);
}
.contact-link {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--clr-text-muted);
  transition: all var(--dur-base) var(--ease);
}
.contact-link:hover {
  border-color: var(--clr-accent);
  color: var(--clr-accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-accent);
}
.contact-link-icon { font-size: 1.1rem; }

/* ── 14. FOOTER ──────────────────────────────────────────────────────── */
#footer {
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  padding: var(--sp-6);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--clr-text-dim);
}

/* ── 15. ANIMATIONS ──────────────────────────────────────────────────── */

/* Scroll-triggered animations */
.animate-left,
.animate-right {
  opacity: 0;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.animate-left  { transform: translateX(-40px); }
.animate-right { transform: translateX( 40px); }

.animate-left.visible,
.animate-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Keyframes */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1);    }
  50%       { opacity: 1;   transform: scaleY(1.15); }
}

/* ── 16. RESPONSIVE ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }
  .about-image { margin-bottom: var(--sp-4); }
  .avatar-wrap { width: 180px; height: 180px; }
  .nav-links, .resume-menu { display: none; }
  .hamburger { display: flex; }
  .mobile-menu { display: block; }

  .featured-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  :root { --sp-24: 4rem; }

  #hero { align-items: center; text-align: center; }
  .hero-cta, .hero-socials { justify-content: center; }
  .hero-tagline { text-align: center; }

  .about-stats { grid-template-columns: 1fr 1fr; }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contact-links { flex-direction: column; align-items: center; }

  .section-title::after { left: 50%; transform: translateX(-50%); }
  .section-header { text-align: center; }
}

/* ── PRINT-ONLY CONTACT BAR (hidden on screen) ───────────────────────────── */
.print-contact-bar { display: none; }

/* ── ABOUT PARAGRAPHS ────────────────────────────────────────────────────── */
.about-para + .about-para { margin-top: var(--sp-4); }

/* ── PRINT / PDF EXPORT ──────────────────────────────────────────────────── *
 * Triggered by the Resume button (window.print()).
 * #all-github-repos is hidden; featured projects appear as a 2-col grid.
 * ─────────────────────────────────────────────────────────────────────────── */
@media print {

  /* ── PAGE GEOMETRY ──────────────────────────────────────────────────── */
  @page {
    size: letter portrait;
    margin: 0.6in 0.65in;
  }

  /* ── HIDE SCREEN-ONLY ELEMENTS ──────────────────────────────────────── */
  #navbar,
  .resume-menu,
  .mobile-resumes,
  .hero-scroll-hint,
  .hero-greeting,
  .hero-cta,
  .hero-socials,
  .hero-bg-grid,
  #all-github-repos,
  #footer,
  .section-label,
  .about-image,
  .about-stats,
  .featured-link,
  .contact-intro {
    display: none !important;
  }

  /* ── SHOW PRINT-ONLY ELEMENTS ───────────────────────────────────────── */
  .print-contact-bar {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    margin-top: 5pt;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 7.5pt;
    color: #4a4a6a !important;
  }
  .print-contact-bar a {
    color: #3730a3 !important;
    text-decoration: none;
  }
  .print-sep { color: #9999bb !important; }

  /* ── RESET ──────────────────────────────────────────────────────────── */
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    box-shadow: none !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* ── BASE ───────────────────────────────────────────────────────────── */
  html, body {
    background: #ffffff !important;
    color: #1a1a2e !important;
    font-size: 9.5pt;
    line-height: 1.45;
  }

  /* ── CSS VARIABLE OVERRIDES (light theme) ───────────────────────────── */
  :root {
    --clr-bg:          #fff;
    --clr-bg-alt:      #fff;
    --clr-surface:     #f4f4f8;
    --clr-surface-2:   #ebebf0;
    --clr-border:      #d0d0dc;
    --clr-text:        #1a1a2e;
    --clr-text-muted:  #4a4a6a;
    --clr-text-dim:    #8888aa;
    --clr-accent:      #3730a3;
    --clr-accent-2:    #065f46;
    --clr-accent-glow: transparent;
  }

  /* ── LAYOUT ─────────────────────────────────────────────────────────── */
  .container { max-width: 100%; padding-inline: 0; }
  main { padding-top: 0; }

  /* ── HERO → RESUME HEADER ───────────────────────────────────────────── */
  #hero {
    display: block;
    min-height: unset;
    padding: 0 0 0.55rem;
    margin-bottom: 0;
    border-bottom: 2pt solid #3730a3;
  }

  .hero-name {
    font-size: 21pt;
    font-weight: 700;
    line-height: 1.1;
    -webkit-text-fill-color: #1a1a2e !important;
    background: none !important;
    color: #1a1a2e !important;
    margin-bottom: 2pt;
  }

  .hero-title {
    font-size: 11pt;
    font-weight: 500;
    color: #3730a3 !important;
    margin-top: 2pt;
  }

  .hero-tagline {
    font-size: 8.5pt;
    color: #4a4a6a !important;
    margin-top: 4pt;
    max-width: 100%;
    line-height: 1.4;
  }

  .hero-location {
    font-size: 8pt;
    margin-top: 3pt;
    color: #4a4a6a !important;
  }

  /* ── SECTIONS ───────────────────────────────────────────────────────── */
  .section,
  .section-alt {
    padding-block: 0.55rem;
    background: transparent !important;
  }

  .section-header { margin-bottom: 0.35rem; }

  .section-label { display: none !important; }

  .section-title {
    font-size: 9.5pt;
    font-weight: 700;
    color: #1a1a2e !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding-bottom: 3pt;
    border-bottom: 1.5pt solid #d0d0dc;
    position: static;
  }
  .section-title::after { display: none !important; }

  /* ── ABOUT ──────────────────────────────────────────────────────────── */
  .about-grid { grid-template-columns: 1fr !important; gap: 0 !important; }
  .about-body { gap: 0.3rem; }
  .about-text { display: flex; flex-direction: column; gap: 0.35rem; }

  .about-para {
    font-size: 8.5pt;
    color: #4a4a6a !important;
    line-height: 1.55;
    margin-top: 0 !important;
  }
  /* Show only the first 2 paragraphs to keep the resume concise */
  .about-para:nth-child(n+3) { display: none !important; }

  /* ── SKILLS ─────────────────────────────────────────────────────────── */
  .skills-grid { gap: 0.25rem; }

  .skill-tag {
    font-size: 7.5pt;
    padding: 2pt 7pt;
    border-radius: 3pt;
    border-color: #d0d0dc !important;
    color: #3730a3 !important;
    background: #f0f0f8 !important;
  }

  /* ── EXPERIENCE TIMELINE ────────────────────────────────────────────── */
  .timeline { padding-left: 0.75rem; }

  .timeline::before {
    width: 1.5pt;
    left: 6px;
    background: linear-gradient(to bottom, #3730a3, #d0d0dc) !important;
  }

  .timeline-item { margin-bottom: 0.6rem; }

  .timeline-item::before {
    width: 10px;
    height: 10px;
    background: #3730a3 !important;
    border: 3px solid #fff;
    left: calc(-0.75rem + 3px);
    top: 6px;
  }

  .timeline-card {
    padding: 0.45rem 0.55rem;
    border-radius: 4pt;
    border: 1pt solid #d0d0dc !important;
    background: #f8f8fc !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .timeline-role    { font-size: 9.5pt; font-weight: 600; color: #1a1a2e !important; }
  .timeline-company { font-size: 8.5pt; color: #3730a3 !important; margin-bottom: 0.2rem; }
  .timeline-location { color: #4a4a6a !important; }

  .timeline-period {
    font-size: 7.5pt;
    background: transparent !important;
    border: 1pt solid #065f46 !important;
    color: #065f46 !important;
    padding: 1pt 5pt;
  }

  .timeline-desc {
    font-size: 8.5pt;
    margin-bottom: 0.3rem;
    color: #4a4a6a !important;
  }

  .timeline-highlights li { font-size: 8pt; color: #4a4a6a !important; }
  .timeline-highlights li::before { color: #3730a3 !important; }

  /* ── FEATURED PROJECTS ──────────────────────────────────────────────── */
  .featured-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
  }

  .featured-card {
    padding: 0.45rem 0.55rem;
    border-radius: 4pt;
    border: 1pt solid #d0d0dc !important;
    background: #f8f8fc !important;
    gap: 0.3rem;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .featured-card::before { display: none !important; }

  .featured-name   { font-size: 9.5pt; font-weight: 600; color: #1a1a2e !important; }
  .featured-status { font-size: 6.5pt; }

  .featured-desc {
    font-size: 8pt;
    color: #4a4a6a !important;
    line-height: 1.4;
  }

  .featured-highlights li { font-size: 7.5pt; color: #4a4a6a !important; }
  .featured-highlights li::before { color: #065f46 !important; }

  .tech-tag {
    font-size: 6.5pt;
    padding: 1pt 5pt;
    color: #3730a3 !important;
    border: 1pt solid #d0d0dc !important;
    background: #ebebf8 !important;
  }

  /* ── EDUCATION ──────────────────────────────────────────────────────── */
  .education-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem !important;
  }

  .edu-card {
    padding: 0.45rem 0.55rem;
    border-radius: 4pt;
    border: 1pt solid #d0d0dc !important;
    background: #f8f8fc !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .edu-card::before { height: 2pt; }

  .edu-degree      { font-size: 9pt; font-weight: 600; color: #1a1a2e !important; }
  .edu-institution { font-size: 8.5pt; color: #3730a3 !important; }
  .edu-period      { font-size: 7.5pt; color: #065f46 !important; }
  .edu-details     { font-size: 8pt; color: #4a4a6a !important; line-height: 1.5; }

  /* ── CONTACT ────────────────────────────────────────────────────────── */
  .contact-container { max-width: 100%; text-align: left; }

  .contact-link {
    font-size: 8.5pt;
    padding: 3pt 9pt;
    border: 1pt solid #d0d0dc !important;
    color: #3730a3 !important;
    background: #f4f4f8 !important;
  }

  /* ── PAGE BREAK HINTS ───────────────────────────────────────────────── */
  #hero, #skills, #contact { break-inside: avoid; page-break-inside: avoid; }
  #experience, #featured-projects, #education { break-before: auto; }
}


/* ── Language toggle & project screenshots ─────────────────────────── */
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-right: var(--sp-3);
}
.lang-btn {
  background: transparent;
  color: var(--clr-text-muted);
  border: 0;
  padding: 4px 10px;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}
.lang-btn.active { background: var(--clr-surface); color: var(--clr-text); font-weight: 600; }
.featured-shot {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--clr-border);
}
@media print { .lang-toggle { display: none !important; } .featured-shot { display: none; } }

/* ── Resume download menu ──────────────────────────────────────────── */
.resume-menu { position: relative; }
.resume-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  margin: 0;
  padding: var(--sp-2);
  list-style: none;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 200;
}
.resume-dropdown[hidden] { display: none; }
.resume-option {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 8px 12px;
  color: var(--clr-text);
  text-decoration: none;
  border-radius: var(--radius-sm, 6px);
  font-size: 0.9rem;
}
.resume-option:hover { background: rgba(255, 255, 255, 0.06); }
.resume-lang {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border: 1px solid var(--clr-border);
  border-radius: 4px;
  color: var(--clr-text-muted);
}
.mobile-resumes { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-4) var(--sp-6); }

.section-subtitle { margin: 2.5rem 0 1.25rem; font-size: 1.35rem; font-weight: 600; }

/* ── TABS ─────────────────────────────────────────────────────────────── */
.tab-hidden { display: none; }
.github-all-section { padding-top: var(--sp-16, 4rem); }

/* ── PROJECT MEDIA (hover video / photo slider) ───────────────────────── */
.featured-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--clr-border);
  margin-bottom: var(--sp-4);
  background: #000;
  cursor: pointer;
}
.featured-media img,
.featured-media video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.featured-media.is-slider .slide { opacity: 0; transition: opacity 0.5s ease; }
.featured-media.is-slider .slide.active { opacity: 1; }
.media-badge {
  position: absolute; right: 10px; bottom: 10px;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(13, 15, 20, 0.7); color: #fff; font-size: 0.8rem;
  transition: opacity 0.2s ease;
}
.featured-media.playing .media-badge { opacity: 0; }
.media-dots {
  position: absolute; left: 0; right: 0; bottom: 8px;
  display: flex; justify-content: center; gap: 6px;
}
.media-dot {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.45); cursor: pointer;
}
.media-dot.active { background: #fff; }
@media print {
  .featured-media { display: none !important; }
  .tab-hidden { display: block !important; }
}
