/* =============================================================================
   0. THEME VARIABLES
   ============================================================================= */

:root {
  /* Light theme */
  --bg:            #ffffff;
  --bg-card:       #f8fafc;
  --bg-card-hover: #f1f5f9;
  --bg-nav:        rgba(255, 255, 255, 0.85);
  --text:          #1a1a1a;
  --text-muted:    #64748b;
  --text-subtle:   #94a3b8;
  --accent:        #3ddc84;
  --accent-2:      #1a5f9e;
  --accent-rgb:    61, 220, 132;
  --accent-2-rgb:  26, 95, 158;
  --border:        #e2e8f0;
  --border-subtle: #f1f5f9;
  --shadow:        0 4px 24px rgba(0, 0, 0, 0.07);
  --shadow-hover:  0 8px 40px rgba(0, 0, 0, 0.14);
  --shadow-card:   0 1px 4px rgba(0, 0, 0, 0.06);

  /* Shared */
  --nav-h:       70px;
  --radius:      12px;
  --radius-sm:   6px;
  --radius-full: 9999px;
  --font-body:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --transition:  0.25s var(--ease);
  --transition-slow: 0.4s var(--ease);
}

[data-theme="dark"] {
  --bg:            #0a0f1e;
  --bg-card:       #111827;
  --bg-card-hover: #1e2a3a;
  --bg-nav:        rgba(10, 15, 30, 0.88);
  --text:          #e2e8f0;
  --text-muted:    #94a3b8;
  --text-subtle:   #64748b;
  --accent:        #3ddc84;
  --accent-2:      #60a5fa;
  --accent-rgb:    61, 220, 132;
  --accent-2-rgb:  96, 165, 250;
  --border:        #1e293b;
  --border-subtle: #0f172a;
  --shadow:        0 4px 24px rgba(0, 0, 0, 0.45);
  --shadow-hover:  0 8px 40px rgba(0, 0, 0, 0.65);
  --shadow-card:   0 1px 4px rgba(0, 0, 0, 0.4);
}


/* =============================================================================
   1. RESET + BASE
   ============================================================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background-color var(--transition-slow), color var(--transition-slow);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
strong { font-weight: 600; }


/* =============================================================================
   2. LAYOUT
   ============================================================================= */

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 100px 0;
}

.section--alt {
  background: var(--bg-card);
}


/* =============================================================================
   3. REVEAL ANIMATIONS
   ============================================================================= */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: var(--delay, 0s);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}


/* =============================================================================
   4. SECTION HEADER
   ============================================================================= */

.section-header {
  margin-bottom: 56px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--text);
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 44px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

.section-subtitle {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 1rem;
}


/* =============================================================================
   5. BUTTONS
   ============================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #0a0f1e;
  font-weight: 600;
}

.btn-primary:hover {
  background: #2bc974;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn-secondary:hover {
  background: rgba(var(--accent-rgb), 0.08);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1rem;
}

.btn svg {
  flex-shrink: 0;
}


/* =============================================================================
   6. NAVBAR
   ============================================================================= */

#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--bg-nav);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition-slow);
}

#navbar.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow);
}

.nav-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.95rem;
  color: #0a0f1e;
  flex-shrink: 0;
  transition: transform var(--transition), box-shadow var(--transition);
}

.nav-logo:hover {
  transform: scale(1.07);
  box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.4);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
}

/* Sun in dark, Moon in light */
[data-theme="dark"] .icon-sun { display: flex; }
[data-theme="dark"] .icon-moon { display: none; }
.icon-sun { display: none; }
.icon-moon { display: flex; }

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.mobile-menu-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}


/* =============================================================================
   7. MOBILE MENU
   ============================================================================= */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.mobile-menu.open {
  opacity: 1;
}

.mobile-menu-inner {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px;
  transform: translateX(100%);
  transition: transform var(--transition-slow);
}

.mobile-menu.open .mobile-menu-inner {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.mobile-menu-header .nav-logo-text {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent);
}

.mobile-menu-header button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.mobile-menu-header button:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.mobile-nav-link {
  display: block;
  padding: 14px 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  transition: color var(--transition);
  opacity: 0;
  transform: translateX(16px);
}

.mobile-menu.open .mobile-nav-link {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.3s var(--ease) var(--delay, 0s),
              transform 0.3s var(--ease) var(--delay, 0s),
              color var(--transition);
}

.mobile-nav-link:hover { color: var(--accent); }

.mobile-menu-footer {
  margin-top: auto;
  display: flex;
  gap: 16px;
}

.mobile-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.mobile-social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}


/* =============================================================================
   8. HERO
   ============================================================================= */

#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 0;
  background: var(--bg);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-bg::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.07) 0%, transparent 65%);
  border-radius: 50%;
}

.hero-bg::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, rgba(var(--accent-2-rgb), 0.05) 0%, transparent 65%);
  border-radius: 50%;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 80px;
  align-items: center;
  padding-top: var(--nav-h);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  width: fit-content;
  font-family: var(--font-mono);
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: blink 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero-greeting {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: -10px;
}

.hero-name {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-title {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 600;
  color: var(--accent);
}

.hero-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: -4px;
}

.hero-tagline {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.hero-socials {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.hero-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.hero-social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ── Avatar ── */

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-avatar {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  animation: pulse-ring 3.5s ease-in-out infinite;
}

.ring-1 {
  width: 280px; height: 280px;
  opacity: 0.18;
  animation-delay: 0s;
}
.ring-2 {
  width: 244px; height: 244px;
  opacity: 0.32;
  animation-delay: 0.5s;
}
.ring-3 {
  width: 208px; height: 208px;
  opacity: 0.55;
  animation-delay: 1s;
}

@keyframes pulse-ring {
  0%, 100% { transform: scale(1);    opacity: 0.18; }
  50%       { transform: scale(1.05); opacity: 0.5;  }
}

.ring-2 { animation-name: pulse-ring-2; }
@keyframes pulse-ring-2 {
  0%, 100% { transform: scale(1);    opacity: 0.32; }
  50%       { transform: scale(1.05); opacity: 0.55; }
}

.ring-3 { animation-name: pulse-ring-3; }
@keyframes pulse-ring-3 {
  0%, 100% { transform: scale(1);    opacity: 0.55; }
  50%       { transform: scale(1.05); opacity: 0.8; }
}

.avatar-circle {
  position: relative;
  z-index: 2;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2.5px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 40px rgba(var(--accent-rgb), 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.avatar-initials {
  font-family: var(--font-mono);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 6px;
  margin-left: 6px;
}

.avatar-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
}

/* ── Scroll cue ── */

.hero-scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-subtle);
  animation: bounce 2.5s ease-in-out infinite;
  transition: color var(--transition);
}

.hero-scroll-cue:hover { color: var(--accent); }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}


/* =============================================================================
   9. ABOUT
   ============================================================================= */

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.about-text p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
}

.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.12);
}

.stat-value {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
  line-height: 1;
}

.stat-label {
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 500;
}


/* =============================================================================
   10. EXPERIENCE TIMELINE
   ============================================================================= */

.timeline {
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 21px;
  top: 52px;
  bottom: 28px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--border) 50%, transparent);
}

.timeline-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0 24px;
  padding-bottom: 40px;
  transition-delay: var(--delay, 0s);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

/* ── Company logo ── */

.tl-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  margin-top: 2px;
  box-shadow: var(--shadow-card);
  z-index: 1;
}

.tl-logo-fb {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--accent);
  font-family: var(--font-mono);
  line-height: 1;
  user-select: none;
}

.tl-logo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 7px;
  background: var(--bg-card);
}

/* ── Entry body ── */

.tl-body {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-subtle);
  min-width: 0;
}

.timeline-item:last-child .tl-body {
  border-bottom: none;
  padding-bottom: 0;
}

.tl-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}

.tl-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.tl-company {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
}

.tl-promotion {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--accent-2);
  background: rgba(var(--accent-2-rgb), 0.1);
  border: 1px solid rgba(var(--accent-2-rgb), 0.25);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.tl-period {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.tl-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  font-size: 0.82rem;
}

.tl-role {
  font-weight: 600;
  color: var(--accent-2);
}

.tl-sep {
  color: var(--text-subtle);
  font-size: 0.68rem;
}

.tl-type { color: var(--text-muted); }

.tl-location {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--text-subtle);
}

.tl-location svg { flex-shrink: 0; }

.tl-bullets {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 16px;
  list-style: none;
  padding: 0;
}

.tl-bullets li {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  padding-left: 18px;
  position: relative;
}

.tl-bullets li::before {
  content: '▹';
  position: absolute;
  left: 0;
  top: 2px;
  color: var(--accent);
  font-size: 0.75rem;
}

/* Tech chips (used in experience + projects) */
.tech-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}

.tech-chip {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 4px 9px;
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}


/* =============================================================================
   11. SKILLS
   ============================================================================= */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.skill-category {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
  transition-delay: var(--delay, 0s);
}

.skill-category:hover {
  border-color: rgba(var(--accent-rgb), 0.3);
  box-shadow: var(--shadow);
}

.skill-cat-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent-2);
  margin-bottom: 16px;
  font-family: var(--font-mono);
}

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

.skill-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 5px 10px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  cursor: default;
  white-space: nowrap;
}

.skill-badge:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  transform: translateY(-1px);
}


/* =============================================================================
   12. PROJECTS
   ============================================================================= */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-card);
  transition-delay: var(--delay, 0s);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(var(--accent-rgb), 0.35);
}

.project-card--placeholder {
  border-style: dashed;
  opacity: 0.75;
}

.project-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.project-icon {
  color: var(--accent);
  display: flex;
}

.project-icon svg {
  width: 28px;
  height: 28px;
}

.project-links {
  display: flex;
  gap: 10px;
}

.project-link {
  display: flex;
  align-items: center;
  color: var(--text-subtle);
  transition: color var(--transition);
}

.project-link:hover { color: var(--accent); }

.project-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

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

.placeholder-hint {
  font-size: 0.72rem;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-style: italic;
  margin-top: auto;
}

.project-url {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  transition: color var(--transition);
  min-width: 0;
  overflow: hidden;
}

.project-url:hover { color: var(--accent); }

.project-url svg { flex-shrink: 0; }

.project-url span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* =============================================================================
   13. ACHIEVEMENTS
   ============================================================================= */

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.achievement-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
  transition-delay: var(--delay, 0s);
}

.achievement-card:hover {
  border-color: rgba(var(--accent-rgb), 0.3);
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.achievement-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.achievement-content {
  flex: 1;
  min-width: 0;
}

.achievement-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.achievement-org {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.achievement-year {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-subtle);
  white-space: nowrap;
  flex-shrink: 0;
}


/* =============================================================================
   14. EDUCATION
   ============================================================================= */

.education-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.education-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
  flex-wrap: wrap;
}

.education-card:hover {
  border-color: rgba(var(--accent-rgb), 0.3);
  box-shadow: var(--shadow);
}

.education-inst {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.education-degree {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.education-cgpa {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.education-cgpa strong {
  color: var(--accent);
  font-family: var(--font-mono);
}

.education-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.education-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}


/* =============================================================================
   15. CONTACT
   ============================================================================= */

.contact-content {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.contact-text {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.contact-cta {
  gap: 10px;
}

.contact-socials {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.contact-social-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: all var(--transition);
}

.contact-social-item:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.05);
  transform: translateX(4px);
}

.contact-social-item svg {
  flex-shrink: 0;
  color: var(--accent);
}

/* ── Contact form ── */

.contact-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 11px 15px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.5;
  outline: none;
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-subtle);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}

.form-group textarea {
  min-height: 130px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.form-status {
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  flex: 1;
}

.form-status--success {
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  color: var(--accent);
}

.form-status--error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
}


/* =============================================================================
   16. FOOTER
   ============================================================================= */

#footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-credit {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-credit strong {
  color: var(--accent);
}

.footer-year {
  font-size: 0.8rem;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}


/* =============================================================================
   17. SCROLL-TO-TOP
   ============================================================================= */

.scroll-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 50;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.scroll-top:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}


/* =============================================================================
   18. RESPONSIVE
   ============================================================================= */

@media (max-width: 1024px) {
  .skills-grid    { grid-template-columns: repeat(2, 1fr); }
  .projects-grid  { grid-template-columns: repeat(2, 1fr); }
  .about-layout   { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 768px) {
  section { padding: 72px 0; }

  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }

  .hero-container {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
    justify-items: center;
    padding-top: calc(var(--nav-h) + 56px);
    padding-bottom: 80px;
    min-height: unset;
  }

  .hero-content { align-items: center; }
  .hero-tagline { text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-socials { justify-content: center; }
  .hero-visual  { order: -1; }

  .hero-avatar { width: 200px; height: 200px; }
  .ring-1      { width: 200px; height: 200px; }
  .ring-2      { width: 174px; height: 174px; }
  .ring-3      { width: 148px; height: 148px; }
  .avatar-circle { width: 120px; height: 120px; }
  .avatar-initials { font-size: 1.8rem; letter-spacing: 4px; }

  .hero-scroll-cue { display: none; }

  .timeline::before { left: 19px; }
  .timeline-item { grid-template-columns: 40px 1fr; gap: 0 14px; }
  .tl-logo { width: 40px; height: 40px; }
  .tl-header { flex-direction: column; gap: 3px; }
  .tl-period { align-self: flex-start; }

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

  .about-stats { grid-template-columns: repeat(2, 1fr); }

  .education-card { flex-direction: column; align-items: flex-start; }
  .education-meta { align-items: flex-start; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-container { padding-top: calc(var(--nav-h) + 80px); }
  .hero-actions { flex-direction: column; width: 100%; }
  .btn { justify-content: center; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .footer-content { justify-content: center; text-align: center; }
}


/* =============================================================================
   19. PRINT
   ============================================================================= */

@media print {
  /* Force light theme for printing */
  :root, [data-theme="dark"] {
    --bg:         #ffffff;
    --bg-card:    #f8fafc;
    --text:       #1a1a1a;
    --text-muted: #444444;
    --accent:     #1a7a45;
    --accent-2:   #1a5f9e;
    --border:     #cccccc;
    --shadow:     none;
    --shadow-hover: none;
    --shadow-card:  none;
  }

  /* Hide non-content chrome */
  #navbar,
  #mobile-menu,
  .scroll-top,
  .hero-scroll-cue,
  .hero-badge,
  .hero-socials,
  .hero-actions,
  .hero-bg,
  .hero-visual,
  .mobile-menu-btn,
  .theme-toggle,
  .placeholder-hint,
  .contact-form,
  #footer {
    display: none !important;
  }

  /* Reset layout for print */
  body {
    background: #fff;
    color: #1a1a1a;
    font-size: 10pt;
  }

  section {
    padding: 24pt 0;
    page-break-inside: avoid;
    background: #fff !important;
  }

  /* Reveal everything immediately */
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Hero: single column, compact */
  #hero {
    min-height: unset;
    padding: 24pt 0 12pt;
  }

  .hero-container {
    display: block;
    min-height: unset;
    padding-top: 0;
  }

  .hero-name  { font-size: 28pt; }
  .hero-title { font-size: 14pt; }

  /* Grids: 2-col for print */
  .skills-grid       { grid-template-columns: repeat(2, 1fr); }
  .projects-grid     { grid-template-columns: repeat(2, 1fr); }
  .achievements-grid { grid-template-columns: repeat(2, 1fr); }
  .about-layout      { grid-template-columns: 1fr 1fr; }
  .about-stats       { grid-template-columns: repeat(2, 1fr); }

  /* Remove hover transforms / shadows */
  .timeline-content,
  .project-card,
  .achievement-card,
  .education-card,
  .stat-card {
    transform: none !important;
    box-shadow: none !important;
    border-color: var(--border) !important;
  }

  /* Timeline: cleaner for print */
  .timeline-dot {
    box-shadow: none;
  }

  /* Ensure links show URL in print */
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #666;
  }

  /* But not for buttons or social links */
  .btn::after,
  .hero-social-link::after,
  .nav-link::after,
  .contact-social-item::after,
  .project-link::after {
    content: none !important;
  }

  /* Page breaks */
  #experience { page-break-before: auto; }
  .timeline-item { page-break-inside: avoid; }
}
