/* ===== Theme tokens ===== */
:root {
  --bg: #fafaf9;
  --bg-grad: radial-gradient(1200px 600px at 50% -10%, #f0f0ee 0%, transparent 70%);
  --surface: #ffffff;
  --glass: rgba(255, 255, 255, 0.7);
  --text: #161616;
  --muted: #6b6b6b;
  --faint: #8d8d8d;
  --border: #e7e7e3;
  --accent: #161616;
  --accent-text: #fafaf9;
  --hover: #f2f2f0;
  --radius: 16px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
  --bg: #0b0b0c;
  --bg-grad: radial-gradient(1200px 600px at 50% -10%, #1a1a1d 0%, transparent 70%);
  --surface: #161618;
  --glass: rgba(22, 22, 24, 0.6);
  --text: #f2f2f2;
  --muted: #9a9a9a;
  --faint: #777;
  --border: #262628;
  --accent: #f2f2f2;
  --accent-text: #0b0b0c;
  --hover: #1a1a1c;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  background-image: var(--bg-grad);
  background-repeat: no-repeat;
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.wrap {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 clamp(22px, 5vw, 40px);
}

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

::selection { background: var(--text); color: var(--bg); }

/* ===== Theme toggle ===== */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s ease, transform 0.3s ease, border-color 0.2s ease;
}
.theme-toggle:hover { background: var(--hover); transform: rotate(40deg); border-color: var(--text); }

/* ===== Hero ===== */
.hero {
  padding: clamp(96px, 16vh, 150px) 0 64px;
  border-bottom: 1px solid var(--border);
}
.hero__mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 30px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}
.hero__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #2ec27e;
  box-shadow: 0 0 0 3px rgba(46, 194, 126, 0.18);
}
.hero__name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(44px, 10vw, 76px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.0;
  margin-bottom: 20px;
}
.hero__tagline {
  font-size: clamp(19px, 3vw, 23px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
  max-width: 600px;
}
.hero__bio {
  font-size: 16px;
  color: var(--muted);
  max-width: 600px;
  margin-bottom: 36px;
}
.hero__bio strong { color: var(--text); font-weight: 600; }

.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn--primary {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--primary span { transition: transform 0.2s ease; }
.btn--primary:hover span { transform: translateX(4px); }
.btn--ghost { background: transparent; color: var(--text); }
.btn--ghost:hover { background: var(--hover); border-color: var(--text); }

/* ===== Sections ===== */
.section { padding: 56px 0; border-bottom: 1px solid var(--border); }
.section__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--faint);
  margin-bottom: 6px;
}
.section__sub { color: var(--muted); font-size: 16px; margin-bottom: 30px; }

/* ===== Product cards ===== */
.cards {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.card {
  position: relative;
  display: block;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--hover), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.card:hover {
  border-color: var(--text);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.card:hover::before { opacity: 1; }
.card > * { position: relative; }
.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.card__name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.card__arrow { color: var(--faint); transition: transform 0.25s ease, color 0.25s ease; }
.card:hover .card__arrow { transform: translate(3px, -3px); color: var(--text); }
.card__desc { color: var(--muted); font-size: 14.5px; margin-bottom: 16px; }
.card__url {
  font-size: 13px;
  color: var(--faint);
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ===== Links ===== */
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.links__subhead {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 30px 0 16px;
}
.link {
  padding: 9px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  background: var(--surface);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.link:hover { border-color: var(--text); background: var(--hover); transform: translateY(-2px); }

/* ===== Footer ===== */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 36px 0;
  font-size: 13.5px;
  color: var(--faint);
}
.footer a { transition: color 0.2s ease; }
.footer a:hover { color: var(--text); }

/* ===== Responsive ===== */

/* Large screens — widen the column slightly */
@media (min-width: 1280px) {
  .wrap { max-width: 960px; }
}

/* Tablets / small laptops */
@media (max-width: 768px) {
  .theme-toggle { top: 14px; right: 14px; width: 40px; height: 40px; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

/* Large phones / down to single-column cards */
@media (max-width: 600px) {
  .hero { padding: clamp(80px, 14vh, 110px) 0 44px; }
  .section { padding: 48px 0; }
  .cards { grid-template-columns: 1fr; }
  .hero__tagline { font-size: 19px; }
}

/* Small phones */
@media (max-width: 480px) {
  .hero { padding: 76px 0 40px; }
  .section { padding: 40px 0; }
  .hero__bio { font-size: 15px; }
  .card { padding: 20px; }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
  .footer { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* Very small phones */
@media (max-width: 360px) {
  .wrap { padding: 0 18px; }
  .hero__mark { font-size: 12px; padding: 5px 11px; }
  .link { padding: 8px 14px; font-size: 14px; }
}

/* Landscape phones — avoid huge top padding eating the viewport */
@media (max-height: 480px) and (orientation: landscape) {
  .hero { padding: 56px 0 36px; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto; }
}
