@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

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

:root {
  --bg: #0c0c10;
  --bg-card: #13131a;
  --bg-card-hover: #18181f;
  --border: #1e1e28;
  --border-hover: #2a2a38;
  --text: #e8e8f0;
  --muted: #6b6b80;
  --alive: #22c55e;
  --alive-dim: rgba(34, 197, 94, 0.1);
  --icu: #f59e0b;
  --icu-dim: rgba(245, 158, 11, 0.1);
  --dead: #6b7280;
  --dead-dim: rgba(107, 114, 128, 0.08);
  --radius: 14px;
}

html {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
}

body::-webkit-scrollbar { width: 4px; }
body::-webkit-scrollbar-track { background: var(--bg); }
body::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 2px; }

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

.hero {
  padding: 72px 24px 56px;
  max-width: 720px;
  margin: 0 auto;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 2px solid var(--border-hover);
  flex-shrink: 0;
}

.hero-text h1 {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
}

.tagline {
  font-size: 1.05rem;
  color: var(--muted);
  margin-top: 8px;
  font-weight: 500;
}

.sub-tagline {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--alive);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

/* ── Sections ─────────────────────────────────────── */

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.section-header {
  margin-bottom: 16px;
}

.section-desc {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 6px;
}

/* ── Badges ───────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid;
}

.badge-alive {
  color: var(--alive);
  border-color: rgba(34, 197, 94, 0.3);
  background: var(--alive-dim);
}

.badge-icu {
  color: var(--icu);
  border-color: rgba(245, 158, 11, 0.3);
  background: var(--icu-dim);
}

.badge-dead {
  color: var(--dead);
  border-color: rgba(107, 114, 128, 0.25);
  background: var(--dead-dim);
}

/* ── Cards ────────────────────────────────────────── */

.cards-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  position: relative;
  overflow: hidden;
}

a.card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.card-icon {
  font-size: 1.3rem;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
}

.card-body {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.card-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.card-arrow {
  font-size: 1rem;
  color: var(--muted);
  flex-shrink: 0;
  transition: color 0.2s, transform 0.2s;
}

a.card:hover .card-arrow {
  transform: translate(2px, -2px);
}

/* Alive cards */
.card-alive {
  border-color: var(--border);
}

.card-alive:hover {
  border-color: rgba(34, 197, 94, 0.3) !important;
}

.card-alive:hover .card-arrow {
  color: var(--alive);
}

.card-alive .card-icon {
  background: var(--alive-dim);
  color: var(--alive);
}

/* ICU cards */
.card-icu {
  border-color: var(--border);
}

.card-icu:hover {
  border-color: rgba(245, 158, 11, 0.3) !important;
}

.card-icu .card-icon {
  background: var(--icu-dim);
  color: var(--icu);
}

/* Flatline heartbeat */
.flatline {
  width: 60px;
  height: 24px;
  flex-shrink: 0;
  color: var(--icu);
  opacity: 0.35;
  transition: opacity 0.2s;
}

.card-icu:hover .flatline {
  opacity: 0.7;
  animation: flatline-anim 1.2s ease-in-out infinite;
}

@keyframes flatline-anim {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 0.3; }
}

/* Dead cards */
.card-dead {
  border-style: dashed;
  border-color: var(--border);
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}

.card-dead .card-icon {
  background: var(--dead-dim);
  color: var(--dead);
  filter: grayscale(1);
}

.card-dead .card-title {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--dead);
}

.epitaph {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 5px;
  font-style: italic;
  opacity: 0.7;
}

.rip {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--dead);
  opacity: 0.5;
  flex-shrink: 0;
}

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

.footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 24px 48px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
}

.footer a {
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer a:hover {
  opacity: 0.7;
}

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

@media (max-width: 480px) {
  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .avatar {
    width: 80px;
    height: 80px;
  }

  .flatline {
    display: none;
  }
}

/* ── Fade in on load ──────────────────────────────── */

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

.hero, .section {
  animation: fadein 0.5s ease both;
}

.section:nth-child(1) { animation-delay: 0.05s; }
.section:nth-child(2) { animation-delay: 0.1s; }
.section:nth-child(3) { animation-delay: 0.15s; }
