:root {
  --bg: #f7f5f0;
  --surface: rgba(255, 255, 255, 0.72);
  --border: rgba(40, 50, 45, 0.08);
  --text: #2a302d;
  --muted: #6b736e;
  --accent: #5a8f7b;        /* soft sage */
  --accent-dark: #3f6f5d;
  --accent-soft: #e3efe9;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(30, 40, 35, 0.04), 0 8px 30px rgba(30, 40, 35, 0.06);
  --max: 1040px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* ---------- background blobs ---------- */
.blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  animation: drift 28s ease-in-out infinite alternate;
}
.b1 { width: 480px; height: 480px; background: #cfe5da; top: -120px; left: -100px; }
.b2 { width: 420px; height: 420px; background: #f3dcc8; top: 30%; right: -140px; animation-duration: 34s; }
.b3 { width: 380px; height: 380px; background: #dcdcf2; bottom: -140px; left: 25%; animation-duration: 40s; }

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(60px, 40px) scale(1.12); }
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.logo { font-family: "Fraunces", serif; font-size: 1.5rem; font-weight: 600; }
.logo span { color: var(--accent); }
.nav nav { display: flex; gap: 6px; }
.nav nav a {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}
.nav nav a:hover { background: var(--accent-soft); color: var(--accent-dark); }

/* ---------- layout ---------- */
main { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.section { padding: 72px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { margin-bottom: 0; }

h1, h2, h3 { font-family: "Fraunces", serif; font-weight: 600; line-height: 1.2; }
h2 { font-size: 2rem; margin-bottom: 28px; }
h3 { font-size: 1.2rem; margin-bottom: 10px; }

.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.card p { color: var(--muted); }

/* ---------- hero ---------- */
.hero { padding: 110px 0 90px; max-width: 760px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 26px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); letter-spacing: -0.01em; margin-bottom: 22px; }
.hero h1 em { font-style: italic; color: var(--accent); }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 600px; margin-bottom: 34px; }

/* ---------- buttons ---------- */
.actions, .contact-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  font: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.btn.primary { background: var(--text); color: #fff; }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(42, 48, 45, 0.18); }
.btn.ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn.ghost:hover { background: var(--accent-soft); transform: translateY(-2px); }

.link { color: var(--accent-dark); font-weight: 500; font-size: 0.95rem; }
.link:hover { text-decoration: underline; }

/* ---------- chips ---------- */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.88rem;
  font-weight: 500;
}

/* ---------- repos ---------- */
.repo { display: flex; flex-direction: column; transition: transform 0.25s, box-shadow 0.25s; }
.repo:hover { transform: translateY(-4px); box-shadow: 0 14px 40px rgba(30, 40, 35, 0.1); }
.repo h3 { word-break: break-word; }
.repo p { flex: 1; font-size: 0.95rem; }
.repo .meta { display: flex; gap: 14px; margin-top: 18px; font-size: 0.82rem; color: var(--muted); }
.repo .lang::before {
  content: "";
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 6px;
}

/* ---------- contact ---------- */
.contact { text-align: center; padding: 56px 28px; }
.contact h2 { margin-bottom: 12px; }
.contact > p { margin-bottom: 28px; }
.contact-row { justify-content: center; margin-bottom: 36px; }
.contact-list {
  list-style: none;
  display: inline-grid;
  gap: 10px;
  text-align: left;
  font-size: 0.95rem;
}
.contact-list li { display: flex; gap: 16px; }
.contact-list span { color: var(--muted); min-width: 72px; }
.contact-list a { color: var(--accent-dark); overflow-wrap: anywhere; }
.contact-list a:hover { text-decoration: underline; }

/* ---------- footer ---------- */
footer { text-align: center; padding: 40px 24px 56px; font-size: 0.88rem; color: var(--muted); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .grid.three { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  main, .nav { padding-left: 16px; padding-right: 16px; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 56px; }
  .section { padding: 52px 0; }
  .nav nav a { padding: 6px 10px; }
  .card { padding: 22px; }
  .contact { padding: 40px 20px; }
}
