:root {
  --bg: #f3f1ec;
  --surface: #ffffff;
  --surface-2: #fafaf6;
  --ink: #111111;
  --ink-soft: #2f2f2f;
  --ink-muted: #6e6e6e;
  --line: #e4e2dc;
  --line-soft: #ececea;
  --accent: #b91c2c;
  --accent-soft: rgba(185, 28, 44, 0.08);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 0 0 1px var(--line);
  --shadow-md: 0 8px 24px -12px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.04), 0 0 0 1px var(--line);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0d;
    --surface: #161618;
    --surface-2: #1c1c1f;
    --ink: #f4f4f4;
    --ink-soft: #d4d4d4;
    --ink-muted: #888888;
    --line: #2a2a2d;
    --line-soft: #232325;
    --accent: #ff6377;
    --accent-soft: rgba(255, 99, 119, 0.10);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--line);
    --shadow-md: 0 12px 32px -16px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--line);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

::selection {
  background: var(--accent-soft);
  color: var(--accent);
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.28;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  .grain {
    mix-blend-mode: screen;
    opacity: 0.06;
  }
}

main {
  max-width: 660px;
  margin: 0 auto;
  padding: 72px 24px 48px;
  display: grid;
  gap: 18px;
  animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Card system ───────────────────────────── */

.card {
  background: var(--surface);
  border-radius: 16px;
  padding: 30px 32px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.hero {
  padding: 44px 32px 40px;
}

/* ─── Hero ─────────────────────────────────── */

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  margin-bottom: 28px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--surface-2);
}

.status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2dd158;
  box-shadow: 0 0 8px rgba(45, 209, 88, 0.5);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(44px, 7.5vw, 64px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1;
  margin-bottom: 22px;
  color: var(--ink);
}

.hero .tagline {
  font-family: var(--serif);
  font-size: clamp(19px, 2.4vw, 22px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 540px;
  margin: 0;
}

/* ─── Section labels ───────────────────────── */

h2 {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  margin-bottom: 18px;
  position: relative;
  padding-left: 18px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 1px;
  background: var(--ink-muted);
}

/* ─── Body text ────────────────────────────── */

p {
  margin-bottom: 14px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.7;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s ease, color 0.2s ease;
}

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

/* ─── Now list ─────────────────────────────── */

.now-list {
  list-style: none;
  display: grid;
  gap: 14px;
}

.now-list li {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: baseline;
  font-size: 15.5px;
  color: var(--ink-soft);
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
}

.now-list li:last-child {
  border-bottom: none;
}

.now-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
}

/* ─── Project ──────────────────────────────── */

.project {
  display: block;
  padding: 20px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.project:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--ink);
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.project-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.project-year {
  font-size: 12.5px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.project p {
  font-size: 15px;
  margin-bottom: 12px;
}

.project-link {
  font-size: 13.5px;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ─── Links grid ───────────────────────────── */

.links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.link-tile {
  --brand: var(--ink);
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.link-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--brand);
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.link-tile:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  color: var(--ink);
  background: var(--surface);
}

.link-tile:hover::before {
  opacity: 0.04;
}

.link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  position: relative;
  z-index: 1;
}

.link-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.link-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.link-name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.link-handle {
  font-size: 12.5px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-arrow {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 14px;
  color: var(--ink-muted);
  z-index: 1;
  transition: color 0.22s ease, transform 0.22s ease;
}

.link-tile:hover .link-arrow {
  color: var(--brand);
  transform: translate(2px, -2px);
}

/* ─── Footer ───────────────────────────────── */

footer {
  max-width: 660px;
  margin: 24px auto 0;
  padding: 20px 32px 32px;
  font-size: 12.5px;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

/* ─── Responsive ───────────────────────────── */

@media (max-width: 600px) {
  main {
    padding: 48px 16px 24px;
    gap: 14px;
  }
  .card {
    padding: 24px 22px;
    border-radius: 14px;
  }
  .hero {
    padding: 32px 22px 28px;
  }
  .now-list li {
    grid-template-columns: 78px 1fr;
    gap: 12px;
    font-size: 14.5px;
  }
  .links-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .link-tile { padding: 14px 16px; }
  footer { padding: 16px 22px 24px; }
}
