@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #10151e;
  --surface: #171e29;
  --raised: #222c38;
  --border: #1a222e;
  --button: #2a3644;
  --text: #eef1f5;
  --body: #d9dee6;
  --secondary: #8c96a4;
  /* Neutral accent — site identity (not SideSpeed green) */
  --accent: #a8b4c4;
  --accent-soft: rgba(168, 180, 196, 0.14);
  /* Project-specific: SideSpeed only */
  --sidespeed: #93bfa2;
  --sidespeed-soft: rgba(147, 191, 162, 0.12);
  --radius: 10px;
  --max: 40rem;
  --focus: 0 0 0 3px rgba(168, 180, 196, 0.45);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 85% 55% at 50% -12%, rgba(168, 180, 196, 0.09), transparent 55%),
    radial-gradient(ellipse 50% 35% at 100% 0%, rgba(143, 170, 204, 0.05), transparent 50%),
    var(--bg);
  color: var(--body);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

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

a:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 4px;
}

h1,
h2,
h3 {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2.1rem, 7vw, 2.75rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.3rem, 3.5vw, 1.55rem);
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  padding-block: 1.25rem 3.5rem;
}

/* —— Header —— */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-block: 0.35rem 1.25rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.avatar {
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}

.avatar--header {
  width: 36px;
  height: 36px;
  box-shadow: 0 0 0 1px rgba(168, 180, 196, 0.25);
}

.avatar--hero {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.15rem;
  box-shadow: 0 0 0 3px rgba(168, 180, 196, 0.18);
}

.nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem 1rem;
  font-size: 0.95rem;
  margin-left: auto;
}

.nav a {
  color: var(--secondary);
  text-decoration: none;
  padding: 0.4rem 0.15rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

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

/* —— Intro / hero —— */
.intro {
  text-align: center;
  padding-block: 1.75rem 2.75rem;
  animation: rise 0.7s ease both;
}

.intro .avatar--hero {
  display: block;
}

.intro-kicker {
  margin: 0 0 0.2rem;
  color: var(--secondary);
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.intro .brand-name {
  margin-bottom: 0.9rem;
}

.intro-pitch {
  color: var(--body);
  max-width: 32rem;
  margin: 0 auto;
  font-size: 1.08rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.6rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Sections —— */
.section {
  padding-block: 2rem;
  border-top: 1px solid var(--border);
  animation: rise 0.7s ease both;
  animation-delay: 0.12s;
}

.section-lead {
  color: var(--secondary);
  margin-bottom: 1.25rem;
  max-width: 34rem;
}

#support {
  animation-delay: 0.2s;
}

/* —— Project cards ——
   Add a new project: duplicate one .project-card block in index.html
   (see the HTML comment above the grid) and fill name, blurb, links, icon. */
.project-grid {
  display: grid;
  gap: 0.9rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.2rem 1.15rem;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "icon title"
    "icon blurb"
    "icon links";
  column-gap: 1rem;
  row-gap: 0.35rem;
  align-items: start;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.project-card:hover {
  transform: translateY(-1px);
}

.project-card > picture {
  grid-area: icon;
}

.project-card .project-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
}

.project-card h3 {
  grid-area: title;
  margin: 0.15rem 0 0;
}

.project-card .project-blurb {
  grid-area: blurb;
  color: var(--secondary);
  font-size: 0.98rem;
  margin: 0;
}

.project-links {
  grid-area: links;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-top: 0.15rem;
  font-size: 0.95rem;
}

.project-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.project-links a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* SideSpeed accent — green only here */
.project-card--sidespeed {
  border-color: rgba(147, 191, 162, 0.28);
  background:
    linear-gradient(135deg, var(--sidespeed-soft), transparent 55%),
    var(--surface);
}

.project-card--sidespeed:hover {
  border-color: var(--sidespeed);
}

.project-card--sidespeed .project-links a {
  color: var(--sidespeed);
}

.project-card--sidespeed .project-links a:hover {
  color: var(--text);
}

.project-card--sidespeed:focus-within {
  box-shadow: 0 0 0 3px rgba(147, 191, 162, 0.35);
}

/* —— Support —— */
.support-row {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 480px) {
  .support-row {
    grid-template-columns: 1fr 1fr;
  }
}

.support-link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  text-decoration: none;
  color: inherit;
  min-height: 44px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.support-link:hover {
  border-color: var(--accent);
  color: inherit;
}

.support-link strong {
  color: var(--text);
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  font-size: 1.02rem;
}

.support-link span {
  color: var(--secondary);
  font-size: 0.92rem;
}

/* —— Footer —— */
.site-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--secondary);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  justify-content: space-between;
}

.site-footer a {
  color: var(--secondary);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}

.footer-note {
  flex-basis: 100%;
  margin: 0.35rem 0 0;
}

/* —— 404 —— */
.error-page {
  text-align: center;
  padding-block: 3rem 2rem;
}

.error-page h1 {
  font-size: clamp(2.5rem, 10vw, 3.5rem);
  margin-bottom: 0.5rem;
}

.error-page p {
  color: var(--secondary);
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1.15rem;
  background: var(--button);
  border: 1px solid var(--button);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: border-color 0.15s ease;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
