:root {
  --bg: #f6efe8;
  --bg-soft: #f0e4d8;
  --ink: #1f1d1a;
  --muted: #5e554a;
  --accent: #d96f42;
  --accent-2: #2f8f83;
  --panel: rgba(255, 255, 255, 0.62);
  --border: rgba(31, 29, 26, 0.12);
  --radius: 18px;
  --shadow: 0 18px 40px rgba(31, 29, 26, 0.12);
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(47, 143, 131, 0.2), transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(217, 111, 66, 0.18), transparent 40%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg-soft) 100%);
  line-height: 1.5;
  overflow-x: hidden;
}

.grain {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(31, 29, 26, 0.08) 0.6px, transparent 0.6px);
  background-size: 3px 3px;
  opacity: 0.25;
  pointer-events: none;
  z-index: -1;
}

.site-header,
main,
.site-footer {
  width: min(1080px, 92vw);
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 0;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-family: "Fraunces", serif;
  font-size: 1.45rem;
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  padding: 0.25rem;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.site-nav {
  display: flex;
  gap: 1.2rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

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

main {
  padding: 3rem 0 4rem;
}

.hero h1,
h2 {
  font-family: "Fraunces", serif;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero h1 {
  font-size: clamp(2.3rem, 5.8vw, 4.2rem);
  max-width: 14ch;
  margin: 0.3rem 0 0.9rem;
}

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

.hero p {
  max-width: 58ch;
  color: var(--muted);
}

.eyebrow {
  display: inline-block;
  margin: 0;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.66rem 1.05rem;
  border-radius: 11px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
}

.btn-solid {
  color: #fff;
  background: linear-gradient(130deg, var(--accent), #bc5127);
}

.btn-outline {
  color: var(--ink);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.65);
}

.panel,
.spotlight {
  margin-top: 3.3rem;
  padding: clamp(1.2rem, 4vw, 2.1rem);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

#profile-avatar {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  flex-shrink: 0;
}

.profile-head h2 {
  margin: 0;
}

.profile-copy,
.profile-meta,
.profile-status {
  margin: 0.3rem 0 0;
  color: var(--muted);
}

.about-copy {
  margin: 0.55rem 0 0;
  color: var(--muted);
  max-width: 60ch;
}

.profile-status {
  font-size: 0.88rem;
}

.profile-status.ready {
  color: var(--accent-2);
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  margin: 0 0 1rem;
}

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

.card {
  padding: 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--border);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.card p,
.spotlight p {
  margin: 0;
  color: var(--muted);
}

.inline-link {
  color: inherit;
}

.spotlight {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.spotlight::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  left: var(--x, 70%);
  top: var(--y, 20%);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(217, 111, 66, 0.2), transparent 64%);
  z-index: -1;
}

.stats {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.stats li {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.8rem;
  text-align: center;
}

.stats strong {
  display: block;
  font-size: 1.2rem;
}

.stats span {
  color: var(--muted);
  font-size: 0.88rem;
}

.repo-grid {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.2rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.repo-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.7);
}

.repo-card a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.repo-card p {
  margin-top: 0.25rem;
  font-size: 0.92rem;
}

.site-footer {
  padding: 1.4rem 0 2.2rem;
  display: grid;
  gap: 0.3rem;
}

.site-footer p,
.site-footer small {
  margin: 0;
  color: var(--muted);
}

.site-footer a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 860px) {
  .card-grid,
  .stats,
  .repo-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .menu-toggle {
    display: inline-block;
  }

  .site-nav {
    position: absolute;
    right: 4vw;
    top: 62px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    padding: 0.7rem;
    display: none;
    flex-direction: column;
    min-width: 140px;
  }

  .site-nav.open {
    display: flex;
  }
}
