/* thedan.dev: light/dark theme tokens */
:root {
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --accent: #512BD4;
  --accent-hover: #4527A0;
  --accent-muted: rgba(81, 43, 212, 0.12);

  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --surface: #ffffff;
  --surface-hover: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 4px 12px rgba(15, 23, 42, 0.08), 0 24px 48px rgba(15, 23, 42, 0.06);
  --header-bg: rgba(248, 250, 252, 0.85);
  --hero-glow: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(81, 43, 212, 0.14), transparent);
  --success: #059669;
  --success-bg: rgba(5, 150, 105, 0.1);
}

[data-theme="dark"] {
  --accent: #7B61FF;
  --accent-hover: #9580FF;
  --accent-muted: rgba(123, 97, 255, 0.16);

  --bg: #0b1120;
  --bg-alt: #111827;
  --surface: #151f32;
  --surface-hover: #1a2740;
  --border: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.35), 0 24px 48px rgba(0, 0, 0, 0.25);
  --header-bg: rgba(11, 17, 32, 0.85);
  --hero-glow: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(123, 97, 255, 0.2), transparent);
  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #7B61FF;
    --accent-hover: #9580FF;
    --accent-muted: rgba(123, 97, 255, 0.16);
    --bg: #0b1120;
    --bg-alt: #111827;
    --surface: #151f32;
    --surface-hover: #1a2740;
    --border: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.35), 0 24px 48px rgba(0, 0, 0, 0.25);
    --header-bg: rgba(11, 17, 32, 0.85);
    --hero-glow: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(123, 97, 255, 0.2), transparent);
    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.12);
  }
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

.container {
  width: min(1120px, calc(100% - 1.5rem));
  margin-inline: auto;
}

@media (min-width: 480px) {
  .container {
    width: min(1120px, calc(100% - 2rem));
  }
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 0.375rem;
}

.skip-link:focus {
  top: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.logo-accent {
  color: var(--accent);
}

.nav-links {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.15s;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.theme-toggle:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.icon-sun,
.icon-moon {
  display: none;
}

[data-theme="light"] .icon-moon,
[data-theme="dark"] .icon-sun {
  display: block;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .icon-moon {
    display: block;
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun {
    display: block;
  }
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin-inline: auto;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 0.25rem 1rem calc(1rem + env(safe-area-inset-bottom));
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
}

.mobile-nav.is-open {
  display: flex;
}

.mobile-nav[hidden] {
  display: none !important;
}

.mobile-nav a {
  padding: 0.875rem 0;
  color: var(--text);
  font-weight: 500;
  font-size: 1.0625rem;
  border-bottom: 1px solid var(--border);
  min-height: 2.75rem;
  display: flex;
  align-items: center;
}

.mobile-nav a:last-child {
  border-bottom: none;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .mobile-nav {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .nav-actions .nav-cta.btn {
    display: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-full {
  width: 100%;
}

/* Hero */
.hero {
  padding: 3rem 0 2.5rem;
  background: var(--hero-glow);
}

@media (min-width: 768px) {
  .hero {
    padding: 5rem 0 4rem;
  }
}

.hero-inner {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.25rem, 10vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hero-tagline {
  margin: 0.5rem 0 0;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
  color: var(--text-muted);
}

.hero-sub {
  margin: 1.25rem 0 0;
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 56ch;
}

@media (min-width: 768px) {
  .hero-sub {
    font-size: 1.125rem;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.hero-actions .btn {
  flex: 1 1 auto;
  min-width: min(100%, 10rem);
}

@media (min-width: 480px) {
  .hero-actions .btn {
    flex: 0 1 auto;
  }
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.tech-stack li {
  padding: 0.375rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
}

/* Sections */
.section {
  padding: 3rem 0;
}

@media (min-width: 768px) {
  .section {
    padding: 5rem 0;
  }
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  margin-bottom: 1.75rem;
}

@media (min-width: 768px) {
  .section-header {
    margin-bottom: 2.5rem;
  }
}

.section-header h2 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-lead {
  margin: 0.75rem 0 0;
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 52ch;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  box-shadow: var(--shadow);
}

/* About */
.about-grid {
  display: grid;
  gap: 2rem;
}

.about-copy p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.about-aside {
  padding: 1.5rem;
}

.about-aside h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.facts {
  margin: 0;
}

.facts div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border);
}

.facts div:last-child {
  border-bottom: none;
}

.facts dt {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-subtle);
}

.facts dd {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: right;
  overflow-wrap: anywhere;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1.5fr 1fr;
    align-items: start;
  }
}

/* Projects list (homepage cards from index.json) */
.project-list {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .project-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card-link {
  display: flex;
  flex-direction: column;
  position: relative;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.project-card-link:hover {
  color: inherit;
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.project-card-link .project-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1;
}

.project-card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.project-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.project-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 2rem;
  color: var(--text-subtle);
}

.project-card-link .project-content {
  padding: 1.25rem 1.5rem 1.5rem;
}

.project-card-link h3 {
  margin: 0;
  font-size: 1.25rem;
}

.project-card-cta {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

.showcase-loading {
  color: var(--text-muted);
}

/* Showcase feature page */
.showcase-page {
  max-width: 960px;
}

.showcase-header {
  position: relative;
  margin-bottom: 2rem;
}

.showcase-back {
  display: inline-block;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.showcase-back:hover {
  color: var(--accent);
}

.showcase-header h1 {
  margin: 0;
  font-size: clamp(1.75rem, 7vw, 2.75rem);
  letter-spacing: -0.03em;
}

.showcase-header .project-badge {
  position: static;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.showcase-header .hero-sub {
  margin-top: 0.75rem;
}

.showcase-header .project-meta {
  margin-top: 1.25rem;
}

.showcase-hero {
  margin: 0 0 2.5rem;
}

.showcase-body.prose {
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.showcase-body.prose h2 {
  margin: 2rem 0 0.75rem;
  color: var(--text);
  font-size: 1.375rem;
}

.showcase-body.prose h3 {
  margin: 1.5rem 0 0.5rem;
  color: var(--text);
  font-size: 1.125rem;
}

.showcase-body.prose p {
  margin: 0 0 1rem;
}

.showcase-body.prose ul {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}

.showcase-body.prose li {
  margin-bottom: 0.375rem;
}

.showcase-body.prose strong {
  color: var(--text);
}

.showcase-gallery {
  margin-top: 1rem;
}

.showcase-galleries {
  display: grid;
  gap: 2.5rem;
  margin-top: 2.5rem;
}

.gallery-section-title {
  margin: 0 0 1rem;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
}

.shot-carousel {
  padding: 0.75rem;
  overflow: hidden;
}

@media (min-width: 640px) {
  .shot-carousel {
    padding: 1rem;
  }
}

.carousel-viewport {
  position: relative;
  min-height: 10rem;
}

.carousel-slide {
  margin: 0;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
  max-height: min(55vh, 480px);
  object-fit: contain;
  background: var(--bg-alt);
  border-radius: 0.75rem;
  border: 1px solid var(--border);
}

@media (min-width: 768px) {
  .carousel-slide img {
    max-height: min(70vh, 640px);
  }
}

.carousel-slide figcaption {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.carousel-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.875rem;
}

.carousel-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.carousel-nav:hover,
.carousel-nav:focus-visible {
  background: var(--accent-muted);
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.carousel-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}

.carousel-dot {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--border);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.carousel-dot.is-active {
  background: var(--accent);
  transform: scale(1.2);
}

.carousel-counter {
  margin: 0.75rem 0 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-subtle);
}

.showcase-error {
  padding: 2rem;
  text-align: center;
}

.showcase-error h1 {
  margin: 0 0 0.75rem;
}

.shot-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  border-radius: 0.75rem;
}

.shot-trigger img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  background: var(--bg-alt);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shot-trigger:hover img,
.shot-trigger:focus-visible img {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.shot-trigger:focus {
  outline: none;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 18, 0.82);
  backdrop-filter: blur(8px);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(1100px, 100%);
  max-height: calc(100vh - 2.5rem);
}

.lightbox-figure {
  margin: 0;
  max-width: 100%;
  max-height: calc(100vh - 2.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.lightbox-image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 5.5rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  background: #0b1120;
}

.lightbox-caption {
  margin: 0;
  padding: 0 1rem;
  color: #e2e8f0;
  font-size: 0.9375rem;
  font-weight: 500;
  text-align: center;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.lightbox-close:hover,
.lightbox-nav:hover,
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  background: rgba(81, 43, 212, 0.9);
  border-color: transparent;
  outline: none;
}

.lightbox-close {
  top: 0.75rem;
  right: 0.75rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  z-index: 2;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  font-size: 1.25rem;
}

.lightbox-prev {
  left: 0.5rem;
}

.lightbox-next {
  right: 0.5rem;
}

@media (max-width: 720px) {
  .lightbox-nav {
    display: none;
  }

  .lightbox-close {
    top: 0.5rem;
    right: 0.5rem;
  }
}

/* Projects */
.project-card.featured {
  display: grid;
  gap: 2rem;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.project-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-muted);
  border-radius: 999px;
}

.project-content h3 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.project-tagline {
  margin: 0.5rem 0 1rem;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text);
}

.project-content > p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.project-highlights {
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
  color: var(--text-muted);
}

.project-highlights li {
  margin-bottom: 0.375rem;
}

.project-highlights strong {
  color: var(--text);
  font-weight: 600;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.meta-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.meta-tags li {
  padding: 0.25rem 0.625rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 0.25rem;
}

.project-note {
  margin: 0;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  border-radius: 0.5rem;
  border-left: 3px solid var(--accent);
}

.shot-feature,
.shot-card {
  margin: 0;
}

.shot-feature img,
.shot-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  background: var(--bg-alt);
}

.shot-feature figcaption,
.shot-card figcaption {
  margin-top: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-subtle);
  text-align: center;
}

.project-gallery {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

@media (min-width: 640px) {
  .project-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .project-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .project-card.featured {
    grid-template-columns: 1fr 1.1fr;
    padding: 2.5rem;
    align-items: center;
  }

  .project-badge {
    top: 2rem;
    right: 2rem;
  }
}

/* Services */
.services-grid {
  display: grid;
  gap: 1.25rem;
}

.service-card {
  padding: 1.5rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.service-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.125rem;
  line-height: 1;
  color: var(--accent);
  background: var(--accent-muted);
  border-radius: 0.5rem;
}

.service-icon .bi {
  display: block;
}

.service-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.service-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Contact */
.contact-layout {
  display: grid;
  gap: 2rem;
}

.contact-links {
  padding: 0;
  overflow: hidden;
}

.contact-link-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.25rem 1.5rem;
  color: inherit;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.contact-link-item:last-child {
  border-bottom: none;
}

.contact-link-item:hover {
  background: var(--surface-hover);
  color: inherit;
}

.contact-link-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contact-link-value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
}

.contact-form {
  padding: 1.5rem;
}

.form-field {
  margin-bottom: 1.25rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.75rem 0.875rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--text-subtle);
}

.form-note {
  margin: 0.875rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-subtle);
  text-align: center;
}

.form-success {
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  font-size: 1.375rem;
  line-height: 1;
  color: var(--success);
  background: var(--success-bg);
  border-radius: 50%;
}

.success-icon .bi {
  display: block;
}

.form-success h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.form-success p {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .contact-intro {
    grid-row: span 2;
  }

  .form-success {
    grid-column: 2;
  }
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-inner p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-subtle);
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
  }
}

.footer-note {
  font-family: var(--font-mono);
  font-size: 0.75rem !important;
  overflow-wrap: anywhere;
}

@media (min-width: 640px) {
  .footer-note {
    font-size: 0.8125rem !important;
  }
}

/* Mobile polish */
@media (max-width: 767px) {
  .site-header {
    padding-top: env(safe-area-inset-top);
  }

  .nav {
    min-height: 3.5rem;
    gap: 0.5rem;
  }

  .logo {
    font-size: 1rem;
  }

  .nav-actions {
    gap: 0.5rem;
  }

  .theme-toggle,
  .nav-toggle {
    width: 2.75rem;
    height: 2.75rem;
  }

  .tech-stack {
    margin-top: 1.75rem;
    gap: 0.375rem;
  }

  .tech-stack li {
    font-size: 0.75rem;
    padding: 0.3rem 0.55rem;
  }

  .project-card-link .project-badge {
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.6875rem;
  }

  .project-card-link .project-content {
    padding: 1rem 1.1rem 1.25rem;
  }

  .project-card-media {
    aspect-ratio: 16 / 11;
  }

  .service-card {
    padding: 1.25rem;
  }

  .showcase-page {
    max-width: 100%;
  }

  .showcase-galleries {
    gap: 2rem;
    margin-top: 2rem;
  }

  .showcase-hero img,
  .shot-feature img {
    border-radius: 0.625rem;
  }

  .showcase-body.prose {
    font-size: 1rem;
  }

  .showcase-body.prose h2 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
  }

  .meta-tags {
    gap: 0.3rem;
  }

  .meta-tags li {
    font-size: 0.6875rem;
  }

  .lightbox {
    padding: 0.75rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
  }

  .lightbox-image {
    max-height: calc(100vh - 7rem);
  }

  .btn {
    min-height: 2.75rem;
  }

  .site-footer {
    padding: 1.5rem 0 calc(1.5rem + env(safe-area-inset-bottom));
  }
}
