/* Custom font declarations */
@font-face {
  font-family: 'MITQuailav-Regular';
  src: url('/fonts/mit-quailav-regular.woff2') format('woff2'),
       url('/fonts/mit-quailav-regular.woff') format('woff'),
       url('/fonts/mit-quailav-regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'MITQuailav-Medium';
  src: url('/fonts/mit-quailav-medium.woff2') format('woff2'),
       url('/fonts/mit-quailav-medium.woff') format('woff'),
       url('/fonts/mit-quailav-medium.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'MITQuailav-ExtraBold';
  src: url('/fonts/mit-quailav-extra-bold.woff2') format('woff2'),
       url('/fonts/mit-quailav-extra-bold.woff') format('woff'),
       url('/fonts/mit-quailav-extra-bold.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'LittleGrandadFatRegular';
  src: url('/fonts/little-grandad-fat.woff2') format('woff2'),
       url('/fonts/little-grandad-fat.woff') format('woff'),
       url('/fonts/little-grandad-fat.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* CSS Custom Properties for theming */
:root {
  /* Default to newsprint scheme */
  --bg-primary: #fefdf5;
  --bg-secondary: #f8f6eb;
  --text-primary: #1e3a8a;
  --text-secondary: #1d4ed8;
  --text-muted: #64748b;
  --accent: #1e40af;
  --border: #e2e8f0;
  
  /* Typography variables */
  --font-display: 'LittleGrandadFatRegular', cursive;
  --font-heading: 'MITQuailav-ExtraBold', sans-serif;
  --font-subheading: 'MITQuailav-Medium', sans-serif;
  --font-body: 'MITQuailav-Regular', sans-serif;
  
  /* Spacing scale */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-xxl: 3rem;
}

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

html {
  font-size: 20px;
  line-height: 1.6;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography hierarchy */
h1 {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: normal;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: var(--spacing-lg);
  letter-spacing: -0.02em;
}

h2 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: normal;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
  margin-top: var(--spacing-xxl);
}

h2:first-child {
  margin-top: 0;
}

h3 {
  font-family: var(--font-subheading);
  font-size: 1.5rem;
  font-weight: normal;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
  margin-top: var(--spacing-xl);
}

h4 {
  font-family: var(--font-subheading);
  font-size: 1.25rem;
  font-weight: normal;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
  margin-top: var(--spacing-lg);
}

h5 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: normal;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
  margin-top: var(--spacing-md);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

h6 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: normal;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: var(--spacing-xs);
  margin-top: var(--spacing-md);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Paragraph and text styles */
p {
  margin-bottom: var(--spacing-md);
  line-height: 1.7;
  font-size: 1.1rem;
}

p:last-child {
  margin-bottom: 0;
}

/* Links */
a {
  color: var(--accent);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

/* Lists */
ul, ol {
  margin-bottom: var(--spacing-md);
  padding-left: var(--spacing-lg);
}

li {
  margin-bottom: var(--spacing-xs);
  line-height: 1.6;
}

/* Layout - Updated for wider text */
.container {
  max-width: 90%;
  width: 100%;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-md);
}

@media (min-width: 640px) {
  .container {
    max-width: 85%;
    padding: var(--spacing-xl) var(--spacing-lg);
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 80%;
    padding: var(--spacing-xxl) var(--spacing-xl);
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 75%;
    padding: var(--spacing-xxl) var(--spacing-xxl);
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 70%;
  }
}

.header {
  margin-bottom: var(--spacing-xxl);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--border);
}

/* Name stack styles for header */
.name-stack {
  margin-bottom: var(--spacing-md);
}

.name-line {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: normal;
  line-height: 0.9;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.nav {
  display: flex;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Sections */
.section {
  margin-bottom: var(--spacing-xxl);
}

.intro {
  margin-bottom: var(--spacing-xxl);
}

.intro p:first-child {
  font-size: 1.25rem;
  line-height: 1.6;
}

.contact {
  margin-bottom: var(--spacing-xxl);
}

/* Keep all your existing social-list styles */
.social-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  list-style: none;
  padding-left: 0;
  margin-bottom: var(--spacing-md);
  /* ADD this line for extra space */
  margin-top: var(--spacing-xxl);
  padding-top: var(--spacing-xl);
}

.social-list li {
  margin-bottom: 0;
}

.social-list a {
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.social-list a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Blog feed styles */
#blog-feed {
  list-style: none;
  padding-left: 0;
}

#blog-feed li {
  margin-bottom: var(--spacing-sm);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--border);
}

#blog-feed li:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

#blog-feed a {
  font-size: 1.1rem;
  line-height: 1.5;
}

/* Reading feed styles */
.reading-item {
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--border);
}

.reading-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* Compact one-line events */
.upcoming-event {
  margin-bottom: var(--spacing-md);
}

.event-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--spacing-xs) 0;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
}

.event-item:last-child {
  border-bottom: none;
}

.event-main {
  flex: 1;
}

.event-title {
  color: var(--text-primary);
  margin-right: var(--spacing-md);
}

.event-date {
  font-size: 0.875rem;
  color: var(--text-muted);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .event-item {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-xs);
  }
}

/* Color scheme selector */
.color-schemes {
  position: fixed;
  bottom: var(--spacing-lg);
  right: var(--spacing-lg);
  display: flex;
  gap: var(--spacing-xs);
  background: var(--bg-secondary);
  padding: var(--spacing-sm);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.scheme-btn {
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scheme-btn:hover {
  transform: scale(1.1);
}

/* Updated button styles to match actual schemes */
.scheme-btn[data-scheme="off-white"] {
  background: #fafaf9;
  color: #1c1917;
  border: 1px solid #e7e5e4;
}

.scheme-btn[data-scheme="pink-dark"] {
  background: #2f0217;
  color: #fb74a9;
  border: 1px solid #5a1535;
}

.scheme-btn[data-scheme="navy-yellow"] {
  background: #030712;
  color: #facc15;
  border: 1px solid #1e293b;
}

.scheme-btn[data-scheme="purple-cream"] {
  background: #8d063c;
  color: #fefce4;
  border: 1px solid #b91c5c;
}

.scheme-btn[data-scheme="brown-burgundy"] {
  background: #3a1f1f;
  color: #e0cb57;
  border: 1px solid #5c3333;
}

.scheme-btn[data-scheme="teal-purple"] {
  background: #111d2e;
  color: #c3a8f5;
  border: 1px solid #334155;
}

/* Footer */
.footer {
  margin-top: var(--spacing-xxl);
  padding-top: var(--spacing-xl);
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.social-links {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.social-links a {
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: color 0.2s ease;
}

.social-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Utility classes */
.text-muted {
  color: var(--text-muted);
}

.text-secondary {
  color: var(--text-secondary);
}

.no-margin-bottom {
  margin-bottom: 0;
}

.small-text {
  font-size: 0.875rem;
}

/* Color scheme variations */
.scheme-off-white {
  --bg-primary: #fafaf9;
  --bg-secondary: #f5f5f4;
  --text-primary: #1c1917;
  --text-secondary: #44403c;
  --text-muted: #78716c;
  --accent: #dc2626;
  --border: #e7e5e4;
}

.scheme-pink-dark {
  --bg-primary: #2f0217;
  --bg-secondary: #4a0c2a;
  --text-primary: #fb74a9;
  --text-secondary: #fb74a9;
  --text-muted: #a8527a;
  --accent: #fb74a9;
  --border: #5a1535;
}

.scheme-navy-yellow {
  --bg-primary: #030712;
  --bg-secondary: #0f172a;
  --text-primary: #facc15;
  --text-secondary: #facc15;
  --text-muted: #b8941f;
  --accent: #facc15;
  --border: #1e293b;
}

.scheme-purple-cream {
  --bg-primary: #8d063c;
  --bg-secondary: #a3074a;
  --text-primary: #fefce4;
  --text-secondary: #fefce4;
  --text-muted: #e5dfc7;
  --accent: #fefce4;
  --border: #b91c5c;
}

.scheme-brown-burgundy {
  --bg-primary: #3a1f1f;
  --bg-secondary: #4d2828;
  --text-primary: #e0cb57;
  --text-secondary: #e0cb57;
  --text-muted: #b8a045;
  --accent: #e0cb57;
  --border: #5c3333;
}

.scheme-teal-purple {
  --bg-primary: #111d2e;
  --bg-secondary: #1e293b;
  --text-primary: #c3a8f5;
  --text-secondary: #c3a8f5;
  --text-muted: #9b7dc7;
  --accent: #c3a8f5;
  --border: #334155;
}

/* Responsive design */
@media (max-width: 768px) {
  html {
    font-size: 18px;
  }
  
  .container {
    padding: var(--spacing-lg) var(--spacing-md);
  }
  
  .name-line {
    font-size: 3rem;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 1.875rem;
  }
  
  .nav {
    flex-wrap: wrap;
    gap: var(--spacing-md);
  }
  
  .social-list {
    gap: var(--spacing-sm);
  }
  
  .color-schemes {
    bottom: var(--spacing-md);
    right: var(--spacing-md);
  }
  
  .event-card {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    text-align: left;
  }
  
  .event-date {
    flex-direction: row;
    justify-content: flex-start;
    align-items: baseline;
    gap: var(--spacing-xs);
    min-width: auto;
  }
  
  .event-day {
    font-size: 1.5rem;
  }
  
  .event-actions {
    justify-content: flex-start;
  }

  /* Sidenotes styling */
.sidenote {
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--text-muted);
  margin: var(--spacing-md) 0;
  padding: var(--spacing-sm) var(--spacing-md);
  border-left: 2px solid var(--border);
  background: var(--bg-secondary);
  font-style: italic;
}

/* Inline sidenote reference */
.sidenote-ref {
  font-size: 0.75rem;
  color: var(--accent);
  vertical-align: super;
  text-decoration: none;
  margin-left: 2px;
}

/* For wider screens, float sidenotes to the margin */
@media (min-width: 1200px) {
  .sidenote-margin {
    float: right;
    clear: right;
    margin-right: -200px;
    margin-top: 0;
    margin-bottom: var(--spacing-md);
    width: 180px;
    font-size: 0.8rem;
    background: none;
    border: none;
    padding: 0;
  }
}
  /* Add this to your typography.css file for the now page styles */

.last-updated {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: var(--spacing-xl);
}

.now-content {
  margin-bottom: var(--spacing-xxl);
}

.archive-section {
  border-top: 1px solid var(--border);
  padding-top: var(--spacing-xl);
  margin-bottom: var(--spacing-xxl);
}

.archive-section h3 {
  margin-top: 0;
  margin-bottom: var(--spacing-md);
}

.archive-list {
  display: grid;
  gap: var(--spacing-xs);
}

.archive-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--spacing-xs) 0;
  border-bottom: 1px solid var(--border);
}

.archive-item:last-child {
  border-bottom: none;
}

.archive-item a {
  color: var(--text-primary);
  text-decoration: none;
}

.archive-item a:hover {
  color: var(--accent);
}

.archive-date {
  font-size: 0.875rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.footer {
  margin-top: var(--spacing-xxl);
  padding-top: var(--spacing-xl);
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
}

.footer p {
  font-size: 0.875rem;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .archive-item {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-xs);
  }
  
  .archive-date {
    white-space: normal;
  }
}
}
