/* ═══════════════════════════════════════════════════
   pragneshs.uk — Clean Design System
   Pages: index.html (homepage) + blog.html (blog)
   Fonts: Cormorant Garamond, DM Serif Display, DM Sans
═══════════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────────── */
:root {
  /* Dark theme (homepage + headers) */
  --dark-bg:       #0e0a14;
  --dark-border:   rgba(175,140,255,0.15);
  --text-hi:       #e8e2f0;
  --text-body:     #a098b8;
  --text-muted:    #c8c0d8;
  --text-dim:      #6b6080;
  --text-meta:     #8880a0;

  /* Accent palette */
  --teal:          #7ecfba;
  --gold:          #c9a84c;
  --mauve:         #c4a8e0;
  --lavender:      #c8c0d8;
  --link-blue:     #0077b5;

  /* Blog body (light theme) */
  --blog-bg:       #fdfcfa;
  --blog-surface:  #ffffff;
  --blog-border:   rgba(14,10,20,0.08);
  --blog-text:     #1a1614;
  --blog-muted:    #5a5068;
  --blog-dim:      #8a7f96;
  --blog-title:    #1a6b5a;

  /* Typography */
  --serif:         'Cormorant Garamond', Georgia, serif;
  --display:       'DM Serif Display', Georgia, serif;
  --sans:          'DM Sans', sans-serif;
}

/* ── RESET ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--dark-bg);
  color: var(--text-hi);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; }

/* ── SHARED ELEMENTS ────────────────────────────── */
.horizon {
  height: 6px;
  background: linear-gradient(90deg,
    transparent, var(--teal) 20%, var(--gold) 50%, var(--mauve) 80%, transparent);
  opacity: 0.9;
}
.topline {
  height: 6px;
  background: linear-gradient(90deg,
    transparent, var(--teal) 20%, var(--gold) 50%, var(--mauve) 80%, transparent);
  opacity: 0.9;
}

/* Color utility classes */
.c-teal     { color: var(--teal); }
.c-gold     { color: var(--gold); }
.c-mauve    { color: var(--mauve); }
.c-lavender { color: var(--lavender); }
.c-blue     { color: var(--link-blue); }

/* ═══════════════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════════════ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.6rem 3rem;
  transition: background 0.4s, border-bottom 0.4s;
}
nav.scrolled {
  background: rgba(14,10,20,0.94);
  backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--dark-border);
}
.nav-logo {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--text-hi);
  letter-spacing: 0.08em;
}
.nav-logo em { font-style: italic; color: var(--gold); }
.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  transition: opacity 0.2s;
}
.nav-links a:hover { opacity: 0.65; }
.nav-links a[href*="writing"], .nav-active { color: var(--teal); }
.nav-links a[href*="speaking"]             { color: var(--link-blue); }
.nav-links a[href*="work"]    { color: var(--gold); }
.nav-links a[href*="about"]   { color: var(--mauve); }
.nav-links a[href*="contact"] { color: var(--lavender); }

/* ═══════════════════════════════════════════════════
   HERO (homepage)
═══════════════════════════════════════════════════ */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 520px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 3rem 2.5rem;
  z-index: 2;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 1;
  filter: none;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(14,10,20,0.60) 0%,
    rgba(14,10,20,0.05) 40%,
    rgba(14,10,20,0.88) 100%);
}
.hero-topline {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent, var(--teal) 20%, var(--gold) 50%, var(--mauve) 80%, transparent);
  opacity: 0.7;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 3rem 5rem;
}
.hero-content h1 {
  font-family: var(--serif);
  font-size: clamp(3.5rem, 8vw, 5.5rem);
  font-weight: 300;
  line-height: 1.1;
  color: #ffffff;
  margin-bottom: 0;
  text-shadow: 0 4px 40px rgba(0,0,0,0.7), 0 2px 8px rgba(0,0,0,0.5);
  opacity: 1;
  animation: fadeUp 0.8s ease 0.3s forwards;
}
.hero-content h1 em { font-style: italic; color: var(--gold); }
.hero-quote {
  border-left: 2.5px solid var(--gold);
  padding-left: 1.4rem;
}
.hero-sub {
  font-size: 1.05rem;
  color: #d0c8e0;
  line-height: 2;
  max-width: 520px;
  text-shadow: 0 1px 12px rgba(14,10,20,0.9);
  opacity: 0;
  animation: fadeUp 0.8s ease 0.5s forwards;
}
.hero-sub a       { color: var(--teal); border-bottom: 0.5px solid rgba(126,207,186,0.4); }
.hero-sub a.gold  { color: var(--gold); border-bottom-color: rgba(201,168,76,0.4); }
.hero-sub a:hover { opacity: 0.75; }
.hero-divider     { color: #d0c8e0; margin: 0 0.2em; }

/* ═══════════════════════════════════════════════════
   HOMEPAGE SECTIONS
═══════════════════════════════════════════════════ */
.section {
  padding: 2.4rem 3rem;
  border-bottom: 0.5px solid rgba(175,140,255,0.10);
}
.section-heading {
  font-size: 2.4rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 300;
  font-family: var(--sans);
  margin-bottom: 2rem;
}

/* Writing list */
.articles { display: flex; flex-direction: column; }
.article {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 0.5px solid rgba(255,255,255,0.04);
  transition: opacity 0.2s;
  cursor: pointer;
}
.article:last-child { border-bottom: none; }
.article:hover { opacity: 0.65; }
.article-title { font-size: 1.05rem; color: var(--text-muted); font-weight: 700; }
.article-year  { font-size: 11px; color: var(--text-dim); flex-shrink: 0; margin-left: 1rem; }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  align-items: center;
}
.about-photo { flex-shrink: 0; align-self: stretch; }
.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
  object-position: 30% 20%;
  border: 1px solid rgba(175,140,255,0.20);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.about-content { display: flex; flex-direction: column; gap: 1rem; }
.about-lead {
  font-size: 1.15rem;
  color: var(--teal);
  line-height: 1.9;
  font-weight: 400;
  margin-top: 0;
}
.about-text { font-size: 1.05rem; color: var(--text-body); line-height: 2.1; font-weight: 300; }
.about-text em { font-style: italic; color: var(--mauve); }
.about-modes {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.8;
}
.mode-label {
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--gold);
}
.about-coda {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.9;
  font-style: italic;
  border-left: 2px solid var(--link-blue);
  padding-left: 1.2rem;
  margin-top: 0.4rem;
}
.about-coda em { font-style: normal; color: var(--lavender); font-weight: 400; }

/* Jobs */
.jobs { display: flex; flex-direction: column; gap: 1.4rem; }
.job  { display: flex; gap: 1rem; align-items: flex-start; }
.job-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}
.job-title { font-size: 0.88rem; color: var(--text-hi); font-weight: 400; margin-bottom: 0.25rem; }
.job-meta  { font-size: 0.78rem; color: var(--text-meta); font-weight: 300; line-height: 1.6; }
.job-meta a { color: var(--teal); }
.job-meta a:hover { color: var(--gold); }

/* Contact */
.contact-text { font-size: 0.9rem; color: var(--text-body); line-height: 2; }
.contact-text a { color: var(--gold); border-bottom: 0.5px solid rgba(201,168,76,0.35); }
.contact-text a:hover { color: var(--teal); }

/* ═══════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════ */
.site-footer {
  background: var(--dark-bg);
  border-top: 0.5px solid var(--dark-border);
}
.footer-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.4rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-copy { font-size: 11px; color: var(--text-dim); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 12px; letter-spacing: 0.04em; transition: opacity 0.2s; }
.footer-links a:hover { opacity: 0.65; }
.footer-links .li { color: #0077b5; }
.footer-links .x  { color: var(--text-hi); }
.footer-links .gh { color: var(--text-meta); }

/* ═══════════════════════════════════════════════════
   BLOG PAGE
═══════════════════════════════════════════════════ */
body.blog-page {
  background: var(--blog-bg);
  color: var(--blog-text);
}

/* Blog header (dark bar) */
.site-header {
  background: var(--dark-bg);
  border-bottom: 0.5px solid var(--dark-border);
}
.site-header nav {
  position: static;
  max-width: 860px;
  margin: 0 auto;
  background: transparent;
  backdrop-filter: none;
}

/* Blog layout */
.page-wrap, .post-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2.5rem;
}
.page-wrap.hidden { display: none; }
.post-wrap { display: none; }
.post-wrap.active { display: block; }

/* Blog index heading */
.page-heading {
  padding: 3.5rem 2.5rem;
  border-bottom: none;
  background: var(--dark-bg);
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding-left: calc(50vw - 50% + 2.5rem);
  padding-right: calc(50vw - 50% + 2.5rem);
}
.page-heading h1 {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 300;
  color: var(--text-hi);
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}
.page-heading h1 em { font-style: italic; color: var(--gold); }
.page-heading p { font-size: 1rem; color: var(--text-body); line-height: 1.75; font-weight: 400; }
.page-heading p a { color: var(--teal); border-bottom: 0.5px solid rgba(126,207,186,0.3); }

/* Article cards (blog index) */
.article-list { display: flex; flex-direction: column; }
.article-card {
  padding: 2rem 0;
  border-bottom: 2px solid;
  border-image: linear-gradient(90deg,
    transparent, var(--teal) 20%, var(--gold) 50%, var(--mauve) 80%, transparent) 1;
  cursor: pointer;
  transition: opacity 0.2s;
}
.article-card:hover { opacity: 0.75; }
.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.article-tag {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 400;
  padding: 2px 10px;
  border-radius: 20px;
}
.article-tag.cloud  { color: #1a6b5a; background: rgba(126,207,186,0.18); }
.article-tag.data   { color: #7a5a10; background: rgba(201,168,76,0.15); }
.article-tag.ai     { color: #5a3d80; background: rgba(196,168,224,0.18); }
.article-tag.zen    { color: #4a4060; background: rgba(126,207,186,0.10); }
.article-date, .article-read { font-size: 11px; color: var(--blog-dim); }
.article-card-title {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--blog-title);
  line-height: 1.3;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}
.article-excerpt {
  font-size: 1rem;
  color: var(--blog-text);
  line-height: 1.75;
  max-width: 560px;
  font-weight: 400;
}

/* Single post */
.post-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blog-muted);
  margin-bottom: 2rem;
  cursor: pointer;
  transition: color 0.2s;
}
.post-back:hover { color: var(--blog-title); }
.post-header {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 0.5px solid var(--blog-border);
  margin-bottom: 2.8rem;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.post-title {
  font-family: var(--sans);
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 700;
  color: var(--blog-text);
  line-height: 1.2;
  margin-bottom: 1.2rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.post-subtitle {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 300;
  font-style: italic;
  color: var(--blog-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.post-author {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding-top: 1.2rem;
}
.post-author-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg,
    rgba(126,207,186,0.3) 0%, rgba(201,168,76,0.3) 100%);
  border: 1px solid rgba(201,168,76,0.4);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 0.9rem;
  color: var(--gold);
}
.post-author-name { font-size: 0.85rem; color: var(--blog-text); font-weight: 400; }
.post-author-role { font-size: 0.75rem; color: var(--blog-muted); }

/* Post prose */
.post-body { font-size: 1.25rem; line-height: 1.9; color: var(--blog-text); font-weight: 400; }
.post-body p { margin-bottom: 2rem; }
.post-body h2 {
  font-family: var(--sans);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--blog-text);
  margin: 3rem 0 1.2rem;
  letter-spacing: -0.01em;
}
.post-body h3 {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--blog-text);
  margin: 2.5rem 0 1rem;
}
.post-body blockquote {
  border-left: 3px solid var(--gold);
  padding: 0.4rem 0 0.4rem 1.6rem;
  margin: 2.2rem 0;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-style: italic;
  font-weight: 400;
  color: var(--blog-muted);
  line-height: 1.7;
}
.post-body a { color: var(--blog-title); border-bottom: 1px solid rgba(26,107,90,0.3); }
.post-body a:hover { border-bottom-color: var(--blog-title); }
.post-body strong { font-weight: 600; color: var(--blog-text); }
.post-body ul, .post-body ol { padding-left: 1.6rem; margin-bottom: 1.8rem; }
.post-body li { margin-bottom: 0.7rem; line-height: 1.9; }
.post-body .callout {
  background: rgba(126,207,186,0.08);
  border: 0.5px solid rgba(126,207,186,0.25);
  border-radius: 4px;
  padding: 1.4rem 1.6rem;
  margin: 2.2rem 0;
  font-size: 1rem;
  color: var(--blog-text);
  line-height: 1.85;
}
.post-body .callout strong { color: var(--blog-title); font-weight: 600; }

/* Post footer */
.post-footer {
  margin-top: 3.5rem;
  padding: 2.5rem 0;
  border-top: 0.5px solid var(--blog-border);
}
.post-tags { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 2rem; }
.post-tag {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blog-muted);
  border: 0.5px solid var(--blog-border);
  padding: 3px 12px;
  border-radius: 20px;
}

/* Buttons */
.cta-row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.btn-gold {
  display: inline-block;
  background: var(--gold);
  color: #1a1614;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 400;
  padding: 11px 28px;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.2s;
  border: none;
}
.btn-gold:hover { opacity: 0.95; }
.btn-outline-light {
  display: inline-block;
  background: transparent;
  color: var(--blog-muted);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 400;
  padding: 10px 24px;
  border-radius: 2px;
  border: 0.5px solid var(--blog-border);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-outline-light:hover { border-color: var(--blog-muted); color: var(--blog-text); }
.medium-note { margin-top: 1.2rem; font-size: 0.78rem; color: var(--blog-dim); line-height: 1.6; }
.medium-note a { color: var(--blog-title); border-bottom: 0.5px solid rgba(26,107,90,0.25); }

/* Blog footer */
body.blog-page .site-footer { margin-top: 3rem; }

/* ── SHOW/HIDE HELPERS ───────────────────────────── */
.desktop-only { display: block; }
.mobile-only  { display: none; }
.mobile-quote {
  padding: 2rem 1.5rem;
  background: var(--dark-bg);
}

/* ═══════════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── FOCUS STYLES (accessibility) ───────────────── */
a:focus-visible, button:focus-visible, [role="button"]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.article-card:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════ */
@media (max-width: 600px) {
  nav { padding: 1.2rem 1rem; flex-wrap: wrap; gap: 0.8rem; }
  .nav-links { gap: 0.8rem; flex-wrap: wrap; }
  .nav-links a { font-size: 12px; padding: 0.4rem 0; }
  .hero-content { padding: 0 1.5rem; text-align: center; }
  .hero-content h1 { font-size: 2rem; }
  .hero { height: 85vh; min-height: 420px; justify-content: center; align-items: center; }
  .desktop-only { display: none !important; }
  .mobile-only  { display: block; }
  .hero-sub { font-size: 0.95rem; }
  .section { padding-left: 1.5rem; padding-right: 1.5rem; }
  .section-heading { font-size: 1.6rem; }
  .about-grid { grid-template-columns: 1fr; text-align: center; }
  .about-photo { display: flex; justify-content: center; }
  .avatar-img { height: 120px; width: 120px; border-radius: 50%; }
  .about-content { text-align: left; }
  .page-wrap, .post-wrap { padding: 0 1.5rem; }
  .footer-inner { padding: 1.2rem 1.5rem; }
  .post-body { font-size: 1.1rem; }
  .article-card-title { font-size: 1.2rem; }
  body.blog-page { overflow-x: hidden; }
}
