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

:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --muted-bg: #f5f5f5;
  --muted-fg: #737373;
  --border: #e5e5e5;
  --primary: #0a0a0a;
  --secondary: #6366f1;
  --secondary-light: rgba(99,102,241,0.1);
  --radius: 1rem;
  --font: 'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.9375rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4 {
  font-family: 'Space Grotesk', var(--font);
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-weight: 700;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: 6rem 0; }
.bg-muted { background: var(--muted-bg); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 2rem;
  height: 3rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: #222; }
.btn-outline {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--secondary); color: var(--secondary); }
.btn-full { width: 100%; justify-content: center; }

/* ===== SECTION HEADERS ===== */
.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { font-size: clamp(1.75rem, 4vw, 2.25rem); margin-bottom: 1rem; }
.section-bar {
  height: 6px;
  width: 5rem;
  background: var(--secondary);
  border-radius: 999px;
}
.section-bar.center { margin: 0 auto; }
.section-sub { margin-top: 1.5rem; color: var(--muted-fg); max-width: 36rem; margin-left: auto; margin-right: auto; }

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#navbar.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.nav-logo span { color: var(--secondary); }
.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}
.nav-hamburger { display: none; }
.nav-mobile-menu { display: none; }
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-fg);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--fg); }


/* ===== HERO ===== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  text-align: center;
  padding-top: 64px;
}
.hero-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--muted-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.375rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 2rem;
  color: var(--muted-fg);
}
.ping-dot {
  position: relative;
  width: 8px; height: 8px;
  display: inline-flex;
}
.ping-inner {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--secondary);
  opacity: 0.6;
  animation: ping 1.5s ease-in-out infinite;
}
.ping-dot-solid {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--secondary);
  position: relative;
  z-index: 1;
}
@keyframes ping {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(2); opacity: 0; }
}
.hero-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  margin-bottom: 1.5rem;
  letter-spacing: -0.04em;
}
.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--muted-fg);
  max-width: 38rem;
  margin: 0 auto 2.5rem;
  line-height: 1.625;
}
.highlight {
  color: var(--secondary);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--secondary);
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 5rem;
}
.hero-icons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 36rem;
  margin: 0 auto;
  opacity: 0.35;
  filter: grayscale(1);
}
.hero-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.hero-icon-item span {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero-icon-hidden { display: none; }
@media(min-width: 768px) { .hero-icon-hidden { display: flex; } }

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: center;
}
@media(min-width: 1024px) { .about-grid { grid-template-columns: 1fr 1fr; } }

.about-image-wrap { position: relative; }
.about-image-frame {
  aspect-ratio: 1;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 12px solid var(--muted-bg);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
}
.about-image-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: filter 0.7s;
}
.about-image-frame:hover img { filter: grayscale(0); }
.about-badge {
  position: absolute;
  bottom: -1.5rem;
  right: -1.5rem;
  background: var(--primary);
  color: #fff;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  text-align: center;
  min-width: 140px;
}
.about-badge-num { font-size: 1.875rem; font-weight: 700; }
.about-badge-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  opacity: 0.8;
  line-height: 1.3;
}
.about-content { display: flex; flex-direction: column; gap: 1.5rem; }
.about-content h2 { font-size: clamp(1.75rem, 4vw, 2.25rem); margin-bottom: 0.25rem; }
.text-secondary { color: var(--secondary); }
.section-bar { height: 6px; width: 5rem; background: var(--secondary); border-radius: 999px; }
.about-text-lg { font-size: 1.0625rem; color: var(--muted-fg); line-height: 1.75; }
.about-text-sm { color: var(--muted-fg); line-height: 1.75; }
.about-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.about-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-radius: 1rem;
  background: var(--muted-bg);
  border: 1px solid transparent;
  transition: border-color 0.2s;
}
.about-card:hover { border-color: rgba(99,102,241,0.2); }
.about-card h4 { font-size: 0.875rem; font-weight: 700; margin-bottom: 0.25rem; }
.about-card p { font-size: 0.75rem; color: var(--muted-fg); }
.icon-secondary { color: var(--secondary); flex-shrink: 0; }


/* ===== SKILLS ===== */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media(min-width: 768px) { .skills-grid { grid-template-columns: repeat(2, 1fr); } }
@media(min-width: 1024px) { .skills-grid { grid-template-columns: repeat(3, 1fr); } }

.skill-card {
  padding: 2rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.skill-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  border-color: rgba(99,102,241,0.3);
}
.skill-icon {
  display: inline-flex;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: var(--muted-bg);
  color: var(--secondary);
  margin-bottom: 1rem;
  transition: background 0.2s;
}
.skill-card:hover .skill-icon { background: var(--secondary-light); }
.skill-card h3 { font-size: 1.0625rem; margin-bottom: 1rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-tags span {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--muted-bg);
  color: var(--muted-fg);
  font-size: 0.75rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  cursor: default;
}
.skill-tags span:hover { background: var(--secondary); color: #fff; }

/* ===== EXPERIENCE ===== */
.timeline { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 3rem; }
.timeline-item {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--border);
  transition: border-color 0.2s;
  padding-bottom: 1rem;
}
.timeline-item:hover { border-left-color: var(--secondary); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  top: 0;
  left: -9px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--border);
  transition: border-color 0.2s;
}
.timeline-item:hover .timeline-dot { border-color: var(--secondary); }
.timeline-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
@media(min-width: 768px) {
  .timeline-header { flex-direction: row; align-items: center; justify-content: space-between; }
}
.timeline-header h3 {
  font-size: 1.2rem;
  transition: color 0.2s;
}
.timeline-item:hover h3 { color: var(--secondary); }
.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--muted-fg);
  font-weight: 500;
}
.timeline-period {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--muted-bg);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-fg);
  white-space: nowrap;
}
.timeline-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.timeline-list li {
  color: var(--muted-fg);
  line-height: 1.625;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.timeline-list li::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--secondary);
  flex-shrink: 0;
  margin-top: 0.55rem;
}

/* ===== EDUCATION ===== */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}
@media(min-width: 768px) { .edu-grid { grid-template-columns: repeat(2, 1fr); } }

.edu-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: box-shadow 0.2s;
}
.edu-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.edu-tag {
  display: inline-block;
  background: var(--secondary-light);
  color: var(--secondary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}
.edu-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.edu-school { font-weight: 600; color: var(--muted-fg); margin-bottom: 0.25rem; }
.edu-location { font-size: 0.875rem; color: var(--muted-fg); }
.edu-highlights { border-top: 1px solid var(--border); padding-top: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.edu-highlight-item { display: flex; gap: 0.75rem; align-items: flex-start; }
.edu-highlight-item span { color: var(--secondary); font-weight: 700; flex-shrink: 0; }
.edu-highlight-item p { font-size: 0.875rem; color: var(--muted-fg); line-height: 1.5; }


/* ===== PROJECTS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}
@media(min-width: 768px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }

.project-card {
  position: relative;
  padding: 2rem;
  border-radius: 1.5rem;
  background: #fff;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.project-card:hover {
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  border-color: rgba(99,102,241,0.2);
}
.project-num {
  position: absolute;
  bottom: -1rem;
  right: -0.5rem;
  font-size: 7rem;
  font-weight: 700;
  color: var(--muted-bg);
  pointer-events: none;
  line-height: 1;
  transition: color 0.2s;
}
.project-card:hover .project-num { color: rgba(99,102,241,0.05); }
.project-card-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.project-icon {
  padding: 0.75rem;
  border-radius: 1rem;
  background: var(--muted-bg);
  color: var(--secondary);
  transition: background 0.2s;
  flex-shrink: 0;
}
.project-card:hover .project-icon { background: var(--secondary-light); }
.project-card h3 { font-size: 1.25rem; }
.project-card > p { color: var(--muted-fg); margin-bottom: 2rem; line-height: 1.625; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.project-tags span {
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  background: var(--muted-bg);
  color: var(--muted-fg);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.project-metric {
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(99,102,241,0.05);
  border: 1px solid rgba(99,102,241,0.1);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.4;
  margin-bottom: 2rem;
}
.project-links { display: flex; gap: 1.5rem; }
.project-links a {
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.15s;
}
.project-links a:hover { color: var(--secondary); }

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
  align-items: start;
}
@media(min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1fr; } }

.contact-info { display: flex; flex-direction: column; gap: 1rem; }
.contact-row { display: flex; flex-direction: column; gap: 0.75rem; }

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.contact-item:hover { border-color: rgba(99,102,241,0.3); }
.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem;
  border-radius: 0.6rem;
  background: var(--muted-bg);
  flex-shrink: 0;
  transition: background 0.2s;
}
.contact-item:hover .contact-icon { background: var(--secondary-light); }
.contact-icon svg { display: block; width: 18px; height: 18px; min-width: 18px; }
.contact-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-fg);
  margin-bottom: 0.125rem;
}
.contact-item a {
  font-size: 0.9375rem;
  font-weight: 700;
  transition: color 0.15s;
}
.contact-item a:hover { color: var(--secondary); }
.contact-note { font-size: 0.75rem; color: var(--muted-fg); font-style: italic; }

.contact-form-wrap {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 2.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.contact-form { display: flex; flex-direction: column; gap: 1.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group label { font-size: 0.875rem; font-weight: 600; }
.form-group input,
.form-group textarea {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-family: var(--font);
  font-size: 0.9375rem;
  background: var(--bg);
  color: var(--fg);
  outline: none;
  transition: border-color 0.15s;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--secondary); }
.form-group input::placeholder,
.form-group textarea::placeholder { color: #aaa; }

/* ===== FOOTER ===== */
footer {
  background: var(--primary);
  color: #fff;
  padding: 2.5rem 1.5rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}
@media(min-width: 768px) {
  .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}
.footer-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.footer-logo span { color: var(--secondary); }
.footer-copy { font-size: 0.875rem; color: rgba(255,255,255,0.5); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 0.875rem; color: rgba(255,255,255,0.6); transition: color 0.15s; }
.footer-links a:hover { color: #fff; }

/* ===== MOBILE RESPONSIVE ===== */
@media(max-width: 768px) {

  /* Nav — hide links, show hamburger */
  .nav-links { display: none; }
  .nav-hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
  }
  .nav-hamburger span {
    display: block;
    width: 22px; height: 2px;
    background: var(--fg);
    border-radius: 2px;
    transition: all 0.2s;
  }
  .nav-mobile-menu {
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: none;
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0;
    z-index: 99;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .nav-mobile-menu.open { display: flex; }  .nav-mobile-menu a {
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 1rem;
    color: var(--fg);
  }
  .nav-mobile-menu a:last-child { border-bottom: none; }

  /* Global */
  section { padding: 3.5rem 0; }
  .container { padding: 0 1rem; }
  h2 { font-size: 1.5rem !important; }

  /* Hero */
  #hero { padding-top: 80px; min-height: auto; padding-bottom: 3rem; }
  .hero-title { font-size: 2.25rem; margin-bottom: 1rem; }
  .hero-subtitle { font-size: 0.9375rem; margin-bottom: 1.75rem; }
  .hero-badge { font-size: 0.75rem; padding: 0.3rem 0.75rem; }
  .hero-buttons { gap: 0.75rem; }
  .hero-buttons .btn { padding: 0 1.25rem; height: 2.75rem; font-size: 0.875rem; }
  .hero-icons { grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 2.5rem; }
  .hero-icon-item span { font-size: 0.55rem; }

  /* About */
  .about-grid { gap: 2rem; }
  .about-image-frame { border-width: 6px; border-radius: 1rem; }
  .about-badge { padding: 1rem; min-width: 110px; bottom: -1rem; right: -0.75rem; }
  .about-badge-num { font-size: 1.5rem; }
  .about-badge-label { font-size: 0.55rem; }
  .about-text-lg { font-size: 0.9375rem; }
  .about-cards { grid-template-columns: 1fr; gap: 0.75rem; }
  .about-card { padding: 0.875rem; }

  /* Skills */
  .skills-grid { grid-template-columns: 1fr; gap: 1rem; }
  .skill-card { padding: 1.25rem; }
  .skill-icon { padding: 0.5rem; margin-bottom: 0.75rem; }
  .skill-card h3 { font-size: 0.9375rem; margin-bottom: 0.75rem; }
  .skill-tags span { font-size: 0.6875rem; padding: 0.2rem 0.6rem; }

  /* Experience */
  .timeline { gap: 2rem; }
  .timeline-item { padding-left: 1.25rem; }
  .timeline-header { flex-direction: column; gap: 0.5rem; }
  .timeline-header h3 { font-size: 1rem; }
  .timeline-meta { font-size: 0.75rem; gap: 0.5rem; flex-wrap: wrap; }
  .timeline-period { font-size: 0.7rem; }
  .timeline-list li { font-size: 0.875rem; }

  /* Education */
  .edu-grid { grid-template-columns: 1fr; gap: 1rem; }
  .edu-card { padding: 1.25rem; }
  .edu-card h3 { font-size: 1rem; }
  .edu-school { font-size: 0.875rem; }
  .edu-location { font-size: 0.8125rem; }
  .edu-highlight-item p { font-size: 0.8125rem; }

  /* Projects */
  .projects-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .project-card { padding: 1.25rem; }
  .project-card h3 { font-size: 1rem; }
  .project-card > p { font-size: 0.875rem; margin-bottom: 1.25rem; }
  .project-tags { margin-bottom: 1.25rem; }
  .project-tags span { font-size: 0.625rem; }
  .project-metric { font-size: 0.8125rem; padding: 0.75rem; margin-bottom: 1.25rem; }
  .project-num { font-size: 5rem; bottom: -0.5rem; right: -0.25rem; }
  .project-links { gap: 1rem; }
  .project-links a { font-size: 0.8125rem; }

  /* Contact */
  .contact-grid { gap: 1.25rem; }
  .contact-item { padding: 0.875rem 1rem; }
  .contact-item a { font-size: 0.875rem; word-break: break-all; }
  .contact-form-wrap { padding: 1.25rem; border-radius: 1rem; }
  .form-row { grid-template-columns: 1fr; gap: 1rem; }
  .form-group input, .form-group textarea { padding: 0.625rem 0.875rem; font-size: 0.875rem; }
  .form-group label { font-size: 0.8125rem; }

  /* Footer */
  footer { padding: 1.75rem 1rem; }
  .footer-links { gap: 1rem; }
  .footer-links a { font-size: 0.8125rem; }

  /* Section header */
  .section-header { margin-bottom: 2rem; }
  .section-sub { font-size: 0.875rem; }
}


/* ===== INLINE SVG ICONS ===== */
svg { overflow: hidden; }
.meta-icon {
  width: 13px; height: 13px;
  min-width: 13px; min-height: 13px;
  max-width: 13px; max-height: 13px;
  vertical-align: middle;
  flex-shrink: 0;
  stroke: var(--secondary);
  margin-right: 4px;
  position: relative;
  top: -1px;
  display: inline-block;
}
.check-icon {
  width: 14px; height: 14px;
  min-width: 14px;
  stroke: var(--secondary);
  flex-shrink: 0;
}
.edu-highlight-item span {
  display: flex;
  align-items: flex-start;
  padding-top: 2px;
}
.metric-icon {
  width: 14px; height: 14px;
  min-width: 14px;
  stroke: var(--secondary);
  flex-shrink: 0;
  vertical-align: middle;
  margin-right: 6px;
  position: relative;
  top: -1px;
  display: inline-block;
}
.contact-icon { display: flex; align-items: center; justify-content: center; }
.contact-icon svg { display: block; width: 20px; height: 20px; min-width: 20px; }
.project-links a svg { flex-shrink: 0; width: 15px; height: 15px; }
.btn svg { flex-shrink: 0; width: 15px; height: 15px; }

/* edu-location icon inline */
.edu-location svg, .timeline-meta svg { width: 13px; height: 13px; min-width: 13px; }

/* ===== EXTRA SMALL / COMPACT ===== */
@media(max-width: 480px) {
  .hero-title { font-size: 1.875rem; }
  .hero-subtitle { font-size: 0.875rem; }
  .hero-badge { font-size: 0.7rem; }
  .hero-buttons .btn { padding: 0 1rem; height: 2.5rem; font-size: 0.8125rem; }

  .about-badge { padding: 0.75rem; min-width: 90px; }
  .about-badge-num { font-size: 1.25rem; }

  .skill-card { padding: 1rem; }
  .project-card { padding: 1rem; }
  .edu-card { padding: 1rem; }
  .contact-form-wrap { padding: 1rem; }
  .contact-item { padding: 0.875rem; gap: 0.75rem; }
  .contact-item a { font-size: 0.8125rem; word-break: break-all; }

  .timeline-item { padding-left: 1rem; }
  .timeline-header h3 { font-size: 0.9375rem; }
}


/* ===== LOADER ===== */
#loader {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; }

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.loader-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  animation: loader-pulse 1s ease-in-out infinite alternate;
}
.loader-logo span { color: var(--secondary); }

@keyframes loader-pulse {
  from { opacity: 0.4; transform: scale(0.97); }
  to   { opacity: 1;   transform: scale(1); }
}

.loader-bar-wrap {
  width: 180px;
  height: 3px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.loader-bar {
  height: 100%;
  width: 0%;
  background: var(--secondary);
  border-radius: 999px;
  animation: loader-fill 2s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes loader-fill {
  0%   { width: 0%; }
  60%  { width: 75%; }
  100% { width: 100%; }
}

.loader-words {
  height: 1.25rem;
  overflow: hidden;
  position: relative;
}
.loader-word {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted-fg);
  animation: loader-cycle 2s steps(1) forwards;
  position: absolute;
  opacity: 0;
}
.loader-word:nth-child(1) { animation-delay: 0s; }
.loader-word:nth-child(2) { animation-delay: 0.65s; }
.loader-word:nth-child(3) { animation-delay: 1.3s; }
@keyframes loader-cycle {
  0%   { opacity: 1; transform: translateY(0); }
  30%  { opacity: 1; }
  50%  { opacity: 0; transform: translateY(-8px); }
  100% { opacity: 0; }
}

/* ===== SIDE-BY-SIDE SECTIONS (desktop) ===== */
/* Skills: 2-col on md, 3-col on lg — already set; bump to 2-col sooner */
@media(min-width: 640px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .edu-grid { grid-template-columns: repeat(2, 1fr); }
  .about-cards { grid-template-columns: repeat(2, 1fr); }
}

/* Experience + Education side by side on large screens */
@media(min-width: 1024px) {
  .skills-grid { grid-template-columns: repeat(3, 1fr); }
}
