/* ==========================================================
   SANJAY MATHIVANAN — Premium Portfolio
   Design System & Complete Styles
   ========================================================== */

/* === Google Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700;800&display=swap');

/* === Custom Properties — Light Mode === */
:root {
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-light: rgba(37, 99, 235, 0.08);
  --primary-glow: rgba(37, 99, 235, 0.25);
  --secondary: #0F172A;
  --accent: #38BDF8;
  --accent-light: rgba(56, 189, 248, 0.08);
  --bg: #FAFAFA;
  --bg-secondary: #F1F5F9;
  --bg-card: #FFFFFF;
  --text: #111827;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border: rgba(0, 0, 0, 0.06);
  --border-strong: rgba(0, 0, 0, 0.1);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 40px -8px rgba(0, 0, 0, 0.1);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.2);
  --gradient-primary: linear-gradient(135deg, #2563EB 0%, #38BDF8 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(37, 99, 235, 0.04) 0%, rgba(56, 189, 248, 0.04) 100%);
  --gradient-card: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  --font-heading: 'Poppins', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --section-py: 100px;
  --container: min(1200px, 90vw);
  --nav-h: 72px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

/* === Dark Mode === */
[data-theme="dark"] {
  --bg: #0B1121;
  --bg-secondary: #111B2E;
  --bg-card: #152036;
  --text: #E2E8F0;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.1);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.5);
  --glass-bg: rgba(11, 17, 33, 0.82);
  --glass-border: rgba(30, 41, 59, 0.4);
  --primary-light: rgba(37, 99, 235, 0.12);
  --accent-light: rgba(56, 189, 248, 0.1);
  --gradient-subtle: linear-gradient(135deg, rgba(37, 99, 235, 0.06) 0%, rgba(56, 189, 248, 0.06) 100%);
  --gradient-card: linear-gradient(145deg, var(--bg-card) 0%, rgba(21, 32, 54, 0.6) 100%);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; transition: color 0.3s var(--ease); }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea { font-family: inherit; }

/* === Utility === */
.container { width: var(--container); margin: 0 auto; }

.section {
  padding: var(--section-py) 0;
  position: relative;
}

/* === Card Transitions & Standard Hover Effects === */
.project-card,
.skill-category,
.experience-card,
.edu-card,
.cert-card,
.achievement-card,
.coding-profile-card,
.knowledge-card,
.info-card {
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease) !important;
}

.project-card:hover,
.skill-category:hover,
.experience-card:hover,
.edu-card:hover,
.cert-card:hover,
.achievement-card:hover,
.coding-profile-card:hover,
.knowledge-card:hover,
.info-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.15) !important;
  border-color: var(--primary) !important;
}

.section-header {
  text-align: center;
  margin-bottom: 48px; /* 48px between header content and section content */
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 32px; /* 32px between badge and title */
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 24px; /* 24px between title and subtitle */
  letter-spacing: -0.02em;
}

.section-header > *:last-child {
  margin-bottom: 0;
}

.section-subtitle {
  font-size: clamp(16px, 1.8vw, 18px);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === Loading Screen === */
#loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loader-name {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

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

/* === Scroll Progress === */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-primary);
  z-index: 10001;
  width: 0%;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* === Navigation === */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 1000;
  transition: all 0.4s var(--ease);
}

#navbar.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  width: var(--container);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo .logo-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  display: inline-block;
}

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

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
  transition: color 0.3s var(--ease);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
  transition: width 0.3s var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 18px;
  transition: all 0.3s var(--ease);
  background: transparent;
}

.theme-toggle:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: var(--radius-sm);
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* === Hero Section === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.4;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  min-height: calc(100vh - var(--nav-h));
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-greeting {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 20px;
  min-height: 80px;
}

.hero-title .static-text {
  color: var(--text-secondary);
}

.typing-wrapper {
  display: block;
}

.typing-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1.1em;
  background: var(--primary);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}

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

.hero-description {
  font-size: clamp(15px, 1.6vw, 17px);
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
  max-width: 520px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hero-social {
  display: flex;
  gap: 12px;
}

.hero-social a {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-size: 18px;
  transition: all 0.3s var(--ease);
}

.hero-social a:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-3px);
}

/* Hero Image */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image-wrapper {
  position: relative;
  width: clamp(300px, 85%, 440px);
  aspect-ratio: 3/4;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--secondary);
  box-shadow: var(--shadow-xl);
}

.hero-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
  pointer-events: none;
}

.hero-float-card {
  position: absolute;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  animation: float 6s ease-in-out infinite;
  z-index: 3;
}

.hero-float-card.top-right {
  top: 10%;
  right: -10%;
  animation-delay: 0s;
}

.hero-float-card.bottom-left {
  bottom: 15%;
  left: -8%;
  animation-delay: -3s;
}

.float-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.float-icon.blue { background: var(--primary-light); color: var(--primary); }
.float-icon.cyan { background: var(--accent-light); color: var(--accent); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* === Who I Am === */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.about-content .section-label { margin-bottom: 12px; }

.about-content .section-title {
  text-align: left;
  margin-bottom: 20px;
}

.about-text {
  font-size: clamp(15px, 1.6vw, 17px);
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 16px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.about-stat {
  text-align: center;
  padding: 16px 10px;
  background: var(--gradient-subtle);
  border-radius: 16px;
  border: 1px solid var(--border);
}

.about-stat .stat-number {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  display: block;
}

.about-stat .stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.about-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.about-card-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
  max-width: 420px;
}

.info-card {
  padding: 24px;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.info-card .card-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.info-card .card-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.info-card .card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* === Journey / Timeline === */
.journey-timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

/* Center vertical line */
.journey-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  opacity: 0.18;
  transform: translateX(-50%);
  border-radius: 2px;
}

/* Each row */
.journey-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px; /* Reduced vertical spacing */
  width: 100%;
}

/* Left card — card on the left, dot in center */
.journey-left {
  justify-content: flex-start;
  padding-right: calc(50% + 20px);
}

/* Right card — card on the right, dot in center */
.journey-right {
  justify-content: flex-end;
  padding-left: calc(50% + 20px);
}

/* Center dot */
.journey-dot {
  position: absolute;
  left: 50%;
  top: 18px;
  width: 10px;
  height: 10px;
  background: var(--bg-card);
  border: 2px solid var(--primary);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 2;
  transition: all 0.3s var(--ease);
}

.journey-dot-active {
  background: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.journey-item:hover .journey-dot {
  background: var(--primary);
  transform: translateX(-50%) scale(1.3);
}

/* Card */
.journey-card {
  padding: 12px 16px; /* Reduced padding (approx 25% size reduction) */
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: all 0.3s var(--ease);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}

.journey-left .journey-card {
  text-align: right;
  flex-direction: row-reverse;
  flex-wrap: wrap-reverse;
}

.journey-left .journey-card p {
  text-align: right;
}

.journey-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.journey-left:hover .journey-card {
  transform: translateX(-4px);
}

.journey-right:hover .journey-card {
  transform: translateX(4px);
}

/* Year pill */
.journey-year {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.journey-year-active {
  background: var(--primary);
  color: #fff;
}

.journey-emoji {
  font-size: 16px; /* Reduced icon size slightly */
  line-height: 1;
  flex-shrink: 0;
}

.journey-card h4 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  flex: 1;
  min-width: 100px;
}

.journey-card p {
  font-size: 13px;
  color: var(--text-muted);
  width: 100%;
  margin-top: -4px;
  line-height: 1.4;
}

/* Mobile — single column */
@media (max-width: 768px) {
  .journey-timeline::before {
    left: 16px;
    transform: none;
  }
  .journey-left,
  .journey-right {
    padding-left: 44px;
    padding-right: 0;
    justify-content: flex-start;
  }
  .journey-left .journey-card {
    text-align: left;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .journey-left .journey-card p {
    text-align: left;
  }
  .journey-dot {
    left: 16px;
    top: 14px;
    width: 8px;
    height: 8px;
  }
  .journey-left:hover .journey-card,
  .journey-right:hover .journey-card {
    transform: translateX(4px);
  }
  .journey-card {
    padding: 10px 14px;
    gap: 10px;
  }
}

/* === Projects Slider === */
.projects-carousel-wrap {
  position: relative;
  width: 100%;
  max-width: 1068px; /* 3 * 340px + 2 * 24px gap */
  margin: 0 auto;
  padding: 0 16px;
}

.projects-carousel {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  align-items: stretch; /* Stretch cards to match the tallest card */
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
  scroll-snap-type: x mandatory;
  padding: 16px 0; /* space for card hover glow and shadow */
  width: 100%;
}

.projects-carousel::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.project-card {
  flex: 0 0 340px;
  width: 340px;
  height: auto; /* Allow heights to grow dynamically */
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: relative;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.18); /* Soft blue hover glow */
  border-color: var(--primary);
}

.project-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
  border-radius: 16px 16px 0 0;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.project-card:hover .project-image img {
  transform: scale(1.08); /* Slight image zoom on hover */
}

.project-image .project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 16px;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-info {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-name {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.project-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Maximum 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 42px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
  overflow: hidden;
  height: 28px;
}

.project-tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

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

.project-link {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  height: 42px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}

.project-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
}

/* Arrows styling */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: all 0.3s var(--ease);
  z-index: 10;
}

.carousel-arrow:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.carousel-arrow.carousel-prev {
  left: -22px;
}

.carousel-arrow.carousel-next {
  right: -22px;
}

/* === Knowledge Hub === */
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
  align-items: stretch;
}

.knowledge-card {
  padding: 24px;
  background: var(--gradient-subtle);
  border: 1px solid var(--border);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.knowledge-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

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

.knowledge-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.knowledge-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.knowledge-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.knowledge-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.knowledge-links {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  width: 100%;
}

.knowledge-link {
  flex: 1;
  height: 42px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease);
  white-space: nowrap;
  background: var(--bg-card);
  color: var(--text);
  margin-top: auto;
  text-decoration: none;
  cursor: pointer;
}

.knowledge-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
}

.knowledge-link.primary-btn {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.knowledge-link.primary-btn:hover {
  background: var(--primary-hover);
  color: #ffffff;
  border-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

/* === Skills === */
.skills-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.skill-category {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.skill-category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.skill-category-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--primary-light);
  color: var(--primary);
}

.skill-category-name {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease);
}

.skill-tag:hover {
  color: var(--primary);
  background: var(--primary-light);
  border-color: var(--primary);
}

/* === Experience === */
.experience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 1068px; /* Standardized width matching projects section */
  margin: 0 auto 32px;
}

.experience-card {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.experience-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.experience-icon-box {
  width: 44px;
  height: 44px;
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--primary);
  flex-shrink: 0;
}

.experience-header-text {
  display: flex;
  flex-direction: column;
}

.experience-role {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.experience-company {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  margin-top: 4px;
}

.experience-duration {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.experience-duration i {
  font-size: 14px;
}

.experience-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
  width: 100%;
}

.experience-points {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  flex: 1;
}

.experience-points li {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: 20px;
  position: relative;
}

.experience-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

.experience-tech-section {
  margin-bottom: 16px;
}

.experience-tech-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.experience-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.experience-buttons {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.experience-btn {
  flex: 1;
  height: 42px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease);
  white-space: nowrap;
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
}

.experience-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
}


/* === Education === */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 820px;
  margin: 0 auto;
}

.edu-card {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.edu-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.edu-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

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

.edu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.edu-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.edu-icon-secondary {
  background: var(--accent-light);
  color: var(--accent);
}

.edu-year {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.edu-degree {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.edu-institute {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.5;
}

.edu-institute i {
  color: var(--text-muted);
  font-size: 14px;
  flex-shrink: 0;
}

.edu-score {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gradient-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 8px 20px;
  margin-top: auto;
  align-self: flex-start;
}

.edu-score-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.edu-score-value {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

@media (max-width: 768px) {
  .edu-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
  .edu-card {
    padding: 24px;
  }
}

/* === Certifications === */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.cert-card {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.cert-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.cert-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.cert-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.cert-org {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.cert-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  transition: gap 0.3s var(--ease);
  margin-top: auto;
  align-self: center;
}

.cert-link:hover {
  gap: 10px;
}

/* === Certifications Summary === */
.cert-summary-container {
  max-width: 960px;
  margin: 48px auto 0 auto;
}

.cert-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.cert-summary-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.cert-summary-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.cert-summary-icon {
  font-size: 24px;
  color: var(--primary);
}

.cert-summary-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.cert-summary-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.cert-stats {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.cert-stat-item {
  display: flex;
  flex-direction: column;
}

.cert-stat-num {
  font-size: 48px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  font-family: var(--font-heading);
}

.cert-stat-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-top: 4px;
}

.cert-stat-divider {
  height: 1px;
  background: var(--border);
  width: 100%;
}

.cert-stat-sub-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cert-stat-sub {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.cert-sub-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-heading);
}

.cert-sub-label {
  font-size: 13px;
  color: var(--text-muted);
}

.cert-domains {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cert-domains-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cert-domain-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cert-domain-tag {
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  background: var(--primary-light);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(37, 99, 235, 0.1);
  transition: all 0.3s var(--ease);
}

.cert-domain-tag:hover {
  transform: translateY(-2px);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
}

@media (max-width: 768px) {
  .cert-summary-content {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* === Achievements === */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.achievement-card {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
}

.achievement-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.achievement-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--gradient-subtle);
  border: 1px solid var(--border);
}

.achievement-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.achievement-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.achievement-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 500;
}



/* === GitHub === */
.github-section {
  background: var(--bg-secondary);
}

.github-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.github-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.github-repo-card {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease);
}

.github-repo-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.repo-name {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.repo-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.repo-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

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

.lang-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* === Contact === */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.contact-info {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.contact-info h3 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.contact-info > p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.3s var(--ease);
}

.contact-item:hover {
  color: var(--primary);
}

.contact-item-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--primary-light);
  color: var(--primary);
  flex-shrink: 0;
}

.contact-socials {
  display: flex;
  gap: 10px;
}

.contact-socials a {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease);
}

.contact-socials a:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-3px);
}

.contact-form-wrapper {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  transition: all 0.3s var(--ease);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.btn-submit {
  width: 100%;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.btn-submit:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

/* === Coding Profiles === */
.coding-profiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.coding-profile-card {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.coding-profile-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.coding-profile-card .profile-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.coding-profile-card .profile-name {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.coding-profile-card .profile-stat {
  font-size: 13px;
  color: var(--text-muted);
}

/* === Footer === */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-copyright {
  font-size: 14px;
  color: var(--text-muted);
}

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

.footer-credit a {
  color: var(--primary);
  font-weight: 500;
}

/* === Scroll Reveal Animations === */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Hero entrance */
.hero-content > * {
  opacity: 0;
  transform: translateY(20px);
  animation: heroEnter 0.8s var(--ease) forwards;
}

.hero-content > *:nth-child(1) { animation-delay: 0.2s; }
.hero-content > *:nth-child(2) { animation-delay: 0.35s; }
.hero-content > *:nth-child(3) { animation-delay: 0.5s; }
.hero-content > *:nth-child(4) { animation-delay: 0.6s; }
.hero-content > *:nth-child(5) { animation-delay: 0.7s; }
.hero-content > *:nth-child(6) { animation-delay: 0.8s; }
.hero-content > *:nth-child(7) { animation-delay: 0.9s; }

.hero-visual {
  opacity: 0;
  transform: translateX(40px);
  animation: heroVisualEnter 1s var(--ease) 0.4s forwards;
}

@keyframes heroEnter {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes heroVisualEnter {
  to { opacity: 1; transform: translateX(0); }
}

/* === Responsive Design === */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { order: -1; }
  .hero-image-wrapper { width: clamp(240px, 60%, 340px); margin: 0 auto; }
  .hero-content { text-align: center; }
  .hero-description { margin: 0 auto 32px; }
  .hero-buttons { justify-content: center; }
  .hero-social { justify-content: center; }
  .hero-float-card { display: none; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-content .section-title { text-align: center; }
  .about-content .section-label { margin: 0 auto 12px; display: flex; justify-content: center; }
  .about-text { text-align: center; }
  .about-card-stack { max-width: 100%; }

  .projects-carousel-wrap { max-width: 704px; }
  .skills-container { grid-template-columns: repeat(2, 1fr); }
  .experience-grid { grid-template-columns: 1fr; max-width: 600px; }
  .github-stats { grid-template-columns: repeat(2, 1fr); }
  .github-cards { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .achievements-grid { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: 1fr; max-width: 400px; }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 64px;
  }

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

  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    padding: 32px;
    gap: 24px;
    z-index: 999;
    animation: slideDown 0.3s var(--ease);
  }

  .nav-links.mobile-open a {
    font-size: 18px;
  }

  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .hero { min-height: auto; padding: calc(var(--nav-h) + 40px) 0 60px; }
  .hero-name { font-size: clamp(28px, 8vw, 40px); }
  .hero-title { font-size: clamp(16px, 4vw, 20px); min-height: 60px; }

  .about-stats { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .about-stat { padding: 16px 8px; }
  .about-stat .stat-number { font-size: 22px; }
  .about-card-stack { grid-template-columns: 1fr 1fr; gap: 12px; }

  .projects-carousel-wrap { max-width: 340px; padding: 0; }
  .carousel-arrow { display: none; }

  .skills-container { grid-template-columns: 1fr; }
  .knowledge-grid { grid-template-columns: 1fr; }
  .coding-profiles { grid-template-columns: 1fr; max-width: 300px; margin: 32px auto 0; }

  .edu-card { padding: 20px; }
  .edu-degree { font-size: 17px; }
}

@media (max-width: 480px) {
  .hero-buttons { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .about-stats { grid-template-columns: 1fr; }
  .github-stats { grid-template-columns: 1fr; }
}

/* === Print Styles === */
@media print {
  .hero-float-card, #navbar, #scroll-progress, .theme-toggle, .mobile-toggle { display: none; }
  .section { page-break-inside: avoid; }
  body { font-size: 12pt; }
}

/* === Toast Notification === */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  color: var(--text);
  padding: 12px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.4s var(--ease-spring), opacity 0.4s var(--ease);
  z-index: 10002;
  font-size: 14px;
  font-weight: 500;
  pointer-events: none;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 768px) {
  .toast {
    left: 20px;
    right: 20px;
    bottom: 20px;
    justify-content: center;
    transform: translateY(50px);
  }
}
