:root {
  --bg: #282828;
  --bg-alt: #1d2021;
  --fg: #ebdbb2;
  --fg-muted: #bdae93;
  --accent: #d3869b;
  --link: #83a598;
  --link-hover: #fabd2f;
  --highlight: #b8bb26;
  --code-bg: #3c3836;
}

@import url('https://fonts.googleapis.com/css2?family=Cousine:wght@400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Ubuntu+Mono:wght@400;700&display=swap');
/* === Global === */
body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: 'Recursive', monospace;
  font-size: 17px;
  line-height: 1.7;
  margin: 0;
  padding: 0;
  text-rendering: optimizeLegibility;
}

header {
  padding-left: 2rem;
  padding-right: 2rem;
  text-align: center;
}

header nav a {
  margin: 0 0.75rem;
}

/* Soft glow */
body {
  text-shadow: 0 0 0.8px var(--fg-muted);
}

/* === Layout === */
main {
  max-width: 720px;
  margin: 4rem auto;
  padding: 0 1.5rem;
  background-color: var(--bg-alt);
  border: 1px solid #3c3836;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

/* === Headings === */
h1, h2, h3 {
  color: var(--highlight);
  margin-top: 2rem;
}

h1 {
  font-size: 2rem;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.5rem;
}

h2 {
  font-size: 1.4rem;
  color: var(--link);
}

/* === Links === */
a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px dotted var(--link);
  transition: color 0.15s ease, border-color 0.15s ease;
}

a:hover {
  color: var(--link-hover);
  border-color: var(--link-hover);
}

/* === Horizontal Rules === */
hr {
  border: 0;
  height: 1px;
  background-color: #3c3836;
  margin: 2.5rem 0;
}

/* === Lists === */
ul {
  padding-left: 1.4rem;
}

li {
  margin: 0.4rem 0;
}

/* === Footer === */
footer {
  text-align: center;
  font-size: 0.9rem;
  color: var(--fg-muted);
  padding: 2rem 0;
}

main:hover {
  box-shadow: 0 0 20px rgba(184, 187, 38, 0.15);
  transition: box-shadow 0.3s ease;
}

strong, b {
  font-weight: 500;
  color: #d79921;
}

video.demo-video {
  display: block;
  margin: 1.5em auto;
  width: 100%;
  max-width: 600px;
  height: auto;
  border: 1px solid rgba(255, 255, 200, 0.15);
  border-radius: 6px;
  background: #0f0f0f;
  box-shadow: 0 0 8px rgba(255, 255, 150, 0.08);
}

p > video.demo-video {
  width: 100%;
  max-width: 600px;
  height: auto;
}

.demo-video:hover {
  box-shadow: 0 0 12px rgba(255, 255, 180, 0.15);
  filter: brightness(1.05);
}

.tardis-mode {
  position: relative;
  background: #000 url("/assets/tardis_1.png") center center fixed;
  background-repeat: no-repeat;
  background-size: cover;
  color: #83a598;
  transition: color 2s ease;
}

.tardis-mode::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(29, 32, 33, 0);
  z-index: 0;
  transition: background 3s ease-in-out;
}

.tardis-fadeout::before {
  background: var(--bg);
  transition: background 3s ease-in-out;
}

body.tardis-mode main,
body.tardis-mode header,
body.tardis-mode footer {
  position: relative;
  z-index: 1;
  opacity: 0.6;
  transition: opacity 2s ease-in;
}

body.tardis-fadeout main,
body.tardis-fadeout header,
body.tardis-fadeout footer {
  opacity: 1;
  transition: opacity 2s ease-out;
}

.tardis-overlay {
  position: fixed;
  top: 5%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Victor Mono', monospace;
  font-size: 1.75rem;
  color: #fabd2f;
  text-shadow: 0 0 12px #458588;
  z-index: 9999;
  animation: tardisTextFade 8s forwards;
  pointer-events: none;
}

@keyframes tardisTextFade {
  0% { opacity: 0; transform: translate(-50%, -60%); }
  10% { opacity: 1; transform: translate(-50%, -50%); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -40%); }
}
