/* =====================================================
   Design tokens
   ===================================================== */
:root {
  --bg:        #faf9ff;
  --text:      #1a1535;
  --accent:    #7c3aed;
  --muted:     #6b6485;
  --card-bg:   #f3f0ff;
  --border:    #ddd6fe;
  --max-width: 900px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
}

h1, h2, h3 {
  font-family: 'Lora', serif;
  line-height: 1.2;
  color: var(--text);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { display: block; max-width: 100%; }

/* Shared section wrapper */
.section {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.section-title {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

/* =====================================================
   Hero
   ===================================================== */
.hero {
  padding: 3rem 1.5rem 2rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 3rem;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.hero-portrait {
  flex-shrink: 0;
  width: 220px;
}

.portrait {
  width: 220px;
  height: 220px;
  aspect-ratio: 1 / 1;
  border-radius: 0.5rem;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--accent);
  box-shadow: 0 6px 24px rgba(124, 58, 237, 0.15);
}

.hero-greeting {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.hero-name {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.hero-subtitle {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.75rem;
  letter-spacing: 0.03em;
}

.hero-tagline {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 55ch;
  margin-bottom: 1.25rem;
}

/* Social links — in the hero, prominently */
.hero-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  align-items: center;
}

.hero-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  white-space: nowrap;
}

.hero-social-link:hover,
.hero-social-link:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--bg);
  text-decoration: none;
  outline: none;
}

.hero-social-link .fab,
.hero-social-link .fas {
  font-size: 0.9rem;
}

.hero-social-label {
  font-size: 0.78rem;
}

@media (max-width: 640px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  .hero-tagline { max-width: none; }
  .hero-social { justify-content: center; }
  .hero-portrait { width: 160px; }
  .portrait { width: 160px; height: 160px; }
}

/* =====================================================
   Bio
   ===================================================== */
.bio-section {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}

.bio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.bio-text p + p { margin-top: 0.85rem; }

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.15s;
}

.contact-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.contact-link .fas,
.contact-link .fab {
  font-size: 1rem;
  color: var(--accent);
}

.bio-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
}

.bio-card-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.bio-card-label-row .bio-card-label {
  margin-bottom: 0;
}

.vcard-download {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: 0.2rem 0.6rem;
  transition: background 0.15s, color 0.15s;
}

.vcard-download:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  text-decoration: none;
}

.bio-card-label {
  font-family: 'Lora', serif;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

/* Custom audio player */
.audio-player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.audio-play-btn {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.1s;
}

.audio-play-btn:hover { background: #6d28d9; }
.audio-play-btn:active { transform: scale(0.93); }

.audio-play-btn svg {
  width: 1rem;
  height: 1rem;
}

.audio-track {
  flex: 1;
}

.audio-progress-bar {
  position: relative;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  cursor: pointer;
  outline: none;
}

.audio-progress-bar:focus-visible {
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.35);
  border-radius: 2px;
}

.audio-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  pointer-events: none;
}

.audio-progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  transition: transform 0.1s;
}

.audio-progress-bar:hover .audio-progress-thumb {
  transform: translate(-50%, -50%) scale(1.3);
}

.audio-time {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 2.5ch;
  text-align: right;
}

.bio-card-note {
  font-size: 0.85rem;
  color: var(--muted);
}

@media (max-width: 640px) {
  .bio-grid { grid-template-columns: 1fr; }
}

/* =====================================================
   Philosophy + Books
   ===================================================== */
.books-section {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

/* Book cover image */
.book-cover {
  width: 100%;
  height: 140px;
  object-fit: contain;
  object-position: center;
  margin-bottom: 0.75rem;
  border-radius: 0.25rem;
}

/* Book cards */
.book-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.book-card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.book-card:hover,
.book-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.10);
  text-decoration: none;
  outline: none;
}

.book-card-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.book-card-badge {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: rgba(124, 58, 237, 0.08);
  border-radius: 2rem;
  padding: 0.2rem 0.6rem;
}

.book-lang-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: 0.2rem 0.6rem;
}

.book-title {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.book-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
  letter-spacing: 0.02em;
}

.book-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 640px) {
  .book-cards { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 400px) {
  .book-cards { grid-template-columns: 1fr; }
}

/* =====================================================
   Community & Podcast
   ===================================================== */
.community-section {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}

.community-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.community-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.community-card:hover,
.community-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.10);
  text-decoration: none;
  outline: none;
}

.community-card-icon {
  font-size: 1.4rem;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.community-card-title {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.community-card-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 600px) {
  .community-cards { grid-template-columns: 1fr; }
}

/* =====================================================
   Tools & technologies
   ===================================================== */
.tools-section {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.tools-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.tool-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  min-width: 80px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tool-item:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.10);
}

.tool-item i {
  font-size: 2rem;
  line-height: 1;
}

.tool-item span {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

/* =====================================================
   Organizations
   ===================================================== */
.orgs-section {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}

.orgs-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
}

.org-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.org-card:hover,
.org-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.10);
  outline: none;
}

.org-logo {
  height: 40px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.org-logo--small {
  height: 40px;
  width: 40px;
}

/* =====================================================
   Footer
   ===================================================== */
.site-footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  display: flex;
  justify-content: center;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--muted);
}
