/* =========================================================
   GLOBAL RESET (Meyer reset)
   Keeps browser defaults consistent and predictable.
   Source: http://meyerweb.com/eric/tools/css/reset/  v2.0
   ========================================================= */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, centre,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video{
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section{
  display: block;
}
body{ line-height: 1; }
ol, ul{ list-style: none; }
blockquote, q{ quotes: none; }
blockquote::before, blockquote::after,
q::before, q::after{ content: ""; }
table{ border-collapse: collapse; border-spacing: 0; }
*{ box-sizing: border-box; }

/* Global link reset – stop default blue/purple */
a,
a:visited {
  color: inherit;
  text-decoration: none;
}

/* Optional: subtle hover for generic links */
a:hover {
  color: var(--accent);
}

/* =========================================================
   DESIGN TOKENS
   Centralised variables so colours, spacing and shadows
   are easy to tweak or theme.
   ========================================================= */
@import url("https://fonts.googleapis.com/css2?family=Unica+One&family=Crimson+Text:wght@400;600;700&display=swap");
@font-face {
  font-family: "Priestacy";
  src:
    url("/assets/fonts/Priestacy.woff2") format("woff2"),
    url("/assets/fonts/Priestacy.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --tomato: #F85A3E;
  --atomic-tangerine: #FF7733;
  --fiery-terracotta: #E15634;
  --cinnabar: #E63B2E;
  --alabaster-grey: #E1E6E1;

  --bg: #0f0f10;
  --text-main: #f5f5f5;
  --text-muted: #c7c7c7;
  --accent: var(--atomic-tangerine);
  --accent-strong: var(--cinnabar);
  --border-soft: rgba(225, 230, 225, 0.12);
  --radius: 24px;
  --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.5);
}

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

.priestacy {
  font-family: "Priestacy", serif;
  letter-spacing: 0.01em;
  font-size: 1.2em;
}

/* more specific than #hero h2 */
#hero h2 .priestacy-word {
  font-family: "Priestacy", "Crimson Text", serif !important;
  font-size: 1.15em;
  letter-spacing: 0.03em;
  font-weight: normal;
}
body {
  min-height: 100vh;
  font-family: "Crimson Text", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #2a1813 0, #120808 25%, #050506 70%, #000000 100%);
  color: var(--text-main);
  padding: 32px 16px 80px;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(248, 90, 62, 0.16), transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 51, 0.18), transparent 55%);
  pointer-events: none;
  z-index: -1;
  mix-blend-mode: screen;
  opacity: 0;
  animation: glow-in 1.2s ease-out forwards;
}

main {
  max-width: 1120px;
  margin: 0 auto;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 40px;
  animation: float-up 0.7s ease-out both;
}

#logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

#logo span {
  font-family: "Unica One", system-ui, sans-serif;
  text-transform: lowercase;
  letter-spacing: 0.30em;
  font-size: 1.35rem;
  padding: 6px 10px 4px;
  border-radius: 999px;
}

#logo small {
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0.9;
}


body.light #logo small {
  color: var(--text-muted);
}

nav {
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 0.9rem;
  font-family: "Unica One", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

nav a {
  position: relative;
  text-decoration: none;
  color: var(--text-muted);
  padding-bottom: 4px;
  transition: color 0.2s ease-out;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--tomato), var(--accent));
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.18s ease-out;
}

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

nav a:hover::after {
  transform: scaleX(1);
}

#hero {
  border-radius: var(--radius);
  padding: 32px 24px 24px;
  border: 1px solid var(--border-soft);
  background: radial-gradient(circle at top left, rgba(255, 119, 51, 0.08), rgba(0, 0, 0, 0.95));
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  margin-bottom: 32px;
  overflow: hidden;
  position: relative;
  animation: float-up 0.8s ease-out 0.08s both;
}

/* orbit wrapper */
#hero-orbit-wrap {
  position: absolute;
  inset: -20em;              /* bleed slightly outside card */
  display: flex;
  align-items: centre;
  align-items: center;
  justify-content: centre;
  justify-content: center;
  pointer-events: none;
  opacity: 0.16;
}

#hero-orbit-wrap img {
  max-width: 420px;
  width: 80%;
}

#hero-corner-circuit {
  position: absolute;
  right: -20px;
  bottom: -10px;
  width: 120px;
  opacity: 0.45;
  pointer-events: none;
}


#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(248, 90, 62, 0.35), transparent 45%),
    linear-gradient(-120deg, transparent 55%, rgba(230, 59, 46, 0.35));
  mix-blend-mode: soft-light;
  opacity: 0;
  animation: reveal-stripes 1.2s ease-out 0.15s forwards;
  pointer-events: none;
}

#hero h1 {
  font-family: "Unica One", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--atomic-tangerine);
  position: relative;
}

#hero h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 72px;
  height: 1px;
  background: linear-gradient(90deg, var(--atomic-tangerine), transparent);
  opacity: 0.85;
}

#hero h2 {
  font-family: "Unica One", system-ui, sans-serif;
  font-size: 2.7rem;
  line-height: 1.1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

#hero p {
  max-width: 540px;
  font-size: 1.05rem;
  color: var(--text-muted);
}

#hero strong {
  color: var(--accent-strong);
  font-weight: 600;
}

#hero-footer {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  font-size: 0.95rem;
}

#hero-footer button {
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: "Unica One", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  background: linear-gradient(135deg, var(--accent-strong), var(--atomic-tangerine));
  color: #050505;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.6);
  transform: translateY(0);
  transition:
    transform 0.16s ease-out,
    box-shadow 0.16s ease-out,
    filter 0.16s ease-out;
}

#hero-footer button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.8);
  filter: brightness(1.05);
}

#hero-footer span {
  color: var(--text-muted);
  opacity: 0.9;
}

#hero-footer span::before {
  content: "→ ";
  color: var(--accent);
}

#sections {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 24px;
}

section {
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: rgba(6, 6, 7, 0.96);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.5);
  padding: 22px 20px 18px;
  position: relative;
  overflow: hidden;
  animation: float-up 0.7s ease-out both;
}

/* first two sections inside #sections grid */
#links {
  animation-delay: 0.16s;
}

#blog {
  animation-delay: 0.24s;
}

/* Light mode: latest post cards */
body.light #blog article {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

body.light #blog article h4 {
  color: var(--text-main);
}

body.light #blog article p {
  color: var(--text-muted);
}

body.light #blog article footer {
  color: var(--text-muted);
}

body.light #blog article footer span:first-of-type {
  color: var(--atomic-tangerine);
}

/* Lab section later */
#lab {
  animation-delay: 0.32s;
}

section > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

section h3 {
  font-family: "Unica One", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--alabaster-grey);
}

section > header span {
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.8;
}

ul {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

li a {
  display: block;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(19, 12, 10, 0.92);
  color: var(--text-main);
  font-size: 0.96rem;
  line-height: 1.5;
  position: relative;
  overflow: hidden;
  transition:
    border-color 0.14s ease-out,
    transform 0.14s ease-out,
    background 0.14s ease-out;
}

li a strong {
  font-family: "Crimson Text", serif;
  font-weight: 600;
  display: block;
}

li a small {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

li a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(248, 90, 62, 0.42),
    rgba(255, 119, 51, 0.15)
  );
  mix-blend-mode: soft-light;
  opacity: 0;
  transition: opacity 0.16s ease-out;
}

li a:hover {
  border-color: rgba(248, 90, 62, 0.9);
  background: rgba(25, 14, 11, 1);
  transform: translateY(-1px);
}

li a:hover::before {
  opacity: 1;
}

/* BLOG CARDS (HOME ONLY) */
#blog article {
  padding: 10px 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(225, 230, 225, 0.18);
  background: rgba(10, 8, 7, 0.98);
  margin-bottom: 10px;
  transition:
    transform 0.16s ease-out,
    box-shadow 0.16s ease-out,
    border-color 0.16s ease-out;
  cursor: pointer;
}

#blog article:last-of-type {
  margin-bottom: 0;
}

#blog article:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.75);
  border-color: rgba(255, 119, 51, 0.55);
}

#blog article h4 {
  font-family: "Crimson Text", serif;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

#blog article p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

#blog article footer {
  display: flex;
  justify-content: space-between;
  align-items: centre;
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.9;
}

#blog article footer span:first-of-type {
  color: var(--atomic-tangerine);
  font-family: "Unica One", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
}

/* ===============================
   Full blog post typography
   =============================== */

main > article {
  max-width: 720px;
  margin: 32px auto 48px;
  padding: 1.8rem 1.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: rgba(6, 6, 7, 0.96);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.5);
}
body.light main > article {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}
main > article h1 {
  /* you already style #hero h1, so this is just a safety net if needed */
}

main > article h2 {
  font-family: "Crimson Text", serif;
  font-size: 1.4rem;
  margin: 1.8rem 0 0.4rem;
}

main > article h3 {
  font-family: "Crimson Text", serif;
  font-size: 1.15rem;
  margin: 1.4rem 0 0.3rem;
}

main > article p {
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--text-main);
  margin: 0 0 0.9rem;
}

main > article strong {
  font-weight: 600;
}

main > article em {
  font-style: italic;
}

main > article ul,
main > article ol {
  margin: 0.4rem 0 1rem 1.2rem;
  font-size: 1.02rem;
  line-height: 1.8;
}

main > article ul li {
  list-style: disc;
  margin-bottom: 0.3rem;
}

main > article ol li {
  list-style: decimal;
  margin-bottom: 0.3rem;
}

main > article li::marker {
  color: var(--atomic-tangerine);
}

main > article time {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* LAB */
#lab {
  border-radius: var(--radius);
  border: 1px dashed rgba(225, 230, 225, 0.35);
  background-image:
    linear-gradient(
      135deg,
      rgba(225, 230, 225, 0.04) 25%,
      transparent 25%,
      transparent 50%,
      rgba(225, 230, 225, 0.04) 50%,
      rgba(225, 230, 225, 0.04) 75%,
      transparent 75%,
      transparent
    );
  background-size: 26px 26px;
  position: relative;
  overflow: hidden;
}

#lab > header h3 {
  color: var(--fiery-terracotta);
}

#lab p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 2em;
  max-width: 460px;
}

#lab-grid {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

#lab-grid > div {
  border-radius: 14px;
  padding: 8px 10px 10px;
  background: rgba(3, 3, 3, 0.92);
  border: 1px solid rgba(225, 230, 225, 0.2);
  font-size: 0.9rem;
}

#lab-grid h4 {
  font-family: "Crimson Text", serif;
  font-size: 0.98rem;
  margin-bottom: 3px;
}

#lab-grid span {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.76rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(248, 90, 62, 0.16);
  color: var(--atomic-tangerine);
  font-family: "Unica One", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

footer {
  max-width: 1120px;
  margin: 40px auto 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.7;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

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

footer a:hover {
  text-decoration: underline;
}

/* animations */

@keyframes float-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glow-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes reveal-stripes {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===============================
   Light mode overrides
   =============================== */

body.light {
  --bg: #f7f7f7;
  --text-main: #181818;
  --text-muted: #555555;
  --border-soft: rgba(0, 0, 0, 0.12);

  --tomato: #d64026;
  --atomic-tangerine: #ff8a4c;
  --fiery-terracotta: #cc5030;
  --cinnabar: #d33a2c;

  background: radial-gradient(circle at top left, #ffffff 0, #f2f2f2 55%, #e9e9e9 100%);
}

/* Light mode: section headings + subheads */
body.light section h3 {
  color: rgba(0, 0, 0, 0.55); /* clear but still soft */
}

body.light #hero-orbit-wrap {
  opacity: 0.08;
}

body.light #hero-corner-circuit {
  opacity: 0.25;
}
body.light section > header span {
  color: rgba(0, 0, 0, 0.55); /* matches Latest posts subline */
}

/* Hero block in light mode (home + blog) */
body.light #hero {
  background: radial-gradient(circle at top left, rgba(255, 138, 76, 0.18), #ffffff);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
  border-color: rgba(0, 0, 0, 0.08);
}

/* All main cards / sections */
body.light section {
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 0, 0, 0.08);
}

/* Link tiles inside sections */
body.light li a {
  background: #f7f1ec;
  border-color: rgba(0, 0, 0, 0.04);
}

/* Lab stripes a bit softer on light */
body.light #lab {
  margin-top:2em;
  background-image:
    linear-gradient(
      135deg,
      rgba(0, 0, 0, 0.03) 25%,
      transparent 25%,
      transparent 50%,
      rgba(0, 0, 0, 0.03) 50%,
      rgba(0, 0, 0, 0.03) 75%,
      transparent 75%,
      transparent
    );
}

/* responsive */

@media (max-width: 880px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    margin-top: 8px;
  }

  #hero {
    padding: 26px 18px 18px;
  }

  #hero h2 {
    font-size: 2.1rem;
  }

  #sections {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  body {
    padding: 24px 14px 56px;
  }

  #hero h2 {
    font-size: 1.8rem;
  }

  nav {
    flex-wrap: wrap;
  }

  #hero-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  #hero-footer button {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* ===============================
   Blog archive page
   =============================== */

#archive-hero {
  max-width: 1120px;
  margin: 0 auto 28px;
  border-radius: 24px;
  border: 1px solid var(--border-soft);
  padding: 22px 20px 20px;
  background: radial-gradient(
    circle at top left,
    rgba(255, 119, 51, 0.16),
    rgba(0, 0, 0, 0.95)
  );
  box-shadow: var(--shadow-soft);
}

#archive-hero h1 {
  font-family: "Unica One", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 1rem;
  margin-bottom: 10px;
  color: var(--atomic-tangerine);
}

#archive-hero p {
  max-width: 560px;
  font-size: 1.02rem;
  color: var(--text-muted);
}

#archive-list {
  max-width: 1120px;
  margin: 0 auto;
  border-radius: 24px;
  border: 1px solid var(--border-soft);
  background: rgba(6, 6, 7, 0.96);
  box-shadow: var(--shadow-soft);
  padding: 22px 20px 20px;
}

#archive-list > div + div {
  margin-top: 26px;
}

#archive-list h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: "Unica One", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--alabaster-grey);
  margin-bottom: 10px;
}

#archive-list h2 span:first-of-type {
  flex: 0 0 auto;
}

#archive-list h2 span:last-of-type {
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, var(--tomato), transparent);
  opacity: 0.75;
}

#archive-list ul {
  list-style: none;
}

#archive-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(225, 230, 225, 0.08);
}

#archive-list li:last-of-type {
  border-bottom: none;
}

#archive-list a {
  font-size: 0.98rem;
  line-height: 1.6;
  text-decoration: none;
  color: var(--text-main);
}

#archive-list a:hover {
  color: var(--atomic-tangerine);
}

#archive-list time {
  flex: 0 0 auto;
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* mobile archive layout */
@media (max-width: 640px) {
  #archive-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  #archive-list time {
    font-size: 0.78rem;
  }
}

section h3 {
  display: inline-flex;
  align-items: centre;
  align-items: center;
  gap: 6px;
}

section h3 img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

