:root {
  --bg: #f1f5ff;
  --text: #0a1434;
  --muted: #4b5d85;
  --accent: #031af4;
  --accent-soft: #c0ccff;
  --card: #ffffff;
  --section: #f8fbff;
  --border: #dde2f2;
  --shadow: 0 14px 30px rgba(10, 20, 52, 0.1);
}

[data-theme="dark"] {
  --bg: #0b1227;
  --text: #e7ebff;
  --muted: #9aa5c7;
  --accent: #3f66ff;
  --accent-soft: #2f3f78;
  --card: #151f3b;
  --section: #101a33;
  --border: #2f3c61;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Roboto", sans-serif;
  background: radial-gradient(circle at 15% 10%, #eaf4ff 0%, #f5f9ff 42%, var(--bg) 100%);
  color: var(--text);
  overflow-wrap: break-word;
}

.container {
  width: min(1200px, 90vw);
  margin: 0 auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font-family: inherit;
}

.navbar {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

[data-theme="dark"] .navbar {
  background: rgba(7, 13, 30, 0.75);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.logo {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  color: var(--accent);
  font-size: 1.45rem;
}

.nav-links {
  display: flex;
  gap: 1.35rem;
  margin-left: 1.5rem;
  list-style: none;
  /* This removes the bullets */
  padding: 0;
  /* This removes the default indentation */
}

.nav-links li a {
  color: var(--text);
  font-weight: 500;
  padding: 0.65rem;
}

.nav-links li a:hover,
.nav-links li a:focus-visible {
  color: var(--accent);
}

.menu-button {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.hamburger-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  margin: 4px auto;
  transition: all 0.25s ease;
}

.menu-button.active .hamburger-bar:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

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

.menu-button.active .hamburger-bar:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.theme-toggle {
  border: 1px solid var(--border);
  background: none;
  border-radius: 8px;
  color: var(--muted);
  width: 38px;
  height: 38px;
  cursor: pointer;
}

.hero {
  padding-top: 80px;
  min-height: calc(100vh - 80px);
  background: linear-gradient(135deg, #5b7bff 0%, #112760 64%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.12) 0%, transparent 52%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  min-height: calc(100vh - 80px);
}

.hero-copy {
  max-width: 560px;
}

.hero .eyebrow {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.88rem;
  opacity: 0.8;
  margin-bottom: 0.4rem;
}

.hero h1 {
  font-size: clamp(2rem, 7vw, 3.6rem);
  line-height: 1.05;
  margin: 0.1rem 0 0.85rem;
}

.hero p {
  max-width: 520px;
  margin-bottom: 1.6rem;
  color: #e4ebff;
  font-size: 1.15rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.cta-btn {
  border-radius: 12px;
  background: #fff;
  color: #192668;
  border: 0;
  padding: 0.75rem 1.3rem;
  display: inline-block;
  font-weight: 700;
}

.cta-btn:hover,
.cta-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(17, 32, 98, 0.35);
}

.cta-btn.outlined {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  color: #fff;
}

.hero-metrics {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  padding: 1.4rem;
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0.8rem;
  color: #f1f6ff;
  text-align: center;
}

.hero-metrics article h3 {
  margin: 0;
  font-size: 2rem;
}

.hero-metrics article p {
  margin: 0.15rem 0 0;
  color: #dce5ff;
}

.hero-metrics article {
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  padding: 0.8rem;
  background: rgba(0, 0, 0, 0.18);
}

.hero-metrics article.high-contrast h3 {
  color: #ffffff;
  font-size: 2.2rem;
  font-weight: 700;
}

.hero-metrics article.high-contrast p {
  color: #f6f9ff;
  font-weight: 600;
}

.section {
  padding: 5rem 0;
  background: var(--section);
}

.section h2 {
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 0.6rem;
  color: var(--text);
}

.section-subtitle {
  color: var(--muted);
  margin-bottom: 2rem;
  max-width: 58ch;
}

.about-grid,
.project-grid,
.skills-grid,
.contact-grid {
  display: grid;
  gap: 1rem;
}

.about-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.about-grid article,
.project-card,
.contact-details {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 16px;
  padding: 1.25rem;
}

.about-grid h3,
.project-card h3,
.contact-details h3 {
  margin-top: 0;
}

.about-grid ul {
  margin: 0;
  padding: 0;
}

.about-grid li {
  font-weight: 500;
  margin: 0.35rem 0;
  list-style: inside square;
}

.project-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.project-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover,
.project-card:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
}

.project-card h3 {
  margin-bottom: 0.6rem;
}

.project-card p {
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.tags span {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.55rem;
}

.links a {
  margin-right: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

.links a:hover,
.links a:focus-visible {
  color: #0417c2;
}

.skills-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.skills-grid article h3 {
  font-size: 1rem;
  margin-bottom: 0.45rem;
}

.skill-bar {
  background: var(--border);
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
}

.skill-bar span {
  background: var(--accent);
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.7s ease;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.event {
  display: grid;
  gap: 0.9rem;
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
}

.event span {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.event h3 {
  margin: 0;
}

.event p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.contact-grid {
  grid-template-columns: 1.3fr 0.7fr;
  gap: 1.4rem;
}

.contact-form,
.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.contact-form input,
.contact-form textarea {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 0.95rem;
  background: var(--bg);
  color: var(--text);
}

.contact-form button {
  border: 0;
  border-radius: 10px;
  padding: 0.9rem;
  background: var(--accent);
  color: #fff;
  font-weight: bold;
  cursor: pointer;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.social-links a {
  color: var(--accent);
  font-weight: 600;
}

.social-links a:hover,
.social-links a:focus-visible {
  text-decoration: underline;
}

.footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 1rem 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
}

.footer-nav {
  display: flex;
  gap: 0.9rem;
}

.footer-nav a {
  color: var(--muted);
  font-size: 0.88rem;
}

.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: all 0.7s ease;
}

.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    padding: 2.5rem 0;
  }

  .hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 750px) {
  .navbar {
    padding: 0 0.85rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    width: 100%;
    flex-direction: column;
    align-items: center;
    background: var(--card);
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    margin: 0.55rem 0;
  }

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 510px) {

  .hero p,
  .section-subtitle {
    font-size: 0.95rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero {
    padding: 10rem 4%;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .about,
  .projects,
  .experience,
  .contact {
    padding: 4rem 1.5rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

/* Project cards stacked */
.project-grid {
  grid-template-columns: 1fr;
}

/* Improve About section on mobile */
.about {
  text-align: left;
}

.about h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.about p {
  font-size: 1rem;
  line-height: 1.7;
}

/* Improve Experience section on mobile */
.experience h2 {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.experience ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.experience li {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
}

.experience li strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.experience li::before {
  content: none;
}

/* === Handle Request Desktop Mode on Mobile (769px–1024px) === */
@media (min-width: 769px) and (max-width: 1024px) {
  body {
    font-size: 90%;
    /* shrink text so it doesn't look oversized */
    line-height: 1.4;
  }

  .hero,
  .about,
  .projects,
  .experience,
  .contact {
    padding: 4rem 5vw;
  }

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

  .hero-content p {
    font-size: 1.1rem;
  }

  .project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 columns instead of 1 squeezed */
    gap: 1.5rem;
  }

  .project-card {
    padding: 1.5rem;
  }

  .experience ul li {
    margin-bottom: 1.2rem;
    font-size: 1rem;
  }

  .contact-form {
    max-width: 600px;
    margin: auto;
  }
}