:root {
  /* V1 PALETTE */
  --bg-paper: #F9F7F2;
  --ink-black: #222222;
  --retro-orange: #E76F51;
  --retro-gold: #E9C46A;
  --retro-teal: #2A9D8F;
  --retro-navy: #264653;

  /* V1 STYLE VARIABLES */
  --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'Courier New', Courier, monospace;
  --border-thick: 2px solid var(--ink-black);
  --shadow-hard: 4px 4px 0px 0px var(--ink-black);
}

* { box-sizing: border-box; }

body {
  background-color: var(--bg-paper);
  color: var(--ink-black);
  font-family: var(--font-main);
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

/* --- NAVIGATION --- */
nav.main-nav {
  border-bottom: var(--border-thick);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-black);
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-black);
  margin-left: 2rem;
  font-weight: 600;
  font-size: 0.9rem;
  position: relative;
  padding-bottom: 5px;
}

.nav-links a:hover {
  color: var(--retro-orange);
  border-bottom: 3px solid var(--retro-teal);
}

/* --- HERO SECTION --- */
.hero {
  max-width: 900px;
  margin: 4rem auto;
  padding: 0 2rem;
}

h1.hero-title {
  font-size: 3.5rem;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
}

.highlight {
  padding: 0 0.25em;
  display: inline-block;
  position: relative;
  z-index: 1;
}

.highlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--retro-gold);
  transform: rotate(-1.5deg);
  z-index: -1;
}

.sub-hero {
  font-size: 1.25rem;
  color: #555;
  max-width: 600px;
  margin-bottom: 3rem;
}

/* --- THE GRID (Bento Box Style) --- */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto 4rem auto;
  padding: 0 2rem;
}

.card {
  background: #fff;
  border: var(--border-thick);
  padding: 2rem;
  box-shadow: var(--shadow-hard);
  transition: all 0.1s ease;
  text-decoration: none;
  color: var(--ink-black);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
}

a.card:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px 0px var(--ink-black);
  background-color: var(--retro-gold);
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.card p {
  font-size: 1rem;
  color: #666;
  margin: 0;
}

/* --- CONTENT SECTIONS --- */
.content-section {
  max-width: 900px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.content-section h2 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.content-section h3 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  margin-top: 2rem;
}

.content-section p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #333;
  margin-bottom: 1rem;
}

.content-section a {
  color: var(--retro-teal);
  text-decoration: none;
  font-weight: 500;
}

.content-section a:hover {
  color: var(--retro-orange);
  text-decoration: underline;
}

/* --- FOOTER --- */
footer.main-footer {
  background-color: var(--ink-black);
  color: var(--bg-paper);
  padding: 2rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  border-top: var(--border-thick);
  text-align: center;
}

footer.main-footer p {
  margin: 0;
}

footer.main-footer a {
  color: var(--bg-paper);
  text-decoration: none;
}

footer.main-footer a:hover {
  color: var(--retro-gold);
}

/* --- BLOG STYLES --- */
.blog-entry {
  background: #fff;
  border: var(--border-thick);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-hard);
}

.blog-entry h1, .blog-entry h2 {
  margin-top: 0;
}

.blog-entry img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem 0;
}

.breadcrumbs {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 2rem;
}

.breadcrumbs a {
  color: var(--retro-teal);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--retro-orange);
}

.entry-list {
  list-style: none;
  padding: 0;
}

.entry-list li {
  margin-bottom: 1rem;
}

.entry-list a {
  color: var(--retro-teal);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
}

.entry-list a:hover {
  color: var(--retro-orange);
}

/* --- CODE HIGHLIGHTING --- */
pre {
  background: var(--retro-navy);
  color: var(--retro-gold);
  padding: .5rem;
  border: var(--border-thick);
  border-radius: 0;
  overflow-x: auto;
  font-family: var(--font-mono);
}

code {
  font-family: var(--font-mono);
  background: #f4f4f4;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

pre code {
  background: transparent;
  padding: 0;
}

/* --- PHOTOGRAPHY GRID --- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.photo-item {
  border: var(--border-thick);
  box-shadow: var(--shadow-hard);
  transition: all 0.2s ease;
  overflow: hidden;
  background: #fff;
}

.photo-item:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px 0px var(--ink-black);
}

.photo-item img {
  width: 100%;
  height: auto;
  display: block;
}

.photo-caption {
  padding: 1rem;
  font-size: 0.9rem;
  color: #666;
}

/* Mobile Tweaks */
@media (max-width: 600px) {
  h1.hero-title {
    font-size: 2.5rem;
  }

  nav.main-nav {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
  }

  .nav-links a {
    margin-left: 0;
    margin-right: 1.5rem;
  }

  .content-section,
  .hero,
  .grid-container {
    padding: 0 1rem;
  }

  .grid-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .card {
    padding: 1.5rem;
  }

  .blog-entry {
    padding: 1.5rem;
  }

  .photo-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  /* Make health table mobile-friendly */
  table {
    font-size: 0.85rem;
  }

  table th,
  table td {
    padding: 0.5rem !important;
  }

  /* Hide description column on mobile */
  table th:nth-child(2),
  table td:nth-child(2) {
    display: none;
  }
}
