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

:root {
  --bg: #0f0f13;
  --card: #16161f;
  --card-hover: #1c1c28;
  --text: #e2e2e2;
  --accent: #6366f1;
  --accent-light: #a5b4fc;
  --muted: #555;
  --border: rgba(255, 255, 255, 0.06);
}

html {
  font-size: 16px;
}

body {
  background-color: var(--bg);
  background-image: radial-gradient(
    ellipse 55% 45% at 15% 5%,
    rgba(99, 102, 241, 0.1) 0%,
    transparent 65%
  );
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  padding: 2.5rem 1.5rem;
}

.wrapper {
  max-width: 900px;
  margin: 0 auto;
}

/* ── Card base ─────────────────────────────────── */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
}

/* ── Bento grid ────────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto auto;
  gap: 1rem;
}

.card-hero { grid-column: span 2; }
.card-info { grid-column: span 1; }
.card-bio  { grid-column: span 3; }
.card-link { grid-column: span 1; }

/* ── Label ─────────────────────────────────────── */

.label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

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

.card-hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 240px;
  background-image: radial-gradient(
    ellipse 80% 60% at 0% 100%,
    rgba(99, 102, 241, 0.08) 0%,
    transparent 70%
  );
}

.card-hero h1 {
  font-size: 4.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  background: linear-gradient(135deg, #ffffff 20%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  margin-top: auto;
  padding-top: 1.5rem;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.01em;
}

/* ── Info card ─────────────────────────────────── */

.card-info {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.info-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.info-key {
  color: var(--muted);
  font-size: 0.8125rem;
}

.info-val {
  color: var(--text);
  font-weight: 500;
  text-align: right;
}

.info-link {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.8125rem;
  text-align: right;
  transition: opacity 0.15s ease;
}

.info-link:hover {
  opacity: 0.75;
}

.info-available {
  color: #4ade80;
  font-weight: 600;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

.tag {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-light);
  border: 1px solid rgba(99, 102, 241, 0.2);
  letter-spacing: 0.02em;
}

/* ── Bio card ──────────────────────────────────── */

.card-bio p {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text);
  opacity: 0.8;
}

/* ── Link cards ────────────────────────────────── */

.card-link {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.card-link:hover,
.card-link:focus-visible {
  background: var(--card-hover);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
  outline: none;
}

.card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.link-label {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0.75rem;
}

.arrow {
  color: var(--muted);
  align-self: flex-end;
  transition: color 0.2s ease, transform 0.2s ease;
}

.card-link:hover .arrow {
  color: var(--accent-light);
  transform: translate(2px, -2px);
}

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

footer {
  margin-top: 1rem;
  padding: 1rem 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ── Modal ─────────────────────────────────────── */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal:target {
  display: flex;
}

.modal-box {
  background: #1a1a24;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem 2rem 2.5rem;
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 1.5rem;
  line-height: 1;
  transition: color 0.15s ease;
}

.modal-close:hover {
  color: var(--text);
}

.modal-box h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.modal-subtitle {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.modal-link {
  color: var(--accent-light);
  text-decoration: none;
}

.modal-link:hover {
  text-decoration: underline;
}

.modal-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.modal-list li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.75rem;
  align-items: start;
}

.modal-year {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-light);
  padding-top: 0.2rem;
  letter-spacing: 0.02em;
}

.modal-list strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.modal-list p {
  font-size: 0.875rem;
  color: var(--text);
  opacity: 0.7;
  line-height: 1.6;
  margin-bottom: 0.35rem;
}

.modal-tech {
  font-size: 0.75rem !important;
  color: var(--accent-light) !important;
  opacity: 1 !important;
  font-weight: 500;
  margin-bottom: 0 !important;
}

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

@media (max-width: 680px) {
  body {
    padding: 1.25rem 1rem;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .card-hero { grid-column: span 2; }
  .card-info { grid-column: span 2; }
  .card-bio  { grid-column: span 2; }
  .card-link { grid-column: span 1; }

  .card-hero h1 {
    font-size: 3rem;
  }

  .card-hero {
    min-height: 180px;
  }
}

@media (max-width: 400px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .card-hero,
  .card-info,
  .card-bio,
  .card-link { grid-column: span 1; }
}
