/* 
  Premium Portfolio CSS (Upgraded)
  Based on Mukul Singh theme, refined for professional look
*/

/* ==================== GLOBAL VARIABLES ==================== */
:root {
  /* Colors (Light) */
  --primary-color: #2563eb;
  --secondary-color: #1d4ed8;
  --accent-color: #22c55e;

  --text-color: #0f172a;
  --text-light: #475569;

  --background-color: #f8fafc;
  --section-bg: rgba(255, 255, 255, 0.65);
  --card-bg: rgba(255, 255, 255, 0.75);

  --border-color: rgba(15, 23, 42, 0.10);

  /* Fonts */
  --heading-font: "Poppins", sans-serif;
  --body-font: "Roboto", sans-serif;

  /* Sizing */
  --container-width: 1200px;
  --header-height: 72px;
  --border-radius: 18px;

  /* Effects */
  --transition: all 0.25s ease;
  --shadow-soft: 0 12px 35px rgba(2, 6, 23, 0.10);
  --shadow-strong: 0 20px 55px rgba(2, 6, 23, 0.16);

  --glass-blur: blur(16px);
}

/* ==================== DARK MODE ==================== */
.dark-mode {
  --primary-color: #60a5fa;
  --secondary-color: #2563eb;
  --accent-color: #5eead4;

  --text-color: #e2e8f0;
  --text-light: #94a3b8;

  --background-color: #0b1220;
  --section-bg: rgba(15, 23, 42, 0.55);
  --card-bg: rgba(15, 23, 42, 0.72);

  --border-color: rgba(226, 232, 240, 0.12);

  --shadow-soft: 0 12px 35px rgba(0, 0, 0, 0.35);
  --shadow-strong: 0 20px 60px rgba(0, 0, 0, 0.55);
}

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

html {
  scroll-behavior: smooth;
}

/* ==================== MOVING BACKGROUND ==================== */
body {
  font-family: var(--body-font);
  line-height: 1.65;
  color: var(--text-color);
  background: var(--background-color);
  transition: var(--transition);
  overflow-x: hidden;
  position: relative;
}

/* Animated gradient layer */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;

  background: radial-gradient(900px 500px at 10% 10%, rgba(37, 99, 235, 0.25), transparent 60%),
              radial-gradient(900px 520px at 90% 20%, rgba(34, 197, 94, 0.18), transparent 60%),
              radial-gradient(900px 520px at 50% 90%, rgba(99, 102, 241, 0.20), transparent 60%);
  animation: bgMove 10s ease-in-out infinite alternate;
  filter: saturate(1.2);
}

/* Noise texture (premium effect) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.14'/%3E%3C/svg%3E");
  opacity: 0.25;
  pointer-events: none;
  mix-blend-mode: overlay;
}

@keyframes bgMove {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(-30px, -20px, 0) scale(1.06);
  }
}

/* ==================== CONTAINER ==================== */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 90px 0;
}

/* ==================== SECTION HEADER ==================== */
.section-header {
  text-align: center;
  margin-bottom: 55px;
}

.section-header h2 {
  font-family: var(--heading-font);
  font-size: 2.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.underline {
  width: 60px;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  margin: 0 auto;
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 12px 28px;
  border-radius: var(--border-radius);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}

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

.secondary-btn {
  background: rgba(255, 255, 255, 0.18);
  color: var(--primary-color);
  border: 1px solid var(--border-color);
  backdrop-filter: var(--glass-blur);
}

.secondary-btn:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.28);
  box-shadow: var(--shadow-soft);
}

/* ==================== LOADER ==================== */
.loader {
  position: fixed;
  inset: 0;
  background-color: var(--background-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.45s ease;
}

.spinner {
  width: 52px;
  height: 52px;
  border: 5px solid rgba(0, 0, 0, 0.08);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loader.hide {
  opacity: 0;
  pointer-events: none;
}

/* ==================== HEADER / NAVBAR ==================== */
header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  height: var(--header-height);
  z-index: 100;

  background: rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: var(--glass-blur);
  transition: var(--transition);
}

.dark-mode header {
  background: rgba(15, 23, 42, 0.55);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.logo a {
  font-family: var(--heading-font);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-color);
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 6px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  color: var(--text-color);
  transition: var(--transition);
}

.nav-link:hover {
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary-color);
}

.theme-toggle {
  margin-left: 14px;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-color);
  transition: var(--transition);
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: rgba(255,255,255,0.18);
  backdrop-filter: var(--glass-blur);
}

.theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  cursor: pointer;
  margin-left: 12px;
}

.mobile-menu .bar {
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  margin: 3px 0;
  transition: var(--transition);
}

/* ==================== HERO ==================== */
#hero {
  height: 100vh;
  display: flex;
  align-items: center;
  padding: 0;
  margin-top: var(--header-height);
}

.hero-content {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.hero-text {
  max-width: 680px;
}

.hero-text h1 {
  font-family: var(--heading-font);
  font-size: 3.4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
}

.hero-text h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-light);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 6px 11px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--section-bg);
  color: var(--primary-color) !important;
  font-size: 0.86rem !important;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.hero-text p {
  font-size: 1.08rem;
  margin-bottom: 26px;
  color: var(--text-light);
}

.highlight {
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.social-links {
  display: flex;
  gap: 14px;
  margin-top: 28px;
}

.social-link {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--section-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-size: 1.1rem;
  transition: var(--transition);
  backdrop-filter: var(--glass-blur);
}

.social-link:hover {
  transform: translateY(-3px);
  background: linear-gradient(135deg, rgba(37,99,235,0.18), rgba(34,197,94,0.14));
  box-shadow: var(--shadow-soft);
}

/* ==================== ABOUT ==================== */
#about {
  background: transparent;
}

.about-content {
  display: flex;
  gap: 40px;
  align-items: center;
}

.about-text {
  flex: 1;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 26px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: var(--glass-blur);
}

.about-text p {
  margin-bottom: 22px;
  font-size: 1.05rem;
  color: var(--text-light);
}

.about-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: rgba(255,255,255,0.14);
  backdrop-filter: var(--glass-blur);
}

.detail-item i {
  color: var(--primary-color);
  font-size: 1.15rem;
}

/* ==================== TIMELINE ==================== */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline:before {
  content: "";
  position: absolute;
  width: 3px;
  background: linear-gradient(var(--primary-color), var(--accent-color));
  top: 0;
  bottom: 0;
  left: 20px;
  border-radius: 999px;
  opacity: 0.7;
}

.timeline-item {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 26px;
  margin-bottom: 36px;
  margin-left: 60px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
  backdrop-filter: var(--glass-blur);
  transition: var(--transition);
}

.timeline-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-strong);
}

.timeline-item:before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  left: -42px;
  top: 28px;
  box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.12);
}

.timeline-item:after {
  content: "";
  position: absolute;
  width: 18px;
  height: 2px;
  background: var(--border-color);
  left: -18px;
  top: 40px;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.timeline-title {
  font-weight: 800;
  font-size: 1.2rem;
  font-family: var(--heading-font);
}

.timeline-period {
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 600;
}

.timeline-company {
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 10px;
}

.timeline-description {
  margin-bottom: 14px;
  font-size: 0.98rem;
  color: var(--text-light);
}

.timeline-achievements {
  padding-left: 20px;
}

.timeline-achievements li {
  margin-bottom: 10px;
  font-size: 0.98rem;
  color: var(--text-light);
}

/* ==================== PROJECTS ==================== */
#projects {
  background: transparent;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 26px;
}

.project-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
  backdrop-filter: var(--glass-blur);
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-strong);
}

.project-content {
  padding: 24px;
}

.project-title {
  font-family: var(--heading-font);
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.project-period {
  font-size: 0.92rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

.project-description {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-light);
  margin-bottom: 14px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  color: var(--primary-color);
  font-size: 0.92rem;
  font-weight: 800;
}

.project-link:hover {
  text-decoration: none;
  gap: 10px;
}

.tech-tag {
  background: rgba(37, 99, 235, 0.12);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
  color: var(--primary-color);
  font-weight: 700;
}

/* ==================== SKILLS ==================== */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.skill-category {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 22px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
  backdrop-filter: var(--glass-blur);
}

.skill-category h3 {
  font-family: var(--heading-font);
  font-size: 1.2rem;
  margin-bottom: 18px;
  color: var(--primary-color);
  font-weight: 800;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  background-color: rgba(37, 99, 235, 0.10);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.92rem;
  color: var(--text-color);
  transition: var(--transition);
  font-weight: 600;
}

.skill-tag:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: #ffffff;
  transform: translateY(-3px);
}

/* ==================== CONTACT ==================== */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 26px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 18px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: var(--glass-blur);
}

.contact-item i {
  font-size: 1.4rem;
  color: var(--primary-color);
}

.contact-detail h3 {
  font-family: var(--heading-font);
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.contact-detail p {
  color: var(--text-light);
}

.contact-form {
  background-color: var(--card-bg);
  padding: 26px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
  backdrop-filter: var(--glass-blur);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--text-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background-color: rgba(255,255,255,0.12);
  font-family: var(--body-font);
  color: var(--text-color);
  transition: var(--transition);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.65);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

/* ==================== FOOTER ==================== */
footer {
  background: transparent;
  padding: 50px 0 20px;
}

.footer-bottom {
  max-width: var(--container-width);
  margin: 0 auto;
  border-top: 1px solid var(--border-color);
  padding: 20px;
  text-align: center;
  margin-top: 40px;
}

.footer-bottom p {
  color: var(--text-light);
  font-size: 0.92rem;
}

/* ==================== BACK TO TOP ==================== */
#backToTop {
  position: fixed;
  z-index: 200;
  bottom: 26px;
  right: 26px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #ffffff;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  border: none;
  box-shadow: var(--shadow-soft);
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
}

#backToTop:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-strong);
}

/* ==================== RESPONSIVE ==================== */
@media screen and (max-width: 992px) {
  .section {
    padding: 70px 0;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .hero-text h1 {
    font-size: 2.7rem;
  }

  .hero-text h2 {
    font-size: 1.6rem;
  }

  .contact-container {
    grid-template-columns: 1fr;
  }

  .about-content {
    flex-direction: column;
  }
}

@media screen and (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: rgba(255,255,255,0.72);
    backdrop-filter: var(--glass-blur);
    flex-direction: column;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--border-color);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 0.35s ease;
  }

  .dark-mode .nav-links {
    background-color: rgba(15, 23, 42, 0.72);
  }

  .nav-links.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }

  .nav-links li {
    margin: 10px 0;
  }

  .mobile-menu {
    display: flex;
  }

  .mobile-menu.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }

  .mobile-menu.active .bar:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }

  .hero-text h1 {
    font-size: 2.2rem;
  }

  /* Let the hero grow with its wrapped mobile content so it cannot overlap About. */
  #hero {
    height: auto;
    min-height: 100svh;
    margin-top: 0;
    padding: calc(var(--header-height) + 48px) 0 72px;
    align-items: flex-start;
  }

  .hero-content {
    padding: 0 20px;
  }

  .hero-text p {
    margin-bottom: 20px;
  }

  .social-links {
    margin-top: 22px;
  }

  .hero-buttons {
    flex-direction: column;
    max-width: 240px;
  }

  .timeline:before {
    left: 10px;
  }

  .timeline-item {
    margin-left: 40px;
  }

  .timeline-item:before {
    left: -30px;
  }

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

@media screen and (max-width: 576px) {
  .section {
    padding: 55px 0;
  }

  .section-header {
    margin-bottom: 34px;
  }

  .section-header h2 {
    font-size: 1.7rem;
  }

  .about-details {
    grid-template-columns: 1fr;
  }

  .timeline-header {
    flex-direction: column;
  }

  .timeline-period {
    margin-top: 6px;
  }
}
/* =========================================================
   FIXES: Dark mode link visibility + Dynamic Animated Background
   Paste at END of style.css
========================================================= */

/* ---------- Stronger animated background (visible in both modes) ---------- */
body {
  position: relative;
}

/* Animated gradient base layer */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;

  background: linear-gradient(
    120deg,
    rgba(37, 99, 235, 0.22),
    rgba(34, 197, 94, 0.18),
    rgba(99, 102, 241, 0.20),
    rgba(244, 63, 94, 0.12)
  );
  background-size: 350% 350%;
  animation: gradientShift 14s ease infinite;
}

/* Floating blobs layer (dynamic motion) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;

  background:
    radial-gradient(circle at 15% 20%, rgba(37, 99, 235, 0.35), transparent 45%),
    radial-gradient(circle at 85% 25%, rgba(34, 197, 94, 0.28), transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(99, 102, 241, 0.30), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(244, 63, 94, 0.18), transparent 55%);
  filter: blur(18px);
  animation: blobFloat 10s ease-in-out infinite alternate;
  opacity: 0.85;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes blobFloat {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-35px, -25px, 0) scale(1.08); }
}

/* ---------- Make sections look premium over background ---------- */
.section {
  position: relative;
}

.section .container {
  position: relative;
  z-index: 2;
}

/* Make all cards more readable on dark background */
.timeline-item,
.project-card,
.skill-category,
.contact-item,
.contact-form,
.about-text {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
}

/* ---------- Link visibility improvements (especially dark mode) ---------- */
a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  text-decoration: underline;
}

/* Force contact links and footer links to be readable */
.contact-detail a,
.footer-bottom a {
  color: var(--primary-color);
  font-weight: 700;
}

/* In dark mode, make links brighter */
.dark-mode a {
  color: #7dd3fc; /* bright sky */
}

.dark-mode a:hover {
  color: #a5b4fc; /* soft violet */
}

/* Make nav links readable in dark mode */
.dark-mode .nav-link {
  color: var(--text-color);
}

.dark-mode .nav-link:hover {
  background: rgba(96, 165, 250, 0.18);
  color: #7dd3fc;
}

/* Social icons visibility */
.dark-mode .social-link {
  color: #e2e8f0;
  border-color: rgba(226, 232, 240, 0.18);
}

/* Tech tags contrast */
.dark-mode .tech-tag {
  background: rgba(96, 165, 250, 0.18);
  color: #e2e8f0;
}

/* Skill tags contrast */
.dark-mode .skill-tag {
  background: rgba(96, 165, 250, 0.16);
  color: #e2e8f0;
}

/* Buttons: keep readable in dark mode */
.dark-mode .secondary-btn {
  color: #7dd3fc;
  border-color: rgba(226, 232, 240, 0.18);
  background: rgba(15, 23, 42, 0.25);
}

/* Improve text contrast in cards */
.timeline-description,
.project-description,
.about-text p,
.contact-detail p {
  color: var(--text-light);
}

/* ---------- Ensure particles are visible above background ---------- */
#particles-js {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.65;
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* ---------- Reduce motion for accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after {
    animation: none !important;
  }
}

/* =========================================================
   Hero introduction layout only
   Keeps the existing colours, animated background and site sections intact.
========================================================= */
#hero {
  align-items: flex-start;
  padding: 62px 0;
}

.hero-content {
  max-width: 1480px;
}

.hero-text {
  max-width: 1030px;
}

.hero-text h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(4.5rem, 6.7vw, 7.5rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.06em;
  margin-bottom: 36px;
}

.hero-eyebrow {
  display: flex;
  width: fit-content;
  padding: 0;
  margin-bottom: 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86rem !important;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero-text h2 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 26px;
}

.hero-text p:not(.hero-eyebrow) {
  max-width: 850px;
  font-size: 1.16rem;
  line-height: 1.7;
  margin-bottom: 34px;
}

.hero-buttons { gap: 12px; }

@media screen and (max-width: 1520px) {
  .hero-content { padding-left: 36px; padding-right: 36px; }
}

@media screen and (max-width: 768px) {
  #hero {
    align-items: flex-start;
    padding: calc(var(--header-height) + 48px) 0 72px;
  }

  .hero-content { padding-left: 20px; padding-right: 20px; }
  .hero-text h1 {
    font-size: 5rem;
    line-height: 1;
  }
  .hero-eyebrow { line-height: 1.6; }
}

/* Navigation polish */
.header-content {
  padding-top: 1px;
}

.logo a {
  display: inline-flex;
  align-items: center;
  min-width: 38px;
  letter-spacing: -0.06em;
}

.nav-links { gap: 4px; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  text-decoration: none;
}

.nav-link::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 6px;
  left: 12px;
  height: 2px;
  border-radius: 99px;
  background: var(--accent-color);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.nav-link:hover {
  background: rgba(37, 99, 235, 0.08);
  text-decoration: none;
}

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

.theme-toggle {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
}

@media screen and (max-width: 768px) {
  .header-content { padding-top: 0; }
  .nav-links { gap: 2px; }
  .nav-link { min-height: 40px; padding: 8px 18px; }
  .nav-link::after { right: 18px; bottom: 3px; left: 18px; }

  .mobile-menu {
    display: flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--section-bg);
  }

  .mobile-menu .bar {
    width: 21px;
    height: 2px;
    margin: 2.5px 0;
  }
}
