:root {
  --bg: #0b0f14;
  --bg-2: #0f1720;
  --fg: #e8eef6;
  --muted: #9aa7b4;
  --accent: #44d0ff;
  --accent-2: #9b7bff;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.12);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --nav-bg: rgba(10, 14, 20, 0.65);
  --grid-gap: 28px;
  --radius: 18px;
  --max-w: 1180px;
}

:root[data-theme="light"] {
  --bg: #f7f8fb;
  --bg-2: #eef2f7;
  --fg: #0c1116;
  --muted: #5c6772;
  --accent: #1562ff;
  --accent-2: #ff7a59;
  --glass: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(10, 20, 30, 0.12);
  --shadow: 0 18px 48px rgba(20, 30, 40, 0.16);
  --nav-bg: rgba(255, 255, 255, 0.7);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  transition: background 0.4s ease, color 0.4s ease;
}

.page {
  overflow: hidden;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.page.loaded {
  opacity: 1;
  transform: translateY(0);
}

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

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(100% - 2.5rem, var(--max-w));
  margin: 0 auto;
}

.section {
  padding: 110px 0;
}

.section-head {
  margin-bottom: 36px;
}

.section-head h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
}

.section-head p {
  color: var(--muted);
  max-width: 680px;
}

.muted {
  color: var(--muted);
}

.nav {
  position: fixed;
  top: 0;
  inset-inline: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 4vw;
  z-index: 1000;
  backdrop-filter: blur(20px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--glass-border);
}

.logo {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.nav-links {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link,
.nav-cta {
  font-size: 0.95rem;
  color: var(--muted);
  transition: color 0.3s ease;
}

.nav-cta {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  color: var(--fg);
  background: var(--glass);
}

.nav-link:hover,
.nav-cta:hover {
  color: var(--fg);
}

.nav-underline {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  bottom: -8px;
  left: 0;
  width: 0;
  transition: transform 0.35s ease, width 0.35s ease;
  border-radius: 4px;
}

.menu-toggle,
.theme-toggle {
  background: none;
  border: 1px solid var(--glass-border);
  color: var(--fg);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
}

.menu-toggle {
  display: none;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding-top: 90px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 140%;
  background: radial-gradient(circle at 20% 20%, rgba(68, 208, 255, 0.35), transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(155, 123, 255, 0.35), transparent 55%),
    linear-gradient(120deg, rgba(5, 10, 20, 0.9), rgba(10, 16, 28, 0.9));
  animation: drift 14s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(0, -40px, 0) scale(1.04); }
}

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

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 18px;
}

.hero h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.8rem, 7vw, 4.8rem);
  letter-spacing: -0.03em;
}

.hero-title {
  font-size: clamp(1.1rem, 2.3vw, 1.6rem);
  color: var(--fg);
  margin-top: 12px;
}

.hero-subtitle {
  max-width: 600px;
  margin-top: 18px;
  color: var(--muted);
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.btn.primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #0a0f16;
  box-shadow: var(--shadow);
}

.btn.ghost {
  border-color: var(--glass-border);
  color: var(--fg);
  background: var(--glass);
}

.btn:hover {
  transform: translateY(-2px);
}

.scroll-indicator {
  margin-top: 60px;
  display: flex;
  gap: 8px;
}

.scroll-indicator span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
  animation: pulse 1.6s ease-in-out infinite;
}

.scroll-indicator span:last-child {
  animation-delay: 0.4s;
}

@keyframes pulse {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(10px); opacity: 1; }
}

.trust {
  padding: 24px 0;
  background: var(--bg-2);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.marquee {
  overflow: hidden;
}

.marquee-track {
  display: flex;
  gap: 48px;
  animation: marquee 18s linear infinite;
}

.marquee-track span {
  font-family: "Space Grotesk", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.8rem;
  color: var(--muted);
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  align-items: center;
}

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.card {
  padding: 28px;
}

.about-media {
  display: grid;
  place-items: center;
  padding: 24px;
}

.photo-placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(68, 208, 255, 0.25), rgba(155, 123, 255, 0.3));
  border: 1px dashed var(--glass-border);
}

.lead {
  font-size: 1.05rem;
  color: var(--fg);
  margin: 16px 0 20px;
}

.highlights {
  list-style: none;
  display: grid;
  gap: 12px;
  color: var(--muted);
}

.highlights li {
  padding-left: 18px;
  position: relative;
}

.highlights li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  left: 0;
  top: 7px;
}

.grid {
  display: grid;
  gap: var(--grid-gap);
}

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

.resume-block h3 {
  margin-bottom: 14px;
  font-family: "Space Grotesk", sans-serif;
}

.resume-list {
  list-style: none;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.resume-list strong {
  color: var(--fg);
  font-weight: 600;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list span {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  color: var(--muted);
}

/* TODO: Adjust tag colors if you want higher contrast in light mode */

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

.hover-lift {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.4);
}

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

.project-card {
  position: relative;
  overflow: hidden;
}

.project-image {
  height: 160px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(68, 208, 255, 0.4), rgba(155, 123, 255, 0.35));
  margin-bottom: 18px;
}

.project-card .tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.8rem;
}

.project-card .tags span {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
}

.project-card .links {
  margin-top: 16px;
  display: flex;
  gap: 14px;
  color: var(--accent);
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  box-shadow: 0 0 0 rgba(68, 208, 255, 0);
  transition: box-shadow 0.35s ease;
  pointer-events: none;
}

.project-card:hover::after {
  box-shadow: 0 0 40px rgba(68, 208, 255, 0.35);
}

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

.metric {
  text-align: center;
}

.metric-value {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.6rem;
  margin-bottom: 8px;
}

.metric-label {
  color: var(--muted);
}


.contact-form {
  display: grid;
  gap: 14px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--bg-2);
  color: var(--fg);
  font-family: "Inter", sans-serif;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
  color: var(--muted);
}

.footer {
  padding: 40px 0 60px;
  border-top: 1px solid var(--glass-border);
}

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

.back-to-top {
  color: var(--accent);
}

.fade-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: 68px;
    right: 20px;
    flex-direction: column;
    background: var(--nav-bg);
    padding: 18px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-underline {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
