:root {
  --bg: #f5f7fc;
  --bg-alt: #e8eefb;
  --text: #0f1220;
  --muted: #4f5874;
  --card: rgba(255, 255, 255, 0.86);
  --border: rgba(15, 18, 32, 0.12);
  --brand: #1f63ff;
  --brand-soft: rgba(31, 99, 255, 0.18);
  --shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
}

body.dark {
  --bg: #05070d;
  --bg-alt: #0f1525;
  --text: #f2f5ff;
  --muted: #acb6cf;
  --card: rgba(11, 15, 28, 0.78);
  --border: rgba(255, 255, 255, 0.08);
  --brand: #7db1ff;
  --brand-soft: rgba(125, 177, 255, 0.16);
  --shadow: 0 24px 50px rgba(0, 0, 0, 0.58);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 15% 20%, var(--bg-alt), transparent 45%),
    radial-gradient(circle at 90% 8%, var(--brand-soft), transparent 34%), var(--bg);
  line-height: 1.5;
  transition: background-color 0.35s ease, color 0.35s ease;
}

.bg-ambient::before,
.bg-ambient::after {
  content: "";
  position: fixed;
  width: 25rem;
  height: 25rem;
  border-radius: 50%;
  filter: blur(75px);
  pointer-events: none;
  z-index: -1;
}

.bg-ambient::before {
  top: -9rem;
  left: -7rem;
  background: var(--brand-soft);
}

.bg-ambient::after {
  right: -9rem;
  bottom: -12rem;
  background: rgba(0, 203, 255, 0.12);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg), transparent 35%);
  border-bottom: 1px solid var(--border);
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 1.08rem;
}

.nav {
  display: flex;
  gap: 1rem;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.nav a:hover {
  color: var(--text);
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 999px;
  min-width: 7.2rem;
  height: 2.4rem;
  padding: 0 0.42rem;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.theme-icon {
  width: 2.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-align: center;
  font-size: 1rem;
  z-index: 1;
}

.theme-label {
  width: 2.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 0.82rem;
  z-index: 1;
}

.theme-thumb {
  position: absolute;
  left: 0.24rem;
  top: 50%;
  width: 3.4rem;
  height: 1.8rem;
  border-radius: 999px;
  background: var(--brand-soft);
  transform: translateY(-50%);
  transition: transform 0.25s ease;
}

body.dark .theme-thumb {
  transform: translate(3.2rem, -50%);
}

.layout {
  width: min(1200px, 92vw);
  margin: 1.5rem auto 2.6rem;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}

.card h1,
.card h2,
.card h3 {
  margin: 0 0 0.45rem;
  font-family: "Sora", sans-serif;
}

.card p {
  margin: 0.2rem 0;
  color: var(--muted);
}

.hero {
  grid-column: span 8;
  min-height: 17rem;
  background:
    radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--brand-soft), transparent 25%), transparent 38%),
    linear-gradient(140deg, color-mix(in srgb, var(--card), var(--brand-soft) 18%) 0%, var(--card) 56%);
  border-color: color-mix(in srgb, var(--border), var(--brand) 18%);
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -22% -15%;
  background:
    radial-gradient(circle at 28% 30%, color-mix(in srgb, var(--brand-soft), transparent 18%), transparent 52%),
    radial-gradient(circle at 80% 72%, color-mix(in srgb, #00d5ff, transparent 84%), transparent 44%);
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
  animation: ambient-flow 14s ease-in-out infinite alternate;
}

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

.hero-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.hero-main {
  min-width: 0;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1;
  margin-bottom: 0.85rem;
}

.hero-heading-secondary {
  margin: -0.2rem 0 0.8rem;
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--muted);
  font-weight: 600;
  line-height: 1.25;
}

.eyebrow {
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: var(--brand);
  text-transform: uppercase;
}

.subtitle {
  max-width: 44ch;
  font-size: 1.03rem;
}

.hero-photo {
  width: 9.4rem;
  min-width: 9.4rem;
  aspect-ratio: 1;
  margin: 0;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--border), var(--brand) 24%);
  overflow: hidden;
  position: relative;
  background: linear-gradient(145deg, color-mix(in srgb, var(--brand-soft), transparent 15%), color-mix(in srgb, var(--bg-alt), #000 6%));
  box-shadow: 0 14px 30px color-mix(in srgb, var(--brand-soft), transparent 45%);
  animation: photo-float 6.4s ease-in-out infinite;
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: -20%;
  border-radius: 30%;
  border: 1px solid color-mix(in srgb, var(--brand), transparent 65%);
  pointer-events: none;
  opacity: 0.5;
  animation: halo-spin 12s linear infinite;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.hero-photo.is-missing img {
  opacity: 0;
}

.hero-photo-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  color: var(--text);
  backdrop-filter: saturate(130%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.hero-photo-fallback strong {
  font-family: "Sora", sans-serif;
  font-size: 1.05rem;
}

.hero-photo-fallback span {
  font-size: 0.72rem;
  color: var(--muted);
}

.hero-photo.is-missing .hero-photo-fallback {
  opacity: 1;
}

.hero-impact {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.impact-item {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.52rem 0.58rem;
  background: color-mix(in srgb, var(--bg-alt), transparent 45%);
}

.impact-item strong {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: 0.88rem;
  line-height: 1.2;
  color: var(--text);
}

.impact-item span {
  display: block;
  margin-top: 0.16rem;
  font-size: 0.73rem;
  color: var(--muted);
  line-height: 1.35;
}

.chips {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 0.85rem;
}

.chips span {
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border), var(--brand) 24%);
  background: color-mix(in srgb, var(--brand-soft), transparent 22%);
  color: var(--text);
  font-size: 0.78rem;
  padding: 0.24rem 0.62rem;
  transition: transform 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

.chips span:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand-soft), transparent 12%);
}

.hero-cta {
  margin-top: 1.15rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.hero-main > * {
  opacity: 0;
  transform: translateY(12px);
}

.hero-photo,
.hero-cta .button {
  opacity: 0;
  transform: translateY(12px);
}

.hero.reveal.visible .eyebrow { animation: hero-rise 420ms ease forwards; }
.hero.reveal.visible h1 { animation: hero-rise 470ms ease 70ms forwards; }
.hero.reveal.visible .subtitle { animation: hero-rise 520ms ease 130ms forwards; }
.hero.reveal.visible .hero-impact { animation: hero-rise 560ms ease 190ms forwards; }
.hero.reveal.visible .chips { animation: hero-rise 560ms ease 220ms forwards; }
.hero.reveal.visible .hero-photo { animation: hero-rise 600ms ease 200ms forwards; }
.hero.reveal.visible .hero-cta .button:first-child { animation: hero-rise 560ms ease 260ms forwards; }
.hero.reveal.visible .hero-cta .button:last-child { animation: hero-rise 560ms ease 320ms forwards; }

.button {
  display: inline-block;
  padding: 0.58rem 0.88rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
  background: var(--brand);
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -125%;
  width: 52%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px color-mix(in srgb, var(--brand), transparent 65%);
}

.button:hover::after {
  animation: sweep-shine 0.8s ease;
}

.button-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.button-ghost:hover {
  border-color: var(--brand);
  box-shadow: none;
}

.ai-signal {
  margin-top: 0.78rem;
  border: 1px solid color-mix(in srgb, var(--border), var(--brand) 18%);
  background: color-mix(in srgb, var(--bg-alt), transparent 38%);
  border-radius: 999px;
  padding: 0.36rem 0.62rem;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.76rem;
  color: var(--muted);
}

.ai-signal strong {
  color: var(--text);
  font-weight: 600;
}

.signal-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #2ecf66;
  box-shadow: 0 0 0 0 rgba(46, 207, 102, 0.45);
  animation: signal-ping 1.7s ease-out infinite;
}

.signal-text-fade {
  opacity: 0;
  transition: opacity 0.18s ease;
}

.spotlight-card {
  grid-column: span 4;
  min-height: 17rem;
  background:
    radial-gradient(circle at 90% 12%, color-mix(in srgb, var(--brand-soft), transparent 20%), transparent 44%),
    linear-gradient(150deg, color-mix(in srgb, var(--card), var(--brand-soft) 10%), var(--card));
  border-color: color-mix(in srgb, var(--border), var(--brand) 14%);
  isolation: isolate;
}

.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(118deg, transparent 35%, rgba(255, 255, 255, 0.24) 50%, transparent 65%);
  transform: translateX(-120%);
  opacity: 0.22;
  animation: card-sheen 7s linear infinite;
}

.spotlight-head,
.spotlight-track,
.spotlight-dots {
  position: relative;
  z-index: 1;
}

.spotlight-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.spotlight-head h2 {
  margin: 0;
}

.spotlight-nav {
  display: inline-flex;
  gap: 0.32rem;
}

.spotlight-btn {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card), transparent 8%);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.spotlight-btn:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.spotlight-track {
  margin-top: 0.65rem;
}

.spotlight-slide {
  display: none;
  min-height: 14.1rem;
  animation: fade-in-up 0.35s ease;
}

.spotlight-slide.is-active {
  display: block;
}

.spotlight-slide h3 {
  margin: 0;
}

.spotlight-dots {
  margin-top: 0.5rem;
  display: flex;
  justify-content: center;
  gap: 0.36rem;
}

.spotlight-dot {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 999px;
  border: 0;
  background: color-mix(in srgb, var(--border), transparent 15%);
  cursor: pointer;
}

.spotlight-dot.is-active {
  background: var(--brand);
}

.contribution-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.contribution-head h3 {
  margin: 0;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  border: 1px solid color-mix(in srgb, var(--border), var(--brand) 22%);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  color: var(--text);
  background: color-mix(in srgb, var(--bg-alt), transparent 35%);
}

.live-pill span {
  width: 0.44rem;
  height: 0.44rem;
  border-radius: 50%;
  background: #2ecf66;
  box-shadow: 0 0 0 0 rgba(46, 207, 102, 0.42);
  animation: signal-ping 1.9s ease-out infinite;
}

.contribution-note {
  margin-top: 0.3rem;
  font-size: 0.84rem;
}

.gh-stats {
  margin-top: 0.55rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

.gh-stats div {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.32rem 0.4rem;
  background: color-mix(in srgb, var(--bg-alt), transparent 42%);
}

.gh-stats span {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: 0.9rem;
  color: var(--text);
}

.gh-stats small {
  font-size: 0.66rem;
  color: var(--muted);
}

.contribution-chart {
  margin-top: 0.55rem;
  display: block;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.48rem;
  background: color-mix(in srgb, var(--card), transparent 8%);
  overflow: hidden;
  position: relative;
}

.contribution-chart::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 42%, color-mix(in srgb, var(--brand-soft), transparent 50%) 50%, transparent 58%);
  transform: translateX(-120%);
  animation: chart-scan 4.6s ease-in-out infinite;
}

.contribution-chart img {
  width: 100%;
  height: 4rem;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.contribution-chart:hover img {
  transform: scale(1.01);
}

.ai-prompt-grid {
  margin-top: 0.62rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
}

.ai-prompt-btn {
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-alt), transparent 40%);
  color: var(--text);
  border-radius: 10px;
  padding: 0.38rem 0.52rem;
  text-align: left;
  font-size: 0.76rem;
  cursor: pointer;
}

.ai-prompt-btn:hover {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand-soft), transparent 38%);
}

.ai-preview {
  margin-top: 0.58rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem 0.58rem;
  background: color-mix(in srgb, var(--bg-alt), transparent 45%);
  min-height: 4.9rem;
}

.ai-preview-label {
  margin: 0;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

#ai-preview-output {
  margin-top: 0.25rem;
  font-size: 0.78rem;
  line-height: 1.42;
  color: var(--text);
}

.retro-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.retro-head span {
  font-size: 0.75rem;
  color: var(--muted);
}

.retro-head strong {
  color: var(--text);
  font-family: "Sora", sans-serif;
}

.snake-canvas {
  margin-top: 0.55rem;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background:
    linear-gradient(0deg, rgba(12, 17, 28, 0.88), rgba(12, 17, 28, 0.88)),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.06) 0,
      rgba(255, 255, 255, 0.06) 1px,
      transparent 1px,
      transparent 16px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.06) 0,
      rgba(255, 255, 255, 0.06) 1px,
      transparent 1px,
      transparent 16px
    );
}

.snake-controls {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.36rem;
}

.snake-btn {
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-alt), transparent 35%);
  color: var(--text);
  border-radius: 9px;
  height: 1.85rem;
  font-size: 0.78rem;
  cursor: pointer;
}

.snake-btn:hover {
  border-color: var(--brand);
}

.snake-reset {
  grid-column: span 1;
  font-size: 0.68rem;
}

.philosophy-hook {
  margin-top: 0.3rem;
  font-size: 0.92rem;
  position: relative;
  z-index: 1;
}

.philosophy-powered {
  margin-top: 0.1rem;
  font-size: 0.78rem;
  opacity: 0.88;
  position: relative;
  z-index: 1;
}

.resume-chat {
  margin-top: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--card), transparent 8%);
  padding: 0.58rem;
  display: grid;
  gap: 0.55rem;
  position: relative;
  z-index: 1;
}

.resume-chat-log {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg-alt), transparent 28%);
  min-height: 8.6rem;
  max-height: 11.5rem;
  overflow-y: auto;
  padding: 0.55rem;
  display: grid;
  gap: 0.45rem;
}

.chat-msg {
  display: flex;
}

.chat-msg p {
  margin: 0;
  max-width: 95%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.38rem 0.5rem;
  font-size: 0.78rem;
  line-height: 1.35;
}

.chat-msg.user {
  justify-content: flex-end;
}

.chat-msg.user p {
  background: var(--brand-soft);
  color: var(--text);
}

.chat-msg.bot p {
  background: transparent;
}

.chat-msg-bubble {
  border-radius: 16px;
  padding: 0.5rem 0.75rem;
  max-width: 90%;
  animation: fade-in-up 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.chat-msg-bubble p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  border: none;
  padding: 0;
}

.chat-msg.bot .chat-msg-bubble {
  background: color-mix(in srgb, var(--bg-alt), transparent 28%);
  border: 1px solid var(--border);
  color: var(--muted);
}

.chat-msg.user .chat-msg-bubble {
  background: var(--brand);
  color: #fff;
}

.chat-msg.user .chat-msg-bubble p {
  color: #fff;
}


.chat-typing {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--muted);
  margin: 0 2px;
  animation: pulse-dot 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

.chat-input-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.44rem;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.2rem 0.2rem 0.8rem;
  background: color-mix(in srgb, var(--bg), transparent 8%);
}

.resume-chat-form input {
  height: auto;
  border: none;
  background: transparent;
  padding: 0;
}

.resume-chat-form .button {
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.resume-chat-form .button:hover {
  transform: scale(1.05);
}

.resume-chat-form .button svg {
  width: 18px;
  height: 18px;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-dot {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.resume-chat-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.prompt-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 0.22rem 0.48rem;
  font-size: 0.7rem;
  cursor: pointer;
}

.prompt-btn:hover {
  border-color: var(--brand);
}

.resume-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.44rem;
}

.resume-chat-form input {
  width: 100%;
  min-width: 0;
  height: 2.15rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg), transparent 8%);
  color: var(--text);
  padding: 0 0.6rem;
}

.resume-chat-form .button {
  height: 2.15rem;
  padding: 0 0.8rem;
  font-size: 0.84rem;
}

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

.projects-showcase {
  grid-column: span 12;
}

.seo-section {
  grid-column: span 12;
}

.seo-section > p + p {
  margin-top: 0.65rem;
}

.service-list,
.case-study-list {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.service-list article,
.case-study-list article {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.8rem;
  background: color-mix(in srgb, var(--card), transparent 14%);
}

.case-study-list article p {
  margin-top: 0.35rem;
}

.case-study-list strong {
  color: var(--text);
}

.projects-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 0.8rem;
}

.project-filters {
  margin-top: 0.55rem;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.3rem 0.68rem;
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.filter-btn:hover {
  color: var(--text);
  border-color: var(--brand);
}

.filter-btn.is-active {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--text);
}

.carousel-shell {
  position: relative;
}

.carousel-window {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  touch-action: pan-x;
  /* Keep raised hover borders visible inside clipped carousel viewport */
  padding-top: 6px;
  margin-top: -6px;
  position: relative;

  /* Hide scrollbar for Chrome, Safari and Opera */
    &::-webkit-scrollbar {
        display: none;
    }

    /* Hide scrollbar for IE, Edge and Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.carousel-edge {
  position: absolute;
  top: 6px;
  bottom: 0;
  width: 5rem;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  z-index: 3;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.carousel-edge-left {
  left: 0;
  justify-content: flex-start;
  padding-left: 0.36rem;
}

.carousel-edge-right {
  right: 0;
  justify-content: flex-end;
  padding-right: 0.36rem;
}

.carousel-edge:hover:not(:disabled) {
  opacity: 1;
}

.carousel-edge:hover:not(:disabled) .carousel-btn {
  border-color: var(--brand);
  background: var(--brand-soft);
  transform: scale(1.06);
}

.carousel-edge:disabled {
  opacity: 0;
  cursor: not-allowed;
}

.carousel-btn {
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card), transparent 8%);
  color: var(--text);
  border-radius: 999px;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.4rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  pointer-events: none;
}

.projects-track {
  display: flex;
  gap: 0.8rem;
  width: max-content;
}

.empty-projects {
  margin: 0.4rem 0;
  color: var(--muted);
}

.project-card {
  flex: 0 0 var(--project-card-width, 20rem);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--card), transparent 10%);
  padding: 0.74rem;
  min-height: 29rem;
  display: flex;
  flex-direction: column;
  gap: 0.62rem;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
}

.project-shot {
  height: 9.6rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(130deg, color-mix(in srgb, var(--brand-soft), transparent 15%), transparent 55%),
    linear-gradient(160deg, color-mix(in srgb, var(--bg-alt), #000 10%), transparent 60%);
  display: flex;
  align-items: end;
  padding: 0.7rem;
}

.project-shot span {
  font-size: 0.72rem;
  color: var(--muted);
}

.project-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.4rem;
}

.project-title h3 {
  font-size: 1rem;
  margin: 0;
}

.platform-tags,
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.platform-tags span,
.tech-tags span {
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.7rem;
  padding: 0.16rem 0.5rem;
}

.project-links {
  margin-top: auto;
  display: flex;
  gap: 0.35rem;
}

.project-links a,
.project-links span {
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  border-radius: 9px;
  font-size: 0.74rem;
  padding: 0.24rem 0.48rem;
}

.project-links a:hover {
  border-color: var(--brand);
}

.skills {
  grid-column: span 7;
}

.skills-grid {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.skills-grid > div {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.72rem;
  background: color-mix(in srgb, var(--card), transparent 16%);
}

.experience {
  grid-column: span 5;
}

.experience article {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--border);
}

.profile {
  grid-column: span 5;
}

.profile ul {
  margin: 0.45rem 0 0;
  padding-left: 0;
  list-style: none;
}

.profile li {
  margin-bottom: 0.42rem;
  color: var(--muted);
}

.profile a {
  color: var(--brand);
}

.education {
  grid-column: span 7;
}

.meta {
  font-size: 0.9rem;
  color: var(--muted);
}

.footer {
  width: min(1200px, 92vw);
  margin: 0 auto 1.9rem;
  text-align: center;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(18px) scale(0.99);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ambient-flow {
  from {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }
  to {
    transform: translate3d(2%, 1%, 0) scale(1.06);
  }
}

@keyframes photo-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes halo-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes signal-ping {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 207, 102, 0.48);
  }
  75% {
    box-shadow: 0 0 0 7px rgba(46, 207, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 207, 102, 0);
  }
}

@keyframes sweep-shine {
  from {
    left: -125%;
  }
  to {
    left: 135%;
  }
}

@keyframes card-sheen {
  0%, 10% {
    transform: translateX(-120%);
  }
  30%, 100% {
    transform: translateX(140%);
  }
}

@keyframes chart-scan {
  0%, 15% {
    transform: translateX(-120%);
  }
  55%, 100% {
    transform: translateX(130%);
  }
}

@media (max-width: 1080px) {
  .project-card {
    min-height: 27rem;
  }
}

@media (max-width: 900px) {
  .hero,
  .spotlight-card,
  .skills,
  .experience,
  .profile,
  .education {
    grid-column: span 12;
  }

  .hero-photo {
    width: 7.4rem;
    min-width: 7.4rem;
  }

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

  .ai-signal {
    max-width: 100%;
  }
}

@media (max-width: 760px) {
  .project-card {
    min-height: 25rem;
  }

  .hero-content {
    flex-direction: column-reverse;
    align-items: center;
  }

  .hero-photo {
    width: 6.6rem;
    min-width: 6.6rem;
  }

  .hero-main {
    width: 100%;
  }

  .subtitle {
    font-size: 0.98rem;
  }

  .contribution-head {
    align-items: flex-start;
  }

  .live-pill {
    margin-top: 0.2rem;
  }

  .resume-chat-log {
    min-height: 7.2rem;
  }

  .resume-chat-form {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    row-gap: 0.55rem;
    padding: 0.7rem 0.9rem;
  }

  .brand {
    order: 1;
  }

  .theme-toggle {
    order: 2;
    min-width: 2.75rem;
    width: 2.75rem;
    height: 2.2rem;
    padding: 0;
    justify-content: center;
    box-shadow: none;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .projects-head {
    flex-wrap: wrap;
    align-items: center;
  }

  .carousel-shell {
    display: block;
  }

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

  .service-list,
  .case-study-list {
    grid-template-columns: 1fr;
  }

  .theme-label {
    display: none;
  }

  .theme-icon {
    width: 100%;
    font-size: 0.95rem;
  }

  .theme-thumb {
    left: 0.18rem;
    top: 0.18rem;
    width: calc(100% - 0.36rem);
    height: calc(100% - 0.36rem);
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .hero-photo,
  .hero-photo::after,
  .button:hover::after,
  .signal-dot,
  .live-pill span,
  .spotlight-card::before,
  .contribution-chart::after {
    animation: none !important;
  }

  .button,
  .chips span,
  .contribution-chart img {
    transition: none !important;
  }
}
