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

:root {
  --bg: #f9f9f7;
  --text: #1a1a1a;
  --muted: #666;
  --border: #e0e0dc;
  --accent: #1a1a1a;
  --card-bg: #ffffff;
  --max: 960px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  padding: 0 1.5rem;
}

/* ── Aurora background ───────────────────── */
@keyframes aurora {
  from { background-position: 50% 50%, 50% 50%; }
  to   { background-position: 350% 50%, 350% 50%; }
}

@keyframes hero-fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--bg);
}

.aurora-wrap {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.aurora-el {
  position: absolute;
  inset: -10px;
  opacity: 0.5;
  will-change: transform;
  background-image:
    repeating-linear-gradient(100deg, #ffffff 0%, #ffffff 7%, transparent 10%, transparent 12%, #ffffff 16%),
    repeating-linear-gradient(100deg, #3b82f6 10%, #a5b4fc 15%, #93c5fd 20%, #ddd6fe 25%, #60a5fa 30%);
  background-size: 300%, 200%;
  background-position: 50% 50%, 50% 50%;
  filter: blur(10px) invert(1);
  animation: aurora 60s linear infinite;
  mask-image: radial-gradient(ellipse at 100% 0%, black 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 100% 0%, black 10%, transparent 70%);
}

.aurora-el::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(100deg, #ffffff 0%, #ffffff 7%, transparent 10%, transparent 12%, #ffffff 16%),
    repeating-linear-gradient(100deg, #3b82f6 10%, #a5b4fc 15%, #93c5fd 20%, #ddd6fe 25%, #60a5fa 30%);
  background-size: 200%, 100%;
  background-attachment: fixed;
  mix-blend-mode: difference;
  animation: aurora 60s linear infinite;
}

.hero-fade {
  animation: hero-fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

/* ── Header ─────────────────────────────── */
header {
  max-width: var(--max);
  margin: 5rem auto 3.5rem;
}

header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

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

nav {
  margin-top: 1rem;
  display: flex;
  gap: 1.25rem;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--text);
  padding-bottom: 1px;
}

nav a:hover {
  color: var(--muted);
  border-color: var(--muted);
}

/* ── Main ────────────────────────────────── */
main {
  max-width: var(--max);
  margin: 0 auto;
}

section {
  margin-bottom: 3.5rem;
}

section h2 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

/* ── Cards ───────────────────────────────── */
.cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cards--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 1.4rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.2rem;
}

.card-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.card-tag {
  font-size: 0.775rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.card-role {
  font-size: 0.825rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.card p:last-child {
  font-size: 0.875rem;
  color: #333;
  line-height: 1.55;
}

.project-img {
  width: 50%;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: block;
}

.card-img {
  width: calc(100% + 2.8rem);
  margin: -1.25rem -1.4rem 1rem;
  display: block;
  border-radius: 5px 5px 0 0;
  border-bottom: 1px solid var(--border);
  object-fit: contain;
  background: #f0f0ee;
  height: 180px;
}

a.card {
  display: block;
  text-decoration: none;
  color: inherit;
}

a.card:hover {
  border-color: var(--text);
}

.back a {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--muted);
  padding-bottom: 1px;
}

.back {
  margin-bottom: 1.5rem;
}

/* ── Footer ──────────────────────────────── */
footer {
  max-width: var(--max);
  margin: 0 auto 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

footer p {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 520px) {
  header {
    margin-top: 3rem;
  }

  .card-header {
    flex-direction: column;
    gap: 0.2rem;
  }
}
