:root {
  --bg: #1a1a1a;
  --bg-card: #222222;
  --bg-hover: #2a2a2a;

  --yellow: #ffc107;
  --yellow-dim: #e5ac00;
  --yellow-muted: rgba(255, 193, 7, 0.12);

  --text: #f5f5f5;
  --text-mid: #b0b0b0;
  --text-dim: #707070;

  --border: #333333;
  --border-hover: #444444;

  --font: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: 'JetBrains Mono', monospace;

  --max-w: 800px;
  --speed: all 0.15s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* subtle horizontal lines for texture */
.site-grid-overlay {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 59px,
    rgba(255, 255, 255, 0.015) 59px,
    rgba(255, 255, 255, 0.015) 60px
  );
  pointer-events: none;
  z-index: -1;
}

.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- Header ---- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(26, 26, 26, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--yellow);
  letter-spacing: -0.01em;
  transition: var(--speed);
}

.logo a:hover {
  color: #fff;
}

.main-nav {
  display: flex;
  gap: 1.25rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-mid);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--speed);
}

.nav-link:hover {
  color: var(--yellow);
}

/* ---- Main Content ---- */
.app-container {
  flex: 1;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 3rem 0;
}

.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2.5rem;
}

img {
  margin: 0 0 0 -2.5rem;
}

/* ---- Typography ---- */
h1 {
  font-weight: 800;
  font-size: 2.2rem;
  letter-spacing: -0.025em;
  color: var(--yellow);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--yellow-muted);
  line-height: 1.2;
}

h2 {
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

h3 {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--yellow-dim);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  color: var(--text-mid);
  font-size: 1rem;
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

/* ---- Links ---- */
a {
  color: var(--yellow);
  text-decoration: none;
  transition: var(--speed);
}

a:hover {
  color: #fff;
}

h2 a {
  color: var(--text);
}

h2 a:hover {
  color: var(--yellow);
}

/* ---- Lists ---- */
ul {
  list-style: none;
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

li {
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-mid);
  transition: var(--speed);
}

li:hover {
  border-color: var(--yellow-dim);
  background: var(--yellow-muted);
}

li a {
  font-weight: 600;
  font-size: 1rem;
}

/* nested recipe sub-lists */
li ul {
  margin: 0.5rem 0 0 0.75rem;
  gap: 0.25rem;
}

li ul li {
  border: none;
  border-left: 2px solid var(--border);
  border-radius: 0;
  padding: 0.3rem 0.75rem;
  background: transparent;
}

li ul li:hover {
  border-left-color: var(--yellow);
  background: transparent;
}

li ul li a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
}

/* ---- Code ---- */
code, pre {
  font-family: var(--mono);
  background: #181818;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15rem 0.35rem;
  font-size: 0.88em;
  color: var(--yellow);
}

pre {
  display: block;
  padding: 1rem;
  overflow-x: auto;
  margin: 1.25rem 0;
  border-radius: 6px;
}

/* ---- Bottom nav links on index page ---- */
div:has(> p > a[href="/archive"]) {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
}

div:has(> p > a[href="/archive"]) p {
  display: flex;
  gap: 1rem;
  margin-bottom: 0;
}

div:has(> p > a[href="/archive"]) a {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-mid);
}

div:has(> p > a[href="/archive"]) a:hover {
  border-color: var(--yellow-dim);
  color: var(--yellow);
  background: var(--yellow-muted);
}

/* ---- Footer ---- */
.app-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  background: #141414;
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
  }

  .main-nav {
    gap: 1rem;
  }

  .app-container {
    padding: 1.5rem 1rem;
  }

  .glass-card {
    padding: 1.5rem 1.25rem;
    border-radius: 8px;
  }

  h1 {
    font-size: 1.7rem;
  }

  h2 {
    font-size: 1.2rem;
  }
}
