/* ============================================================
   UWAMI MGXEKWA — MAIN STYLESHEET
   ============================================================ */

/* ===== CSS VARIABLES ===== */
:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --secondary: #ec4899;
  --accent: #f59e0b;
  --bg-color: #ffffff;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --glass: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.1);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  --transition-fast: 0.2s ease;
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --theme-transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

/* ===== DARK MODE ===== */
html.dark {
  --bg-color: #030712;
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --glass: rgba(3, 7, 18, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

@media (prefers-color-scheme: dark) {
  html:not(.light) {
    --bg-color: #030712;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --glass: rgba(3, 7, 18, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb {
  background: #7c3aed;
  border-radius: 10px;
  border: 3px solid var(--bg-color);
}
::-webkit-scrollbar-thumb:hover { background: #6d28d9; }

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  transition: var(--theme-transition);
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: var(--theme-transition);
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Allow selection inside form inputs only */
input, textarea, select {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}

* {
  transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  -webkit-touch-callout: none;
  pointer-events: none;
}

/* Re-enable pointer events on linked images (logo, etc.) */
a img {
  pointer-events: auto;
}

/* ===== NAVIGATION ===== */
nav#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.25rem 2rem;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: var(--glass);
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.4s ease;
}

.logo a {
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  opacity: 0.8;
  position: relative;
}

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

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

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

.nav-cta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* ===== HAMBURGER MENU ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  border-radius: 8px;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.hamburger:hover {
  background: var(--glass-border);
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
  transform-origin: center;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
}

.mobile-nav-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-nav-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(280px, 85vw);
  height: 100%;
  background: var(--bg-color);
  border-left: 1px solid var(--glass-border);
  padding: 5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav.open {
  display: block;
}

.mobile-nav.open .mobile-nav-overlay {
  opacity: 1;
}

.mobile-nav.open .mobile-nav-drawer {
  transform: translateX(0);
}

.mobile-nav-drawer a {
  display: flex;
  align-items: center;
  padding: 0.9rem 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 0.75rem;
  color: var(--text-primary);
  transition: background 0.2s ease, color 0.2s ease;
}

.mobile-nav-drawer a:hover,
.mobile-nav-drawer a.active {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
}

.mobile-nav-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 0.5rem 0;
}
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 32px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #e5e7eb;
  transition: 0.4s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
}

.slider i {
  width: 14px;
  height: 14px;
  z-index: 1;
}

.sun-icon { color: #f59e0b; }
.moon-icon { color: #9ca3af; opacity: 0.3; }

.slider::before {
  content: '';
  position: absolute;
  height: 24px;
  width: 24px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
  z-index: 2;
}

input:checked + .slider { background-color: #1f2937; }
input:checked + .slider::before { transform: translateX(28px); }
input:checked + .slider .moon-icon { color: #818cf8; opacity: 1; }
input:checked + .slider .sun-icon { opacity: 0.3; }

.slider.round { border-radius: 34px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  border-radius: 3rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.primary:hover {
  background: var(--primary-hover);
}

.btn.outline {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--text-primary);
}

.btn.outline:hover {
  background: var(--text-primary);
  color: var(--bg-color);
}

.btn.small {
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
}/* ===== LAYOUT ===== */
section {
  padding: 8rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

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

.section-header h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* ===== BACKGROUND BLOBS ===== */
.blob {
  position: fixed;
  z-index: -1;
  width: 50vw;
  height: 50vw;
  background: rgba(99, 102, 241, 0.05);
  filter: blur(100px);
  border-radius: 50%;
  animation: blobMove 20s infinite alternate;
  pointer-events: none;
}

@keyframes blobMove {
  from { transform: translate(-10%, -10%); }
  to   { transform: translate(10%, 10%); }
}

/* ===== BADGE ===== */
.badge {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border-radius: 2rem;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.65)),
    url('/assets/images/hero-bg.png');
  background-size: cover;
  background-position: center;
  width: 100%;
}

html.dark .hero,
html:not(.light) .hero {
  background-image:
    linear-gradient(rgba(3, 7, 18, 0.72), rgba(3, 7, 18, 0.82)),
    url('/assets/images/hero-bg.png');
}

@media (prefers-color-scheme: dark) {
  html:not(.light) .hero {
    background-image:
      linear-gradient(rgba(3, 7, 18, 0.72), rgba(3, 7, 18, 0.82)),
      url('/assets/images/hero-bg.png');
  }
}

.hero .reveal {
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin-bottom: 2rem;
}

.cta-group {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2rem;
}

/* ===== ABOUT GRID ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2rem;
  border: 1px solid var(--glass-border);
}

/* ===== SKILLS GRID ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.skill-card {
  text-align: center;
  padding: 2.5rem 2rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 2rem;
  transition: border-color 0.3s ease;
}

.skill-card:hover {
  border-color: var(--primary);
}

.skill-card i {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  display: block;
}

.skill-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.skill-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ===== PROJECTS GRID ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  border-radius: 1.5rem;
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  transition: border-color 0.3s ease;
}

.project-card:hover {
  border-color: var(--primary);
}

.project-content {
  padding: 1.75rem;
}

.project-content h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.project-content h3 a:hover {
  color: var(--primary);
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  margin-right: 0.5rem;
  margin-top: 0.25rem;
}

.loading {
  text-align: center;
  color: var(--text-secondary);
  padding: 3rem;
  grid-column: 1 / -1;
}

/* ===== PLATFORMS GRID ===== */
.platform-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
}

.platform-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 130px;
  opacity: 0.75;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.platform-card:hover {
  opacity: 1;
  transform: translateY(-4px);
}

.platform-card img {
  max-width: 160px;
  max-height: 65px;
  object-fit: contain;
  margin-bottom: 1rem;
}

.platform-card span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ===== CONTACT GRID ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.contact-detail i {
  color: var(--primary);
  flex-shrink: 0;
}

/* ===== CONTACT FORM ===== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.95rem;
}

input,
textarea,
select {
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  border: 1.5px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 16px;
  transition: border-color 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
}

textarea {
  resize: vertical;
  min-height: 140px;
}

/* ===== TOAST NOTIFICATION ===== */
#toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 0.875rem;
  font-size: 0.95rem;
  font-weight: 500;
  min-width: 280px;
  max-width: 380px;
  pointer-events: all;
  border: 1.5px solid transparent;
  opacity: 0;
  transform: translateX(120%);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.toast.hide {
  opacity: 0;
  transform: translateX(120%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.success {
  background: #f0fdf4;
  color: #15803d;
  border-color: #86efac;
}

html.dark .toast.success {
  background: #052e16;
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.25);
}

.toast.error {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fca5a5;
}

html.dark .toast.error {
  background: #2d0a0a;
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.25);
}

.toast i {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 0 0 0.875rem 0.875rem;
  background: currentColor;
  opacity: 0.35;
  animation: toast-shrink 5s linear forwards;
}

@keyframes toast-shrink {
  from { width: 100%; }
  to   { width: 0%; }
}

.toast {
  position: relative;
  overflow: hidden;
}

/* Hide old inline formStatus — toast replaces it */
#formStatus { display: none !important; }

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--glass-border);
  padding: 3rem 2rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.footer-logo img {
  height: 36px;
  width: auto;
  margin: 0 auto;
}

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

.footer-links a {
  font-size: 0.9rem;
  opacity: 0.7;
  transition: opacity 0.2s ease, color 0.2s ease;
}

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

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

/* ===== PAGE HERO (inner pages) ===== */
.page-hero {
  padding: 10rem 2rem 5rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.page-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  margin-bottom: 1rem;
}

.page-hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
}

/* ===== ABOUT PAGE ===== */
.about-full-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 5rem;
  align-items: start;
}

.about-sticky {
  position: sticky;
  top: 7rem;
}

.about-sticky img {
  width: 100%;
  border-radius: 2rem;
  border: 1px solid var(--glass-border);
}

.about-meta {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.about-meta-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.about-meta-item i {
  color: var(--primary);
  flex-shrink: 0;
}

.about-content h2 {
  font-size: 2rem;
  margin-bottom: 1.25rem;
  margin-top: 2.5rem;
}

.about-content h2:first-child {
  margin-top: 0;
}

.about-content p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.85;
  font-size: 1.05rem;
}

.timeline {
  margin-top: 1rem;
  border-left: 2px solid var(--glass-border);
  padding-left: 1.5rem;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.85rem;
  top: 0.4rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-color);
}

.timeline-item .year {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

.timeline-item h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.timeline-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* ===== GITHUB STATS GRID ===== */
.github-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.github-stat-card {
  border-radius: 1rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 2rem;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.github-stat-full {
  grid-column: 1 / -1;
}

.stat-loading {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
}

/* Stat card internals */
.stat-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.stat-numbers {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Language bars */
.lang-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.lang-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.lang-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
}

.lang-name {
  font-weight: 600;
  color: var(--text-primary);
}

.lang-pct {
  color: var(--text-secondary);
}

.lang-bar-bg {
  height: 6px;
  background: var(--glass-border);
  border-radius: 3px;
  overflow: hidden;
}

.lang-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--primary);
}

/* Streak row */
.streak-row {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: space-around;
  text-align: center;
}

.streak-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.streak-value {
  font-size: 2.5rem;
  font-weight: 900;
  font-family: 'Outfit', sans-serif;
  color: var(--primary);
  line-height: 1;
}

.streak-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.streak-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .github-stats-grid {
    grid-template-columns: 1fr;
  }
  .github-stat-full {
    grid-column: 1;
  }
  .stat-numbers {
    gap: 1.5rem;
  }
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* ===== ANIMATIONS ===== */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.spin {
  animation: spin 1s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  nav#navbar { gap: 2rem; padding: 1rem 1.5rem; }
  .about-full-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-sticky { position: static; }
  .about-sticky img { max-width: 400px; margin: 0 auto; }
}

@media (max-width: 992px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  section { padding: 5rem 1.25rem; }

  nav#navbar {
    flex-direction: row;
    justify-content: space-between;
    padding: 0.9rem 1.25rem;
    gap: 0;
  }

  /* Ensure logo and controls don't overflow */
  .logo img { height: 32px; }

  .nav-cta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .switch { width: 48px; height: 26px; }
  .slider::before { height: 18px; width: 18px; bottom: 4px; left: 4px; }
  input:checked + .slider::before { transform: translateX(22px); }

  /* Hero */
  .hero { padding: 5rem 1.25rem 3rem; }
  .hero h1 { font-size: clamp(2.25rem, 11vw, 3.5rem); }
  .hero p  { font-size: 1rem; padding: 0; }

  /* Grids → single column */
  .about-grid,
  .skills-grid,
  .projects-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* About image full width on mobile */
  .about-image {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1;
  }

  /* Platform grid tighter on mobile */
  .platform-grid {
    gap: 1.5rem;
    justify-content: space-around;
  }

  .platform-card {
    min-width: 100px;
  }

  .platform-card img {
    max-width: 110px;
    max-height: 45px;
  }

  /* Section headers */
  .section-header { margin-bottom: 2.5rem; }
  .section-header h2 { font-size: 1.85rem; }

  /* Page hero */
  .page-hero { padding: 7rem 1.25rem 2.5rem; }
  .page-hero h1 { font-size: clamp(2rem, 9vw, 3rem); }

  /* About full page */
  .about-full-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-sticky { position: static; }
  .about-sticky img { max-width: 100%; border-radius: 1.5rem; }
  .about-content h2 { font-size: 1.6rem; }

  /* GitHub stats */
  .github-stats-grid { grid-template-columns: 1fr; }
  .github-stat-full { grid-column: 1; }
  .stat-numbers { gap: 1.25rem; }
  .stat-value { font-size: 1.6rem; }
  .streak-value { font-size: 2rem; }

  /* Contact */
  .contact-info { order: 2; }
  .contact-form { order: 1; }

  /* Buttons full width on very small screens */
  .cta-group { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .cta-group .btn { width: 100%; justify-content: center; }

  /* Toast position on mobile */
  #toast-container {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
  }

  .toast {
    min-width: unset;
    max-width: 100%;
    width: 100%;
  }

  html, body {
    overscroll-behavior: none;
    touch-action: pan-y;
  }
}

@media (max-width: 480px) {
  .btn { padding: 0.85rem 1.75rem; font-size: 0.95rem; }
  .hero h1 { font-size: clamp(1.9rem, 13vw, 2.75rem); }
  .badge { font-size: 0.7rem; padding: 0.4rem 1rem; }
  .skill-card { padding: 2rem 1.5rem; }
  .skill-card i { font-size: 2.75rem; }
  .timeline { padding-left: 1.25rem; }
  .streak-row { gap: 1.25rem; }
  .footer-links { gap: 1.25rem; }
}
