:root {
  --bg: #0e0e10;
  --fg: #ece9e2;
  --muted: #76746e;
  --line: #25252a;
  --accent: #d4a14a;
  --card: #15151a;
  --card-hover: #1c1c22;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #faf9f5;
    --fg: #14140f;
    --muted: #7a7770;
    --line: #e5e3da;
    --accent: #b97e1c;
    --card: #f3f1e9;
    --card-hover: #ebe8de;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
a:not(.card):hover { color: var(--accent); }

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 88px 28px 64px;
}

.intro {
  margin-bottom: 72px;
}

h1 {
  font-family: ui-serif, "Iowan Old Style", "Apple Garamond", Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: clamp(2.6rem, 6vw, 4rem);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  line-height: 1.05;
}

.tag {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 52ch;
  margin: 0;
}

.tag a {
  color: var(--fg);
  border-bottom: 1px solid var(--line);
}

.tag a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.projects {
  margin-bottom: 72px;
}

.projects ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 640px) {
  .projects ol { grid-template-columns: 1fr; }
  main { padding-top: 56px; }
}

.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px 22px 20px;
  position: relative;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.card:hover {
  background: var(--card-hover);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.card .num {
  position: absolute;
  top: 18px;
  right: 22px;
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.card h2 {
  font-family: ui-serif, "Iowan Old Style", "Apple Garamond", Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: 1.35rem;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.card p {
  font-size: 0.92rem;
  color: var(--fg);
  opacity: 0.82;
  margin: 0 0 16px;
}

.card .host {
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-size: 0.74rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.card .host em {
  font-style: normal;
  color: var(--accent);
  margin-left: 6px;
}

.soon {
  border-top: 1px solid var(--line);
  padding-top: 36px;
  margin-bottom: 72px;
}

.soon h3 {
  font-family: ui-serif, "Iowan Old Style", "Apple Garamond", Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: 1rem;
  color: var(--muted);
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.soon ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.soon li {
  font-size: 0.95rem;
  line-height: 1.6;
}

.soon strong {
  font-weight: 500;
}

.soon .host {
  display: inline-block;
  margin-left: 6px;
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-size: 0.74rem;
}

.soon .muted {
  color: var(--muted);
}

footer {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

footer p {
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.logout-form {
  display: inline;
  margin: 0;
  margin-left: auto;
}

.logout-form button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
  letter-spacing: inherit;
}

.logout-form button:hover {
  color: var(--accent);
}

/* ---- login page ---- */

body.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login {
  width: 100%;
  max-width: 360px;
}

.login h1 {
  font-family: ui-serif, "Iowan Old Style", "Apple Garamond", Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: 1.8rem;
  letter-spacing: -0.01em;
  margin: 0 0 28px;
}

.login form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login label span {
  font-size: 0.74rem;
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.login input {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 11px 12px;
  font-size: 0.98rem;
  color: var(--fg);
  font-family: inherit;
  transition: border-color 120ms ease;
}

.login input:focus {
  outline: none;
  border-color: var(--accent);
}

.login button[type="submit"] {
  margin-top: 6px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 4px;
  padding: 12px 14px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 120ms ease;
}

.login button[type="submit"]:hover {
  opacity: 0.9;
}

.login .error {
  font-size: 0.85rem;
  color: var(--accent);
  margin: 0;
}
