/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ── */
:root {
  --bg:        #ffffff;
  --bg2:       #f5f5f5;
  --surface:   #ffffff;
  --border:    #e5e5e5;
  --text:      #111111;
  --text2:     #555555;
  --text3:     #888888;
  --accent:    #111111;

  --green-bg:    #f0fdf4;
  --green-text:  #16a34a;
  --green-border:#bbf7d0;

  --blue-bg:    #eff6ff;
  --blue-text:  #2563eb;
  --blue-border:#bfdbfe;

  --volt-bg:    rgba(182,255,46,.08);
  --volt-text:  #5a8a00;
  --volt-border:rgba(140,210,0,.35);

  --amber-bg:    rgba(245,158,11,.08);
  --amber-text:  #b45309;
  --amber-border:rgba(245,158,11,.35);

  --shadow:    0 1px 4px rgba(0,0,0,.05), 0 6px 24px rgba(0,0,0,.07);
  --radius:    16px;
  --toggle-bg: #ebebeb;
  --toggle-color: #555;

  --grid-color: rgba(0, 0, 0, 0.042);
  --grid-size:  48px;
}

[data-theme="dark"] {
  --bg:        #0f0f0f;
  --bg2:       #181818;
  --surface:   #1c1c1c;
  --border:    #2c2c2c;
  --text:      #f0f0f0;
  --text2:     #a0a0a0;
  --text3:     #606060;
  --accent:    #ffffff;

  --green-bg:    rgba(22,163,74,.12);
  --green-text:  #4ade80;
  --green-border:rgba(74,222,128,.2);

  --blue-bg:    rgba(37,99,235,.12);
  --blue-text:  #60a5fa;
  --blue-border:rgba(96,165,250,.2);

  --volt-bg:    rgba(182,255,46,.10);
  --volt-text:  #b6ff2e;
  --volt-border:rgba(182,255,46,.25);

  --amber-bg:    rgba(245,158,11,.12);
  --amber-text:  #fbbf24;
  --amber-border:rgba(251,191,36,.25);

  --shadow:    0 1px 4px rgba(0,0,0,.3), 0 6px 24px rgba(0,0,0,.35);
  --toggle-bg: #282828;
  --toggle-color: #a0a0a0;

  --grid-color: rgba(255, 255, 255, 0.038);
}

/* ── Base ── */
html { font-size: 16px; scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s, color 0.2s;
}

/* ── Layout ── */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 62px 48px 100px;
}

/* ── Hero ── */
.hero {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 36px;
  margin-bottom: 32px;
}

.hero-left { flex-shrink: 0; }

.avatar {
  width: 224px;
  height: 224px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg2);
  border: 3px solid var(--border);
  flex-shrink: 0;
}
.avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.avatar-fallback {
  display: none;
  width: 100%; height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  font-weight: 700;
  color: var(--text3);
}

.hero-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 0;
}

h1 {
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.8px;
  line-height: 1.15;
  margin-bottom: 12px;
}

.bio {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.65;
  margin-bottom: 18px;
  max-width: 480px;
  text-align: left;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px 20px;
  margin-bottom: 18px;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--text3);
  text-decoration: none;
  transition: color 0.15s;
}
.hero-link svg { width: 14px; height: 14px; flex-shrink: 0; }
.hero-link:hover { color: var(--text); }

/* ── Social buttons ── */
.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text2);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.social-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.social-btn:hover {
  background: var(--surface);
  border-color: var(--text3);
  color: var(--text);
  transform: translateY(-1px);
}

/* ── Dark toggle ── */
.theme-toggle-wrap {
  margin-top: 16px;
  display: flex;
  justify-content: flex-start;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text2);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.theme-toggle:hover {
  border-color: var(--text3);
  color: var(--text);
  transform: translateY(-1px);
}
.theme-toggle svg { width: 18px; height: 18px; flex-shrink: 0; }

[data-theme="light"] .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: block; }
[data-theme="dark"]  .icon-moon { display: none; }
[data-theme="dark"]  .icon-sun  { display: block; }

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 0 32px;
}

/* ── Sections ── */
.section { margin-bottom: 36px; }

.section-eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text3);
  margin-bottom: 20px;
}

/* ── Cards ── */
.card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  color: inherit;
  box-shadow: var(--shadow);
}

/* card icon — far left */
.card-img {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-img svg { width: 28px; height: 28px; }

.sleep-img {
  background: var(--green-bg);
  color: var(--green-text);
  border: 1px solid var(--green-border);
}
.pdf-img {
  background: var(--blue-bg);
  color: var(--blue-text);
  border: 1px solid var(--blue-border);
}
.fitsplit-img {
  background: var(--volt-bg);
  color: var(--volt-text);
  border: 1px solid var(--volt-border);
}
.umanifest-img {
  background: var(--amber-bg);
  color: var(--amber-text);
  border: 1px solid var(--amber-border);
}

/* card text — middle, grows */
.card-body {
  flex: 1;
  min-width: 0;
}

.card-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.card-desc {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.55;
  margin: 0;
}

/* card action — far right */
.card-action {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 11px 24px;
  border-radius: 10px;
  background: #1a1a1a;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid #1a1a1a;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.card-cta:hover {
  background: #ffffff;
  color: #1a1a1a;
}
[data-theme="dark"] .card-cta {
  background: #e8e8e8;
  color: #111111;
  border-color: #e8e8e8;
}
[data-theme="dark"] .card-cta:hover {
  background: #111111;
  color: #e8e8e8;
}

/* ── Badges ── */
.badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  flex-shrink: 0;
}
.badge.free {
  background: var(--green-bg);
  color: var(--green-text);
  border: 1px solid var(--green-border);
}
.badge.paid {
  background: var(--blue-bg);
  color: var(--blue-text);
  border: 1px solid var(--blue-border);
}

/* ── Contact ── */
.contact-section { padding-bottom: 0; }
.contact-text {
  font-size: 15px;
  color: var(--text2);
  margin-bottom: 12px;
}
.contact-email {
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: border-color 0.15s, color 0.15s;
}
.contact-email:hover {
  border-color: var(--text);
}

/* ── Tablet ── */
@media (max-width: 720px) {
  main { padding: 48px 32px 80px; }
  .hero { gap: 28px; }
  .avatar { width: 144px; height: 144px; }
  h1 { font-size: 30px; }
  .bio { font-size: 15px; }
}

/* ── Mobile ── */
@media (max-width: 540px) {
  main { padding: 40px 20px 80px; }
  .hero { flex-direction: column; align-items: center; text-align: center; gap: 20px; }
  .hero-right { align-items: center; }
  .bio { text-align: center; max-width: 100%; }
  .hero-links { justify-content: center; }
  .socials { justify-content: center; }
  .theme-toggle-wrap { justify-content: center; }
  .avatar { width: 120px; height: 120px; }
  h1 { font-size: 26px; }
  .card { flex-wrap: wrap; gap: 16px; }
  .card-action { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
  .card-cta { min-width: 130px; }
  .card-img { width: 48px; height: 48px; }
  .card-title { font-size: 15px; }
}
