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

:root {
  --bg: #050816;
  --bg-alt: #0b1020;
  --card-bg: #111827;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --danger: #f97373;
  --success: #4ade80;
  --radius-lg: 16px;
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.45);
  --border-subtle: rgba(148, 163, 184, 0.25);
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #111827 0, #020617 55%, #000 100%);
  color: var(--text);
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */

.top-bar {
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  backdrop-filter: blur(18px);
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.95),
    rgba(15, 23, 42, 0.78)
  );
  position: sticky;
  top: 0;
  z-index: 10;
}

.top-bar .container {
  padding: 1.25rem 1.5rem;
}

h1 {
  font-size: clamp(1.6rem, 2vw + 1rem, 2.2rem);
  margin: 0;
  letter-spacing: 0.03em;
}

.subtitle {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Layout */

main.container {
  flex: 1;
  padding-top: 1.75rem;
  padding-bottom: 2.5rem;
}

.card-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 840px) {
  .card-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }

  .projects .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 839px) {
  .projects .card-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Cards */

.card {
  background: radial-gradient(circle at top left, #1f2937 0, #020617 55%);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(
    circle at top,
    rgba(56, 189, 248, 0.18),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.35s ease-out;
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

.card h2,
.card h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.price-card h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.price-card h2::after {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

.price-card[data-loaded="true"] h2::after {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.8rem;
}

.bullets {
  margin: 0.6rem 0 0.3rem;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.bullets li + li {
  margin-top: 0.3rem;
}

/* Price layout */

.price-row {
  display: flex;
  gap: 1.5rem;
  margin: 1rem 0 0.6rem;
}

.price-row > div {
  flex: 1;
  background: rgba(15, 23, 42, 0.9);
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.value {
  font-size: 1.4rem;
  font-weight: 600;
}

.price-extra {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

/* Chips & tags */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid transparent;
}

.chip-neutral {
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.45);
}

.chip-positive {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.6);
  color: var(--success);
}

.chip-negative {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.6);
  color: var(--danger);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.65rem 0 0.4rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.9);
}

/* Projects */

.projects {
  margin-top: 2.25rem;
}

.projects h2 {
  margin-bottom: 0.25rem;
}

/* Links */

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Footer */

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 1.1rem 0 1.4rem;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.98),
    rgba(15, 23, 42, 0.8)
  );
  margin-top: auto;
}
