:root {
  --radius: 0.625rem;
  --radius-sm: 0.375rem;

  --bg: oklch(0.99 0.003 247);
  --surface: oklch(1 0 0);
  --surface-hover: oklch(0.975 0.005 247);
  --border: oklch(0.9 0.01 255);
  --border-strong: oklch(0.78 0.02 255);
  --fg: oklch(0.18 0.03 265);
  --fg-muted: oklch(0.48 0.02 260);
  --accent: oklch(0.45 0.14 260);
  --focus: oklch(0.6 0.18 255);
}

[data-theme="dark"] {
  --bg: oklch(0.14 0.025 265);
  --surface: oklch(0.19 0.028 265);
  --surface-hover: oklch(0.23 0.03 265);
  --border: oklch(0.28 0.025 265);
  --border-strong: oklch(0.42 0.04 260);
  --fg: oklch(0.97 0.005 250);
  --fg-muted: oklch(0.72 0.02 260);
  --accent: oklch(0.82 0.1 250);
  --focus: oklch(0.75 0.15 255);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--fg);
}

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

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
}

.wordmark {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg-muted);
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.theme-toggle:hover {
  color: var(--fg);
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

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

/* Main */
.site-main {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.hero {
  margin-bottom: 3rem;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.tagline {
  margin: 0;
  color: var(--fg-muted);
  font-size: 1.0625rem;
}

/* Gallery */
.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.card:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -12px oklch(0 0 0 / 0.2);
}

.card-icon {
  display: inline-flex;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-hover);
  margin-bottom: 0.25rem;
}

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

.card-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-tagline {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.9375rem;
  flex: 1;
}

.card-link {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.01em;
}

/* Footer */
.site-footer {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  color: var(--fg-muted);
  font-size: 0.8125rem;
}

/* Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
  .card:hover {
    transform: none;
  }
}
