/* =========================================================
   Augustus Richter — unified site theme
   Modern, dark, plasma-inspired
   ========================================================= */

:root {
  /* Surfaces */
  --bg:        #07060c;   /* deep near-black with a violet cast */
  --bg-soft:   #0c0a15;
  --card:      rgba(18, 16, 30, 0.62);
  --card-solid:#12101e;
  --border:    rgba(255, 255, 255, 0.09);
  --border-hi: rgba(255, 255, 255, 0.16);

  /* Text */
  --text:      #e9e7f2;
  --muted:     #a29fb8;
  --faint:     #6f6b86;

  /* Plasma accents */
  --violet:    #8b5cf6;
  --magenta:   #d946ef;
  --cyan:      #22d3ee;
  --accent:    var(--violet);
  --grad: linear-gradient(100deg, var(--cyan), var(--violet) 55%, var(--magenta));

  /* Shape */
  --radius:    18px;
  --radius-sm: 12px;
  --shadow:    0 18px 50px rgba(0, 0, 0, 0.55);
  --ring:      0 0 0 1px var(--border);
  --ease:      cubic-bezier(.22, .61, .36, 1);

  --maxw:      1040px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Static gradient wash under the animated canvas so the page
   never looks flat before/behind the plasma. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 55% at 15% 8%, rgba(34, 211, 238, 0.10), transparent 60%),
    radial-gradient(55% 50% at 85% 20%, rgba(217, 70, 239, 0.10), transparent 60%),
    radial-gradient(70% 60% at 50% 100%, rgba(139, 92, 246, 0.12), transparent 65%),
    var(--bg);
}

/* Plasma animation canvas */
#plasma-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

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

/* ---------------------------------------------------------
   Layout helpers
   --------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { margin: 2rem auto; }

.card {
  background: var(--card);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
}

/* ---------------------------------------------------------
   Navbar
   --------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: var(--maxw);
  margin: 0 auto;
}

.navbar.scrolled {
  background: rgba(10, 9, 18, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

/* full-bleed backdrop for the sticky bar */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-wrap.scrolled {
  background: rgba(9, 8, 16, 0.7);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-links a {
  position: relative;
  padding: 0.5rem 0.9rem;
  color: var(--muted);
  font-weight: 500;
  border-radius: 999px;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

.nav-links a:hover { color: var(--text); }

.nav-links a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.28rem;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 42px;
  height: 38px;
  cursor: pointer;
  color: var(--text);
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: currentColor;
  position: relative;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after  { position: absolute; top: 6px; }

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */
.hero {
  padding: clamp(3rem, 9vw, 6rem) 0 1rem;
}

.hero-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.5rem;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}
.hero-eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.7); }
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.7rem;
}
.hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.18rem);
  font-weight: 500;
  margin-bottom: 1.6rem;
}

.link-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 1.4rem;
  list-style: none;
}
.link-grid a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-weight: 500;
  padding: 0.15rem 0;
  transition: color 0.2s var(--ease);
}
.link-grid a svg { flex: 0 0 auto; opacity: 0.85; transition: transform 0.2s var(--ease); }
.link-grid a:hover { color: var(--cyan); }
.link-grid a:hover svg { transform: translateX(2px); }

.hero-photo {
  position: relative;
  flex: 0 0 auto;
}
.hero-photo img {
  display: block;
  width: 210px;
  height: 270px;
  object-fit: cover;
  object-position: center 25%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hi);
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-sm) + 2px);
  padding: 2px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.55;
  pointer-events: none;
}

/* ---------------------------------------------------------
   Section headings & prose
   --------------------------------------------------------- */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.section-title::before {
  content: "";
  width: 4px;
  height: 1.4em;
  border-radius: 3px;
  background: var(--grad);
}

.prose p { color: var(--text); margin-bottom: 1.05rem; }
.prose p:last-child { margin-bottom: 0; }
.prose a { color: var(--cyan); border-bottom: 1px solid rgba(34, 211, 238, 0.35); transition: border-color 0.2s; }
.prose a:hover { border-color: var(--cyan); }

/* ---------------------------------------------------------
   News list
   --------------------------------------------------------- */
.news-list { display: flex; flex-direction: column; gap: 0.75rem; }
.news-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), background 0.25s var(--ease);
}
.news-item:hover {
  border-color: var(--border-hi);
  background: rgba(255, 255, 255, 0.04);
  transform: translateX(3px);
}
.news-date {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  color: var(--faint);
  padding-top: 0.15rem;
  min-width: 5.2rem;
}
.news-title { color: var(--text); font-weight: 500; }
.news-item:hover .news-title { color: var(--cyan); }
.news-arrow { margin-left: auto; color: var(--faint); transition: transform 0.2s, color 0.2s; }
.news-item:hover .news-arrow { color: var(--cyan); transform: translate(3px, -3px); }

/* ---------------------------------------------------------
   Blog index — post cards
   --------------------------------------------------------- */
.page-head {
  padding: clamp(2.5rem, 8vw, 4.5rem) 0 1rem;
}
.page-head h1 {
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.page-head h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-head p { color: var(--muted); margin-top: 0.6rem; max-width: 46ch; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.4rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
a.post-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hi);
  box-shadow: var(--shadow);
}
.post-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #1a1730, #0d0b18);
}
.post-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease), filter 0.4s var(--ease);
  filter: saturate(0.85) contrast(1.02);
}
a.post-card:hover .post-thumb img { transform: scale(1.05); filter: saturate(1.05); }

.post-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.post-tag {
  align-self: flex-start;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.10);
  border: 1px solid rgba(34, 211, 238, 0.25);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}
.post-card h3 { font-size: 1.2rem; font-weight: 700; line-height: 1.25; margin-bottom: 0.55rem; }
.post-card p { color: var(--muted); font-size: 0.95rem; margin-bottom: 1rem; }
.post-meta { margin-top: auto; font-size: 0.82rem; color: var(--faint); display: flex; align-items: center; gap: 0.5rem; }
.read-more { color: var(--cyan); font-weight: 600; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 0.35rem; }

/* "coming soon" cards */
.post-card.soon { opacity: 0.72; cursor: default; }
.post-card.soon .post-tag {
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  border-color: var(--border);
}
.post-card.soon .post-meta { color: var(--faint); }

/* ---------------------------------------------------------
   Article (single post)
   --------------------------------------------------------- */
.article {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 3.5rem) 0 2rem;
}
.article-head { margin-bottom: 2rem; }
.article-kicker {
  font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase;
  font-weight: 700; color: var(--magenta); margin-bottom: 0.9rem;
}
.article-head h1 {
  font-size: clamp(2rem, 5.5vw, 3rem);
  line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.9rem;
}
.article-byline { color: var(--faint); font-size: 0.9rem; }

.article-body { font-size: 1.12rem; line-height: 1.8; }
.article-body p { margin: 1.35em 0; color: #dedbec; }
.article-body p.dropcap::first-letter {
  float: left; font-size: 3.5rem; line-height: 0.8; font-weight: 800;
  padding: 0.05em 0.14em 0 0;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.article-body em { color: #efe;}
.article figure { margin: 2.2rem 0; }
.article figure img {
  display: block;
  width: 100%; height: auto; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.article figcaption {
  font-size: 0.85rem; color: var(--faint); font-style: italic;
  margin-top: 0.6rem; line-height: 1.5;
}
.article figcaption a { color: var(--muted); border-bottom: 1px dotted var(--faint); }
.article figcaption a:hover { color: var(--cyan); }
.article-body hr { border: none; height: 1px; background: var(--border); margin: 2.5rem 0; }
.article-body blockquote {
  margin: 2rem 0;
  padding: 1.2rem 1.5rem;
  border-left: 3px solid var(--violet);
  background: rgba(139, 92, 246, 0.07);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 1.15rem; font-style: italic; color: #e8e5f5;
}
.article-body blockquote cite { display: block; margin-top: 0.7rem; font-size: 0.85rem; font-style: normal; color: var(--faint); }
.article-body a { color: var(--cyan); border-bottom: 1px solid rgba(34,211,238,0.35); }
.article-body a:hover { border-color: var(--cyan); }

.back-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--muted); font-weight: 500; margin-bottom: 1.5rem;
  transition: color 0.2s, gap 0.2s;
}
.back-link:hover { color: var(--cyan); gap: 0.6rem; }

/* ---------------------------------------------------------
   Placeholder (CV coming soon)
   --------------------------------------------------------- */
.placeholder {
  min-height: 55vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; gap: 1rem;
  padding: 4rem 1.5rem;
}
.placeholder h1 { font-size: clamp(2rem, 6vw, 3rem); font-weight: 800; letter-spacing: -0.02em; }
.placeholder h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.placeholder p { color: var(--muted); max-width: 44ch; }
.placeholder .badge {
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cyan); border: 1px solid rgba(34,211,238,0.3);
  padding: 0.4rem 1rem; border-radius: 999px; margin-top: 0.5rem;
}

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding: 2rem 0;
}
.footer .container {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.footer p { color: var(--faint); font-size: 0.88rem; }
.footer-links { display: flex; gap: 1.2rem; }
.footer-links a { color: var(--muted); font-size: 0.88rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--cyan); }

/* ---------------------------------------------------------
   Scroll reveal
   --------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(10, 9, 18, 0.96);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1rem 1rem;
    transform-origin: top;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.85rem 0.6rem; border-radius: 10px; }
  .nav-links a.active::after { display: none; }

  .hero-card { grid-template-columns: 1fr; text-align: left; }
  .hero-photo { order: -1; align-self: flex-start; }
  .hero-photo img { width: 150px; height: 195px; }
  .link-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-eyebrow .dot { animation: none; }
}
