:root {
  --bg: #f3efe5;
  --surface: rgba(255, 252, 245, 0.86);
  --surface-strong: #fffdf8;
  --text: #1f1a17;
  --muted: #5f564f;
  --accent: #0f766e;
  --accent-strong: #134e4a;
  --border: rgba(31, 26, 23, 0.1);
  --shadow: 0 24px 60px rgba(39, 29, 23, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(217, 119, 6, 0.16), transparent 28%),
    linear-gradient(180deg, #f8f5ec 0%, var(--bg) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(
    rgba(255, 255, 255, 0.22) 1px,
    transparent 1px
  );
  background-size: 100% 28px;
  opacity: 0.2;
}

.page-shell {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.hero,
.panel,
.footer-guide {
  backdrop-filter: blur(10px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero {
  padding: 2.2rem 1.4rem;
  margin-bottom: 1.25rem;
}

.eyebrow {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.85rem;
  font-size: clamp(2.2rem, 8vw, 4.8rem);
  line-height: 0.95;
}

.hero-copy {
  max-width: 42rem;
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
}

.content {
  display: grid;
  gap: 1.25rem;
}

.panel,
.footer-guide {
  padding: 1.4rem;
}

.panel h2,
.footer-guide h2 {
  margin-bottom: 0.9rem;
  font-size: 1.4rem;
}

.panel p,
.footer-guide p {
  margin-bottom: 0;
  line-height: 1.7;
  color: var(--muted);
}

.panel p + p {
  margin-top: 0.8rem;
}

.project-panel {
  position: relative;
  overflow: hidden;
}

.project-panel > * {
  position: relative;
  z-index: 1;
}

.project-panel::after {
  content: "";
  position: absolute;
  inset: auto -2rem -2rem auto;
  width: 8rem;
  height: 8rem;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(15, 118, 110, 0.18),
    rgba(217, 119, 6, 0.08)
  );
}

.panel-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.95rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #f8fffd;
  text-decoration: none;
  font-weight: 700;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.project-link:hover,
.project-link:focus-visible {
  background: var(--accent-strong);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.18);
}

.project-link:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  outline-offset: 3px;
}

.footer-guide {
  margin-top: 1.25rem;
  background: var(--surface-strong);
}

.is-visible {
  animation: rise-in 700ms ease both;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 700px) {
  .page-shell {
    width: min(1100px, calc(100% - 3rem));
    padding-top: 3rem;
  }

  .hero,
  .panel,
  .footer-guide {
    border-radius: 28px;
  }

  .hero,
  .panel,
  .footer-guide {
    padding: 2rem;
  }

  .panel-heading {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 960px) {
  .content {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  #about {
    grid-column: span 1;
  }

  #memory-trainer,
  #air-hockey {
    grid-column: span 1;
  }
}
