*,
*::before,
*::after {
  box-sizing: border-box;
}

:root,
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f0ea;
  --ink: #1a1916;
  --muted: #6a6560;
  --text: #4f4b46;
  --card: #fffcf7;
  --line: #e6e0d6;
  --line-hover: #cfc8bb;
  --thumb: #ddd8ce;
  --shadow: rgba(26, 25, 22, 0.08);
  --lift: rgba(26, 25, 22, 0.04);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141311;
  --ink: #f3f0ea;
  --muted: #a8a39c;
  --text: #c9c4bc;
  --card: #1e1c19;
  --line: #322f2a;
  --line-hover: #4e4a43;
  --thumb: #2a2824;
  --shadow: rgba(0, 0, 0, 0.4);
  --lift: rgba(0, 0, 0, 0.2);
}

body {
  margin: 0 auto;
  max-width: 38rem;
  padding: 3.5rem 1.25rem 4.5rem;
  color: var(--ink);
  background: var(--bg);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 1.05rem;
  line-height: 1.55;
}

header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.theme-toggle {
  flex-shrink: 0;
  margin-top: 0.2rem;
  padding: 0.35rem 0.7rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--line-hover);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.projects {
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
}

.projects li + li {
  margin-top: 1rem;
}

.project {
  display: grid;
  gap: 0.9rem;
  padding: 0.7rem;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 0 var(--lift);
  font-weight: 400;
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.project:hover {
  border-color: var(--line-hover);
  box-shadow: 0 8px 24px var(--shadow);
  transform: translateY(-1px);
}

.project:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  background: var(--thumb);
  border-radius: 9px;
}

.copy h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.copy p {
  margin: 0.35rem 0 0.15rem;
  color: var(--text);
  font-size: 0.98rem;
}

footer {
  margin-top: 2.25rem;
}

footer a {
  color: var(--muted);
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

footer a:hover {
  color: var(--ink);
}

footer a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

@media (min-width: 640px) {
  .project {
    grid-template-columns: 11.5rem 1fr;
    align-items: center;
    gap: 1.1rem;
    padding: 0.8rem 1rem 0.8rem 0.8rem;
  }

  .thumb {
    aspect-ratio: 1200 / 630;
  }
}
