:root {
  --page-max-width: 1160px;
  --page-padding: clamp(1.5rem, 4vw, 2.75rem);
  --text-strong: #0f172a;
  --text-muted: #475569;
  --text-faint: #64748b;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --surface-muted: #f1f5f9;
  --border-color: rgba(15, 23, 42, 0.08);
  --accent: #0f766e;
  --accent-alt: #14b8a6;
  --accent-soft: rgba(20, 184, 166, 0.12);
  --accent-strong: rgba(13, 148, 136, 0.18);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-soft: 0 24px 50px -30px rgba(15, 23, 42, 0.45);
  --shadow-ring: 0 0 0 1px rgba(13, 148, 136, 0.12);
  color-scheme: light;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--surface-alt);
  color: var(--text-muted);
  line-height: 1.6;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(480px 420px at 12% 18%, rgba(13, 148, 136, 0.12), transparent 68%),
    radial-gradient(420px 360px at 90% 20%, rgba(45, 212, 191, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.035), transparent 40%);
  z-index: -2;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  backdrop-filter: blur(60px);
  opacity: 0.35;
  pointer-events: none;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--text-strong);
}

.container {
  width: min(var(--page-max-width), 100%);
  margin: 0 auto;
}

.section {
  padding: var(--page-padding) var(--page-padding) clamp(3rem, 5vw, 4.5rem);
}

.shadow-surface {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-color);
}

.projects-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  background: rgba(248, 250, 252, 0.92);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.projects-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.45rem var(--page-padding);
}

.brand {
  font-family: 'Satisfy', 'Inter', cursive;
  font-size: clamp(1.15rem, 2.8vw, 1.6rem);
  color: var(--text-strong);
  letter-spacing: 0.02em;
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
  color: var(--text-muted);
}

.topbar-link:hover {
  background: rgba(13, 148, 136, 0.08);
  border-color: rgba(13, 148, 136, 0.2);
  color: var(--text-strong);
}

.topbar-link--accent {
  background: rgba(13, 148, 136, 0.12);
  border-color: rgba(13, 148, 136, 0.24);
  color: var(--text-strong);
}

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(230, 252, 245, 0.65))
      , url('/projects/assets/hero-texture.svg');
  background-size: cover;
  background-position: center;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(24px);
  opacity: 0.45;
  pointer-events: none;
}

.hero::before {
  width: 460px;
  height: 460px;
  top: -240px;
  right: -160px;
  background: radial-gradient(circle at 30% 30%, rgba(13, 148, 136, 0.35), transparent 65%);
}

.hero::after {
  width: 380px;
  height: 380px;
  bottom: -180px;
  left: -140px;
  background: radial-gradient(circle at 60% 60%, rgba(45, 212, 191, 0.28), transparent 65%);
}

.hero__inner {
  position: relative;
  padding: clamp(3.5rem, 6vw, 6rem) clamp(2.5rem, 6vw, 5rem);
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
}

.eyebrow {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.hero__title {
  color: var(--text-strong);
  font-size: clamp(2.25rem, 4.5vw, 3.4rem);
  line-height: 1.08;
  font-weight: 800;
  margin: 0 0 1.4rem;
}

.hero__description {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  max-width: 720px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.button--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.button--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 35px -22px rgba(13, 148, 136, 0.6);
}

.button--ghost {
  background: rgba(13, 148, 136, 0.08);
  color: var(--accent);
  border-color: rgba(13, 148, 136, 0.16);
}

.button--ghost:hover {
  background: rgba(13, 148, 136, 0.12);
  transform: translateY(-1px);
}

.project-grid {
  display: grid;
  gap: clamp(1.6rem, 3vw, 2.3rem);
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.project-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: clamp(1.5rem, 3vw, 2.3rem);
  display: grid;
  gap: 1.2rem;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
  align-content: start;
  min-height: 100%;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
  border-color: rgba(13, 148, 136, 0.18);
}

.project-card__title {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 1.65rem);
  color: var(--text-strong);
  font-weight: 700;
  line-height: 1.2;
}

.project-card__summary {
  margin: 0;
  color: var(--text-muted);
}

.project-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.project-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}

.project-card__status {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background: rgba(13, 148, 136, 0.9);
}

.project-card__status.is-planned {
  background: rgba(15, 23, 42, 0.65);
}

.project-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--accent);
}

.project-card__cta svg {
  width: 18px;
  height: 18px;
  transition: transform 150ms ease;
}

.project-card__cta:hover svg {
  transform: translateX(4px);
}

.project-card.is-upcoming {
  opacity: 0.85;
}

.project-card.is-upcoming .project-card__cta {
  color: var(--text-faint);
}

.projects-footer {
  padding: clamp(2rem, 4vw, 3.4rem) var(--page-padding);
  text-align: center;
  color: var(--text-faint);
  font-size: 0.9rem;
}

.projects-footer a {
  color: var(--accent);
  font-weight: 600;
}

@media (min-width: 720px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1080px) {
  .project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar-links {
    gap: 0.45rem;
  }

  .topbar-link {
    padding: 0.35rem 0.55rem;
  }

  .project-card__footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
