/* Late-day workshop: charcoal bench, brass caliper, rose wax seal.
   Strategy: committed dark — near-black surface, rose primary, teal accent. */

:root {
  --bg: oklch(0.10 0.000 0);
  --surface: oklch(0.16 0.010 340);
  --surface-2: oklch(0.20 0.014 340);
  --ink: oklch(0.96 0.010 340);
  --muted: oklch(0.72 0.020 340);
  --primary: oklch(0.62 0.180 340);
  --accent: oklch(0.72 0.110 200);
  --brass: oklch(0.78 0.100 85);
  --rule: oklch(0.28 0.020 340);
  --focus: oklch(0.78 0.140 340);

  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Literata", "Iowan Old Style", "Palatino Linotype", Palatino, serif;

  --space-xs: 0.5rem;
  --space-sm: 0.85rem;
  --space-md: 1.5rem;
  --space-lg: 2.75rem;
  --space-xl: clamp(3.5rem, 8vw, 6.5rem);

  --radius: 0.75rem;
  --max: 68rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

@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;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 0.95rem + 0.35vw, 1.2rem);
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 85% -10%, oklch(0.28 0.08 340 / 0.45), transparent 55%),
    radial-gradient(900px 500px at -10% 30%, oklch(0.25 0.05 200 / 0.28), transparent 50%),
    var(--bg);
}

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

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

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

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* —— Header —— */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: var(--space-md);
}

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}

.lang-toggle button {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0.45rem 0.9rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

.lang-toggle button[aria-pressed="true"] {
  color: var(--bg);
  background: var(--primary);
}

.contact-link {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--brass);
  padding-bottom: 0.1rem;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.contact-link:hover {
  color: var(--brass);
  border-color: var(--primary);
}

/* —— Hero —— */

.hero {
  padding-block: var(--space-xl) var(--space-lg);
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rule), transparent);
}

.hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

.portrait {
  width: clamp(6.5rem, 18vw, 9.5rem);
  height: clamp(6.5rem, 18vw, 9.5rem);
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid color-mix(in oklch, var(--brass) 70%, var(--primary));
  box-shadow:
    0 0 0 6px color-mix(in oklch, var(--primary) 18%, transparent),
    0 18px 40px oklch(0 0 0 / 0.35);
  flex-shrink: 0;
}

.hero-copy {
  flex: 1 1 16rem;
  min-width: min(100%, 16rem);
}

.brand {
  margin: 0 0 var(--space-md);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 1.4rem + 4.5vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: 14ch;
}

.brand span {
  color: var(--primary);
}

.tagline {
  margin: 0;
  max-width: 36ch;
  color: var(--muted);
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.35rem);
  text-wrap: pretty;
}

/* —— Sections —— */

.projects {
  padding-block: var(--space-lg) var(--space-xl);
  display: grid;
  gap: var(--space-xl);
}

.section-head {
  display: grid;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.section-kicker {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section-lead {
  margin: 0;
  max-width: 52ch;
  color: var(--muted);
  text-wrap: pretty;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: var(--space-md);
  justify-content: start;
}

.card {
  display: flex;
  flex-direction: column;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 28rem;
  width: 100%;
  transition:
    transform 0.35s var(--ease),
    border-color 0.35s var(--ease),
    background 0.35s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  border-color: oklch(0.45 0.08 340);
  background: var(--surface-2);
}

.card:has(.card-cta:focus-visible) {
  transform: translateY(-4px);
  border-color: oklch(0.45 0.08 340);
  background: var(--surface-2);
}

.card-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.card:hover .card-media img {
  transform: scale(1.04);
}

.card-body {
  display: grid;
  gap: 0.55rem;
  padding: 1.15rem 1.2rem 1.35rem;
  flex: 1;
}

.card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-blurb {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
  text-wrap: pretty;
  max-width: 42ch;
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.card-cta {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--primary);
  transition: color 0.2s var(--ease);
}

.card-cta:hover,
.card-cta:focus-visible {
  color: var(--accent);
}

/* Staggered entrance — content visible by default */
@keyframes rise {
  from {
    opacity: 0.35;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero .portrait,
.hero .brand,
.hero .tagline,
.section-block {
  animation: rise 0.7s var(--ease) both;
}

.hero .brand {
  animation-delay: 0.06s;
}

.hero .tagline {
  animation-delay: 0.12s;
}

.section-block:nth-child(1) {
  animation-delay: 0.12s;
}
.section-block:nth-child(2) {
  animation-delay: 0.2s;
}
.section-block:nth-child(3) {
  animation-delay: 0.28s;
}

/* —— Footer —— */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.footer-note {
  margin: 0;
  max-width: 40ch;
}
