/* ========================================
   1. Fonts and theme
======================================== */

:root {
  color-scheme: dark;

  --background: hsl(228 35% 8%);
  --foreground: hsl(36 41% 93%);
  --card: hsl(228 30% 12%);
  --primary: hsl(42 60% 58%);
  --primary-foreground: hsl(228 35% 8%);
  --secondary: hsl(228 35% 18%);
  --muted-foreground: hsl(228 15% 55%);
  --border: hsl(232 28% 23%);

  --font-sans: "Inter", sans-serif;
  --font-display: "Space Grotesk", sans-serif;

  --content-width: 1152px;
  --page-gutter: 24px;
  --header-height: 64px;
  --radius: 0.5rem;
}

:root {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-primary: var(--primary);
  --color-primary-hover: hsl(42 60% 65%);
  --color-secondary: var(--secondary);
  --color-muted: var(--muted-foreground);
  --color-border: var(--border);

  --font-mono: "JetBrains Mono", monospace;
}

/* ========================================
   2. Reset and base styles
======================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body,
button,
a {
  font-family: var(--font-sans);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

::selection {
  background: var(--primary);
  color: var(--primary-foreground);
}

/* ========================================
   3. Shared layout
======================================== */

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
  padding-top: var(--header-height);
}

.container {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.font-display {
  font-family: var(--font-display);
}

.text-primary {
  color: var(--primary);
}

.text-muted {
  color: var(--muted-foreground);
}

/* ========================================
   4. Navigation
======================================== */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;

  background: hsl(228 35% 8% / 80%);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);

  border-bottom: 1px solid hsl(232 28% 23% / 50%);
}

.navbar-inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;

  color: var(--muted-foreground);
  font-size: 0.875rem;
  font-weight: 500;

  transition: color 200ms ease;
  isolation: isolate;
}

.nav-link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: hsl(42 60% 58% / 10%);
  opacity: 0;
  transform: scale(0.92);
  transition:
    opacity 200ms ease,
    transform 250ms ease;
}

.nav-link:hover {
  color: var(--foreground);
}

.nav-link.active {
  color: var(--primary);
}

.nav-link.active::before {
  opacity: 1;
  transform: scale(1);
}

/* Mobile toggle */

.mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
}

.mobile-toggle svg {
  width: 20px;
  height: 20px;
}

/* Mobile navigation panel */

.mobile-panel {
  display: none;
  overflow: hidden;
  max-height: 0;
  opacity: 0;

  background: hsl(228 35% 8% / 95%);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);

  border-bottom: 1px solid transparent;

  transition:
    max-height 300ms ease,
    opacity 220ms ease,
    border-color 220ms ease;
}

.mobile-panel.open {
  max-height: 360px;
  opacity: 1;
  border-bottom-color: hsl(232 28% 23% / 50%);
}

.mobile-nav-inner {
  display: grid;
  gap: 4px;
  padding: 16px var(--page-gutter);
}

.mobile-nav-link {
  display: block;
  padding: 12px 16px;
  border-radius: var(--radius);

  color: var(--muted-foreground);
  font-size: 0.875rem;
  font-weight: 500;

  transition:
    color 200ms ease,
    background-color 200ms ease;
}

.mobile-nav-link:hover {
  color: var(--foreground);
  background: hsl(228 35% 18% / 50%);
}

.mobile-nav-link.active {
  color: var(--primary);
  background: hsl(42 60% 58% / 10%);
}

/* ========================================
   5. Footer
======================================== */

.site-footer {
  background: var(--background);
  border-top: 1px solid hsl(232 28% 23% / 50%);
}

.footer-inner {
  padding-block: 48px;
}

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-description {
  margin: 4px 0 0;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.social-link {
  display: flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;

  border: 1px solid hsl(232 28% 23% / 50%);
  border-radius: 50%;
  color: var(--muted-foreground);

  transition:
    color 200ms ease,
    border-color 200ms ease,
    transform 200ms ease;
}

.social-link:hover {
  color: var(--primary);
  border-color: hsl(42 60% 58% / 50%);
  transform: translateY(-2px);
}

.social-link svg {
  width: 16px;
  height: 16px;
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid hsl(232 28% 23% / 30%);
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

/* ========================================
   Responsive styles
======================================== */

/* ================================
   HOME PAGE — FEATURED PROJECTS
================================ */

.section {
  padding: 6rem 1.5rem;
}

.container {
  width: 100%;
  max-width: 1152px;
  margin-inline: auto;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 3.5rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--color-primary, #c5a46d);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  color: var(--color-foreground, #f5f3ef);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.accent-italic {
  color: var(--color-primary, #c5a46d);
  font-style: italic;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.project-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--color-border, #33343a);
  border-radius: 1rem;
  background: var(--color-card, #17191f);
  transition:
    transform 300ms ease,
    border-color 300ms ease,
    box-shadow 300ms ease;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-primary, #c5a46d);
  box-shadow: 0 16px 40px rgb(0 0 0 / 14%);
}

.project-image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 11;
  background: var(--color-border, #33343a);
}

.project-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

.project-card:hover .project-image {
  transform: scale(1.045);
}

/* ==================================
   FEATURED PROJECT CARD
================================== */

.project-card {
  cursor: pointer;
  border-radius: 1rem;
  transition:
    border-color 300ms ease,
    transform 300ms ease,
    box-shadow 300ms ease;
}

.project-card:hover {
  border-color: var(--color-project-hover, rgb(197 164 109 / 40%));
  box-shadow: 0 12px 32px rgb(0 0 0 / 12%);
}

/* Terminal-style header */

.project-terminal {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.25rem;
  padding-inline: 1rem;
  border-bottom: 1px solid var(--color-border, #33343a);
  background: var(--color-terminal-bg, rgb(255 255 255 / 3%));
}

.terminal-dots {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.375rem;
}

.terminal-dot {
  display: block;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
}

.terminal-dot-red {
  background: var(--color-terminal-red, rgb(239 68 68 / 50%));
}

.terminal-dot-yellow {
  background: var(--color-terminal-yellow, rgb(234 179 8 / 50%));
}

.terminal-dot-green {
  background: var(--color-terminal-green, rgb(34 197 94 / 50%));
}

.terminal-path {
  min-width: 0;
  margin-left: 0.5rem;
  overflow: hidden;
  color: var(--color-muted, #a3a3ad);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  line-height: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Project image */

.project-image-wrapper {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-border, #33343a);
}

.project-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.project-card:hover .project-image {
  transform: scale(1.05);
}

/* Project tags */

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}

.project-tag {
  padding: 0.125rem 0.5rem;
  border: 1px solid var(--color-tag-border, rgb(197 164 109 / 20%));
  border-radius: 0.25rem;
  background: var(--color-secondary, rgb(255 255 255 / 5%));
  color: var(--color-primary, #c5a46d);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  line-height: 1.25rem;
}

/* Project content */

.project-content {
  padding: 1.25rem;
}

.project-title {
  margin: 0;
  color: var(--color-foreground, #f5f3ef);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  transition: color 200ms ease;
}

.project-card:hover .project-title {
  color: var(--color-primary, #c5a46d);
}

.project-description {
  display: -webkit-box;
  margin: 0.375rem 0 0;
  overflow: hidden;
  color: var(--color-muted, #a3a3ad);
  font-size: 0.875rem;
  line-height: 1.625;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

/* Accessibility */

.project-card:focus-within {
  outline: 2px solid var(--color-primary, #c5a46d);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .project-image,
  .project-title {
    transition: none;
  }

  .project-card:hover {
    transform: none;
  }

  .project-card:hover .project-image {
    transform: none;
  }
}

.project-content {
  padding: 1.5rem;
}

.project-title {
  margin: 0 0 0.625rem;
  color: var(--color-foreground, #f5f3ef);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
}

.project-description {
  margin: 0;
  color: var(--color-muted, #a3a3ad);
  font-size: 0.9rem;
  line-height: 1.75;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.project-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--color-border, #33343a);
  border-radius: 999px;
  color: var(--color-muted, #a3a3ad);
  font-size: 0.75rem;
  line-height: 1.2;
}

/* ================================
   LINKS AND BUTTONS
================================ */

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-muted, #a3a3ad);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 200ms ease;
}

.text-link:hover {
  color: var(--color-primary, #c5a46d);
}

.text-link svg,
.button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 200ms ease;
}

.text-link:hover svg,
.button:hover svg {
  transform: translateX(3px);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 200ms ease,
    color 200ms ease,
    border-color 200ms ease,
    transform 200ms ease;
}

.button-primary {
  min-height: 48px;
  padding-inline: 2rem;
  background: var(--color-primary, #c5a46d);
  color: #111216;
}

.button-primary:hover {
  transform: translateY(-2px);
  background: var(--color-primary-hover, #d4b985);
}

.button-outline {
  border-color: var(--color-border, #33343a);
  color: var(--color-foreground, #f5f3ef);
}

.button-outline:hover {
  border-color: var(--color-primary, #c5a46d);
  color: var(--color-primary, #c5a46d);
}

.mobile-project-link {
  display: none;
  margin-top: 2rem;
  text-align: center;
}

/* ================================
   CALL TO ACTION
================================ */

.cta-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 4rem 3rem;
  border: 1px solid var(--color-border, #33343a);
  border-radius: 1.5rem;
  background: var(--color-card, #17191f);
  text-align: center;
}

.cta-glow {
  position: absolute;
  z-index: -1;
  top: -10rem;
  left: 50%;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  background: var(--color-primary, #c5a46d);
  opacity: 0.06;
  filter: blur(70px);
  transform: translateX(-50%);
  pointer-events: none;
}

.cta-content {
  position: relative;
}

.cta-description {
  max-width: 28rem;
  margin: 1rem auto 0;
  color: var(--color-muted, #a3a3ad);
  font-size: 1rem;
  line-height: 1.75;
}

.cta-button {
  margin-top: 2rem;
}

/* ========================================
   HERO SECTION
======================================== */

.hero-section {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 90vh;
  overflow: hidden;
  isolation: isolate;
  background: var(--background);
}

/* Background image and overlay */

.hero-background {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.hero-background-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.2;
}

.hero-background-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    hsl(228 35% 8% / 60%) 0%,
    hsl(228 35% 8% / 80%) 55%,
    var(--background) 100%
  );
}

/* Layout */

.hero-container {
  width: 40%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding: 5rem var(--page-gutter);
}

.hero-content {
  max-width: 48rem;
}

/* Status badge */

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 0.5rem 1rem;
  border: 1px solid hsl(42 60% 58% / 20%);
  border-radius: 0.25rem;
  background: hsl(42 60% 58% / 10%);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
}

.hero-sparkle-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

/* Main headline */

.hero-title {
  margin: 0;
  color: var(--foreground);
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.hero-highlight {
  color: var(--primary);
}

/* Description */

.hero-description {
  max-width: 36rem;
  margin: 2rem 0 0;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.8;
}

/* Buttons */

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}

.hero-button {
  min-height: 48px;
  padding-inline: 2rem;
  font-size: 0.875rem;
}

.hero-button.button-outline {
  border-color: hsl(36 41% 93% / 15%);
  background: transparent;
  color: var(--foreground);
}

.hero-button.button-outline:hover {
  background: hsl(228 35% 18% / 60%);
}

.hero-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Statistics */

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  max-width: 28rem;
  margin-top: 5rem;
}

.hero-stat-value {
  color: var(--foreground);
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1.3;
}

.hero-stat-label {
  margin-top: 0.25rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* Entrance animations */

.hero-enter {
  animation: heroFadeUp 800ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-stats-enter {
  animation-delay: 300ms;
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */

@media (max-width: 640px) {
  .hero-container {
    width: 100%;
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .hero-title {
    font-size: clamp(2.75rem, 11vw, 3.75rem);
  }

  .hero-description {
    font-size: 0.875rem;
    line-height: 1.8;
  }

  .hero-actions {
    align-items: stretch;
  }

  .hero-button {
    padding-inline: 1.5rem;
  }

  .hero-stats {
    gap: 1rem;
    margin-top: 4rem;
  }

  .hero-stat-value {
    font-size: 1.625rem;
  }

  .hero-stat-label {
    font-size: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-enter,
  .hero-stats-enter {
    animation: none;
  }
}

/* Statistics */

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  max-width: 28rem;
  margin-top: 5rem;
}

.hero-stat-value {
  color: var(--color-foreground, #f5f3ef);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1.3;
}

.hero-stat-label {
  margin-top: 0.25rem;
  color: var(--color-muted, #a3a3ad);
  font-size: 0.875rem;
}

/* Entrance animations */

.hero-enter {
  animation: heroFadeUp 800ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-stats-enter {
  animation-delay: 300ms;
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive styles */

@media (max-width: 640px) {
  .hero-section {
    min-height: 90vh;
  }

  .hero-container {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .hero-title {
    font-size: clamp(2.75rem, 11vw, 3.75rem);
  }

  .hero-description {
    font-size: 0.875rem;
    line-height: 1.8;
  }

  .hero-actions {
    align-items: stretch;
  }

  .hero-button {
    padding-inline: 1.5rem;
  }

  .hero-stats {
    gap: 1rem;
    margin-top: 4rem;
  }

  .hero-stat-value {
    font-size: 1.625rem;
  }

  .hero-stat-label {
    font-size: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-enter,
  .hero-stats-enter {
    animation: none;
  }
}

/* ================================
   SCROLL ANIMATIONS
================================ */

/* ==================================
   REUSABLE SCROLL REVEAL ANIMATION
================================== */

.animated-section {
  opacity: 0;
  transform: translateY(30px);

  transition:
    opacity 600ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 600ms cubic-bezier(0.22, 1, 0.36, 1);

  transition-delay: var(--animation-delay, 0ms);
}

.animated-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respect accessibility preferences */

@media (prefers-reduced-motion: reduce) {
  .animated-section {
    opacity: 1;
    transform: none;
    transition: none;
    transition-delay: 0ms;
  }
}

/* ==================================
   SKILLS & EXPERTISE
================================== */

.skills-section {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.skills-heading .eyebrow {
  margin-bottom: 0.75rem;
}

.skills-heading {
  margin-bottom: 0.75rem;
  color: var(--color-foreground, #f5f3ef);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 3.5rem;
}

.skill-card {
  height: 100%;
  min-width: 0;
  padding: 1.5rem;
  border: 1px solid var(--color-border, #33343a);
  border-radius: 1rem;
  background: var(--color-card, #17191f);
  transition:
    border-color 300ms ease,
    background-color 300ms ease,
    transform 300ms ease;
}

.skill-card:hover {
  border-color: var(--color-skill-hover-border, rgb(197 164 109 / 30%));
  transform: translateY(-3px);
}

.skill-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1rem;
  border-radius: 0.75rem;
  background: var(--color-skill-icon-bg, rgb(197 164 109 / 10%));
  color: var(--color-primary, #c5a46d);
  transition: background-color 300ms ease;
}

.skill-card:hover .skill-icon {
  background: var(--color-skill-icon-hover-bg, rgb(197 164 109 / 20%));
}

.skill-icon svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skill-title {
  margin: 0;
  color: var(--color-foreground, #f5f3ef);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}

.skill-description {
  margin: 0.5rem 0 0;
  color: var(--color-muted, #a3a3ad);
  font-size: 0.875rem;
  line-height: 1.75;
}

/* Tablet */

@media (max-width: 900px) {
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile */

@media (max-width: 640px) {
  .skills-section {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }

  .skills-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2.5rem;
  }

  .skill-card {
    padding: 1.25rem;
  }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  .skill-card,
  .skill-icon {
    transition: none;
  }

  .skill-card:hover {
    transform: none;
  }
}

/* Portfolio page */
.portfolio-page {
  padding-block: 5rem;
}

.portfolio-heading {
  max-width: 42rem;
}

.portfolio-intro {
  max-width: 36rem;
  margin-top: 1rem;
  color: var(--muted-foreground);
  font-size: 1.125rem;
  line-height: 1.8;
}

.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 3rem;
}

.portfolio-filter {
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: hsl(228 35% 18% / 50%);
  color: var(--muted-foreground);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 200ms,
    color 200ms,
    border-color 200ms;
}

.portfolio-filter:hover {
  background: var(--secondary);
  color: var(--foreground);
}

.portfolio-filter.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.portfolio-card {
  overflow: hidden;
  border: 1px solid hsl(232 28% 23% / 70%);
  border-radius: 1rem;
  background: var(--card);
  transition:
    border-color 250ms,
    transform 250ms;
}

.portfolio-card:hover {
  border-color: hsl(42 60% 58% / 45%);
  transform: translateY(-3px);
}

.portfolio-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--secondary);
}

.portfolio-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms;
}

.portfolio-card:hover .portfolio-card-image img {
  transform: scale(1.04);
}

.portfolio-card-content {
  padding: 1.5rem;
}

.portfolio-card-category {
  margin: 0 0 0.5rem;
  color: var(--primary);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.portfolio-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.portfolio-card-description {
  margin: 0.75rem 0 0;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.7;
}

.portfolio-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.portfolio-card-tag {
  padding: 0.25rem 0.5rem;
  border: 1px solid hsl(42 60% 58% / 20%);
  border-radius: 0.25rem;
  background: var(--secondary);
  color: var(--primary);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.75rem;
}

.portfolio-empty {
  margin-top: 5rem;
  color: var(--muted-foreground);
  text-align: center;
}

.portfolio-empty[hidden] {
  display: none;
}

/* Portfolio project list */
.portfolio-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2.5rem;
}

.portfolio-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  overflow: hidden;
  border: 1px solid hsl(232 28% 23% / 50%);
  border-radius: 1rem;
  background: var(--card);
  color: var(--foreground);
  text-decoration: none;
  transition:
    border-color 300ms,
    background 300ms;
}

.portfolio-item:hover {
  border-color: hsl(42 60% 58% / 40%);
}

.portfolio-item-number {
  display: none;
  color: var(--border);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 1.875rem;
  font-weight: 700;
  transition: color 300ms;
}

.portfolio-item:hover .portfolio-item-number {
  color: hsl(42 60% 58% / 40%);
}

.portfolio-item-image {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 0.75rem;
  background: var(--secondary);
}

.portfolio-item-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms;
}

.portfolio-item:hover .portfolio-item-image img {
  transform: scale(1.05);
}

.portfolio-item-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}

.portfolio-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.portfolio-item-tag {
  padding: 0.125rem 0.5rem;
  border: 1px solid hsl(42 60% 58% / 20%);
  border-radius: 0.25rem;
  background: var(--secondary);
  color: var(--primary);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.75rem;
}

.portfolio-item-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  transition: color 200ms;
}

.portfolio-item:hover .portfolio-item-title {
  color: var(--primary);
}

.portfolio-item-description {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.7;
}

.portfolio-item-case-study {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: opacity 300ms;
}

.portfolio-item-corner-arrow {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid hsl(232 28% 23% / 50%);
  border-radius: 50%;
  color: var(--muted-foreground);
  opacity: 0;
  transition:
    opacity 300ms,
    color 300ms,
    border-color 300ms;
}

.portfolio-item:hover .portfolio-item-corner-arrow {
  border-color: hsl(42 60% 58% / 50%);
  color: var(--primary);
  opacity: 1;
}

.portfolio-empty[hidden] {
  display: none;
}

@media (min-width: 768px) {
  .portfolio-item {
    grid-template-columns: 60px minmax(0, 1fr) minmax(0, 1.2fr);
  }

  .portfolio-item-number {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .portfolio-item-image {
    aspect-ratio: 4 / 3;
  }

  .portfolio-item-case-study {
    opacity: 0;
  }

  .portfolio-item:hover .portfolio-item-case-study {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-item,
  .portfolio-item-image img,
  .portfolio-item-title,
  .portfolio-item-number,
  .portfolio-item-case-study,
  .portfolio-item-corner-arrow {
    transition: none;
  }
}

@media (min-width: 768px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-card,
  .portfolio-card-image img,
  .portfolio-filter {
    transition: none;
  }
}

/* ================================
   RESPONSIVE LAYOUT
================================ */

@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card:last-child {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 4.5rem 1.5rem;
  }

  .section-heading {
    margin-bottom: 2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .project-content {
    padding: 1.25rem;
  }

  .desktop-only {
    display: none;
  }

  .mobile-project-link {
    display: block;
  }

  .cta-card {
    padding: 3rem 1.5rem;
    border-radius: 1.25rem;
  }

  .cta-glow {
    width: 18rem;
    height: 18rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .animated-section,
  .project-card,
  .project-image,
  .button,
  .text-link,
  .text-link svg,
  .button svg {
    transition: none;
  }

  .animated-section {
    opacity: 1;
    transform: none;
  }

  .project-card:hover,
  .button-primary:hover {
    transform: none;
  }

  .project-card:hover .project-image {
    transform: none;
  }
}

/* ========================================
   Responsive styles
======================================== */

@media (min-width: 768px) {
  .footer-top {
    flex-direction: row;
  }

  .mobile-toggle,
  .mobile-panel {
    display: none;
  }
}

@media (max-width: 767px) {
  .desktop-nav {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .mobile-panel {
    display: block;
  }
}

/* Respect reduced-motion preferences */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* Project detail page */

.project-detail-page {
  padding: 4rem 0 6rem;
}

.project-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 200ms ease;
}

.project-back-link:hover {
  color: var(--primary);
}

.project-detail-heading {
  max-width: 800px;
  margin-bottom: 3rem;
}

.project-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.project-detail-tag {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 0.35rem;
  color: var(--primary);
  background: var(--secondary);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.75rem;
}

.project-detail-description {
  max-width: 680px;
  color: var(--muted-foreground);
  font-size: 1.05rem;
  line-height: 1.8;
}

.project-detail-hero {
  margin: 0 0 4rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.project-detail-hero img {
  display: block;
  width: 100%;
  max-height: 650px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.project-detail-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr);
  gap: 3rem;
  padding: 2rem 0 3rem;
  border-bottom: 1px solid var(--border);
}

.project-detail-page h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.project-detail-overview p,
.project-detail-content p {
  color: var(--muted-foreground);
  line-height: 1.85;
}

.project-detail-meta {
  display: grid;
  gap: 1.25rem;
  margin: 0;
}

.project-detail-meta dt {
  margin-bottom: 0.35rem;
  color: var(--muted-foreground);
  font-size: 0.8rem;
}

.project-detail-meta dd {
  margin: 0;
  font-weight: 500;
}

.project-detail-services,
.project-detail-results,
.project-detail-content {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
}

.project-detail-services ul,
.project-detail-content ul {
  display: grid;
  gap: 0.75rem;
  padding-left: 1.25rem;
  color: var(--muted-foreground);
  line-height: 1.8;
}

.project-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.project-metric {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.project-metric strong {
  color: var(--primary);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 2rem);
}

.project-metric span {
  color: var(--muted-foreground);
  font-size: 0.85rem;
  line-height: 1.5;
}

.project-detail-content h2,
.project-detail-content h3 {
  margin: 2rem 0 0.75rem;
  font-family: var(--font-display);
}

.project-detail-content h2:first-child,
.project-detail-content h3:first-child {
  margin-top: 0;
}

.project-detail-content code {
  padding: 0.15rem 0.35rem;
  border-radius: 0.25rem;
  background: var(--secondary);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
}

.project-detail-end {
  padding-top: 2rem;
}

@media (max-width: 767px) {
  .project-detail-page {
    padding-top: 2.5rem;
  }

  .project-detail-overview {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .project-metrics {
    grid-template-columns: 1fr;
  }

  .project-detail-hero img {
    aspect-ratio: 4 / 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-back-link {
    transition: none;
  }
}

/* ========================================
   ABOUT PAGE
======================================== */

.about-page {
  padding: 80px 0 100px;
  overflow: hidden;
}

.about-page .container {
  max-width: 1152px;
}

/* Hero */

.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 64px;
}

.about-eyebrow {
  margin: 0 0 14px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.about-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(38px, 4.5vw, 58px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.about-title span {
  color: var(--primary);
}

.about-intro-copy {
  display: grid;
  gap: 16px;
  margin-top: 28px;
  color: var(--muted-foreground);
  font-size: 15px;
  line-height: 1.85;
}

.about-intro-copy p {
  margin: 0;
}

/* Portrait */

.about-portrait-wrapper {
  position: relative;
  min-width: 0;
}

.about-portrait {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
}

.about-portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.about-portrait-glow {
  position: absolute;
  z-index: 0;
  right: -20px;
  bottom: -20px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.13;
  filter: blur(45px);
  pointer-events: none;
}

/* Section headings */

.about-values-section,
.about-experience-section {
  margin-top: 112px;
}

.about-section-heading {
  margin-bottom: 36px;
}

.about-section-heading .about-eyebrow {
  margin-bottom: 12px;
}

.about-section-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 600;
  letter-spacing: -0.025em;
}

/* Values cards */

.about-values-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.about-value-card {
  height: 100%;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  transition:
    border-color 250ms ease,
    transform 250ms ease,
    background-color 250ms ease;
}

.about-value-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.about-value-icon {
  display: flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
}

.about-value-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.about-value-card p {
  margin: 10px 0 0;
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 1.75;
}

/* Experience timeline */

.about-timeline {
  display: flex;
  flex-direction: column;
}

.about-timeline-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 24px;
  min-height: 120px;
}

.about-timeline-marker-column {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about-timeline-icon {
  display: flex;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--card);
  color: var(--primary);
}

.about-timeline-line {
  width: 1px;
  flex: 1;
  min-height: 40px;
  margin-top: 8px;
  background: var(--border);
}

.about-timeline-content {
  padding: 2px 0 36px;
}

.about-timeline-year {
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

.about-timeline-content h3 {
  margin: 7px 0 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}

.about-timeline-content p {
  max-width: 650px;
  margin: 8px 0 0;
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 1.8;
}

/* Reveal animation */

.about-page .animated-section {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 600ms ease,
    transform 600ms ease;
  transition-delay: var(--animation-delay, 0ms);
}

.about-page .animated-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive layouts */

@media (max-width: 900px) {
  .about-hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
    gap: 36px;
  }

  .about-title {
    font-size: clamp(36px, 5vw, 48px);
  }

  .about-values-section,
  .about-experience-section {
    margin-top: 88px;
  }
}

@media (max-width: 680px) {
  .about-page {
    padding: 48px 0 72px;
  }

  .about-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .about-title {
    font-size: clamp(38px, 10vw, 50px);
  }

  .about-intro-copy {
    margin-top: 22px;
    font-size: 14px;
  }

  .about-portrait-wrapper {
    width: 100%;
    max-width: 440px;
    margin-inline: auto;
  }

  .about-portrait img {
    aspect-ratio: 5 / 4;
  }

  .about-values-section,
  .about-experience-section {
    margin-top: 72px;
  }

  .about-section-heading {
    margin-bottom: 26px;
  }

  .about-values-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .about-value-card {
    padding: 22px;
  }

  .about-timeline-item {
    grid-template-columns: 36px minmax(0, 1fr);
    column-gap: 16px;
  }

  .about-timeline-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .about-timeline-content {
    padding-bottom: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-page .animated-section,
  .about-value-card {
    transition: none;
  }

  .about-page .animated-section {
    transform: none;
  }
}

/* ========================================
   CONTACT PAGE
======================================== */

.contact-page {
  padding: 80px 0 100px;
}

.contact-page .container {
  max-width: 1152px;
}

/* Heading */

.contact-heading {
  max-width: 760px;
}

.contact-eyebrow {
  margin: 0 0 14px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.contact-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.contact-title span {
  color: var(--primary);
  font-style: italic;
}

.contact-intro {
  max-width: 620px;
  margin: 20px 0 0;
  color: var(--muted-foreground);
  font-size: 17px;
  line-height: 1.8;
}

/* Main layout */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 64px;
  align-items: start;
  margin-top: 64px;
}

.contact-form-column,
.contact-info-column {
  min-width: 0;
}

/* Form */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.contact-field label {
  color: var(--foreground);
  font-size: 13px;
  font-weight: 500;
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--foreground);
  font: inherit;
  font-size: 14px;
  transition:
    border-color 200ms ease,
    box-shadow 200ms ease;
}

.contact-field input {
  min-height: 48px;
  padding: 12px 14px;
}

.contact-field textarea {
  min-height: 160px;
  padding: 14px;
  line-height: 1.7;
  resize: vertical;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
  color: var(--muted-foreground);
  opacity: 0.8;
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
}

.contact-submit {
  display: inline-flex;
  width: fit-content;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 0 22px;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-foreground);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    opacity 200ms ease,
    transform 200ms ease;
}

.contact-submit:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.contact-submit:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 3px;
}

.contact-form-status {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.6;
}

/* Contact information */

.contact-info-column {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-info-icon {
  display: flex;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: var(--primary);
}

.contact-info-copy {
  min-width: 0;
}

.contact-info-label {
  margin: 1px 0 5px;
  color: var(--muted-foreground);
  font-size: 13px;
}

.contact-info-value {
  margin: 0;
  color: var(--foreground);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

a.contact-info-value {
  text-decoration: none;
  transition: color 200ms ease;
}

a.contact-info-value:hover {
  color: var(--primary);
}

/* Quick contact card */

.contact-chat-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
}

.contact-chat-card h2 {
  margin: 0;
  color: var(--foreground);
  font-size: 15px;
  font-weight: 600;
}

.contact-chat-card p {
  margin: 12px 0 20px;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.8;
}

.contact-chat-card a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.contact-chat-card a:hover {
  text-decoration: underline;
}

/* Reveal animation */

.contact-page .animated-section {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 600ms ease,
    transform 600ms ease;
  transition-delay: var(--animation-delay, 0ms);
}

.contact-page .animated-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */

@media (max-width: 900px) {
  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
    margin-top: 48px;
  }

  .contact-info-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 28px;
  }

  .contact-info-list {
    gap: 24px;
  }
}

@media (max-width: 600px) {
  .contact-page {
    padding: 48px 0 72px;
  }

  .contact-title {
    font-size: clamp(34px, 9vw, 46px);
  }

  .contact-intro {
    font-size: 15px;
  }

  .contact-layout {
    gap: 40px;
    margin-top: 36px;
  }

  .contact-field-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .contact-submit {
    width: 100%;
  }

  .contact-info-column {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .contact-chat-card {
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-page .animated-section,
  .contact-submit,
  .contact-field input,
  .contact-field textarea {
    transition: none;
  }

  .contact-page .animated-section {
    transform: none;
  }
}

/* ============================
   LAB PAGE
============================ */

.lab-page {
  padding-top: 80px;
  padding-bottom: 100px;
}

.lab-content-width {
  max-width: 960px;
  margin-inline: auto;
}

.lab-masthead {
  margin-bottom: 56px;
}

.lab-terminal-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 15px;
  margin-bottom: 24px;
  color: var(--primary);
  background: hsl(42 60% 58% / 0.08);
  border: 1px solid hsl(42 60% 58% / 0.2);
  border-radius: 5px;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
}

.lab-masthead h1 {
  margin: 0;
  color: var(--foreground);
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.lab-masthead > p {
  max-width: 570px;
  margin-top: 18px;
  color: var(--muted-foreground);
  font-size: 18px;
  line-height: 1.8;
}

/* Featured post */

.lab-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: var(--card);
  border: 1px solid hsl(232 28% 23% / 0.7);
  border-radius: 16px;
  transition: border-color 300ms ease;
  align-items: stretch;
}

.lab-featured:hover {
  border-color: hsl(42 60% 58% / 0.4);
}

.lab-featured-image {
  position: relative;
  min-height: 100%;
  height: 100%;
  aspect-ratio: auto;
  overflow: hidden;
}

.lab-featured-image img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lab-featured:hover .lab-featured-image img {
  transform: scale(1.05);
}

.lab-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 55%, hsl(228 30% 12% / 0.4));
  pointer-events: none;
}

.lab-featured-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 10px;
  color: var(--primary);
  background: hsl(228 35% 8% / 0.8);
  border: 1px solid hsl(42 60% 58% / 0.3);
  border-radius: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  backdrop-filter: blur(8px);
}

.lab-featured-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px;
}

.lab-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--muted-foreground);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}

.lab-category {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
}

.lab-meta-separator {
  color: var(--border);
}

.lab-featured-body h2 {
  margin: 0;
  color: var(--foreground);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  transition: color 200ms ease;
}

.lab-featured:hover h2,
.lab-post-card:hover h3 {
  color: var(--primary);
}

.lab-excerpt,
.lab-post-body > p {
  color: var(--muted-foreground);
  line-height: 1.8;
}

.lab-excerpt {
  margin-top: 16px;
  font-size: 14px;
}

.lab-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.lab-tag {
  padding: 4px 8px;
  color: var(--muted-foreground);
  background: var(--secondary);
  border: 1px solid hsl(232 28% 23% / 0.7);
  border-radius: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
}

.lab-read-link {
  margin-top: 24px;
  color: var(--primary);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}

/* Sections and archive */

.lab-section {
  margin-top: 64px;
}

.lab-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid hsl(232 28% 23% / 0.6);
}

.lab-section-heading p {
  margin: 0;
  color: var(--primary);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lab-section-heading > span {
  color: var(--muted-foreground);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}

.lab-post-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 140px;
  align-items: start;
  gap: 24px;
  padding: 24px 0;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid hsl(232 28% 23% / 0.55);
}

.lab-date-rail {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 4px;
  color: var(--muted-foreground);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}

.lab-date-rail span:first-child {
  color: hsl(36 41% 93% / 0.7);
}

.lab-date-dash {
  color: var(--border);
}

.lab-post-body h3 {
  margin: 9px 0 0;
  color: var(--foreground);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  transition: color 200ms ease;
}

.lab-post-body > p {
  margin-top: 9px;
  font-size: 13px;
}

.lab-post-body .lab-tags {
  margin-top: 14px;
}

.lab-post-thumbnail {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
}

.lab-post-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  transition:
    opacity 500ms ease,
    transform 500ms ease;
}

.lab-post-card:hover .lab-post-thumbnail img {
  opacity: 1;
  transform: scale(1.05);
}

/* Code snippets */

.lab-snippets-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.lab-snippet {
  min-width: 0;
  overflow: hidden;
  background: var(--card);
  border: 1px solid hsl(232 28% 23% / 0.7);
  border-radius: 16px;
  transition: border-color 300ms ease;
}

.lab-snippet:hover {
  border-color: hsl(42 60% 58% / 0.4);
}

.lab-snippet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 42px;
  padding: 0 14px;
  background: hsl(228 35% 18% / 0.3);
  border-bottom: 1px solid hsl(232 28% 23% / 0.6);
}

.lab-snippet-heading,
.lab-window-dots {
  display: flex;
  align-items: center;
}

.lab-snippet-heading {
  min-width: 0;
  gap: 12px;
  color: var(--muted-foreground);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}

.lab-window-dots {
  flex-shrink: 0;
  gap: 5px;
}

.lab-window-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.lab-window-dots span:nth-child(1) {
  background: hsl(0 70% 60% / 0.55);
}

.lab-window-dots span:nth-child(2) {
  background: hsl(45 85% 60% / 0.55);
}

.lab-window-dots span:nth-child(3) {
  background: hsl(135 55% 50% / 0.55);
}

.lab-copy-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  color: var(--muted-foreground);
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  cursor: pointer;
  transition:
    color 200ms ease,
    background 200ms ease;
}

.lab-copy-button:hover {
  color: var(--primary);
  background: var(--secondary);
}

.lab-copy-button.is-copied {
  color: #4ade80;
}

.lab-snippet pre {
  padding: 20px;
  margin: 0;
  color: var(--muted-foreground);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  line-height: 1.8;
  white-space: pre;
  tab-size: 2;
}

.lab-snippet:hover pre {
  color: hsl(36 41% 93% / 0.8);
}

.lab-snippet code {
  font: inherit;
}

/* Stack */

.lab-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lab-stack-item {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  margin: 0;
  color: var(--muted-foreground);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
  transition:
    color 200ms ease,
    border-color 200ms ease,
    transform 200ms ease;
}

.lab-stack-item:hover {
  color: var(--primary);
  border-color: hsl(42 60% 58% / 0.4);
  transform: scale(1.05);
}

/* Article detail */

.lab-back-link {
  display: inline-block;
  margin-bottom: 36px;
  color: var(--primary);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  text-decoration: none;
}

.lab-back-link:hover {
  text-decoration: underline;
}

.lab-article-header {
  margin-bottom: 32px;
}

.lab-article-header h1 {
  margin: 0;
  color: var(--foreground);
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.lab-article-header > p {
  margin-top: 20px;
  color: var(--muted-foreground);
  font-size: 17px;
  line-height: 1.8;
}

.lab-article-cover {
  display: block;
  width: 100%;
  max-height: 440px;
  margin-bottom: 40px;
  object-fit: cover;
  border-radius: 14px;
}

.lab-article-content {
  max-width: 760px;
  margin-inline: auto;
  color: var(--muted-foreground);
  font-size: 15px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.lab-article-content h2 {
  margin: 42px 0 14px;
  color: var(--foreground);
  font-family: var(--font-display);
  font-size: 25px;
  line-height: 1.3;
}

.lab-article-content h3 {
  margin: 32px 0 12px;
  color: var(--foreground);
  font-family: var(--font-display);
  font-size: 19px;
}

.lab-article-content p {
  margin: 0 0 20px;
}

.lab-article-content ul {
  padding-left: 24px;
  margin: 0 0 24px;
}

.lab-article-content li {
  padding-left: 4px;
  margin-bottom: 8px;
}

.lab-article-content strong {
  color: var(--foreground);
}

.lab-article-content p code {
  padding: 2px 5px;
  background: var(--secondary);
  border-radius: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9em;
}

.lab-article-code {
  overflow-x: auto;
  padding: 20px;
  margin: 20px 0 28px;
  color: var(--foreground);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  line-height: 1.8;
  white-space: pre;
}

.lab-not-found {
  padding-top: 24px;
  color: var(--muted-foreground);
}

.lab-not-found a {
  color: var(--primary);
}

/* Responsive layout */

@media (max-width: 760px) {
  .lab-page {
    padding-top: 56px;
    padding-bottom: 72px;
  }

  .lab-featured {
    grid-template-columns: 1fr;
  }

  .lab-featured-image {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .lab-image-overlay {
    background: linear-gradient(
      to top,
      hsl(228 30% 12% / 0.8),
      transparent 65%
    );
  }

  .lab-featured-body {
    padding: 24px;
  }

  .lab-post-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .lab-date-rail {
    flex-direction: row;
    align-items: center;
    gap: 9px;
  }

  .lab-date-dash {
    display: none;
  }

  .lab-post-thumbnail {
    display: none;
  }

  .lab-snippets-grid {
    grid-template-columns: 1fr;
  }

  .lab-section {
    margin-top: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lab-featured,
  .lab-featured-image img,
  .lab-post-thumbnail img,
  .lab-snippet,
  .lab-stack-item,
  .lab-copy-button {
    transition: none;
  }
}
