/*
  Design tokens and global styles for the zero intelligence site.
  - CSS custom properties define the color system (light/dark aware)
  - Utility layout primitives and components follow
*/
:root {
  --bg: #ffffff;
  --fg: #0b0b0b;
  --muted: #6b7280;
  --accent: #111827;
  --border: #e5e7eb;
  --ring: rgba(17, 24, 39, 0.12);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0b;
    --fg: #f3f4f6;
    --muted: #9ca3af;
    --accent: #d1d5db;
    --border: #1f2937;
    --ring: rgba(250, 250, 250, 0.12);
  }
}
/* Reset-ish + base */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--fg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
/* Accessibility: appear on focus for keyboard navigation */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 16px;
  top: 12px;
  width: auto; height: auto; padding: 8px 12px; background: var(--fg); color: var(--bg);
}
/* Header */
.site-header { position: sticky; top: 0; backdrop-filter: saturate(180%) blur(8px); background: color-mix(in oklab, var(--bg) 85%, transparent); z-index: 10; border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.brand { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; font-weight: 600; letter-spacing: 0.2px; }
.site-nav ul { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: inherit; text-decoration: none; opacity: 0.8; }
.site-nav a:hover, .site-nav a:focus { opacity: 1; }

/* Hero */
.hero { position: relative; padding: 96px 0 72px; overflow: hidden; }
.headline { font-size: clamp(40px, 8vw, 86px); line-height: 0.95; letter-spacing: -0.02em; margin: 0 0 12px; }
.tagline { font-size: clamp(16px, 2.2vw, 22px); color: var(--muted); margin: 0 0 28px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 999px; border: 1px solid var(--border); text-decoration: none; color: inherit; background: transparent; cursor: pointer; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.button:focus { outline: none; box-shadow: 0 0 0 6px var(--ring); }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--fg); color: var(--bg); }
.button.ghost { background: transparent; }

/* Decorative radial glows behind hero */
.bg-grid { position: absolute; inset: -10% -10% auto -10%; height: 60%; background-image: radial-gradient(circle at 20% 20%, color-mix(in oklab, var(--fg) 8%, transparent), transparent 40%),
             radial-gradient(circle at 80% 10%, color-mix(in oklab, var(--fg) 6%, transparent), transparent 40%),
             radial-gradient(circle at 50% 60%, color-mix(in oklab, var(--fg) 8%, transparent), transparent 45%);
  filter: blur(40px); opacity: 0.35; pointer-events: none; }

/* Sections */
.about, .work, .contact { padding: 64px 0; border-top: 1px solid var(--border); }
.about h2, .work h2, .contact h2 { font-size: clamp(28px, 4.8vw, 40px); margin: 0 0 12px; }
.pill-list { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 18px 0 0; list-style: none; }
.pill-list li { padding: 8px 12px; border: 1px dashed var(--border); border-radius: 999px; font-size: 14px; opacity: 0.9; }

/* Work cards */
.cards { display: grid; grid-template-columns: repeat(1, 1fr); gap: 16px; margin-top: 20px; }
.card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  /* if you want the thumbnail flush to the left, set padding: 0; */
  padding: 12px;
}
@media (min-width: 720px) {
  .card { grid-column: span 4; }
}
.card:focus { outline: none; box-shadow: 0 0 0 8px var(--ring); }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.06); border-color: color-mix(in oklab, var(--fg) 10%, var(--border)); }
.card-body {
  flex: 1 1 auto;
  min-width: 0;
  /* keep text inset if you removed padding from .card:
     padding: 12px; */
}
.card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card h3 { margin: 0; font-size: 20px; }
.card .meta { margin: 0; color: var(--muted); font-size: 14px; }
.card .desc { margin: 10px 0 0; opacity: 0.95; }

/* card thumnails */
.card-thumb {
  /* ensure the container clips rounded corners */
  overflow: hidden;
  border-radius: 12px;
  flex: 0 0 100px;
  width: 100px;
  height: 100px;
  background: color-mix(in oklab, var(--fg) 4%, transparent);
}

/* target both the element inside and your new class */
.card-thumb img,
.card-thumb-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* use container radius so image is rounded too */
  border-radius: inherit;
}

/* Place thumbnail left, text to the right on all screens */
/* With flex, thumbnail stays inline to the left of text */

/* Contact form */
.contact-form { display: grid; gap: 12px; margin-top: 16px; }
.contact-form .grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) {
  .contact-form .grid { grid-template-columns: 1fr 1fr; }
}
label { display: grid; gap: 6px; font-size: 14px; }
input, textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: transparent; color: inherit; font: inherit; }
input:focus, textarea:focus { outline: none; box-shadow: 0 0 0 6px var(--ring); border-color: color-mix(in oklab, var(--fg) 20%, var(--border)); }
.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hint { color: var(--muted); font-size: 14px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.social { list-style: none; display: flex; gap: 12px; padding: 0; margin: 0; }
.social a { color: inherit; text-decoration: none; border: 1px solid var(--border); padding: 6px 10px; border-radius: 999px; opacity: 0.9; }
.social a:hover { opacity: 1; }

/* Subtle wiggle animation for the ◯ glyph */
.wiggle { display: inline-block; transform-origin: 50% 50%; animation: wiggle 2.8s ease-in-out infinite; }
@keyframes wiggle { 0%,100%{ transform: rotate(0deg) translateY(0); } 15%{ transform: rotate(-6deg) translateY(-2px);} 30%{ transform: rotate(6deg) translateY(1px);} 45%{ transform: rotate(-3deg);} 60%{ transform: rotate(3deg);} 75%{ transform: rotate(-1deg);} }

/* Reveal-on-scroll utility class used by script.js */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
