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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  width: 100%;
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #fafbfd;
  color: #1a1a2e;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.8s ease, color 0.8s ease;
}

body.dark-mode {
  background: #020810;
  color: #e0eaf5;
}

/* ===== Canvas Background ===== */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== Vignette ===== */
.vignette {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  box-shadow:
    inset 0 0 60px 15px rgba(85, 152, 215, 0.08),
    inset 0 0 150px 40px rgba(85, 152, 215, 0.04),
    inset 0 0 350px 80px rgba(85, 152, 215, 0.02);
  transition: box-shadow 0.8s ease;
}

body.dark-mode .vignette {
  box-shadow:
    inset 0 0 120px 50px rgba(2, 8, 16, 0.8),
    inset 0 0 300px 80px rgba(2, 8, 16, 0.5),
    inset 0 0 500px 120px rgba(5, 15, 30, 0.3);
}

/* ===== Section Base ===== */
.section {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px;
}

.section-inner {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.3em;
  letter-spacing: -0.02em;
}

.section-subtitle {
  text-align: center;
  color: #555555;
  font-size: 1.05rem;
  margin-bottom: 2.5em;
  transition: color 0.8s;
}

body.dark-mode .section-subtitle {
  color: #467fae;
}

.accent {
  background: linear-gradient(135deg, #5598d7, #0598ce);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.dark-mode .accent {
  background: linear-gradient(135deg, #62b1f3, #0598ce);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Navigation ===== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}

#navbar.scrolled {
  background: rgba(250, 251, 253, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

body.dark-mode #navbar.scrolled {
  background: rgba(2, 8, 16, 0.9);
  box-shadow: 0 1px 0 rgba(98, 177, 243, 0.08);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 800;
  text-decoration: none;
  color: #1a1a2e;
  letter-spacing: -0.03em;
  transition: color 0.8s;
}

body.dark-mode .nav-logo {
  color: #e0eaf5;
}

.logo-dot {
  color: #5598d7;
}

body.dark-mode .logo-dot {
  color: #62b1f3;
}

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

.nav-link {
  text-decoration: none;
  color: #555555;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: #5598d7;
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-link:hover {
  color: #204769;
}

body.dark-mode .nav-link {
  color: #467fae;
}

body.dark-mode .nav-link:hover {
  color: #62b1f3;
}

body.dark-mode .nav-link::after {
  background: #62b1f3;
}

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

/* Theme Toggle */
#theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(85, 152, 215, 0.2);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: #555555;
  position: relative;
}

#theme-toggle:hover {
  transform: scale(1.1);
  border-color: rgba(85, 152, 215, 0.4);
  background: rgba(255, 255, 255, 0.2);
}

#theme-toggle svg {
  width: 18px;
  height: 18px;
  transition: opacity 0.3s, transform 0.4s;
}

.icon-sun {
  position: absolute;
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

.icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

body.dark-mode #theme-toggle {
  color: #62b1f3;
  border-color: rgba(98, 177, 243, 0.2);
  background: rgba(17, 55, 104, 0.3);
}

body.dark-mode #theme-toggle:hover {
  border-color: rgba(98, 177, 243, 0.4);
}

body.dark-mode .icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

body.dark-mode .icon-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

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

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #555555;
  border-radius: 2px;
  transition: all 0.3s;
}

body.dark-mode .menu-toggle span {
  background: #62b1f3;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Hero Section ===== */
.hero-section {
  flex-direction: column;
  text-align: center;
  padding-top: 120px;
}

.hero-content {
  max-width: 700px;
  pointer-events: none;
}

.hero-greeting {
  font-size: 1.1rem;
  font-weight: 500;
  color: #5598d7;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

body.dark-mode .hero-greeting {
  color: #62b1f3;
}

.hero-name {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.25em;
  color: #1a1a2e;
  transition: color 0.8s;
}

body.dark-mode .hero-name {
  color: #ffffff;
}

.hero-title {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 500;
  background: linear-gradient(135deg, #5598d7, #0598ce);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1em;
}

body.dark-mode .hero-title {
  background: linear-gradient(135deg, #62b1f3, #0598ce);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.05rem;
  color: #555555;
  line-height: 1.7;
  margin-bottom: 2em;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
  transition: color 0.8s;
}

body.dark-mode .hero-desc {
  color: #467fae;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  pointer-events: all;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #5598d7, #0598ce);
  color: #fff;
  box-shadow: 0 4px 15px rgba(85, 152, 215, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(85, 152, 215, 0.4);
}

.btn-secondary {
  background: rgba(85, 152, 215, 0.08);
  color: #5598d7;
  border: 1.5px solid rgba(85, 152, 215, 0.2);
}

.btn-secondary:hover {
  background: rgba(85, 152, 215, 0.15);
  transform: translateY(-2px);
}

body.dark-mode .btn-secondary {
  background: rgba(98, 177, 243, 0.1);
  color: #62b1f3;
  border-color: rgba(98, 177, 243, 0.25);
}

body.dark-mode .btn-secondary:hover {
  background: rgba(98, 177, 243, 0.2);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.4;
  animation: scrollBounce 2s infinite;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

@keyframes scrollBounce {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(10px);
  }
}

/* ===== About Section ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-text p {
  margin-bottom: 1.2em;
  color: #444;
  font-size: 1.02rem;
  line-height: 1.8;
  transition: color 0.8s;
}

body.dark-mode .about-text p {
  color: #467fae;
}

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.highlight-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
  border-radius: 16px;
  background: rgba(85, 152, 215, 0.04);
  border: 1px solid rgba(85, 152, 215, 0.08);
  transition: all 0.3s;
}

.highlight-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(85, 152, 215, 0.08);
  background: rgba(85, 152, 215, 0.07);
}

body.dark-mode .highlight-card {
  background: rgba(17, 55, 104, 0.3);
  border-color: rgba(70, 127, 174, 0.15);
}

body.dark-mode .highlight-card:hover {
  background: rgba(17, 55, 104, 0.5);
  box-shadow: 0 8px 24px rgba(98, 177, 243, 0.08);
}

.highlight-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.highlight-info h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.highlight-info p {
  font-size: 0.8rem;
  color: #777;
  margin-bottom: 0 !important;
  transition: color 0.8s;
}

body.dark-mode .highlight-info p {
  color: #5a8ab5 !important;
}

/* ===== Skills Section ===== */
.skill-filters {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 2em;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 50px;
  border: 1.5px solid rgba(85, 152, 215, 0.15);
  background: transparent;
  color: #555555;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
  font-family: inherit;
}

.filter-btn:hover {
  border-color: rgba(85, 152, 215, 0.3);
  color: #5598d7;
}

.filter-btn.active {
  background: linear-gradient(135deg, #5598d7, #0598ce);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 12px rgba(85, 152, 215, 0.3);
}

body.dark-mode .filter-btn {
  color: #467fae;
  border-color: rgba(70, 127, 174, 0.2);
}

body.dark-mode .filter-btn:hover {
  color: #62b1f3;
  border-color: rgba(98, 177, 243, 0.3);
}

body.dark-mode .filter-btn.active {
  color: #fff;
  background: linear-gradient(135deg, #5598d7, #0598ce);
  box-shadow: 0 3px 12px rgba(85, 152, 215, 0.3);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.skill-card {
  padding: 20px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(85, 152, 215, 0.08);
  text-align: center;
  transition: all 0.3s;
  backdrop-filter: blur(5px);
}

.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(85, 152, 215, 0.1);
  border-color: rgba(85, 152, 215, 0.2);
}

body.dark-mode .skill-card {
  background: rgba(17, 55, 104, 0.3);
  border-color: rgba(70, 127, 174, 0.12);
  backdrop-filter: blur(10px);
}

body.dark-mode .skill-card:hover {
  background: rgba(17, 55, 104, 0.5);
  box-shadow: 0 10px 30px rgba(98, 177, 243, 0.08);
  border-color: rgba(98, 177, 243, 0.25);
}

.skill-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.skill-category {
  font-size: 0.78rem;
  color: #888;
  font-weight: 500;
  transition: color 0.8s;
}

body.dark-mode .skill-category {
  color: #5a8ab5;
}

/* Skill card hide/show for filtering */
.skill-card.hidden {
  display: none;
}

/* ===== Projects Section ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.project-card {
  padding: 28px 24px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(85, 152, 215, 0.08);
  transition: all 0.35s;
  backdrop-filter: blur(5px);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(85, 152, 215, 0.1);
  border-color: rgba(85, 152, 215, 0.15);
}

body.dark-mode .project-card {
  background: rgba(17, 55, 104, 0.3);
  border-color: rgba(70, 127, 174, 0.12);
  backdrop-filter: blur(10px);
}

body.dark-mode .project-card:hover {
  background: rgba(17, 55, 104, 0.5);
  box-shadow: 0 16px 40px rgba(98, 177, 243, 0.08);
  border-color: rgba(98, 177, 243, 0.2);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.project-icon {
  font-size: 2rem;
}

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

.project-link {
  color: #888;
  transition: color 0.2s, transform 0.2s;
}

.project-link:hover {
  color: #5598d7;
  transform: translateY(-2px);
}

body.dark-mode .project-link {
  color: #5a8ab5;
}

body.dark-mode .project-link:hover {
  color: #62b1f3;
}

.project-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.project-desc {
  font-size: 0.92rem;
  color: #555555;
  line-height: 1.7;
  margin-bottom: 16px;
  transition: color 0.8s;
}

body.dark-mode .project-desc {
  color: #467fae;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(85, 152, 215, 0.08);
  color: #5598d7;
  transition: all 0.8s;
}

body.dark-mode .tag {
  background: rgba(98, 177, 243, 0.1);
  color: #62b1f3;
}

/* ===== Contact Section ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(85, 152, 215, 0.08);
  text-decoration: none;
  color: inherit;
  transition: all 0.35s;
  backdrop-filter: blur(5px);
}

.contact-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(85, 152, 215, 0.1);
  border-color: rgba(85, 152, 215, 0.2);
}

body.dark-mode .contact-card {
  background: rgba(17, 55, 104, 0.3);
  border-color: rgba(70, 127, 174, 0.12);
  backdrop-filter: blur(10px);
  color: #e0eaf5;
}

body.dark-mode .contact-card:hover {
  background: rgba(17, 55, 104, 0.5);
  box-shadow: 0 16px 40px rgba(98, 177, 243, 0.08);
  border-color: rgba(98, 177, 243, 0.2);
}

.contact-icon {
  color: #5598d7;
  margin-bottom: 14px;
  transition: color 0.8s;
}

body.dark-mode .contact-icon {
  color: #62b1f3;
}

.contact-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.contact-card p {
  font-size: 0.85rem;
  color: #777;
  transition: color 0.8s;
}

body.dark-mode .contact-card p {
  color: #5a8ab5;
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 32px 24px;
  font-size: 0.85rem;
  color: #999;
  transition: color 0.8s;
}

body.dark-mode .footer {
  color: #467fae;
}

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

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

/* ===== Responsive ===== */

/* --- Tablet (≤ 900px) --- */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
}

/* --- Mobile (≤ 700px) --- */
@media (max-width: 700px) {

  /* ── Mobile Navigation ── */
  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 0 24px;
    gap: 0;
    background: rgba(250, 251, 253, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(85, 152, 215, 0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  body.dark-mode .nav-links {
    background: rgba(2, 8, 16, 0.97);
    border-bottom-color: rgba(98, 177, 243, 0.08);
  }

  .nav-links.open {
    display: flex;
    max-height: 320px;
    padding: 20px 24px 24px;
  }

  .nav-link {
    font-size: 1.05rem;
    padding: 14px 0;
    border-bottom: 1px solid rgba(85, 152, 215, 0.06);
    opacity: 0;
    transform: translateY(-8px);
    animation: mobileNavFadeIn 0.35s ease forwards;
  }

  .nav-links.open .nav-link:nth-child(1) {
    animation-delay: 0.05s;
  }

  .nav-links.open .nav-link:nth-child(2) {
    animation-delay: 0.1s;
  }

  .nav-links.open .nav-link:nth-child(3) {
    animation-delay: 0.15s;
  }

  .nav-links.open .nav-link:nth-child(4) {
    animation-delay: 0.2s;
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  body.dark-mode .nav-link {
    border-bottom-color: rgba(98, 177, 243, 0.06);
  }

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

  .menu-toggle {
    display: flex;
  }

  /* ── Hero Section Mobile ── */
  .hero-section {
    padding-top: 100px;
    min-height: calc(100vh - 20px);
    min-height: calc(100dvh - 20px);
  }

  .hero-greeting {
    font-size: 0.95rem;
    margin-bottom: 6px;
  }

  .hero-name {
    font-size: clamp(2.2rem, 11vw, 3.2rem);
    margin-bottom: 0.2em;
  }

  .hero-title {
    font-size: clamp(1.1rem, 4.5vw, 1.4rem);
    margin-bottom: 0.8em;
  }

  .hero-desc {
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 1.8em;
    padding: 0 8px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
    padding: 14px 28px;
    font-size: 0.95rem;
  }

  .scroll-indicator {
    bottom: 24px;
  }

  /* ── Section Base Mobile ── */
  .section {
    padding: 70px 18px;
    min-height: auto;
  }

  .section-title {
    font-size: clamp(1.7rem, 6vw, 2.2rem);
    margin-bottom: 0.25em;
  }

  .section-subtitle {
    font-size: 0.95rem;
    margin-bottom: 2em;
    padding: 0 8px;
  }

  /* ── About Section Mobile ── */
  .about-grid {
    gap: 28px;
  }

  .about-text p {
    font-size: 0.95rem;
    line-height: 1.75;
  }

  .about-highlights {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .highlight-card {
    padding: 14px 12px;
    border-radius: 14px;
    gap: 10px;
  }

  .highlight-icon {
    font-size: 1.4rem;
  }

  .highlight-info h3 {
    font-size: 0.88rem;
  }

  .highlight-info p {
    font-size: 0.75rem;
  }

  /* ── Skills Section Mobile ── */
  .skill-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    margin-bottom: 1.8em;
    justify-content: flex-start;
    flex-wrap: nowrap;
    /* Hide scrollbar but keep functionality */
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .skill-filters::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex-shrink: 0;
    scroll-snap-align: start;
    padding: 10px 20px;
    font-size: 0.85rem;
    min-height: 40px;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .skill-card {
    padding: 16px 14px;
    border-radius: 12px;
  }

  .skill-name {
    font-size: 0.92rem;
  }

  .skill-category {
    font-size: 0.73rem;
  }

  /* ── Projects Section Mobile ── */
  .projects-grid {
    gap: 16px;
  }

  .project-card {
    padding: 22px 18px;
    border-radius: 16px;
  }

  .project-title {
    font-size: 1.1rem;
  }

  .project-desc {
    font-size: 0.88rem;
    line-height: 1.65;
    margin-bottom: 14px;
  }

  .tag {
    padding: 5px 12px;
    font-size: 0.73rem;
  }

  /* ── Contact Section Mobile ── */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 100%;
  }

  .contact-card {
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 20px 18px;
    border-radius: 14px;
    gap: 14px;
  }

  .contact-icon {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .contact-card h3 {
    font-size: 0.95rem;
    margin-bottom: 2px;
  }

  .contact-card p {
    font-size: 0.82rem;
  }

  /* ── Footer Mobile ── */
  .footer {
    padding: 24px 18px;
    font-size: 0.8rem;
  }

  /* ── Vignette Mobile ── */
  .vignette {
    box-shadow:
      inset 0 0 40px 10px rgba(85, 152, 215, 0.06),
      inset 0 0 100px 30px rgba(85, 152, 215, 0.03);
  }

  body.dark-mode .vignette {
    box-shadow:
      inset 0 0 80px 30px rgba(2, 8, 16, 0.8),
      inset 0 0 200px 50px rgba(5, 15, 30, 0.4);
  }
}

/* --- Small Mobile (≤ 480px) --- */
@media (max-width: 480px) {
  .hero-name {
    font-size: clamp(2rem, 12vw, 2.8rem);
  }

  .hero-title {
    font-size: clamp(1rem, 5vw, 1.25rem);
  }

  .hero-desc {
    font-size: 0.9rem;
  }

  .section {
    padding: 60px 16px;
  }

  .section-title {
    font-size: clamp(1.5rem, 7vw, 1.9rem);
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .skill-card {
    padding: 14px 10px;
  }

  .skill-name {
    font-size: 0.85rem;
  }

  .about-highlights {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .highlight-card {
    padding: 12px 10px;
    gap: 8px;
  }

  .highlight-icon {
    font-size: 1.2rem;
  }

  .highlight-info h3 {
    font-size: 0.82rem;
  }

  .highlight-info p {
    font-size: 0.7rem;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 0.82rem;
  }

  .project-card {
    padding: 18px 16px;
  }

  .project-title {
    font-size: 1.05rem;
  }

  .contact-card {
    padding: 16px 14px;
    gap: 12px;
  }
}

/* --- Very small (≤ 360px) --- */
@media (max-width: 360px) {
  .hero-name {
    font-size: 1.9rem;
  }

  .section {
    padding: 50px 14px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 0.88rem;
    max-width: 260px;
  }

  .nav-logo {
    font-size: 1.2rem;
  }

  .skills-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
}