/* =============================================
   Alex Cotran — Personal Site
   Design: Retro/Y2K Flat, Midnight Blue
   ============================================= */

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

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Backgrounds — Deeper Midnight Black */
  --bg:         #03060d;
  --bg-card:    #080e1c;
  --bg-hover:   #0e172a;

  /* Text */
  --text:       #ede8dc;
  --text-muted: #7488a5;

  /* Borders */
  --border:     #17263d;

  /* Accent — Projects (Green) */
  --green:      #2ea84e;
  --green-lt:   #50d472;

  /* Accent — Blog (Burgundy/Crimson) */
  --burgundy:   #c42040;
  --burgundy-lt:#f04060;

  /* Accent — Schedule Blocks (Cool Blue, sits inside the grid) */
  --blue:       #2b7fff;
  --blue-lt:    #60a5fa;
  --blue-card:  #0d2340;
  --blue-border:#1d4ed8;

  /* Accent — Schedule Chrome (Bright Blue, everything outside the grid) */
  --blue-bright:#3b8cff;
  --blue-glow:  #7cc0ff;

  /* Fonts — Cohesive Editorial Serif Theme */
  --font-serif-heading: 'Playfair Display', Georgia, serif;
  --font-serif-body:    'Lora', Georgia, serif;
  --font-serif:         'Playfair Display', Georgia, serif;
  --font-mono:          'Lora', Georgia, serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-serif-body);
  font-size: 1rem;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  opacity: 1;
  transition: opacity 0.18s ease;
}

body.fade-out { opacity: 0; }

a { color: inherit; text-decoration: none; }

/* ─── Navigation ──────────────────────────────────────────── */
.nav {
  border-bottom: 2px solid var(--border);
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}

.nav-logo {
  font-family: var(--font-serif-heading);
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--text);
  border: 2px solid var(--text);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: 2px solid var(--text);
  outline-offset: 3px;
  transition: background 0.12s, color 0.12s;
}

.nav-logo:hover { background: var(--text); color: var(--bg); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-serif-body);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.12s;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* ─── Layout ──────────────────────────────────────────────── */
main {
  flex: 1;
  padding: 2.5rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* ─── Hero (Homepage) ─────────────────────────────────────── */
.hero {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding: 3rem 0 3.5rem;
  border-bottom: 2px solid var(--border);
}

.monogram {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 2rem;
  color: var(--text);
  border: 3px solid var(--text);
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  outline: 3px solid var(--text);
  outline-offset: 3px;
  margin-top: 6px;
}

.hero-text h1 {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero-text .quote {
  margin-top: 1rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 480px;
  border-left: 3px solid var(--border);
  padding-left: 1rem;
}

/* ─── Section Tiles (Homepage) ────────────────────────────── */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.tile {
  border: 2px solid var(--border);
  padding: 1.5rem;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  display: block;
  color: var(--text);
}

.tile:hover { background: var(--bg-hover); border-color: var(--text-muted); }

.tile-accent {
  height: 5px;
  margin: -1.5rem -1.5rem 1.25rem -1.5rem;
}

.tile-projects .tile-accent  { background: var(--green); }
.tile-blog     .tile-accent  { background: var(--burgundy); }
.tile-schedule .tile-accent  { background: var(--blue-bright); }
.tile-schedule               { border-style: dashed; }

.tile h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.tile p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.tile-arrow {
  display: inline-block;
  margin-top: 1.2rem;
  font-family: var(--font-serif-body);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.tile:hover .tile-arrow { color: var(--text); }

/* ─── Page Header (Inner Pages) ──────────────────────────── */
.page-header {
  padding: 2.5rem 0 2rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 2.5rem;
}

.accent-bar { height: 5px; width: 48px; margin-bottom: 1rem; }

.accent-green    { background: var(--green); }
.accent-burgundy { background: var(--burgundy); }
.accent-mustard, .accent-blue { background: var(--blue-bright); }

.page-header h1 {
  font-family: var(--font-serif-heading);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
}

.page-header p {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: var(--font-serif-body);
  font-style: italic;
}

/* ─── Project Cards ───────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.project-card {
  border: 2px solid var(--border);
  padding: 1.4rem;
  transition: background 0.12s, border-color 0.12s;
}

.project-card:hover {
  background: var(--bg-hover);
  border-color: var(--green);
}

.project-card h3 {
  font-family: var(--font-serif-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.project-card .proj-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.tag {
  display: inline-block;
  font-family: var(--font-serif-body);
  font-size: 0.72rem;
  padding: 2px 8px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  margin-right: 4px;
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

.proj-link {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-serif-body);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--green-lt);
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--green);
  padding-bottom: 1px;
}

.proj-link:hover { color: var(--text); border-bottom-color: var(--text-muted); }

/* ─── Blog ────────────────────────────────────────────────── */
.blog-categories {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.cat-btn {
  font-family: var(--font-serif-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border: 2px solid var(--border);
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s;
}

.cat-btn:hover,
.cat-btn.active {
  border-color: var(--burgundy);
  color: var(--text);
  background: var(--bg-hover);
}

.blog-list { display: flex; flex-direction: column; }

.blog-empty {
  font-family: var(--font-serif-body);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-muted);
  border: 2px dashed var(--border);
  padding: 2.5rem;
  text-align: center;
}

.blog-post-item {
  border-bottom: 1px solid var(--border);
  padding: 1.4rem 0;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1.5rem;
  align-items: start;
  cursor: pointer;
  transition: background 0.1s, padding 0.1s;
}

.blog-post-item:first-child { border-top: 1px solid var(--border); }

.blog-post-item:hover {
  background: var(--bg-hover);
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  margin: 0 -0.75rem;
}

.post-date {
  font-family: var(--font-serif-body);
  font-size: 0.76rem;
  color: var(--text-muted);
  padding-top: 3px;
  line-height: 1.5;
}

.post-category {
  font-family: var(--font-serif-body);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 5px;
}

.post-category.cat-thoughts { color: var(--burgundy-lt); }
.post-category.cat-school   { color: var(--blue-glow); }
.post-category.cat-tech     { color: var(--green-lt); }

.post-info h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.post-info p {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── Schedule / Custom Calendar ─────────────────────────── */
.cal-wrap {
  display: grid;
  grid-template-columns: 1fr 268px;
  gap: 1.5rem;
  align-items: start;
}

/* Header: prev | MONTH YEAR | next + view switcher */
.cal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 2px solid var(--border);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cal-nav-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cal-month-label {
  font-family: var(--font-serif-heading);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  min-width: 140px;
  text-align: center;
}

.cal-nav-btn {
  font-family: var(--font-serif-body);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.12s;
}

.cal-nav-btn:hover {
  border-color: var(--blue-bright);
  color: var(--blue-glow);
  background: var(--bg-hover);
}

.cal-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.view-switcher {
  display: flex;
  border: 1px solid var(--border);
}

.view-btn {
  font-family: var(--font-serif-body);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: none;
  border: none;
  border-right: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.12s;
}

.view-btn:last-child { border-right: none; }

.view-btn:hover {
  background: var(--bg-hover);
  color: var(--blue-glow);
}

.view-btn.active {
  background: var(--blue-bright);
  color: #ffffff;
  font-weight: bold;
}

.btn-appointment {
  font-family: var(--font-serif-body);
  font-weight: 600;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--bg-card);
  color: var(--blue-glow);
  border: 1.5px solid var(--blue-bright);
  padding: 5px 14px;
  cursor: pointer;
  transition: all 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-appointment:hover {
  background: var(--blue-bright);
  color: #ffffff;
}

/* Day View Timeline */
.day-timeline {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.time-slot {
  display: grid;
  grid-template-columns: 80px 1fr;
  border-bottom: 1px solid var(--border);
  height: 50px;
}

.time-slot:last-child { border-bottom: none; }

.slot-label {
  font-family: var(--font-serif-body);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px;
  border-right: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: flex-start;
}

.slot-content {
  position: relative;
  height: 50px;
}

.slot-event {
  position: absolute;
  top: 2px;
  left: 4px;
  right: 4px;
  box-sizing: border-box;
  font-family: var(--font-serif-body);
  font-size: 0.76rem;
  background: var(--blue-card);
  color: #f0f6ff;
  padding: 5px 8px;
  border-left: 4px solid var(--blue-lt);
  border-top: 1px solid var(--blue-border);
  border-right: 1px solid var(--blue-border);
  border-bottom: 1px solid var(--blue-border);
  z-index: 5;
  box-shadow: 0 3px 10px rgba(0,0,0,0.5);
  overflow: hidden;
}

.slot-event-title {
  font-family: var(--font-serif-heading);
  font-size: 0.84rem;
  font-weight: 700;
  color: #ffffff;
}

.slot-event-time {
  font-family: var(--font-serif-body);
  font-size: 0.7rem;
  color: var(--blue-lt);
}

/* Week View Hourly Matrix */
.week-timeline {
  display: grid;
  grid-template-columns: 65px repeat(7, 1fr);
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow-x: auto;
}

.week-hdr-cell {
  font-family: var(--font-serif-heading);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 8px 4px;
  text-align: center;
  border-bottom: 2px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
}

.week-hdr-cell:last-child { border-right: none; }

.week-hdr-cell.is-today {
  color: var(--blue-glow);
  font-weight: bold;
  border-bottom-color: var(--blue-bright);
}

.week-time-cell {
  font-family: var(--font-serif-body);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 8px 6px;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  text-align: right;
  height: 50px;
  box-sizing: border-box;
}

.week-slot-cell {
  height: 50px;
  position: relative;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
  cursor: pointer;
  box-sizing: border-box;
}

.week-slot-cell:nth-child(8n) { border-right: none; }
.week-slot-cell:hover { background: var(--bg-hover); }
.week-slot-cell.is-today { background: rgba(43, 127, 255, 0.04); }

.week-event-card {
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  box-sizing: border-box;
  font-family: var(--font-serif-body);
  font-size: 0.7rem;
  background: var(--blue-card);
  color: #f0f6ff;
  padding: 4px 6px;
  border-left: 3px solid var(--blue-lt);
  border-top: 1px solid var(--blue-border);
  border-right: 1px solid var(--blue-border);
  border-bottom: 1px solid var(--blue-border);
  font-weight: 500;
  z-index: 5;
  box-shadow: 0 3px 8px rgba(0,0,0,0.45);
  overflow: hidden;
  line-height: 1.25;
}

.week-event-title {
  font-family: var(--font-serif-heading);
  font-size: 0.74rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.week-event-time {
  font-family: var(--font-serif-body);
  font-size: 0.65rem;
  color: var(--blue-lt);
}

/* Appointment Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(3, 6, 13, 0.85);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--bg);
  border: 2.5px solid var(--text);
  outline: 3px solid var(--text);
  outline-offset: 4px;
  width: 100%;
  max-width: 480px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.85rem;
  margin-bottom: 1.25rem;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  font-family: var(--font-serif-body);
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 2px 8px;
  cursor: pointer;
}

.modal-close:hover { color: var(--text); border-color: var(--text); }

.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-family: var(--font-serif-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  font-family: var(--font-serif-body);
  font-size: 0.9rem;
  background: var(--bg-card);
  color: var(--text);
  border: 1.5px solid var(--border);
  padding: 8px 11px;
  outline: none;
  transition: border-color 0.12s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--blue-bright);
}

/* Honeypot — visually gone, but not display:none, which smarter bots detect */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Submit status line — only says "sent" when it really was */
.appt-status {
  font-family: var(--font-serif-body);
  font-size: 0.82rem;
  line-height: 1.45;
  margin-top: 0.9rem;
  padding: 0;
  border-left: 0 solid transparent;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.15s ease;
}

.appt-status.is-pending,
.appt-status.is-ok,
.appt-status.is-error {
  max-height: 120px;
  padding: 0.6rem 0.8rem;
  border-left-width: 3px;
  border-left-style: solid;
}

.appt-status.is-pending {
  background: var(--bg-card);
  border-left-color: var(--text-muted);
  color: var(--text-muted);
}

.appt-status.is-ok {
  background: rgba(46, 168, 78, 0.10);
  border-left-color: var(--green);
  color: var(--green-lt);
}

.appt-status.is-error {
  background: rgba(196, 32, 64, 0.10);
  border-left-color: var(--burgundy);
  color: var(--burgundy-lt);
}

/* Pending request the visitor just submitted — not yet accepted */
.week-event-card.is-tentative,
.slot-event.is-tentative,
.cal-event-bar.is-tentative {
  background: transparent;
  border: 1.5px dashed var(--blue-lt);
  border-left: 3px dashed var(--blue-lt);
  color: var(--blue-glow);
  box-shadow: none;
}

.btn-submit {
  width: 100%;
  font-family: var(--font-serif-body);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--blue-bright);
  color: #ffffff;
  border: none;
  padding: 10px;
  cursor: pointer;
  transition: background 0.12s;
  margin-top: 0.5rem;
}

.btn-submit:hover {
  background: var(--blue-glow);
  color: var(--bg);
}

/* 7-col grid */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-day-hdr {
  font-family: var(--font-serif-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: center;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2px;
}

.cal-cell {
  min-height: 76px;
  padding: 4px 5px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
  overflow: hidden;
}

.cal-cell:hover { background: var(--bg-hover); }

.cal-cell.is-empty {
  cursor: default;
  background: var(--bg-card);
  border-color: var(--bg-card);
  opacity: 0.4;
}

.cal-cell.is-today { border-color: var(--blue-bright); }

.cal-cell.is-selected {
  background: var(--text);
  border-color: var(--text);
}

.cal-day-num {
  font-family: var(--font-serif-heading);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  display: block;
  margin-bottom: 3px;
}

.cal-cell.is-today .cal-day-num   { color: var(--blue-glow); }
.cal-cell.is-selected .cal-day-num { color: var(--bg); }

.cal-event-bar {
  font-family: var(--font-serif-body);
  font-size: 0.65rem;
  background: var(--blue-card);
  color: var(--blue-lt);
  border-left: 2.5px solid var(--blue-lt);
  padding: 1px 5px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  font-weight: 600;
}

.cal-cell.is-selected .cal-event-bar {
  background: var(--bg);
  color: var(--text);
}

.cal-more {
  font-family: var(--font-serif-body);
  font-size: 0.65rem;
  color: var(--text-muted);
  padding-left: 2px;
}

.cal-cell.is-selected .cal-more { color: var(--bg); opacity: 0.6; }

/* Right-side event panel */
.cal-panel {
  border: 2px solid var(--border);
  padding: 1.25rem;
  position: sticky;
  top: 72px;
  min-height: 200px;
}

.cal-panel-label {
  font-family: var(--font-serif-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-glow);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--blue-bright);
  margin-bottom: 0.75rem;
}

.panel-ev {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.panel-ev:last-child { border-bottom: none; }

.panel-ev-date {
  font-family: var(--font-serif-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue-glow);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.panel-ev-title {
  font-family: var(--font-serif-heading);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.25;
}

.panel-ev-time,
.panel-ev-loc {
  font-family: var(--font-serif-body);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.cal-empty-msg {
  font-family: var(--font-serif-body);
  font-size: 0.88rem;
  font-style: italic;
  color: var(--text-muted);
  padding: 1rem 0;
}

.cal-loading, .cal-error {
  font-family: var(--font-serif-body);
  font-size: 0.85rem;
  padding: 2.5rem;
  text-align: center;
  border: 2px dashed var(--border);
  color: var(--text-muted);
}

.cal-error { border-color: var(--burgundy); color: var(--burgundy-lt); }

/* ─── Blog Post Page ─────────────────────────────────────── */
.post-body {
  max-width: 680px;
}

.post-body .post-meta {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 2rem;
  font-family: var(--font-serif-body);
  font-size: 0.82rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.post-body .post-meta .post-category {
  font-size: 0.72rem;
}

.post-content {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
}

.post-content h2 {
  font-family: var(--font-serif-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
}

.post-content h3 {
  font-family: var(--font-serif-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
}

.post-content p {
  margin-bottom: 1.2rem;
  color: var(--text-muted);
}

.post-content p:last-child { margin-bottom: 0; }

.post-content a {
  color: var(--burgundy-lt);
  border-bottom: 1px solid var(--burgundy);
}

.post-content a:hover { color: var(--text); }

.post-content code {
  font-family: var(--font-serif-body);
  font-size: 0.88em;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1px 5px;
  color: var(--green-lt);
}

.post-content pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.88rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-serif-body);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  letter-spacing: 0.04em;
}

.back-link:hover { color: var(--text); }

/* ─── Footer ──────────────────────────────────────────────── */
footer {
  border-top: 2px solid var(--border);
  padding: 1.25rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-serif-body);
  font-size: 0.82rem;
  color: var(--text-muted);
}

footer a {
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: color 0.1s, border-color 0.1s;
}

footer a:hover { color: var(--text); border-bottom-color: var(--text-muted); }

.footer-links { display: flex; gap: 1.5rem; }

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .tiles { grid-template-columns: 1fr; }
  .hero  { flex-direction: column; gap: 1rem; }
  .hero-text h1 { font-size: 2.5rem; }
  main   { padding: 1.5rem; }
  .nav   { padding: 0 1.25rem; }
  footer { flex-direction: column; gap: 0.5rem; text-align: center; }
  .blog-post-item { grid-template-columns: 1fr; gap: 0.25rem; }
  .cal-wrap { grid-template-columns: 1fr; }
  .cal-panel { position: static; }
  .cal-cell { min-height: 54px; }
}
