:root {
  --ground: #FAF9F5;
  --ground-raised: #F1EFE8;
  --ink: #23281F;
  --ink-soft: #5B6154;
  --line: #DAD6C9;
  --accent: #4B6355;
  --accent-soft: #E4E9E1;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #1C1F1A;
    --ground-raised: #262B22;
    --ink: #EFEDE4;
    --ink-soft: #A6AB9B;
    --line: #3A3F33;
    --accent: #8FB09B;
    --accent-soft: #2C3327;
  }
}

:root[data-theme="dark"] {
  --ground: #1C1F1A;
  --ground-raised: #262B22;
  --ink: #EFEDE4;
  --ink-soft: #A6AB9B;
  --line: #3A3F33;
  --accent: #8FB09B;
  --accent-soft: #2C3327;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Work Sans", system-ui, sans-serif;
  padding-inline: 24px;
  padding-block: 64px;
  display: flex;
  justify-content: center;
}

main {
  width: 100%;
  max-width: 880px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

/* ---------- Logo ---------- */

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.brand-mark {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.brand-mark path { fill: var(--accent); }

.brand-name {
  font-family: "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  font-size: clamp(1.7rem, 1.4rem + 1vw, 2.3rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.brand-tag {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.brand-visit {
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.brand-visit a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s ease;
}

.brand-visit a:hover,
.brand-visit a:focus-visible {
  border-color: var(--accent);
}

.brand-visit a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.brand-desc {
  margin: 0;
  max-width: 46ch;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.section-title {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------- Link columns ---------- */

.links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  padding-block: 40px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

@media (max-width: 620px) {
  .links { grid-template-columns: 1fr; gap: 36px; }
}

.col h2 {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.col h2 span {
  color: var(--ink-soft);
  font-weight: 500;
}

.col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.col a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.98rem;
  line-height: 1.3;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 0% 1px;
  transition: background-size 0.18s ease;
  padding-bottom: 2px;
}

.col a:hover,
.col a:focus-visible {
  background-size: 100% 1px;
}

.col a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Footer ---------- */

footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.socials {
  display: flex;
  gap: 14px;
}

.socials a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ground-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  transition: background 0.18s ease, color 0.18s ease;
}

.socials a:hover,
.socials a:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
}

.socials a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.socials svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.fine-print {
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .col a, .socials a { transition: none; }
}
