/* Global Styles */
:root {
  --primary-color: #2C5F8F;
  --secondary-color: #1a1a2e;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --accent-color: #C06C84; /* This accent color can be used more creatively */
  --highlight-color: #A68A57;

  /* AI color system */
  --ai-primary: #4f9cff;    /* cool blue */
  --ai-secondary: #6fbaff;  /* lighter cyan */
  --ai-highlight: #7dd3fc;  /* bright highlight for pulses */
  --identity-gold: #e6c98a; /* name highlight */
  --identity-gold-dark: #d6b977;

  /* Hero background stops */
  --bg-top: #2a2f45;
  --bg-mid: #1b1f33;
  --bg-base: #121624;

  --text-color-dark-bg: #E0E0E0;
  --text-color-light-bg: #343a40;
  --text-light: #6c757d;
  --transition-speed: 0.3s;
  --border-radius: 15px;
  /* Button system tokens */
  --btn-radius: 12px;
  --btn-padding-y: 0.7rem;
  --btn-padding-x: 1.4rem;
  --btn-font-size: clamp(0.9rem, 1.6vw, 1rem);
  --btn-shadow: 0 6px 18px rgba(44,95,143,0.14);
  --btn-shadow-hover: 0 10px 28px rgba(44,95,143,0.18);
  --btn-focus-ring: 0 0 0 4px rgba(44,95,143,0.14);
  --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-heavy: 0 15px 40px rgba(0, 0, 0, 0.15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.7;
  color: var(--text-color-light-bg);
  background-color: #f9f9f9;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: all var(--transition-speed) ease;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--secondary-color);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

section {
  padding: 4rem 0;
  position: relative; /* For potential future animations */
}

/* Responsive Typography */
h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
}

p {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: linear-gradient(180deg, var(--ai-primary), var(--ai-secondary));
  color: #ffffff;
  padding: var(--btn-padding-y) var(--btn-padding-x);
  border: none;
  border-radius: var(--btn-radius);
  cursor: pointer;
  transition: transform 160ms var(--transition-speed), box-shadow 160ms var(--transition-speed), opacity 160ms var(--transition-speed), background 160ms var(--transition-speed);
  font-weight: 600;
  box-shadow: 0 8px 28px rgba(32, 64, 120, 0.18);
  font-size: var(--btn-font-size);
  min-height: 48px; /* Improved touch target */
  line-height: 1;
}

.btn:hover {
  transform: translateY(-4px);
  box-shadow: var(--btn-shadow-hover);
}

.btn:active {
  transform: translateY(-1px) scale(0.995);
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

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

/* Outline / ghost variant */
.btn-outline {
  background: transparent;
  color: #eaf6ff; /* brighter text */
  border: 1px solid rgba(79,156,255,0.18); /* visible outline using AI accent */
  box-shadow: none;
  cursor: pointer;
}

.btn-outline:hover {
  background: rgba(79,156,255,0.10);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(79,156,255,0.16);
}

.btn-outline:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(79,156,255,0.14);
  background: rgba(79,156,255,0.10);
  color: #fff;
} 

/* Disabled state */
.btn[disabled], .btn.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Make 'Visit Medium Profile' and 'View PDF' outlines more visible */
.blog .btn-outline, .publication-card .btn-outline {
  border-color: rgba(79,156,255,0.18);
  color: var(--ai-primary); /* readable on white cards */
}

.publication-card .btn-outline {
  border-width: 1.25px;
  padding: calc(var(--btn-padding-y) - 2px) var(--btn-padding-x);
}


/* Focus for keyboard users */
.btn:focus-visible, .mobile-menu-toggle:focus-visible, .terminal-toggle:focus-visible, .btn-outline:focus-visible {
  outline: none;
  box-shadow: var(--btn-focus-ring);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .btn, .btn-outline { transition: none !important; }
}

/* Header & Navigation */
header {
  background: rgba(26, 26, 46, 0.95);
  color: var(--text-color-dark-bg);
  padding: 0.8rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  transition: all var(--transition-speed) ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color-dark-bg);
  text-decoration: none;
}

nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 1rem;
  margin: 0;
}

nav ul li a {
  color: var(--text-color-dark-bg);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  transition: all var(--transition-speed) ease;
  white-space: nowrap;
  font-size: 0.95rem;
}

nav ul li a:hover {
  color: var(--primary-color);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px); /* Subtle hover for nav items */
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-color-dark-bg);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 10px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: rgba(26, 26, 46, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.mobile-menu.active {
  display: block;
}

.mobile-menu ul {
  flex-direction: column;
  padding: 1rem 0;
  gap: 0;
}

.mobile-menu ul li a {
  display: block;
  padding: 1rem 2rem;
  border-radius: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* Cinematic deep blue-charcoal gradient + subtle radial depth */
  background-image:
    radial-gradient(circle at 18% 12%, rgba(79,156,255,0.03), transparent 18%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 50%, var(--bg-base) 100%);
  background-size: cover;
  background-position: center center;
  color: var(--text-color-dark-bg);
  position: relative;
  padding: 5rem 1rem 2rem;
  overflow: hidden; /* Ensure no overflow from potential animations */
}

/* Canvas for geometric animation */
#hero-background-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Place it behind the content */
    opacity: 0.22; /* Slightly dimmer to preserve text contrast */
    pointer-events: none; /* Ensure canvas doesn't intercept input */
}
.hero-content {
  max-width: 800px;
  width: 100%;
  padding: 0 1rem;
  position: relative; /* To be above the ::before pseudo-element */
  z-index: 2; /* Ensure content is above canvas */
}

.hero-content h1 {
  margin-bottom: 1.5rem;
  line-height: 1.2;
  color: #f5f7fb; /* off-white for premium readability */
  display: inline-block;
}

/* Identity highlight (use sparingly) */
.hero-content h1 .highlight {
  color: var(--identity-gold);
  -webkit-text-fill-color: var(--identity-gold);
  text-shadow: 0 1px 0 rgba(0,0,0,0.08);
}

.hero-content h2 {
  margin-bottom: 2.5rem;
  font-weight: 400;
  opacity: 0.95;
  color: rgba(245, 247, 251, 0.75); /* subtle off-white */
}

/* Typing role */
.typed-role {
  font-weight: 600;
  color: #fff;
  display: inline-block;
  position: relative;
  padding-right: 6px;
}
.typed-role::after {
  content: '';
  display: inline-block;
  width: 1px;
  height: 1.05em;
  background: rgba(255,255,255,0.95);
  margin-left: 6px;
  vertical-align: middle;
  animation: blink 1.1s steps(2, start) infinite;
}

/* Hero stats */
.hero-stats {
  margin-top: 2rem;
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.hero-stats .stat {
  text-align: center;
  min-width: 120px;
}
.hero-stats .stat-value {
  font-size: clamp(1.4rem, 3.2vw, 2.2rem);
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, #ffffff, var(--highlight-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  display: inline-block;
  transition: opacity 300ms ease, transform 300ms ease;
}
.hero-stats .stat-label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.9);
  margin-top: 6px;
}

/* Respect user reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .typed-role::after { animation: none; }
  .hero-stats .stat-value { transition: none; }
}


.hero-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-down {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: floatBounce 2s infinite ease-in-out;
}

.scroll-down a {
  color: var(--accent-color);
  font-size: 1.8rem;
  opacity: 0.8;
  transition: all var(--transition-speed) ease;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.4));
}

.scroll-down a:hover {
  opacity: 1;
  color: var(--highlight-color);
  transform: scale(1.1);
}

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

/* ============================================= */
/* TEXT REVEAL ANIMATION - "Hi, I'm Athar Sayed" */
/* ============================================= */

.hero-content h1 {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.animate-word {
    opacity: 0;
    transform: translateY(30px);
    display: inline-block;
    animation: fadeInUp 0.8s ease-out forwards;
    will-change: transform, opacity;
}

/* Sequential delays */
.hero-content h1 .animate-word:nth-child(1) { animation-delay: 0.3s; }
.hero-content h1 .animate-word:nth-child(2) { animation-delay: 0.6s; }
.hero-content h1 .animate-word:nth-child(3) { animation-delay: 0.9s; }
.hero-content h1 .animate-word:nth-child(4) { animation-delay: 1.2s; }

/* Highlighted name keeps gradient */
.hero-content h1 .highlight {
    background: linear-gradient(90deg, #ffffff, var(--highlight-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

/* Keyframe animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .animate-word {
        animation: none !important;
        opacity: 1;
        transform: translateY(0);
    }
}

/* Optional: Add slight bounce to the last word for emphasis */
.hero-content h1 .animate-word:nth-child(4) {
    animation: fadeInUpBounce 1s ease-out 1.2s forwards;
}

@keyframes fadeInUpBounce {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    60% {
        opacity: 1;
        transform: translateY(-8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Terminal Toggle Icon */
.terminal-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  width: 56px;
  height: 56px;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  flex-shrink: 0;
}

.terminal-toggle:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 14px 40px rgba(102, 126, 234, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.35);
}

.terminal-toggle:active {
  transform: translateY(-2px) scale(0.98);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.terminal-toggle .toggle-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(239, 68, 68, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border: 2.5px solid #fff;
  animation: badgePulse 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* AI Terminal */
.ai-terminal {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%) scale(0.92);
  opacity: 0;
  max-width: 750px;
  width: 90%;
  margin: 0;
  background: linear-gradient(180deg, rgba(248, 248, 255, 0.99) 0%, rgba(242, 242, 252, 0.99) 100%);
  border: 1.5px solid rgba(200, 200, 230, 0.4);
  border-radius: 20px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 0 40px rgba(99, 102, 241, 0.08);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Poppins', sans-serif;
  color: #1a1a2e;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  z-index: 1000;
  display: none;
  transition: all 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(10px);
}

.ai-terminal.active {
  display: flex;
  flex-direction: column;
  opacity: 1;
  transform: translateY(-50%) scale(1);
  animation: terminalSlideIn 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes terminalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50%) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

.terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(248, 248, 255, 0.4) 100%);
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid rgba(200, 200, 230, 0.25);
  gap: 1rem;
  backdrop-filter: blur(25px);
}

.terminal-title-section {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.terminal-title {
  color: #6366f1;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  text-shadow: 0 1px 2px rgba(99, 102, 241, 0.1);
}

.terminal-subtitle {
  color: #9ca3af;
  font-weight: 670;
  font-size: 0.70rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.terminal-powered-by {
  margin: 0;
}

.llama-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%);
  border: 1.5px solid rgba(99, 102, 241, 0.35);
  color: #6366f1;
  padding: 0.5rem 0.9rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  box-shadow: 0 3px 12px rgba(99, 102, 241, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  transition: all 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.llama-badge:hover {
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.22), inset 0 1px 1px rgba(255, 255, 255, 0.7);
  border-color: rgba(99, 102, 241, 0.55);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18) 0%, rgba(139, 92, 246, 0.18) 100%);
  transform: translateY(-2px);
}

.llama-badge i {
  font-size: 0.9rem;
}

.control-btn {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 150ms ease;
  border: none;
}

.control-btn.minimize {
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 2px 6px rgba(251, 191, 36, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Chat body and messages */
.chat-body {
  padding: 1rem;
  flex: 1;
  min-height: 190px;
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(248, 248, 255, 0.2) 100%);
}

.messages {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0;
  margin: 0;
}

.message {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  opacity: 0;
  animation: slideIn 320ms ease-out forwards;
}

.message .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.message .bubble {
  max-width: 78%;
  padding: 0.6rem 0.9rem;
  border-radius: 14px;
  line-height: 1.35;
  box-shadow: var(--shadow-light);
}

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.message.user .bubble {
  background: linear-gradient(180deg, #6366f1, #4f46e5);
  color: white;
  border-bottom-right-radius: 6px;
}
.message.user .avatar { background: #4f46e5; }

.message.assistant {
  align-self: flex-start;
}
.message.assistant .bubble {
  background: #f3f4f6;
  color: #1f2937;
  border-bottom-left-radius: 6px;
}
.message.assistant .avatar { background: #10b981; }

.message.system .bubble {
  background: transparent;
  color: #6b7280;
  font-style: italic;
}

/* Typing indicator */
.bubble.typing {
  color: transparent;
  position: relative;
}
.bubble.typing::after {
  content: '';
  display: inline-block;
  width: 26px;
  height: 10px;
  background: radial-gradient(circle, rgba(0,0,0,0.25) 20%, rgba(0,0,0,0) 21%) 0 0/6px 6px;
  background-repeat: repeat-x;
  animation: typingDots 1s steps(3,end) infinite;
  vertical-align: middle;
}
@keyframes typingDots {
  0% { background-position: 0 0; }
  100% { background-position: 18px 0; }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.chat-input {
  display: flex;
  align-items: center;
  padding: 0.8rem 1rem;
  border-top: 1px solid rgba(200, 200, 230, 0.25);
  gap: 0.6rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, rgba(248, 248, 255, 0.12) 100%);
}

#terminal-input {
  background: #fff;
  border: 1px solid rgba(99, 102, 241, 0.12);
  color: #1d1d2e;
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Poppins', sans-serif;
  font-size: 0.95rem;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
}

#terminal-input::placeholder {
  color: rgba(99, 102, 241, 0.35);
  font-style: normal;
  font-weight: 500;
}

#terminal-input:focus {
  outline: none;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.08);
  border-color: #6366f1;
}

#terminal-input[disabled] {
  opacity: 0.6;
}

#chat-send {
  min-width: 72px;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
}

#chat-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


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

/* Mobile */
@media (max-width: 768px) {
  .ai-terminal {
    width: 95%;
    right: 2.5%;
    max-width: calc(100% - 5%);
  }
  
  .terminal-body {
    min-height: 110px;
    max-height: 260px;
  }
  
  .terminal-header {
    flex-wrap: wrap;
    gap: 0.6rem;
  }
  
  .terminal-powered-by {
    margin-left: auto;
    margin-right: 0;
  }
}

/* Section Headings */
section h2 {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--secondary-color);
  position: relative;
}

section h2 span {
  position: relative;
  z-index: 1;
  padding: 0 1rem;
}

section h2 span::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 15px;
  background: rgba(44, 95, 143, 0.2);
  z-index: -1;
  border-radius: 5px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.6s ease;
}

section h2:hover span::after {
  transform: scaleX(1);
}

/* About Section */
.about { background: #fff; }

.about-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: center;
}

.about-img {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-img img {
  width: 100%;
  max-width: 300px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  transition: all 0.5s ease;
  border: 5px solid var(--primary-color);
  outline: 5px solid rgba(192, 108, 132, 0.3);
  outline-offset: -5px;
}

.about-img:hover img {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-heavy);
  border-color: var(--accent-color);
  outline-color: var(--primary-color);
}

.about-text p {
  margin-bottom: 1.5rem;
  color: var(--text-color-light-bg);
  line-height: 1.8;
}

.education-details {
  margin: 2rem 0;
  display: grid;
  gap: 1.5rem;
}

.education-item {
  padding: 1.5rem;
  background: rgba(44, 95, 143, 0.08);
  border-radius: 10px;
  border-left: 5px solid var(--primary-color);
  transition: all var(--transition-speed) ease;
  position: relative;
}

.education-item::before {
  content: '\f02d';
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  right: 1rem;
  top: 1.5rem;
  font-size: 2rem;
  color: rgba(192, 108, 132, 0.2);
  z-index: 0;
}

.education-item:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-light);
  border-left-color: var(--accent-color);
}

.education-item h4 {
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.education-item p {
  color: var(--text-light);
  margin-bottom: 0;
}

.coding-profiles {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
  justify-content: center;
}

.coding-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--secondary-color);
  color: #fff;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-weight: 500;
  transition: all var(--transition-speed) ease;
  min-height: 44px;
}

.coding-btn i { font-size: 1rem; }

.coding-btn:hover {
  background: var(--primary-color);
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-light);
  border: 1px solid var(--accent-color);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--secondary-color);
  color: #fff;
  border-radius: 50%;
  font-size: 1.5rem;
  transition: all var(--transition-speed) ease;
}

.social-links a:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Projects Section */
.projects { background: var(--light-color); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.project-card {
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  overflow: hidden;
  transition: all var(--transition-speed) ease;
  border: 1px solid rgba(0,0,0,0.05);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-medium);
  border-color: var(--accent-color);
}

.project-img { position: relative; overflow: hidden; }

.project-img img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: all 0.5s ease;
}

.project-card:hover .project-img img { transform: scale(1.05); }

.project-content { padding: 1.5rem; }

.project-content h3 {
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.project-details {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-color-light-bg);
}

.project-details li { margin-bottom: 0.5rem; }

.project-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-color);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  font-size: 0.9rem;
  transition: all var(--transition-speed) ease;
}

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

/* ----------------- Blog Section ----------------- */
.blog { background: var(--light-color); }
.blog-subtitle { text-align: center; margin-bottom: 1.2rem; color: var(--text-color-light-bg); }

.blog-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  padding: 1rem;
}

.blog-card {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 1rem;
  box-shadow: var(--shadow-light);
  border: 1px solid rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-medium);
  border-color: var(--accent-color);
}

.blog-card .title {
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.blog-card .meta {
  font-size: 0.9rem;
  color: var(--text-color-light-bg);
}

.blog-card .excerpt {
  margin-top: 0.5rem;
  color: var(--text-color-light-bg);
  flex-grow: 1;
}

.blog-card a {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* small image thumbnail support (if available) */
.blog-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.6rem;
}

/* Placeholder thumbnail (font icon) */
.blog-thumb-placeholder {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(44,95,143,0.04), rgba(192,108,132,0.02));
  border-radius: 8px;
  margin-bottom: 0.6rem;
}

.blog-card .meta { margin-bottom: 0.25rem; }

/* Publications Section */
.publications { background: var(--light-color); }

.publications-container {
  max-width: 800px;
  margin: 0 auto;
}

.publication-card {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 2rem;
  background: #fff;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  transition: all var(--transition-speed) ease;
  border: 1px solid rgba(0,0,0,0.05);
}

.publication-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
  border-color: var(--accent-color);
}

.pub-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.publication-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

.publication-card:hover .publication-icon { color: var(--accent-color); }

.conference-badge {
  background: var(--primary-color);
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
  text-align: center;
  transition: background-color 0.3s ease;
}

.publication-card:hover .conference-badge { background: var(--accent-color); }

.pub-right h3 {
  margin-bottom: 0.5rem;
  color: var(--secondary-color);
}

.pub-authors {
  font-size: 0.95rem;
  color: var(--text-color-light-bg);
  margin-bottom: 1rem;
}

.pub-abstract {
  margin-bottom: 1.5rem;
  color: var(--text-color-light-bg);
}

.publication-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Skills Section */
.skills { background: #fff; }

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.skill-category {
  background: #fff;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  transition: all var(--transition-speed) ease;
  text-align: center;
}

.skill-category:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.skill-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  transition: color 0.3s ease;
}

.skill-category:hover .skill-icon { color: var(--accent-color); }

.skill-category h3 {
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.skill-category ul { list-style: none; padding: 0; }

.skill-category li {
  margin-bottom: 0.5rem;
  color: var(--text-color-light-bg);
}

/* Experience Section */
.experience { background: var(--light-color); }

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 2rem;
  width: 2px;
  height: 100%;
  background: var(--primary-color);
  opacity: 0.2;
}

.timeline-item {
  background: #fff;
  padding: 2rem;
  margin-bottom: 2rem;
  margin-left: 4rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  position: relative;
  transition: all var(--transition-speed) ease;
  border: 1px solid rgba(0,0,0,0.05);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -3.5rem;
  top: 2rem;
  width: 12px;
  height: 12px;
  background: var(--primary-color);
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px var(--primary-color);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
  border-color: var(--accent-color);
}

.timeline-item:hover::before {
  background-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-color);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.timeline-item h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.date {
  color: var(--text-light);
  font-size: 0.9rem;
  background: rgba(44, 95, 143, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  white-space: nowrap;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.timeline-item:hover .date {
  background-color: var(--accent-color);
  color: #fff;
}

.timeline-item ul { padding-left: 1.5rem; }

.timeline-item li {
  margin-bottom: 0.8rem;
  color: var(--text-color-light-bg);
}

.download-btn {
  color: var(--primary-color);
  background: rgba(44, 95, 143, 0.1);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed) ease;
  flex-shrink: 0;
}

.download-btn:hover {
  background: var(--primary-color);
  color: #fff;
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Certifications Section */
.certifications { background: #fff; }

.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.certification-card {
  background: #fff;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  transition: all var(--transition-speed) ease;
  text-align: center;
  border: 1px solid rgba(0,0,0,0.05);
}

.certification-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium), 0 0 10px rgba(192, 108, 132, 0.2);
}

.certification-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  transition: color 0.3s ease;
}

.certification-card:hover .certification-icon { color: var(--accent-color); }

.certification-card h3 {
  margin-bottom: 0.5rem;
  color: var(--secondary-color);
}

.certification-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Footer */
footer {
  background: var(--secondary-color);
  color: var(--text-color-dark-bg);
  padding: 3rem 0;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-color-dark-bg);
  opacity: 0.8;
  transition: all var(--transition-speed) ease;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--highlight-color);
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.sticky {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0;
}

/* Notification for form submission */
.form-notification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--primary-color);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-speed) ease;
  z-index: 10000;
  max-width: calc(100vw - 4rem);
}

.form-notification.show {
  opacity: 1;
  transform: translateY(0);
}

.form-notification i {
  font-size: 1.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .container {
    padding: 0 1.5rem;
  }
  
  section {
    padding: 3.5rem 0;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .about-img {
    order: -1;
  }
  
  .hero-links {
    gap: 0.8rem;
  }
  
  .coding-profiles {
    justify-content: center;
  }
  
  .timeline::before {
    left: 1.5rem;
  }
  
  .timeline-item {
    margin-left: 3rem;
  }
  
  .timeline-item::before {
    left: -2.8rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  section {
    padding: 3rem 0;
  }
  
  /* Mobile Menu Styles */
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.2s ease;
    border-radius: 8px;
  }

  .mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
  }

  .mobile-menu-toggle:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.2);
  }

  .mobile-menu-toggle i {
    transition: transform 0.3s ease;
  }

  nav ul {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    flex-direction: column;
    padding: 1.5rem 1rem;
    margin: 0;
    transform: translateY(-150%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    border-radius: 0 0 16px 16px;
  }

  nav ul.active {
    transform: translateY(0);
  }

  nav ul li {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  nav ul li:last-child {
    margin-bottom: 0;
  }

  nav ul li a {
    display: block;
    padding: 1rem 1.5rem;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.025em;
    border-radius: 12px;
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
  }

  nav ul li a:hover,
  nav ul li a:focus {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  nav ul li a:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.15);
  }
  
  /* About Section Mobile */
  .about-content {
    text-align: center;
  }
  
  .coding-profiles {
    flex-direction: column;
    align-items: center;
  }
  
  .coding-btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
  
  .social-links {
    gap: 0.8rem;
  }
  
  /* Projects Grid Mobile */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  /* Publications Mobile */
  .publication-card {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.5rem;
  }
  
  .pub-left {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 1rem;
  }
  
  .publication-icon {
    font-size: 2rem;
  }
  
  .conference-badge {
    margin: 0;
    font-size: 0.7rem;
  }
  
  /* Skills Mobile */
  .skills-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  /* Timeline Mobile */
  .timeline::before {
    left: 1rem;
  }
  
  .timeline-item {
    margin-left: 2rem;
    padding: 1.5rem;
  }
  
  .timeline-item::before {
    left: -1.8rem;
  }
  
  .timeline-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  /* Certifications Mobile */
  .certifications-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  /* Contact Form Mobile */
  #contact-form {
    padding: 2rem 1.5rem;
  }
  
  .form-group input,
  .form-group textarea {
    padding: 0.8rem;
  }
  
  .social-links a {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }
}

/* Print Styles */
@media print {
  * {
    box-shadow: none !important;
    transform: none !important;
  }
  
  .hero,
  .scroll-down,
  .mobile-menu-toggle,
  .form-notification {
    display: none;
  }
  
  section {
    padding: 2rem 0;
    break-inside: avoid;
  }
  
  .project-card,
  .timeline-item,
  .skill-category {
    break-inside: avoid;
    margin-bottom: 1rem;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #1a4480;
    --secondary-color: #000000;
    --text-color-light-bg: #000000;
    --text-light: #333333;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .scroll-down {
    animation: none;
  }
}

/* Achievements Section */
.achievements {
  background: #fff;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.achievement-card {
  background: #fff;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  transition: all var(--transition-speed) ease;
  text-align: center;
  border: 1px solid rgba(0,0,0,0.05);
}

.achievement-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium), 0 0 10px rgba(192, 108, 132, 0.2);
}

.achievement-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  transition: color 0.3s ease;
}

.achievement-card:hover .achievement-icon {
  color: var(--accent-color);
}

.achievement-card h3 {
  margin-bottom: 0.5rem;
  color: var(--secondary-color);
  font-size: 2rem;
  font-weight: 700;
}

.achievement-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* About Section - modern card layout */
.about .container { padding: 0 1rem; }
.about .section-heading { margin-bottom: 1.25rem; color: var(--secondary-color); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
.about-img img {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: var(--shadow-medium);
  display: block;
  margin: 0 auto;
  transition: transform 220ms var(--transition-speed), box-shadow 220ms var(--transition-speed);
}
.about-img img:focus, .about-img img:hover { transform: translateY(-6px); box-shadow: var(--shadow-heavy); }

.about-text p { color: var(--text-color-light-bg); margin-bottom: 0.9rem; }
.about-cta { margin-top: 0.25rem; font-weight: 600; color: var(--ai-secondary); }

.education-cards { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.25rem; }
.edu-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: #ffffff;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: var(--shadow-light);
  transition: transform 220ms var(--transition-speed), box-shadow 220ms var(--transition-speed);
  border: 1px solid rgba(15,23,42,0.03);
}
.edu-card:focus, .edu-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-medium); outline: none; }
.edu-icon {
  min-width: 48px;
  min-height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--ai-primary), var(--ai-secondary));
  color: #fff;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.edu-body h4 { margin: 0 0 0.25rem 0; font-size: 1rem; color: var(--secondary-color); }
.edu-meta { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-bottom: 0.45rem; }
.edu-meta .edu-university { font-size: 0.95rem; color: var(--text-color-light-bg); }
.edu-meta .edu-duration { font-size: 0.85rem; color: var(--text-light); }
.edu-meta .edu-cgpa { background: rgba(79,156,255,0.08); padding: 0.18rem 0.5rem; border-radius: 999px; color: var(--ai-primary); font-weight:600; font-size:0.85rem; }
.edu-desc { margin: 0; color: var(--text-color-light-bg); font-size: 0.95rem; }

.profile-links { display:flex; gap:0.6rem; margin-top:1rem; }
.coding-btn { display:inline-flex; align-items:center; gap:0.6rem; padding:0.45rem 0.8rem; background:transparent; border-radius:10px; border:1px solid rgba(15,23,42,0.04); color:var(--secondary-color); font-weight:600; }
.coding-btn i { color: var(--ai-primary); }

.about .social-links { margin-top:1rem; display:flex; gap:0.8rem; }
.about .social-links a { display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; border-radius:10px; background: #fff; color: var(--secondary-color); box-shadow: var(--shadow-light); border:1px solid rgba(15,23,42,0.04); transition: transform 160ms var(--transition-speed), box-shadow 160ms var(--transition-speed); }
.about .social-links a:hover, .about .social-links a:focus { transform: translateY(-4px); box-shadow: var(--shadow-medium); }

/* small screen adjustments */
@media (max-width: 880px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-img { order: -1; }
  .about-img img { max-width: 320px; }
  .education-cards { gap: 0.75rem; }
}

/* Screen reader helper */
.sr-only { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* Refinements: typography, spacing, timeline accent for education */
.about .section-heading { font-size: clamp(1.6rem, 2.6vw, 2rem); letter-spacing: -0.02em; margin-bottom: 1.5rem; }
.name-highlight { color: var(--secondary-color); font-weight: 700; font-size: 1.05rem; display: inline-block; letter-spacing: -0.01em; }
.about-text p { margin-bottom: 0.85rem; max-width: 55ch; }

.education-cards { position: relative; padding-left: 44px; }
.education-cards::before {
  content: '';
  position: absolute;
  left: 30px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  background: linear-gradient(180deg, rgba(79,156,255,0.18), rgba(127,195,255,0.06));
  border-radius: 4px;
  pointer-events: none;
}
.edu-card { position: relative; padding: 0.9rem 1rem 0.9rem 0.8rem; }
.edu-card::after {
  content: '';
  position: absolute;
  left: 22px; /* aligns with center of .edu-icon */
  top: 18px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.6);
  border: 3px solid rgba(79,156,255,0.95);
  transform: translateX(-50%);
  z-index: 1;
  transition: transform 200ms ease, box-shadow 200ms ease, opacity 200ms ease;
}
.edu-card:hover::after, .edu-card:focus::after { transform: translateX(-50%) scale(1.05); box-shadow: 0 6px 20px rgba(79,156,255,0.12); }

.edu-icon { position: relative; z-index: 2; }
.edu-body { z-index: 2; }

/* stronger hover accent: subtle left color bar */
.edu-card:hover { box-shadow: 0 14px 34px rgba(16,24,40,0.08); }
.edu-card:hover .edu-icon { transform: translateY(-3px); }

/* Rhythm: add breathing room below about section */
.about { padding-bottom: 3.25rem; }

@media (max-width: 880px) {
  .about .section-heading { text-align: left; }
  .education-cards { padding-left: 24px; }
  .education-cards::before { left: 18px; }
  .edu-card::after { left: 12px; }
}

  /* Mobile-specific refinements (<=768px) to improve spacing, centering, and readability */
  @media (max-width: 768px) {
    /* Center the section heading */
    .about .section-heading { text-align: center; margin-bottom: 1rem; }

    /* Single-column stack and clear vertical rhythm */
    .about-grid {
      grid-template-columns: 1fr;
      gap: 1rem 0; /* row gap */
      align-items: center;
    }

    /* Ensure stacking order: Title -> Image -> Text -> Education -> Buttons */
    .about-img { order: 0; }
    .about-text { order: 1; }
    .education-cards { order: 2; }
    .profile-links, .about .social-links { order: 3; }

    /* Profile image: smaller and centered with consistent spacing */
    .about-img img {
      max-width: 240px;
      width: 60%;
      display: block;
      margin: 0.6rem auto 1rem auto;
      border-radius: 14px;
    }

    /* Add comfortable left/right padding to the section container */
    .about { padding: 2.25rem 1.25rem 2.25rem; }
    .about .container { padding-left: 0.5rem; padding-right: 0.5rem; }

    /* About text readability */
    .about-text p { font-size: 1rem; line-height: 1.55; margin-bottom: 0.9rem; text-align: center; }
    .about-cta { margin-top: 0.6rem; }

    /* Education cards: full width, comfortable padding, aligned with timeline */
    .education-cards { padding-left: 20px; margin-top: 1rem; }
    .education-cards::before { left: 12px; }
    .edu-card {
      width: 100%;
      padding: 0.95rem 1rem;
      border-radius: 10px;
      display: flex;
      gap: 0.85rem;
      align-items: flex-start;
    }
    .edu-card .edu-body { flex: 1; }

    /* Increase tappable space for action links */
    .profile-links { justify-content: center; margin-top: 1rem; gap: 0.75rem; }
    .coding-btn { padding: 0.6rem 0.9rem; }

    /* Center social icons */
    .about .social-links { justify-content: center; }

    /* Reduce visual clutter of the timeline marker on small screens */
    .edu-card::after { left: 8px; top: 20px; width: 10px; height: 10px; border-width: 2.5px; }

    /* Slightly larger heading and tighter line spacing for mobile */
    .about .section-heading { font-size: 1.5rem; line-height: 1.15; }
  }