:root {
  --ink: #1F2937;        /* logo dark gray */
  --teal: #0F766E;       /* logo teal */
  --teal-dark: #115E59;
  --teal-tint: #F0FDFA;
  --muted: #4B5563;
  --line: #E5E7EB;
  --bg: #FFFFFF;
  --bg-alt: #F9FAFB;
  --radius: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 104px; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); }

.container { max-width: 1320px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }
.narrow { max-width: 900px; }

/* ---------- Logo ---------- */
.logo {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.logo b { font-weight: 800; color: var(--teal); }
.logo-small { font-size: 1.1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding-top: 12px; padding-bottom: 10px;
}
.header-inner .logo { font-size: 2.25rem; line-height: 1.2; }
.nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 28px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.nav a:hover { color: var(--teal); }

/* ---------- Hero ---------- */
.hero { padding: 96px 0 80px; background: linear-gradient(180deg, var(--teal-tint), var(--bg)); }
.eyebrow { color: var(--teal); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; margin: 0 0 12px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.15; margin: 0 0 20px; letter-spacing: -0.02em; }
.hero-title { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 0 0 32px; }
.hero-title h1 { margin: 0; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 80ch; margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Contact form section (bottom of the page) ---------- */
.contact { background: linear-gradient(180deg, var(--teal-tint), var(--bg)); border-top: 1px solid var(--line); }

/* ---------- "Need something custom?" ---------- */
.custom-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.custom-card {
  background: var(--bg); border: 1px solid var(--line); border-top: 4px solid var(--teal);
  border-radius: var(--radius); padding: 18px 20px;
}
.custom-card h3 { margin: 0 0 10px; font-size: 1.05rem; color: var(--teal); }
.custom-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.custom-list a {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-alt);
  color: var(--ink); text-decoration: none; font-size: 0.9rem; font-weight: 500;
}
.custom-list a:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-tint); }

/* ---------- Buttons ---------- */
.button {
  display: inline-block;
  background: var(--teal); color: #fff;
  padding: 12px 22px; border-radius: 8px;
  font-weight: 600; text-decoration: none;
  transition: background 0.15s;
}
.button:hover { background: var(--teal-dark); }
.button-small { padding: 9px 16px; font-size: 0.95rem; }
.button-ghost { background: transparent; color: var(--teal); border: 1.5px solid var(--teal); }
.button-ghost:hover { background: var(--teal-tint); }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { font-size: 1.9rem; margin: 0 0 8px; letter-spacing: -0.01em; }
.section-intro { color: var(--muted); margin: 0 0 36px; }
.section p { color: var(--muted); }

/* ---------- App cards ---------- */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.app-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; background: var(--bg);
  transition: box-shadow 0.15s, border-color 0.15s;
}
.app-card:hover { border-color: #CBD5E1; box-shadow: 0 8px 24px rgba(31,41,55,0.08); }
.app-card > p { margin: 16px 0; }
.app-card > .button { margin-top: auto; align-self: flex-start; }
.app-card-soon { background: var(--bg-alt); border-style: dashed; }
.app-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; }

/* Screenshot at the top of a card; clicking it opens the demo */
.app-shot {
  display: block; margin: -28px -28px 20px; overflow: hidden;
  border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; background: var(--bg-alt);
}
.app-shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; transition: transform 0.2s; }
.app-shot:hover img { transform: scale(1.02); }

/* Status label on a card */
.status {
  margin-left: auto; align-self: flex-start; white-space: nowrap;
  padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
}
.status-live { background: #DCFCE7; color: #166534; }
.status-ready { background: #DBEAFE; color: #1E40AF; }
.status-soon { background: #FEF3C7; color: #92400E; }

.app-head { display: flex; gap: 14px; align-items: center; }
.app-head h3 { margin: 0; font-size: 1.25rem; }
.app-tag { margin: 0 !important; font-size: 0.85rem; color: var(--teal) !important; font-weight: 500; }
.app-icon {
  width: 48px; height: 48px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--teal-tint); color: var(--teal);
  border-radius: 10px;
}
.badge {
  display: inline-block; vertical-align: middle; margin-left: 6px;
  padding: 2px 9px; border-radius: 999px;
  background: #FEF3C7; color: #92400E; font-size: 0.72rem; font-weight: 600;
}
.app-icon-muted { background: #F3F4F6; color: var(--muted); }

.features { margin: 0 0 24px; padding-left: 20px; color: var(--muted); }
.features li { margin-bottom: 6px; }

/* ---------- Greeting form ---------- */
.form-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(31,41,55,0.08);
  padding: 32px;
}
.form-card fieldset { border: 0; margin: 0 0 28px; padding: 0; min-width: 0; }
.form-card legend { font-weight: 600; font-size: 1.1rem; margin-bottom: 14px; padding: 0; }
.step {
  display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 6px;
  border-radius: 50%; background: var(--teal); color: #fff; font-size: 0.85rem;
}
.hint { font-weight: 400; color: var(--muted); font-size: 0.9rem; margin-left: 6px; }

.topic-groups {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}
.topic-group {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px 22px;
}
.group-label {
  margin: 0 0 16px; text-align: center; font-size: 0.85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--teal);
}
/* Choices inside a group: two even columns; an odd last one sits centered */
.topic-group .pill-group { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.topic-group .pill span { display: block; text-align: center; }
.topic-group .pill:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 6px); }
.topic-other { margin-top: 24px; justify-content: center; }
.pill-group { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { cursor: pointer; position: relative; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill span {
  display: inline-block; padding: 9px 16px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--bg); font-weight: 500; font-size: 0.95rem;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pill:hover span { border-color: var(--teal); }
.pill input:checked + span { background: var(--teal); border-color: var(--teal); color: #fff; }
.pill input:checked + span::before { content: "✓ "; }
.pill input:focus-visible + span { outline: 3px solid rgba(15,118,110,0.35); outline-offset: 2px; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 0.92rem; font-weight: 500; }
.field em { color: var(--teal); font-style: normal; }
.field-wide { grid-column: 1 / -1; }
.field input, .field textarea {
  font: inherit; font-weight: 400; color: var(--ink);
  padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--bg);
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,118,110,0.15); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-actions .button { border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.form-actions .button:disabled { opacity: 0.6; cursor: wait; }
.form-note { margin: 0; font-size: 0.85rem; color: var(--muted); max-width: 46ch; }
.form-status { margin: 14px 0 0; font-weight: 500; min-height: 1px; }
.form-status.error { color: #B91C1C; }

.form-success { text-align: center; padding: 24px 0; }
.form-success h2 { margin: 0 0 8px; font-size: 1.6rem; outline: none; }
.form-success p { color: var(--muted); margin: 0 0 20px; }
.form-success .button { cursor: pointer; font: inherit; font-weight: 600; }

/* ---------- Expertise ---------- */
.skill-group-title { font-size: 1.1rem; margin: 36px 0 14px; color: var(--teal); }
.section-intro + .skill-group-title { margin-top: 0; }
.skill-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px;
}
.skill-grid li {
  background: var(--bg); border: 1px solid var(--line); border-left: 4px solid var(--teal);
  border-radius: 8px; padding: 16px 18px;
}
.skill-grid strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.skill-grid span { color: var(--muted); font-size: 0.92rem; }

/* ---------- About me ---------- */
.about-me { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.about-me-intro p:not(.eyebrow) { font-size: 1.05rem; }
.about-me-intro .about-me-lead { font-size: 1.2rem; color: var(--ink); font-weight: 500; }
.stats { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stats li { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stats strong { display: block; font-size: 1.7rem; line-height: 1.1; color: var(--teal); letter-spacing: -0.02em; }
.stats span { font-size: 0.85rem; color: var(--muted); }
.about-me-work h3 { margin: 0 0 16px; font-size: 1.2rem; }
.work-list { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 12px; }
.work-list li {
  background: var(--bg); border: 1px solid var(--line); border-left: 4px solid var(--teal);
  border-radius: 8px; padding: 14px 18px;
}
.work-list strong { display: block; margin-bottom: 2px; }
.work-list span { color: var(--muted); font-size: 0.95rem; }

/* ---------- Footer ---------- */
.site-footer { padding: 32px 0; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- 404 ---------- */
.not-found { padding: 120px 0; text-align: center; }
.not-found h1 { font-size: 2.5rem; margin: 0 0 12px; }

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .about-me { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 600px) {
  .header-inner { padding-top: 10px; padding-bottom: 8px; }
  .header-inner .logo { font-size: 1.75rem; }
  .stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .stats li { padding: 12px 10px; }
  .stats strong { font-size: 1.3rem; }
  .nav { gap: 16px; }
  .nav a { font-size: 0.9rem; }
  .logo { font-size: 1.25rem; }
  .hero { padding: 64px 0 56px; }
  .section { padding: 56px 0; }
  .app-grid { grid-template-columns: 1fr; }
  .app-card { padding: 22px; }
  .app-shot { margin: -22px -22px 18px; }
  .form-card { padding: 22px 18px; }
  .field-grid { grid-template-columns: 1fr; }
  .hint { display: block; margin: 4px 0 0; }
  .topic-groups { grid-template-columns: 1fr; gap: 16px; }
  .topic-group { padding: 16px 14px 18px; }
  .topic-group .pill-group { gap: 10px; }
  .topic-group .pill span { padding: 9px 8px; font-size: 0.9rem; }
}
@media (max-width: 420px) {
  .nav { gap: 12px; }
  .nav a { font-size: 0.82rem; }
  .logo { font-size: 1.1rem; }
  .header-inner .logo { font-size: 1.5rem; }
}
