/* Campus Florum — main page. Calm and plain; one column, two themes. */

* { box-sizing: border-box; margin: 0; }

@font-face {
  font-family: 'IM Fell English';
  src: url('fonts/imfell-regular.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'IM Fell English';
  font-style: italic;
  src: url('fonts/imfell-italic.woff2') format('woff2');
  font-display: swap;
}

:root, :root[data-theme="dark"] {
  --bg: #14161a;
  --card: #1b1e24;
  --card-hover: #20242b;
  --border: #2b3038;
  --text: #e6e3da;
  --muted: #979a9f;
  --accent: #c9a45c;
  --blue: #8fb0d9;
  --gold: #d3ab5e;
  --green: #93b97a;
  --rose: #d68f86;
  --plum: #b99ad6;
  --display: 'IM Fell English', 'Iowan Old Style', Palatino, Georgia, serif;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f3ec;
  --card: #fffdf8;
  --card-hover: #fffefb;
  --border: #dfd9cb;
  --text: #25262a;
  --muted: #6b6d72;
  --accent: #8a651b;
  --blue: #3c6699;
  --gold: #8f6a1c;
  --green: #4a7036;
  --rose: #a8524a;
  --plum: #6d4a8f;
  color-scheme: light;
}

html { background: var(--bg); -webkit-text-size-adjust: 100%; }

body {
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

.page { max-width: 820px; margin: 0 auto; padding: 28px 20px 48px; }

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

/* ---- header ---- */

.top { display: flex; align-items: center; justify-content: space-between; }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.star { width: 15px; height: 15px; fill: var(--accent); }

.theme {
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  width: 38px;
  height: 38px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
}
.theme:hover { color: var(--text); border-color: var(--muted); }

/* ---- intro ---- */

.intro { padding: 72px 0 24px; max-width: 620px; }
.intro h1 {
  font-family: var(--display);
  font-weight: normal;
  font-size: clamp(2.2rem, 7vw, 3.2rem);
  line-height: 1.1;
  margin-bottom: 18px;
  text-wrap: balance;
}
.intro p { color: var(--muted); font-size: 1.08rem; }
.intro b { color: var(--text); font-weight: 600; }

/* ---- sections ---- */

section + section { margin-top: 52px; }

h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
h2::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---- tools ---- */

.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.tool {
  display: flex;
  gap: 16px;
  padding: 20px;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.tool:hover { border-color: var(--tint); background: var(--card-hover); transform: translateY(-2px); }

.icon {
  flex: none;
  width: 26px;
  height: 26px;
  margin-top: 2px;
  fill: none;
  stroke: var(--tint);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tool-name { font-family: var(--display); font-size: 1.4rem; line-height: 1.2; }
.tool-text { color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.tool-host { margin-top: 6px; font-size: 0.8rem; color: var(--tint); overflow-wrap: anywhere; }

/* ---- quick links ---- */

.links { list-style: none; padding: 0; }
.links li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--border);
}
.links li:last-child { border-bottom: 0; }
.links a { text-decoration: none; }
.links a::after { content: " ↗"; color: var(--muted); font-size: 0.85em; }
.links.notes a::after { content: " →"; }
.links.pdf a::after { content: " ↓"; }
.course .nr { flex: none; width: 2em; font-size: inherit; text-align: left; color: var(--muted); font-variant-numeric: tabular-nums; }
.course li.soon { color: var(--muted); }
.course li.soon div { display: flex; }
.course li a { display: flex; }
.course li a::after { margin-left: 0.3em; }
.course li > span { white-space: nowrap; }
.small-note { color: var(--muted); font-size: 0.9rem; margin-top: 10px; }
.links a:hover { color: var(--accent); }
.links span { color: var(--muted); font-size: 0.9rem; text-align: right; }

/* ---- about (small button that reveals the text) ---- */

.about { margin-top: 22px; }
.about summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  cursor: pointer;
  padding: 6px 14px;
  font-size: 0.9rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  user-select: none;
}
.about summary::-webkit-details-marker { display: none; }
.about summary::after { content: "+"; color: var(--accent); font-size: 1.05em; line-height: 1; }
.about[open] summary::after { content: "–"; }
.about summary:hover, .about[open] summary { color: var(--text); border-color: var(--muted); }
.about-body { margin-top: 16px; padding-left: 16px; border-left: 2px solid var(--accent); }
.about-body p { font-size: 1rem; }
.about-body p + p { margin-top: 10px; }
.about-body a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.about-body a:hover { color: var(--accent); }

/* ---- contact & footer ---- */

.contact { color: var(--muted); max-width: 620px; }
.contact a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.contact a:hover { color: var(--accent); }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  margin-top: 72px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
}
.quote { font-family: var(--display); font-style: italic; font-size: 1rem; }

/* ---- page not found ---- */

.lost .code { font-size: 0.8rem; letter-spacing: 0.2em; color: var(--accent); margin-bottom: 10px; }
.lost-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.pill {
  padding: 6px 16px;
  font-size: 0.92rem;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
}
.pill:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 640px) {
  .tools { grid-template-columns: 1fr; }
  .intro { padding-top: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .tool { transition: none; }
  .tool:hover { transform: none; }
}

.closing { margin-top: 44px; color: var(--muted); }
