/* grepins!ght: one theme for the front page and the about pages, in Korean and English.
   "Field Notes": cool gallery paper, near-black ink, a serif voice for headlines, Pretendard for
   reading, and ultramarine as the only colour. Rules separate things; boxes do not.
   (Cream + terracotta was dropped: it read as Claude's own palette.) */

:root {
  --bg: #f4f5f7; --surface: #ffffff; --ink: #16181d; --muted: #5d6270; --line: #d9dce3;
  --accent: #2b3fd6; --hover: #e8eaf2; --select: #cdd4ff;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  --serif: "Noto Serif KR", Georgia, AppleMyungjo, Batang, serif;
  --wide: 880px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #101216; --surface: #181b21; --ink: #e9ebf0; --muted: #9aa0ad; --line: #2c313b;
          --accent: #8c9cff; --hover: #1d2129; --select: #2d3570; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.75 var(--sans); font-feature-settings: "ss06";
  -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: anywhere;
}
::selection { background: var(--select); color: var(--ink); }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- the top bar: brand or back link on the left, language on the right ---------- */
.top {
  max-width: var(--wide); margin: 0 auto; padding: 20px 16px 0;
  display: flex; align-items: center; justify-content: flex-end; gap: 16px;
}
.top .home-link { margin-right: auto; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -.02em; font-size: 18px; }
.lang {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  font-size: 14px; color: var(--muted); text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px;
}
.lang:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- the "!" mark: a printer's slight tilt, and a wiggle when you reach for it ---------- */
.bang { display: inline-block; color: var(--accent); transform: rotate(7deg); transform-origin: 50% 90%; }
.brand:hover .bang, .home-link:hover .bang { animation: wiggle .5s ease-in-out; }
@keyframes wiggle { 0%, 100% { transform: rotate(7deg); } 30% { transform: rotate(-10deg); } 60% { transform: rotate(14deg); } }

main { max-width: var(--wide); margin: 0 auto; padding: 32px 16px 72px; }

/* ---------- home ---------- */
.home { display: grid; gap: 32px; }
.brand { font-size: 36px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; margin: 0 0 20px; }
.lead { font-family: var(--serif); font-weight: 500; font-size: 24px; line-height: 1.5; margin: 0 0 20px; }
.intro { margin: 0; color: var(--muted); }
.intro a { white-space: nowrap; }

.sites { border-top: 1px solid var(--line); position: relative; z-index: 0; }
a.site {
  position: relative; display: grid; grid-template-columns: 2.4em 1fr auto; align-items: baseline; gap: 4px 12px;
  padding: 20px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none;
}
/* The hover tint is its own layer, so the rules between rows stay straight and flush. */
a.site::before {
  content: ""; position: absolute; inset: 4px -10px; z-index: -1; border-radius: 8px;
  background: var(--hover); opacity: 0; transition: opacity .14s;
}
a.site:hover::before, a.site:focus-visible::before { opacity: 1; }
.site .no { font-size: 14px; font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 600; }
.site .body { min-width: 0; }
.site .name { display: block; font-size: 20px; font-weight: 650; line-height: 1.4; }
.site .meta { display: block; font-size: 15px; line-height: 1.6; color: var(--muted); margin-top: 2px; }
.site .host { display: block; font-size: 14px; color: var(--muted); margin-top: 6px; }
.site .arrow { color: var(--muted); transition: transform .14s, color .14s; }
a.site:hover .arrow, a.site:focus-visible .arrow { transform: translateX(3px); color: var(--accent); }
a.site:hover .name { color: var(--accent); }

@media (min-width: 960px) {
  .top { padding-top: 28px; }
  main { padding-top: 56px; }
  .home { grid-template-columns: 300px 1fr; gap: 64px; align-items: start; }
  .hello { position: sticky; top: 40px; }
  .brand { font-size: 44px; }
  .lead { font-size: 28px; line-height: 1.45; }
  .site .name { font-size: 21px; }
}

/* ---------- about ---------- */
.about section { padding: 40px 0 0; }
.about section + section { margin-top: 40px; border-top: 1px solid var(--line); }
.about h1 { font-family: var(--serif); font-weight: 600; font-size: 36px; line-height: 1.3; letter-spacing: -.01em; margin: 0 0 16px; }
.about .tagline { font-size: 22px; line-height: 1.55; font-weight: 500; margin: 0 0 20px; }
.about p { margin: 0 0 18px; }
.about h2 {
  font-size: 14px; line-height: 1.5; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 16px;
}
.about h3 { font-size: 18px; font-weight: 650; margin: 0 0 6px; }
.about .work > div + div { margin-top: 24px; }
.about ul { margin: 0; padding-left: 1.1em; font-size: 16px; line-height: 1.7; }
.about li { margin: 6px 0; }
.about li::marker { color: var(--line); }
.about .num { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.about .links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.about .links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--ink); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 600;
  transition: background .14s, color .14s;
}
.about .links a:hover { background: var(--ink); color: var(--bg); }

@media (min-width: 960px) {
  .about section { display: grid; grid-template-columns: 176px 1fr; gap: 48px; }
  .about section.hero { padding-top: 16px; }
  .about section.hero > * { grid-column: 2; }
  .about h1 { font-size: 48px; line-height: 1.2; }
  .about .tagline { font-size: 24px; line-height: 1.5; }
  .about h2 { padding-top: 3px; }
  .about > section { max-width: 100%; }
  .about section > :last-child { max-width: 656px; }
}

/* Hangul is set without tracking; the Latin tightening and spaced capitals stay English-only. */
html:lang(ko) .brand, html:lang(ko) .about h1, html:lang(ko) .about h2 { letter-spacing: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.nowrap { white-space: nowrap; }

/* ---------- search: a box on the front page, a page of results at /search/ ---------- */
form.search { display: flex; gap: 8px; margin-top: 24px; }
form.search input {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
}
form.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
form.search button {
  min-height: 44px; padding: 0 18px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  color: var(--bg); background: var(--ink); border: 1px solid var(--ink); border-radius: 999px;
}
form.search button:hover { background: var(--accent); border-color: var(--accent); }
.search-page { max-width: 720px; }
.search-page h1 { font-family: var(--serif); font-weight: 600; font-size: 36px; line-height: 1.3; margin: 0; }
.search-status { color: var(--muted); font-size: 15px; margin: 20px 0 0; min-height: 1.6em; }
ol.results { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--line); }
ol.results:empty { border-top: 0; }
ol.results a { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
ol.results a:hover .title { color: var(--accent); }
ol.results .where { display: block; font-size: 13px; font-weight: 600; color: var(--accent); }
ol.results .title { display: block; font-size: 19px; font-weight: 650; line-height: 1.4; margin-top: 2px; }
ol.results .snippet { display: block; font-size: 15px; line-height: 1.6; color: var(--muted); margin-top: 4px; }
ol.results .url { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
ol.results mark { background: var(--select); color: var(--ink); border-radius: 3px; padding: 0 1px; }
