/* Style tokens: light-dark(light, dark). Follows the system unless <html data-theme> is set. */
:root {
  color-scheme: light dark;
  --ground: light-dark(#f3ead7, #1f1710);
  --surface: light-dark(#e6d8b9, #2b2016);
  --ink: light-dark(#3b2a1a, #f3ead7);
  --border: light-dark(#3b2a1a, #c9b79a);
  --accent: light-dark(#2f6b3a, #7fc08a);
  --accent-ink: light-dark(#f3ead7, #1f1710);
  --chip: light-dark(#3b2a1a, #f3ead7);
  --chip-ink: light-dark(#f3ead7, #1f1710);
  --foot: light-dark(#3b2a1a, #120d08);
  --foot-ink: #f3ead7;
  --wood: #c9965a;
  --roof: #8a5a2b;
  --leaf: #3f7a46;
  --tape-dark: light-dark(#3b2a1a, #120d08);
  --bulb: light-dark(#ffe08a, transparent);
  --bulb-glow: light-dark(rgb(255 224 138 / 0.4), transparent);
  --font: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --gutter: 16px;
  --max: 1200px;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.5 var(--font);
}

a { color: var(--accent); }
a:hover { color: var(--ink); }
a:focus-visible,
.button:focus-visible {
  outline: 4px solid var(--ink);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  background: var(--ground);
  padding: 12px 16px;
  z-index: 1;
}
.skip:focus { top: 8px; }

.bar,
.hero,
.projects,
.team,
.foot__inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-block: 12px;
}
.bar__logo { border: 3px solid var(--border); border-radius: 8px; }
.bar__name { flex-grow: 1; font-weight: 700; font-size: 18px; }
.bar__nav { display: flex; gap: 4px; margin-right: 76px; }
.bar__nav a { padding: 12px 8px; min-height: 44px; }

@media (max-width: 479px) {
  .bar__name { display: none; }
  .bar__nav { flex-grow: 1; justify-content: flex-end; }
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-block: 24px 40px;
}
.hero__logo {
  width: 100%;
  max-width: 300px;
  height: auto;
  aspect-ratio: 1;
  align-self: center;
  border: 4px solid var(--border);
  border-radius: 16px;
}
.hero__text { display: flex; flex-direction: column; gap: 20px; }
h1 { margin: 0; font-size: 44px; line-height: 1.05; }
.hero p { margin: 0; font-size: 20px; line-height: 1.4; }

.button {
  text-align: center;
  background: var(--accent);
  color: var(--accent-ink);
  border: 3px solid var(--border);
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}
.button:hover { color: var(--accent-ink); background: var(--ink); }

.projects { padding-block: 0 40px; }
h2 { margin: 0 0 16px; font-size: 28px; }

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

/* Project card. Layers: decoy (-1), name plate (origin), chip (attachment), tape (+1). */
.card {
  position: relative;
  overflow: hidden;
  min-height: 240px;
  height: 100%;
  border: 3px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.card__decoy {
  position: absolute;
  inset: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  filter: blur(7px);
  transform: scale(1.1);
  pointer-events: none;
  user-select: none;
}
.card__decoy b { font-size: 20px; }
.decoy-icon { width: 64px; height: 64px; border-radius: 16px; background: var(--wood); }
.decoy-line { height: 12px; width: 90%; border-radius: 6px; background: var(--roof); opacity: .6; }
.decoy-line--short { width: 70%; }
.decoy-dots { display: flex; gap: 10px; margin-top: 6px; }
.decoy-dots i { width: 48px; height: 48px; border-radius: 10px; background: var(--wood); }
.decoy-dots i:first-child { background: var(--leaf); opacity: .6; }
.decoy-dots i:last-child { background: var(--roof); opacity: .6; }

.card__tape {
  position: absolute;
  inset: auto 0 0 0;
  height: 14px;
  background: repeating-linear-gradient(135deg, var(--tape-dark) 0 12px, var(--wood) 12px 24px);
}
.card__body {
  position: relative;
  min-height: 240px;
  padding: 20px 20px 34px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 10px;
}
.card__name {
  margin: 0;
  font-size: 24px;
  background: var(--ground);
  border: 3px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
}
.card__chip {
  background: var(--chip);
  color: var(--chip-ink);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
}

.team { padding-block: 0 56px; }
.members {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  max-width: 760px;
}
.member {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 3px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.member__avatar {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border: 3px solid var(--border);
  border-radius: 12px;
  background: var(--wood);
  color: #3b2a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
}
img.member__avatar { background: none; }
.member__name { margin: 0; font-size: 22px; }
.member div { min-width: 0; display: flex; flex-direction: column; }

/* Theme switch: bulb on a wire with a pull chain, hangs from the top of the header. */
.lamp {
  position: absolute;
  top: 0;
  right: var(--gutter);
  z-index: 2;
  width: 76px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y; /* sideways swipes reach the chain, vertical ones still scroll */
}
.lamp[hidden] { display: none; }
.lamp svg { width: 100%; height: auto; overflow: visible; }
.lamp:focus-visible { outline: 4px solid var(--ink); outline-offset: 3px; border-radius: 12px; }
.lamp__plate { fill: var(--border); }
.lamp__wire { stroke: var(--border); stroke-width: 3; fill: none; }
.lamp__socket { fill: #6b5640; stroke: var(--border); stroke-width: 3; }
.lamp__glass { fill: var(--bulb); stroke: var(--border); stroke-width: 3; stroke-linejoin: round; }
.lamp__filament { stroke: var(--border); stroke-width: 2; fill: none; }
.lamp__glow { fill: var(--bulb-glow); }
.lamp__hit { fill: none; stroke: transparent; stroke-width: 12; stroke-linejoin: round; pointer-events: stroke; cursor: pointer; }
.lamp__hit--knob { pointer-events: all; stroke: none; }
.lamp__link { fill: none; stroke: var(--border); stroke-width: 2.5; }
.lamp__knob { fill: var(--wood); stroke: var(--border); stroke-width: 3; stroke-linejoin: round; }

.foot { background: var(--foot); color: var(--foot-ink); margin-top: 8px; }
.foot__inner {
  padding-block: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}
.foot__name { font-weight: 700; font-size: 18px; }
.foot a { color: var(--foot-ink); padding: 12px 0; display: inline-block; }
.foot a:focus-visible { outline-color: var(--foot-ink); }

@media (min-width: 760px) {
  :root { --gutter: 32px; }
  .bar { padding-block: 24px; }
  .bar__logo { width: 44px; height: 44px; }
  .lamp { width: 92px; }
  .bar__nav { margin-right: 92px; }
  .hero { flex-direction: row; align-items: center; gap: 48px; padding-block: 48px 72px; }
  .hero__logo { width: 340px; max-width: none; align-self: auto; flex-shrink: 0; border-radius: 18px; }
  .hero__text { flex: 1 1 0; min-width: 0; }
  h1 { font-size: 64px; }
  .hero p { font-size: 24px; max-width: 30ch; }
  .button { align-self: flex-start; padding-inline: 24px; }
  .projects { padding-block: 0 72px; }
  h2 { font-size: 32px; margin-bottom: 24px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .card, .card__body { min-height: 320px; }
  .card__name { font-size: 28px; padding-inline: 14px; }
  .team { padding-block: 0 72px; }
  .members { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot__inner { padding-block: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
