/* ══════════════════════════════════════════════════════════
   AMEEN ASHADHULLAH M — ELITE DARK PORTFOLIO
   Matching Tejas Goel format with Midnight Navy dark theme
   ══════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ─────────────────────────────────── */
:root {
  --bg:            #0B0F1E;
  --bg-trans:      rgba(11, 15, 30, 0.88);
  --surface:       #131829;
  --surface-hover: #1C2340;
  --border:        rgba(255, 255, 255, 0.07);
  --border-light:  rgba(99, 102, 241, 0.3);
  --text-main:     #E8EEFF;
  --text-muted:    #8E9AAF;
  --text-dim:      #5E6A82;
  --accent:        #6366F1;
  --accent-light:  #818CF8;
  --cyan:          #22D3EE;
  --glow:          rgba(99, 102, 241, 0.18);
  --font-main:     'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-logo:     'Caveat', cursive;
  --font-mono:     'JetBrains Mono', monospace;
}

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

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

/* ── HIGHLIGHT ANIMATION ── */
@keyframes flashGlow {
  0% { box-shadow: 0 4px 20px rgba(0,0,0,0.4); transform: translateY(0); }
  20% { box-shadow: 0 0 40px rgba(255, 153, 0, 0.6); transform: translateY(-8px); border: 1px solid rgba(255, 153, 0, 0.8); background: rgba(255, 153, 0, 0.05); }
  100% { box-shadow: 0 4px 20px rgba(0,0,0,0.4); transform: translateY(0); border: 1px solid var(--border); background: var(--surface); }
}

.flash-highlight {
  animation: flashGlow 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  z-index: 10;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── SCROLLBAR ─────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1E2640; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ══════════════════════════════════════════════════════
   NAVIGATION
   ══════════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 50px;
  background: var(--bg-trans);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.35s ease;
}

.navbar.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.logo {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: -1px;
  user-select: none;
  transition: all 0.3s ease;
}

.logo .cursor {
  color: var(--accent-light);
  animation: blink 1s step-end infinite;
  display: inline-block;
  margin-left: 2px;
}

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

.logo:hover {
  text-shadow: 0 0 15px var(--glow);
}

.logo:hover .cursor {
  animation: none;
  opacity: 1;
  text-shadow: 0 0 12px var(--accent-light);
}

.nav-menu {
  display: flex;
  gap: 16px;
  list-style: none;
}

.nav-link {
  display: inline-block;
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.25s ease;
  letter-spacing: 0.2px;
}

.nav-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--text-main);
  font-weight: 700;
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ══════════════════════════════════════════════════════
   SCROLL TO TOP BUTTON
   ══════════════════════════════════════════════════════ */
.scroll-top-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  pointer-events: none;
}

.scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.scroll-top-btn:hover {
  background: var(--accent-light);
  transform: translateY(-3px);
}

/* ══════════════════════════════════════════════════════
   SECTIONS BASE
   ══════════════════════════════════════════════════════ */
.section {
  display: none;
  padding-top: 100px;
}

.section.active {
  display: block;
  animation: fadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 50px;
}

/* ══════════════════════════════════════════════════════
   HERO VIEWPORT (Full Height)
   ══════════════════════════════════════════════════════ */
.hero-viewport {
  min-height: calc(100vh - 100px);
  display: flex;
  align-items: center;
  position: relative;
}

/* ── SCROLL DOWN INDICATOR ── */
.scroll-down-indicator {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color 0.3s ease;
  animation: bounce 2.5s infinite;
  z-index: 10;
}
.scroll-down-indicator:hover {
  color: var(--text-main);
}
.scroll-down-indicator svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent);
}
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
  40% { transform: translateY(-10px) translateX(-50%); }
  60% { transform: translateY(-5px) translateX(-50%); }
}

.hero-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  width: 100%;
}

.hero-split.reverse-layout {
  flex-direction: row-reverse;
}

/* ── HERO TEXT (Left) ── */
.hero-text {
  flex: 0 1 48%;
  z-index: 2;
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.aws-cert-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  background: rgba(255, 153, 0, 0.1);
  border: 1px solid rgba(255, 153, 0, 0.4);
  border-radius: 8px;
  color: #FF9900;
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 153, 0, 0.1);
}

.aws-cert-badge:hover {
  background: rgba(255, 153, 0, 0.2);
  border-color: #FF9900;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 153, 0, 0.25);
  color: #FF9900;
}

/* ── HERO ILLUSTRATION (Right) ── */
.hero-illustration {
  flex: 0 1 52%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-illustration img {
  width: 100%;
  max-width: 650px;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-illustration:hover img {
  transform: scale(1.03);
}

/* ── TYPOGRAPHY ──────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: 100px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-light);
  margin-bottom: 28px;
  letter-spacing: 0.3px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

.title-large {
  font-size: clamp(52px, 6vw, 88px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2.5px;
  margin-bottom: 24px;
  color: var(--text-main);
}

.subtitle {
  font-size: 24px;
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 16px;
}

.hero-tagline {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 680px;
}

/* ── SOCIAL ICON CIRCLES ── */
.social-icons-row {
  display: flex;
  gap: 14px;
  margin-bottom: 32px;
}

.social-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.social-icon-circle:hover {
  color: var(--accent-light);
  transform: translateY(-3px);
}

/* Specific brand colors on hover */
.social-icon-circle[title="GitHub"]:hover {
  color: #fff;
}

.social-icon-circle[title="LinkedIn"]:hover {
  color: #0A66C2;
}

.social-icon-circle[title="Gmail"]:hover,
.social-icon-circle[title="Email"]:hove.card-body p {
  line-height: 1.5;
}

/* ─── Certification Cards ─── */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

/* ── TIMELINE (EXPERIENCE) ── */
.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto 100px;
  scroll-margin-top: 120px; /* Prevents the fixed header from overlapping the content */
}
.timeline-item {
  position: relative;
  margin-bottom: 70px;
  padding-left: 120px; /* NEW: Leaves 120px space on the left for the logo! */
}
.timeline-item:last-child {
  margin-bottom: 0;
}
.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 40px; /* Place the line at left 40px */
  width: 3px;
  background: linear-gradient(to bottom, #6366f1, #a855f7, rgba(255,255,255,0.05) 90%);
  transform: translateX(-50%);
}
.timeline-logo {
  position: absolute;
  top: 0; /* Align with top of the card */
  left: 40px; /* Exactly on the timeline line */
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: white; 
  border: 4px solid var(--bg-dark); 
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, 0); /* Center exactly horizontally */
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.timeline-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.timeline-logo img.contain-logo {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}
/* Highly Premium Glassmorphic Card */
.timeline-content.highlight-card {
  position: relative;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9)); 
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.1); 
  box-shadow: 0 10px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Glowing hover effect */
.timeline-content.highlight-card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 15px 50px rgba(99, 102, 241, 0.25), inset 0 1px 0 rgba(255,255,255,0.1);
}
.timeline-caret {
  position: absolute;
  top: 32px; /* Center with the 64px logo which is at top:0 */
  left: -12px; 
  width: 0; 
  height: 0; 
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent; 
  border-right: 12px solid rgba(255, 255, 255, 0.1); 
  transform: translateY(-50%);
  z-index: 1;
}
.timeline-caret::after {
  content: "";
  position: absolute;
  top: -11px;
  left: 2px;
  width: 0; 
  height: 0; 
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent; 
  border-right: 11px solid #1a2235; /* match card background edge */
  z-index: 2;
}

@media (max-width: 768px) {
  .timeline-item { padding-left: 80px; }
  .timeline-line { left: 20px; }
  .timeline-logo { left: 20px; width: 48px; height: 48px; }
  .timeline-caret { top: 24px; left: -10px; border-width: 10px; }
  .timeline-caret::after { top: -9px; border-width: 9px; }
  .timeline-content.highlight-card { padding: 24px; }
}
.cert-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.cert-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
}
.cert-image {
  height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
}
.cert-image img {
  max-height: 60px;
  max-width: 100%;
  position: relative;
  z-index: 2;
}
.cert-info {
  padding: 16px 20px;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--card-bg);
}
.cert-info h4 {
  font-size: 16px !important;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.4;
  font-weight: 600;
}
.cert-info p {
  font-size: 14px !important;
  color: var(--text-dim);
}

/* Cert Image Backgrounds */
.cert-aws-de {
  background: linear-gradient(135deg, #1C2340 0%, #0B0F1E 100%);
  border-bottom: 3px solid #005276; /* AWS Data Eng Color */
}
.cert-aws-dev {
  background: linear-gradient(135deg, #1C2340 0%, #0B0F1E 100%);
  border-bottom: 3px solid #D13212; /* AWS Dev Color */
}
.cert-stanford {
  background: #8C1515; /* Stanford Red */
  border-bottom: 3px solid #4D0A0A;
}

/* ─── Buttons ─── */
.btn-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 36px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  letter-spacing: 0.3px;
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* ══════════════════════════════════════════════════════
   "WHAT I DO?" SECTION (Below fold on Home page)
   ══════════════════════════════════════════════════════ */
.what-i-do-section {
  padding-bottom: 0;
}

.section-heading {
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 800;
  text-align: center;
  margin-bottom: 80px;
  color: var(--text-main);
  letter-spacing: -1px;
}

/* ── SKILL BLOCK (illustration + content side by side) ── */
.skill-block {
  display: flex;
  align-items: center;
  gap: 60px;
  margin-bottom: 100px;
}

/* ─── Lightbox Modal ─── */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(11, 15, 30, 0.9);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.lightbox.active {
  display: flex;
  opacity: 1;
}
.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}
.lightbox.active .lightbox-content {
  transform: scale(1);
}
.lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  color: white;
  font-size: 48px;
  font-weight: 300;
  cursor: pointer;
  transition: color 0.3s ease;
  line-height: 1;
}
.lightbox-close:hover {
  color: var(--primary-color);
}

.skill-block.reverse {
  flex-direction: row-reverse;
}

.skill-block-illustration {
  flex: 0 0 42%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.skill-block-illustration img {
  width: 100%;
  max-width: 450px;
  transition: transform 0.5s ease;
}

.skill-block:hover .skill-block-illustration img {
  transform: scale(1.03);
}

.skill-block-content {
  flex: 1;
}

.skill-block-title {
  font-size: clamp(36px, 4vw, 54px);
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 28px;
}

/* ── SOCIAL LOGOS (Original Colored) ── */
.social-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, filter 0.25s ease;
}
.social-logo:hover {
  transform: translateY(-4px) scale(1.1);
  filter: drop-shadow(0 6px 12px rgba(255,255,255,0.15));
}
.social-logo img, .social-logo svg {
  width: 36px;
  height: 36px;
  display: block;
}

/* ── TECH LOGOS ── */
.tech-logos-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
  align-items: center;
}

.tech-logos-row img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  transition: transform 0.25s ease;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.tech-logos-row img:hover {
  transform: scale(1.15) translateY(-3px);
}

/* For dark icons that need light treatment on dark bg */
.tech-logos-row img.invert-icon {
  filter: invert(1) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

/* ── CUSTOM TOOLTIP (macOS Dock Style) ── */
.custom-tooltip {
  position: fixed;
  background: rgba(40, 40, 44, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #FFFFFF;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-main);
  pointer-events: none;
  z-index: 10000;
  opacity: 0;
  transform: translate(-50%, 10px) scale(0.95);
  transition: opacity 0.15s ease-out, transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.15);
  white-space: nowrap;
}

/* Tooltip Caret / Arrow */
.custom-tooltip::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px 5px 0;
  border-style: solid;
  border-color: rgba(40, 40, 44, 0.85) transparent transparent transparent;
  display: block;
  width: 0;
}

.custom-tooltip.visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

/* ── SKILL BULLETS ── */
.skill-bullets {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.skill-bullets p:last-child {
  margin-bottom: 0;
}

.skill-bullets p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-muted);
}

.skill-bullets strong {
  color: var(--text-main);
}

/* ══════════════════════════════════════════════════════
   CARDS (for About, Projects, etc.)
   ══════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.card-icon-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
  font-size: 22px;
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.card-body {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 20px;
}

/* ── TECH PILLS ── */
.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main);
  font-family: var(--font-mono);
}

/* ── GRID LAYOUTS ── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

/* ══════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════ */
.footer {
  text-align: center;
  padding: 48px 0;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 80px;
}

.footer a {
  color: var(--accent-light);
  text-decoration: none;
}

/* ══════════════════════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
   ══════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger children */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }

/* ══════════════════════════════════════════════════════
   PROJECTS
   ══════════════════════════════════════════════════════ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  margin-top: 50px;
}

@media (min-width: 1024px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  height: 100%;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(99, 102, 241, 0.1);
}

.project-image-container {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.project-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.project-content {
  padding: 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
  transition: color 0.3s ease;
}

.project-card:hover .project-title {
  color: var(--accent-light);
}

.project-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 30px;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.project-footer {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.3s ease;
}

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

.project-link svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.project-link:hover svg {
  transform: translateX(4px) translateY(-4px);
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════ */
@media (max-width: 992px) {
  .container {
    padding: 0 32px;
  }

  .navbar {
    padding: 0 24px;
  }

  .nav-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 20px;
    gap: 4px;
  }

  .nav-menu.open {
    display: flex;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero-split,
  .hero-split.reverse-layout {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }

  /* Specific fix for Home hero: Image above text */
  #home-hero-split {
    flex-direction: column-reverse;
    gap: 0px; /* Remove gap between hero image and text */
  }

  #projects-hero-split {
    transform: none !important;
    gap: 0px;
  }
  
  #experience .hero-split {
    gap: 0px;
  }
  
  #projects .hero-viewport,
  #experience .hero-viewport {
    flex-direction: column;
    justify-content: flex-start;
    min-height: calc(100vh - 100px) !important;
    padding-bottom: 20px;
    padding-top: 20px;
  }
  
  #projects .scroll-down-indicator,
  #experience .scroll-down-indicator {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none !important;
    margin-top: auto; /* Pushes button to bottom of screen if space allows */
  }

  #projects .hero-illustration img,
  #experience .hero-illustration img {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0;
    margin-top: 10px;
    transform: scale(1.15) !important; /* Scale up symmetrically from center */
  }

  /* Make the contact page fit without swiping */
  #contact .hero-viewport {
    min-height: auto !important;
    padding-top: 20px;
    padding-bottom: 40px;
  }

  #contact .hero-illustration img {
    max-width: 200px !important;
    margin-bottom: 10px;
  }

  /* Specific fix for About section illustrations */
  .desktop-only {
    display: none !important;
  }
  .mobile-only {
    display: block !important;
  }

  .hero-text {
    flex: 1;
  }

  .hero-illustration {
    flex: 1;
    justify-content: center;
  }

  .hero-illustration img {
    max-width: 440px !important; /* Larger size to push buttons off-screen naturally */
    width: 100% !important;
    transform: none !important; /* Cancel the desktop horizontal shift */
  }

  /* Fix text alignment for all paragraphs on mobile */
  p, .hero-tagline, .subtitle {
    text-align: justify !important;
  }

  .hero-tagline {
    max-width: 100%;
  }

  .social-icons-row {
    justify-content: center;
  }

  .btn-group {
    justify-content: center;
  }

  .hero-cta-group {
    justify-content: center;
    flex-wrap: nowrap;
    gap: 12px;
  }

  .hero-cta-group .btn-primary {
    padding: 12px 18px;
    font-size: 14px;
    white-space: nowrap;
  }

  .hero-cta-group .aws-cert-badge {
    padding: 8px 16px;
    font-size: 13px;
    white-space: nowrap;
  }

  .skill-block,
  .skill-block.reverse {
    flex-direction: column-reverse; /* Text above image on mobile */
    text-align: left; /* Align text left */
    gap: 15px;
  }

  .skill-block-illustration {
    flex: 0 0 auto;
    margin-top: 0px; 
  }

  .tech-logos-row {
    justify-content: flex-start; /* Align logos left */
  }

  .skill-bullets {
    text-align: left;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0 16px;
  }

  .container {
    padding: 0 20px;
  }

  .title-large {
    font-size: 40px;
    letter-spacing: -1px;
  }

  .hero-tagline {
    font-size: 16px;
  }

  .section {
    padding-top: 80px; /* Clear the navbar exactly so image isn't cut off */
  }

  /* Push the hero content to the top instead of center */
  .hero-viewport {
    align-items: flex-start;
  }

  .what-i-do-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05); /* Partition */
  }

  .section-heading {
    font-size: 32px;
    margin-bottom: 40px;
  }

  .skill-block-title {
    font-size: 26px;
  }
  .skill-block-title br {
    display: none; /* Fit on same line if possible */
  }

  .skill-block {
    margin-bottom: 40px; /* Reduce spacing between skill blocks */
  }

  .tech-logos-row img {
    width: 36px;
    height: 36px;
  }

  .scroll-top-btn {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }

  /* Social Icons Sizing */
  .social-logo svg,
  .social-logo img {
    width: 26px !important;
    height: 26px !important;
  }

  /* Reduce space in About section headers/cards */
  #about .section-heading {
    margin-bottom: 24px !important;
  }
  #about .skill-block-title {
    margin-bottom: 16px !important;
  }
  #about .mobile-only {
    margin-top: 24px !important;
    margin-bottom: 24px !important;
  }
}
