:root {
  color-scheme: light;
  --background: 220 30% 98%;
  --foreground: 224 50% 10%;
  --card: 0 0% 100%;
  --card-foreground: 224 50% 10%;
  --primary: 250 78% 52%;
  --primary-foreground: 0 0% 100%;
  --secondary: 220 25% 93%;
  --secondary-foreground: 224 50% 15%;
  --muted: 220 20% 94%;
  --muted-foreground: 224 25% 45%;
  --accent: 20 95% 57%;
  --border: 220 20% 88%;
  --ring: 250 78% 52%;
  --radius: 1rem;

  --glow-primary: 250 78% 52%;
  --gradient-start: 250 78% 52%;
  --gradient-end: 185 90% 45%;
  --orb-1: 250 78% 52%;
  --orb-2: 185 90% 55%;
  --orb-3: 20 95% 57%;
  --header-bg: hsl(var(--background) / 0.72);
  --shadow-card: 0 4px 24px hsl(220 50% 10% / 0.08);
  --shadow-hover: 0 8px 20px hsl(220 50% 10% / 0.15);
  --orb-opacity: 0.12;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: 222 47% 5%;
  --foreground: 214 40% 93%;
  --card: 222 40% 8%;
  --card-foreground: 214 40% 93%;
  --primary: 250 90% 65%;
  --primary-foreground: 222 47% 5%;
  --secondary: 222 30% 14%;
  --secondary-foreground: 214 40% 85%;
  --muted: 222 30% 12%;
  --muted-foreground: 214 25% 55%;
  --accent: 185 90% 55%;
  --border: 222 25% 16%;
  --ring: 250 90% 65%;
  --glow-primary: 250 90% 65%;
  --gradient-start: 250 90% 65%;
  --gradient-end: 185 90% 55%;
  --orb-1: 250 90% 65%;
  --orb-2: 185 90% 55%;
  --orb-3: 20 95% 57%;
  --header-bg: hsl(var(--background) / 0.74);
  --shadow-card: 0 10px 36px hsl(0 0% 0% / 0.42);
  --shadow-hover: 0 8px 20px hsl(0 0% 0% / 0.15);
  --orb-opacity: 0.08;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: "Inter", sans-serif;
  line-height: 1.55;
  font-feature-settings:
    "rlig" 1,
    "calt" 1;
  transition:
    background-color 0.25s ease,
    color 0.25s ease;
}

::selection {
  background: hsl(var(--primary) / 0.25);
  color: hsl(var(--foreground));
}

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

.site-shell {
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid hsl(var(--border) / 0.55);
  background: var(--header-bg);
  backdrop-filter: blur(16px);
}

.header-inner {
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.header-nav {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.header-nav a {
  color: hsl(var(--muted-foreground));
  font-weight: 600;
  transition: color 0.2s ease;
}

.header-nav a:hover {
  color: hsl(var(--foreground));
}

.theme-toggle {
  position: relative;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: hsl(var(--muted-foreground));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.theme-toggle:hover {
  background: hsl(var(--secondary) / 0.75);
  color: hsl(var(--foreground));
  transform: translateY(-1px);
}

.theme-toggle:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.theme-icon-wrap {
  position: relative;
  width: 1.1rem;
  height: 1.1rem;
}

.theme-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition:
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.25s ease;
}

.sun-icon {
  color: hsl(38 92% 50%);
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.moon-icon {
  color: hsl(var(--primary));
  opacity: 0;
  transform: rotate(-90deg) scale(0);
}

:root[data-theme="dark"] .sun-icon {
  opacity: 0;
  transform: rotate(90deg) scale(0);
}

:root[data-theme="dark"] .moon-icon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.section {
  padding: 4.5rem 0 0;
}

.hero {
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--primary) / 0.3);
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  font-weight: 600;
  font-size: 0.84rem;
}

.hero-title {
  margin: 1.2rem 0 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(2.25rem, 6vw, 4.1rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-role {
  margin: 0.8rem 0 0;
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  font-weight: 600;
  color: hsl(var(--foreground) / 0.9);
}

.hero-description {
  max-width: 36rem;
  margin: 1rem auto 0;
  font-size: 1.05rem;
  color: hsl(var(--muted-foreground));
}

.section-head {
  margin-bottom: 1.25rem;
}

.section-title {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  letter-spacing: -0.025em;
}

.section-subtitle {
  margin: 0.45rem 0 0;
  color: hsl(var(--muted-foreground));
}

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

.card {
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card) / 0.88);
  color: hsl(var(--card-foreground));
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(8px);
  padding: 1.4rem;
}

.card-hover {
  transition:
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow:
    0 24px 60px hsl(var(--glow-primary) / 0.25),
    var(--shadow-hover);
}

.project-name {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.18rem;
  font-weight: 700;
}

.project-description {
  margin: 0.6rem 0 1.1rem;
  color: hsl(var(--muted-foreground));
}

.contact-card {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: calc(var(--radius) - 0.35rem);
  height: 2.5rem;
  padding: 0 1rem;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.btn:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.btn-gradient {
  color: hsl(var(--primary-foreground));
  background: linear-gradient(
    135deg,
    hsl(var(--gradient-start)),
    hsl(var(--gradient-end))
  );
}

.btn-gradient:hover {
  opacity: 0.94;
  transform: translateY(-1px);
  box-shadow: 0 8px 30px hsl(var(--glow-primary) / 0.4);
}

.btn-outline {
  background: hsl(var(--background));
  border-color: hsl(var(--border));
  color: hsl(var(--foreground));
}

.btn-outline:hover {
  background: hsl(var(--secondary));
  border-color: hsl(var(--primary) / 0.35);
}

.site-footer {
  margin-top: 4.5rem;
  border-top: 1px solid hsl(var(--border) / 0.55);
}

.footer-inner {
  min-height: 4rem;
  display: flex;
  align-items: center;
}

.footer-inner p {
  margin: 0;
  color: hsl(var(--muted-foreground));
  font-size: 0.92rem;
}

.gradient-text {
  background: linear-gradient(
    135deg,
    hsl(var(--gradient-start)),
    hsl(var(--gradient-end))
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.gradient-text-warm {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(20 95% 57%));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.ambient-orbs {
  pointer-events: none;
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: var(--orb-opacity);
}

.orb-1 {
  width: 520px;
  height: 520px;
  top: -180px;
  left: -120px;
  background: hsl(var(--orb-1) / 0.14);
  animation: float 8s ease-in-out infinite;
}

.orb-2 {
  width: 430px;
  height: 430px;
  top: 32%;
  right: -160px;
  background: hsl(var(--orb-2) / 0.1);
  animation: float-alt 10s ease-in-out infinite;
}

.orb-3 {
  width: 340px;
  height: 340px;
  bottom: -110px;
  left: 30%;
  background: hsl(var(--orb-3) / 0.1);
  animation: float 14s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  33% {
    transform: translateY(-18px) rotate(2deg);
  }
  66% {
    transform: translateY(-10px) rotate(-2deg);
  }
}

@keyframes float-alt {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-22px) rotate(-3deg);
  }
}

@media (max-width: 640px) {
  .header-inner {
    min-height: 4.3rem;
  }

  .header-nav {
    gap: 0.65rem;
  }

  .theme-toggle {
    width: 2rem;
    height: 2rem;
  }

  .section {
    padding-top: 3.5rem;
  }

  .hero-description {
    font-size: 0.98rem;
  }

  .contact-card .btn {
    width: 100%;
  }
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }

  .theme-toggle {
    width: 2.25rem;
    height: 2.25rem;
  }
}
