@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

/* ==========================================================================
   Midnight & Aurora — site.css
   Deep slate-navy base (technical) + cyan primary, with a restrained violet
   "magic" secondary and a sparing gold micro-accent. One base, two accents,
   used consistently for cohesion.
   ========================================================================== */

:root{
  /* surfaces */
  --bg: hsl(218 48% 8%);          /* #0B1220 deep slate-navy */
  --bg-soft: hsl(218 40% 11%);
  --fg: hsl(214 38% 92%);         /* #E6ECF5 cool white */

  /* accents */
  --primary: hsl(199 89% 60%);    /* #38BDF8 cyan — technical */
  --secondary: hsl(250 78% 71%);  /* #8B7CF0 violet — magic */
  --accent: hsl(41 73% 67%);      /* #E8C26B muted gold — sparingly */

  /* primary as RGB triplet for translucent fills */
  --primary-rgb: 56 189 248;
  --secondary-rgb: 139 124 240;
  --accent-rgb: 232 194 107;

  --card: hsl(218 40% 12%);
  --muted: hsl(218 30% 20%);
  --muted-fg: hsl(214 18% 70%);

  --border: hsl(218 26% 24%);
  --radius: 14px;

  --font-display: 'Cinzel', serif;
  --font-body: 'Inter', sans-serif;
  --font-serif: 'Playfair Display', serif;

  --shadow: 0 24px 60px rgba(2, 6, 18, .55);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin:0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img{ max-width:100%; display:block; }
a{ color: inherit; text-decoration:none; }
a:hover{ text-decoration: none; }
strong{ color: var(--accent); }

::selection{ background: rgb(var(--primary-rgb) / .25); }

/* layout */
.container{ width: min(1100px, calc(100% - 32px)); margin: 0 auto; }
.container.narrow{ width: min(820px, calc(100% - 32px)); }
.page{ padding: 120px 0 80px; }
.center{ text-align:center; }
.maxw{ max-width: 640px; margin-left:auto; margin-right:auto; }
.stack > * + *{ margin-top: 16px; }
.stack-lg > * + *{ margin-top: 22px; }
.pt{ padding-top: 12px; }
.right{ display:flex; justify-content:flex-end; }

/* nav */
.nav{
  position: fixed;
  top:0; left:0; right:0;
  z-index: 50;
  background: rgba(11, 18, 32, .65);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav-inner{
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  height: 72px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.brand{
  font-family: var(--font-display);
  letter-spacing: .08em;
  font-weight: 700;
}
.nav-links{ display:flex; gap: 18px; align-items:center; }

/* logout form inline so it behaves like a link */
.nav-links form{
  display: inline;
  margin: 0;
  padding: 0;
}

/* <a> and <button> styled the same in the nav */
.nav-links a,
.nav-links button{
  color: rgba(230, 236, 245, .78);
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links button:hover{
  color: var(--primary);
  text-decoration: none;
}

/* CTA pill (used for Contact) — works for <a> or <button> */
.nav-cta{
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgb(var(--primary-rgb) / .28);
  background: rgb(var(--primary-rgb) / .08);
}
.nav-links a.nav-cta:hover{ color: var(--fg); border-color: rgb(var(--primary-rgb) / .55); }

.nav-links button.nav-cta{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* footer */
.footer{
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 28px 0;
}
.footer-inner{
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  display:flex;
  justify-content:space-between;
  gap: 14px;
  flex-wrap: wrap;
}

/* type */
.h1, .h2, .post-title{
  font-family: var(--font-display);
  letter-spacing: .04em;
  margin: 0 0 12px;
}
.h1{ font-size: clamp(38px, 5vw, 64px); }
.h2{ font-size: clamp(26px, 3vw, 36px); }
.lead{ font-size: 18px; color: rgba(230, 236, 245, .72); margin: 0; }
.serif{ font-family: var(--font-serif); font-style: italic; }
.muted{ color: rgba(230, 236, 245, .66); }
.meta{ font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.accent{ color: var(--accent); }

.text-glow{ text-shadow: 0 0 24px rgb(var(--secondary-rgb) / .35); }
.gradient-text{
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.accent-serif{ font-family: var(--font-serif); font-style: normal; color: var(--primary); }

/* hero */
.hero{
  position: relative;
  min-height: 90vh;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  padding: 0 16px;
}
.hero-bg{ position:absolute; inset:0; pointer-events:none; }
.glow{
  position:absolute;
  border-radius: 9999px;
  filter: blur(110px);
}
/* magic glow (violet) + technical glow (cyan), balanced */
.glow-a{ width: 420px; height: 420px; left: 18%; top: 18%; background: rgb(var(--secondary-rgb) / .22); animation: pulse 4s ease-in-out infinite; }
.glow-b{ width: 320px; height: 320px; right: 16%; bottom: 16%; background: rgb(var(--primary-rgb) / .16); }

@keyframes pulse{
  0%,100%{ transform: scale(1); opacity: .8; }
  50%{ transform: scale(1.1); opacity: 1; }
}

.hero-inner{ position: relative; z-index: 2; text-align:center; }
.badge{
  display:inline-flex;
  gap: 10px;
  align-items:center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(230, 236, 245, .9);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .02em;
  margin-bottom: 22px;
}
.hero-title{
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 86px);
  line-height: 1.04;
  margin: 0 0 18px;
}
.hero-sub{
  font-size: 18px;
  color: rgba(230, 236, 245, .72);
  max-width: 760px;
  margin: 0 auto 26px;
  line-height: 1.6;
}
.hero-actions{
  display:flex;
  justify-content:center;
  gap: 12px;
  flex-wrap: wrap;
}

/* buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
  font-weight: 600;
  letter-spacing: .01em;
}
.btn:hover{ transform: translateY(-1px); }
.btn-primary{
  background: var(--primary);
  border-color: transparent;
  box-shadow: 0 16px 38px rgb(var(--primary-rgb) / .28);
  color: hsl(218 60% 10%);
}
.btn-primary:hover{ filter: brightness(1.05); }
/* ghost = magical secondary edge */
.btn-ghost:hover{
  background: rgb(var(--secondary-rgb) / .08);
  border-color: rgb(var(--secondary-rgb) / .45);
  color: var(--secondary);
}
.w-full{ width:100%; }

/* scroll indicator */
.scroll-indicator{
  position:absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  opacity: .75;
}
.mouse{
  width: 24px;
  height: 40px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.22);
  padding: 8px 0;
  display:flex;
  justify-content:center;
}
.dot{
  width: 3px;
  height: 8px;
  border-radius: 999px;
  background: rgb(var(--primary-rgb) / .7);
  animation: bounce 2s infinite;
}
@keyframes bounce{
  0%,100%{ transform: translateY(0); opacity: .7; }
  50%{ transform: translateY(8px); opacity: 1; }
}

/* about */
.about{
  padding: 90px 0;
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.02);
}
.about-grid{
  display:grid;
  gap: 42px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px){
  .about-grid{ grid-template-columns: 1fr 1fr; align-items:center; }
}
.photo-wrap{ position:relative; }
.photo-card{
  position:relative;
  border-radius: 18px;
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
}
.photo{ width:100%; height:100%; object-fit: cover; transform: scale(1); transition: transform .6s ease; }
.photo-card:hover .photo{ transform: scale(1.04); }
.photo-grad{ position:absolute; inset:0; background: linear-gradient(to top, rgba(7,11,22,.88), transparent 60%); }
.photo-caption{ position:absolute; left:16px; right:16px; bottom:16px; }
.photo-title{ font-family: var(--font-display); font-size: 22px; margin-bottom: 2px; }
.photo-sub{ color: rgba(230, 236, 245, .68); font-size: 13px; }

.frame{
  position:absolute;
  inset: -14px;
  border-radius: 18px;
  border: 2px solid rgb(var(--primary-rgb) / .20);
  z-index: -1;
}
.frame-b{
  inset: 14px -14px -14px 14px;
  border-color: rgb(var(--secondary-rgb) / .18);
}

/* cards / panels */
.card{
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  box-shadow: 0 14px 40px rgba(2, 6, 18, .35);
}
.card-body{ padding: 22px; }
.card-title{ font-family: var(--font-display); margin: 0 0 10px; }
.card-title.big{ font-size: 26px; }
.card-link{ display:block; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.card-link:hover{ border-color: rgb(var(--primary-rgb) / .40); background: rgba(255,255,255,.04); transform: translateY(-2px); }
.readmore{ margin-top: 14px; font-weight: 600; color: var(--primary); }
.link-accent{ color: var(--primary); font-weight: 600; }
.link-accent:hover{ text-decoration: underline; text-underline-offset: 3px; }

.panel{
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
  position: relative;
  overflow:hidden;
}
.panel:before{
  content:"";
  position:absolute;
  width: 260px;
  height: 260px;
  right: -80px;
  top: -80px;
  border-radius: 9999px;
  background: rgb(var(--secondary-rgb) / .08);
  filter: blur(80px);
  pointer-events:none;
}

/* page hero */
.page-hero{ padding: 40px 0 30px; }
.icon-badge{
  width: 54px; height: 54px;
  display:inline-flex;
  align-items:center; justify-content:center;
  border-radius: 999px;
  background: rgb(var(--primary-rgb) / .10);
  border: 1px solid rgb(var(--primary-rgb) / .25);
  margin-bottom: 14px;
  color: var(--primary);
  font-size: 22px;
  font-weight: 700;
}

/* grids */
.grid{ display:grid; gap: 18px; }
@media (min-width: 900px){
  .cards-3{ grid-template-columns: repeat(3, 1fr); }
}
.empty{
  padding: 40px;
  border: 1px dashed rgba(255,255,255,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.02);
  text-align:center;
}

/* magic grid */
.magic-grid{
  display:grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px){
  .magic-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px){
  .magic-grid{ grid-template-columns: repeat(3, 1fr); }
}
.magic-tile{
  position:relative;
  border-radius: 16px;
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 14px 40px rgba(2, 6, 18, .35);
  height: 300px;
}
.tile-tall{ height: 624px; }
.magic-fallback{
  position:absolute; inset:0;
  background: rgba(255,255,255,.02);
  display:flex; align-items:center; justify-content:center;
  color: rgb(var(--secondary-rgb) / .25);
  font-size: 44px;
}
.magic-img{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit: cover;
  opacity: .9;
  transform: scale(1);
  transition: transform .6s ease, opacity .2s ease;
}
.magic-tile:hover .magic-img{ transform: scale(1.08); opacity: 1; }
.magic-overlay{
  position:absolute; inset:0;
  display:flex; flex-direction: column; justify-content:flex-end;
  padding: 18px;
  background: linear-gradient(to top, rgba(7,11,22,.82), rgba(7,11,22,.18), transparent 60%);
  opacity: 0;
  transition: opacity .2s ease;
}
.magic-tile:hover .magic-overlay{ opacity: 1; }
.magic-overlay h3{
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
}
.bar{
  margin-top: 10px;
  width: 48px;
  height: 4px;
  border-radius: 999px;
  background: var(--primary);
}

/* book of shadows sigil (blog list hero) */
.book-sigil{
  display:inline-flex;
  align-items:center; justify-content:center;
  width: 56px; height: 56px;
  margin-bottom: 14px;
  border-radius: 999px;
  font-size: 26px;
  color: var(--secondary);
  background: rgb(var(--secondary-rgb) / .10);
  border: 1px solid rgb(var(--secondary-rgb) / .28);
}

/* book a performance CTA (magic page) */
.book-cta{
  margin-top: 64px;
  text-align: center;
  padding: 48px 24px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  background:
    radial-gradient(700px 240px at 50% 0%, rgb(var(--secondary-rgb) / .10), transparent 60%),
    rgba(255,255,255,.02);
}
.book-cta .h2{ margin-bottom: 12px; }
.book-cta .btn{ margin-top: 22px; }

/* pull-quote */
.pullquote{
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.5;
  color: var(--fg);
  border-left: 3px solid var(--secondary);
  padding: 6px 0 6px 20px;
  margin: 8px 0;
}
.pullquote .cite{
  display:block;
  margin-top: 10px;
  font-size: 12px;
  font-style: normal;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-fg);
}

/* forms */
.form{ position:relative; z-index: 1; }
.field{ margin-bottom: 14px; }
label{ display:block; margin-bottom: 8px; color: rgba(230, 236, 245, .78); font-weight: 600; }
input, textarea{
  width:100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  color: var(--fg);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, textarea:focus{
  border-color: rgb(var(--primary-rgb) / .55);
  box-shadow: 0 0 0 3px rgb(var(--primary-rgb) / .15);
}
.err{ margin-top: 6px; color: #ff7a7a; font-size: 12px; }

/* pager */
.pager{
  margin-top: 22px;
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 14px;
  flex-wrap: wrap;
}

/* blog detail */
.backlink{
  display:inline-block;
  color: rgba(230, 236, 245, .72);
  margin: 18px 0 22px;
}
.backlink:hover{ color: var(--primary); }
.post-head{ text-align:center; margin: 10px 0 34px; }
.post-title{ font-size: clamp(34px, 4.2vw, 54px); line-height:1.08; margin: 12px 0 14px; }
.post-summary{ color: rgba(230, 236, 245, .68); font-size: 18px; margin: 0 auto; max-width: 720px; }
.prose{
  line-height: 1.75;
  font-size: 18px;
  color: rgba(230, 236, 245, .84);
}
.prose p{ margin: 0 0 16px; }

/* toast */
.toast-wrap{
  position: fixed;
  right: 16px;
  top: 84px;
  z-index: 99;
  display:flex;
  flex-direction: column;
  gap: 10px;
}
.toast{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(10px);
  padding: 12px 14px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  max-width: 420px;
}
.toast-success{ border-color: rgba(34,197,94,.25); }
