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

:root {
  --accent: #00d4e8;
  --accent-rgb: 0, 212, 232;
  --bg: #050810;
  --bg-card: rgba(255,255,255,0.03);
  --border: rgba(255,255,255,0.07);
  --text: #e8eaf0;
  --text-muted: rgba(255,255,255,0.45);
  --text-dim: rgba(255,255,255,0.25);
  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius: 12px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { display: block; max-width: 100%; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(var(--accent-rgb), 0.3); border-radius: 3px; }

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes blink {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 0; }
}

@keyframes wave {
  from { transform: scaleY(0.4); }
  to   { transform: scaleY(1.2); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

@keyframes typing-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Page entrance ────────────────────────────────────────────────────────── */
.page-body {
  animation: fadeUp 0.5s ease both;
}

/* ── Reveal on scroll ─────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Nav ──────────────────────────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 64px;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}

.site-nav.scrolled {
  background: rgba(5,8,16,0.85);
  backdrop-filter: blur(20px);
  border-color: rgba(255,255,255,0.06);
}

.nav-brand {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  margin-right: auto;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-head);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.65);
  transition: color 0.2s;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  border-color: var(--accent);
}

.nav-social {
  display: flex;
  gap: 0.75rem;
  margin-left: 3rem;
  list-style: none;
}

.nav-social a {
  color: rgba(255,255,255,0.4);
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

.nav-social a:hover { color: var(--accent); }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero--full { height: 100vh; }
.hero--half { height: 55vh; align-items: flex-end; }
.hero--post { height: 62vh; align-items: flex-end; }

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(var(--accent-rgb),0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb),0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

.hero-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 30%, var(--bg));
}

.hero-fade-full {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 200px;
  background: linear-gradient(transparent, var(--bg));
}

.hero-featured-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 2rem;
}

.hero-content--left {
  position: relative;
  z-index: 1;
  padding: 0 4rem 3.5rem;
  max-width: 860px;
  width: 100%;
}

/* ── Typography helpers ───────────────────────────────────────────────────── */
.section-label {
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(var(--accent-rgb), 0.8);
  margin-bottom: 0.75rem;
}

.tag {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(var(--accent-rgb), 0.7);
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  padding: 3px 10px;
  border-radius: 100px;
}

.eyebrow {
  font-family: var(--font-head);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  border-color: rgba(var(--accent-rgb), 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(var(--accent-rgb), 0.08);
}

.card--link { cursor: pointer; }
.card--no-hover:hover { transform: none; box-shadow: none; }

/* ── Post grid ────────────────────────────────────────────────────────────── */
.posts-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

.post-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem;
  margin-bottom: 1.5rem;
  text-decoration: none;
  color: inherit;
}

.post-featured-thumb {
  height: 200px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(var(--accent-rgb),0.1), rgba(139,92,246,0.1));
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-featured-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.post-card {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.post-card h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin: 0.75rem 0 0.5rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  flex: 1;
}

.post-featured h3 {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin: 1rem 0 0.75rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.post-excerpt {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.post-featured .post-excerpt {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.post-meta {
  font-family: var(--font-head);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: auto;
}

/* ── Single post body ─────────────────────────────────────────────────────── */
.post-body {
  max-width: 680px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

.post-body p {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.85;
  margin-bottom: 1.5rem;
  text-wrap: pretty;
}

.post-body h2 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
}

.post-body h3 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  margin: 2rem 0 0.75rem;
}

.post-body ul, .post-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.post-body li {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.75;
  margin-bottom: 0.4rem;
}

.post-body blockquote {
  border-left: 2px solid var(--accent);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
  color: rgba(255,255,255,0.55);
  font-style: italic;
}

.post-body code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.875em;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}

.post-body pre {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.post-body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.75);
}

.post-body a {
  color: var(--accent);
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.3);
  transition: border-color 0.2s;
}

.post-body a:hover { border-color: var(--accent); }

/* ── Back link ────────────────────────────────────────────────────────────── */
.back-link {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  margin-bottom: 1rem;
  text-decoration: none;
}

/* ── Related posts ────────────────────────────────────────────────────────── */
.related-posts {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.related-card {
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: block;
}

/* ── Inner page layout ────────────────────────────────────────────────────── */
.inner-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

.inner-page--narrow {
  max-width: 700px;
}

/* ── Speaking ─────────────────────────────────────────────────────────────── */
.speaking-cta {
  padding: 2.5rem;
  margin-bottom: 3rem;
  border-color: rgba(var(--accent-rgb), 0.15);
}

.speaking-cta p {
  font-family: var(--font-body);
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 0.75rem;
}

.topics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.topic-card {
  padding: 1.75rem;
}

.topic-card h4 {
  font-family: var(--font-head);
  font-weight: 700;
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.topic-card p {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 12px 28px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}

.btn--accent {
  background: var(--accent);
  color: var(--bg);
}

.btn--accent:hover {
  filter: brightness(1.1);
}

.btn--outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.btn--outline:hover {
  background: var(--accent);
  color: var(--bg);
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Press ────────────────────────────────────────────────────────────────── */
.outlets-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 4rem;
}

.outlet-badge {
  height: 56px;
  padding: 0 1.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
}

.press-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.press-item {
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  text-decoration: none;
  color: inherit;
}

.press-item:hover .press-arrow { color: var(--accent); }

.press-outlet {
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  min-width: 80px;
}

.press-title {
  font-family: var(--font-body);
  color: rgba(255,255,255,0.75);
  flex: 1;
  font-size: 0.95rem;
}

.press-year {
  font-family: var(--font-head);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.press-arrow {
  color: var(--text-dim);
  font-size: 0.875rem;
  transition: color 0.2s;
}

/* ── Music ────────────────────────────────────────────────────────────────── */
.waveform-deco {
  position: absolute;
  bottom: 80px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 3px;
  align-items: center;
  opacity: 0.18;
  pointer-events: none;
}

.waveform-bar {
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}

.track-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.track-item {
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.track-play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(255,255,255,0.08);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  transition: all 0.2s;
}

.track-play:hover,
.track-play.playing {
  background: var(--accent);
  color: var(--bg);
}

.mini-wave {
  display: flex;
  gap: 2px;
  align-items: center;
}

.mini-wave-bar {
  width: 2px;
  border-radius: 1px;
  background: rgba(255,255,255,0.15);
  transition: background 0.3s;
}

.track-play.playing ~ .mini-wave .mini-wave-bar,
.track-item.active .mini-wave-bar {
  background: var(--accent);
  animation-name: wave;
  animation-duration: 0.8s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

.track-info { flex: 1; }

.seek-container {
  width: 100%;
  height: 0;
  margin-top: 0;
  opacity: 0;
  display: flex;
  align-items: center;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
}

.track-item.active .seek-container {
  height: 16px;
  margin-top: 4px;
  opacity: 1;
}

.seek-bar {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.seek-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  pointer-events: none;
  transition: width 0.1s linear;
}

.track-title {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: #fff;
  margin-bottom: 2px;
}

.track-ensemble {
  font-family: var(--font-head);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.track-duration {
  font-family: var(--font-head);
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ── About ────────────────────────────────────────────────────────────────── */
.avatar-ring {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  background: conic-gradient(from 0deg, var(--accent), rgba(139,92,246,0.8), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-inner {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: #070c18;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 1rem;
  margin-bottom: 3rem;
}

.timeline-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.timeline-line {
  width: 1px;
  background: linear-gradient(var(--accent), rgba(var(--accent-rgb),0.08));
  flex-shrink: 0;
  position: relative;
  margin-top: 4px;
}

.timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  top: 0;
  left: -3.5px;
  box-shadow: 0 0 8px var(--accent);
}

.timeline-card {
  padding: 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.timeline-role {
  font-family: var(--font-head);
  font-weight: 700;
  color: #fff;
  font-size: 1rem;
}

.timeline-org {
  font-family: var(--font-head);
  color: var(--accent);
  font-size: 0.875rem;
  margin-top: 2px;
}

.timeline-years {
  font-family: var(--font-head);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0,0,0,0.2);
}

.footer-copy {
  font-family: var(--font-head);
  font-size: 0.875rem;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  font-family: var(--font-head);
  font-size: 0.8rem;
  color: var(--text-dim);
  transition: color 0.2s;
}

.footer-links a:hover { color: #fff; }

/* ── Pagination ───────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.75rem;
  border-radius: 8px;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  text-decoration: none;
}

.pagination-btn:hover {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.4);
}

.pagination-btn--active {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

.pagination-btn--active:hover {
  color: var(--bg);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .post-featured { grid-template-columns: 1fr; }
  .post-featured-thumb { display: none; }
  .post-grid { grid-template-columns: 1fr 1fr; }
  .topics-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; gap: 1.5rem; text-align: center; }
}

@media (max-width: 600px) {
  .post-grid { grid-template-columns: 1fr; }
  .hero-content--left { padding: 0 1.5rem 2.5rem; }
  .nav-links { gap: 1rem; }
  .nav-social { display: none; }
  .inner-page { padding: 3rem 1.25rem 4rem; }
  .site-footer { padding: 2rem 1.25rem; }
}
