
/* davidragone.com — sophisticated, precise, and content-first */
/* Foundation: design tokens */
:root{
  /* Core colors - sophisticated, photographed feel */
  --bg: #0a0a0b;
  --bg-elev: #111113;
  --bg-subtle: #191919;
  --text: #f4f4f6;
  --text-medium: #c9c9d1;
  --text-muted: #9b9ba5;
  --text-subtle: #6f6f7a;
  --border: #242428;
  --border-subtle: #1a1a1e;
  --card: #131315;
  --card-elevated: #181819;
  
  /* Sophisticated accent palette */
  --accent: #6366f1; /* refined indigo */
  --accent-light: #818cf8;
  --accent-subtle: #e0e7ff;
  --accent-surface: #1e1b4b;
  
  /* Semantic colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;

  /* Enhanced spatial system */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  
  /* Sophisticated shadows with multiple layers */
  --shadow-sm: 
    0 1px 2px 0 rgba(0, 0, 0, 0.15),
    0 1px 3px 0 rgba(0, 0, 0, 0.1);
  --shadow: 
    0 1px 3px 0 rgba(0, 0, 0, 0.2),
    0 4px 8px 0 rgba(0, 0, 0, 0.15),
    0 8px 24px 0 rgba(0, 0, 0, 0.1);
  --shadow-lg: 
    0 4px 6px -1px rgba(0, 0, 0, 0.2),
    0 10px 15px -3px rgba(0, 0, 0, 0.15),
    0 20px 40px -7px rgba(0, 0, 0, 0.1);
  --shadow-xl: 
    0 10px 15px -3px rgba(0, 0, 0, 0.25),
    0 25px 50px -12px rgba(0, 0, 0, 0.2);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.3);

  /* Refined typography scale using golden ratio (≈1.618) */
  --step--2: clamp(0.69rem, 0.66rem + 0.15vw, 0.78rem);
  --step--1: clamp(0.83rem, 0.78rem + 0.24vw, 0.94rem);
  --step-0:  clamp(1.00rem, 0.92rem + 0.39vw, 1.13rem);
  --step-1:  clamp(1.20rem, 1.09rem + 0.54vw, 1.35rem);
  --step-2:  clamp(1.44rem, 1.29rem + 0.75vw, 1.62rem);
  --step-3:  clamp(1.73rem, 1.53rem + 1.02vw, 1.94rem);
  --step-4:  clamp(2.07rem, 1.81rem + 1.33vw, 2.33rem);
  --step-5:  clamp(2.49rem, 2.15rem + 1.74vw, 2.80rem);

  /* Enhanced spacing system */
  --space-xs: 4px;
  --space-sm: 8px;
  --space: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 80px;
  --space-5xl: 128px;

  /* Typography refinements */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  --letter-spacing-tight: -0.025em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.025em;

  /* Animation timing */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 350ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: light){
  :root{
    /* Light mode - sophisticated, calm tones */
    --bg: #fdfdfe;
    --bg-elev: #ffffff;
    --bg-subtle: #f8f9fa;
    --text: #0f172a;
    --text-medium: #334155;
    --text-muted: #64748b;
    --text-subtle: #94a3b8;
    --border: #e2e8f0;
    --border-subtle: #f1f5f9;
    --card: #ffffff;
    --card-elevated: #ffffff;
    
    --accent: #4f46e5;
    --accent-light: #6366f1;
    --accent-subtle: #eef2ff;
    --accent-surface: #f0f9ff;
    
    --success: #059669;
    --warning: #d97706;
    --error: #dc2626;

    /* Refined light shadows */
    --shadow-sm: 
      0 1px 2px 0 rgba(0, 0, 0, 0.03),
      0 1px 3px 0 rgba(0, 0, 0, 0.04);
    --shadow: 
      0 1px 3px 0 rgba(0, 0, 0, 0.08),
      0 4px 6px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 
      0 4px 6px -1px rgba(0, 0, 0, 0.06),
      0 10px 15px -3px rgba(0, 0, 0, 0.04);
    --shadow-xl: 
      0 10px 25px -3px rgba(0, 0, 0, 0.08),
      0 25px 50px -12px rgba(0, 0, 0, 0.06);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.04);
  }
}

/* Global foundations */
*{ 
  box-sizing: border-box; 
}

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

html{ 
  color-scheme: light dark;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  line-height: var(--line-height-normal);
  font-size: var(--step-0);
  font-weight: var(--font-weight-normal);
  letter-spacing: var(--letter-spacing-normal);
  overflow-x: hidden;
}

/* Enhanced typography hierarchy */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-tight);
  line-height: var(--line-height-tight);
  color: var(--text);
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
h5 { font-size: var(--step-0); }
h6 { font-size: var(--step--1); }

p {
  margin: 0;
  line-height: var(--line-height-relaxed);
}

/* Refined media elements */
img{ 
  max-width: 100%; 
  height: auto; 
  vertical-align: middle;
  border-style: none;
}

/* Enhanced link styling with better affordances */
a{ 
  color: var(--accent);
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-out);
  position: relative;
}

a:hover{ 
  color: var(--accent-light);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* Layout foundations with enhanced spacing */
.container{ 
  width: min(1200px, 94vw);
  margin: 0 auto; 
  padding: 0 var(--space);
}

.section{ 
  padding: var(--space-4xl) 0;
  position: relative;
}

.section:first-of-type{ 
  padding-top: var(--space-3xl);
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(1200px, 94vw);
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--border) 20%,
    var(--border) 80%,
    transparent
  );
}

.section:first-of-type::before {
  display: none;
}

.section h2{ 
  font-size: var(--step-3);
  font-weight: var(--font-weight-bold);
  margin: 0 0 var(--space-xl);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--text);
  position: relative;
}

.section h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 32px;
  height: 3px;
  background: var(--accent);
  border-radius: var(--radius-sm);
}

/* Enhanced header with sophisticated glass morphism */
header.site{
  position: sticky; 
  top: 0; 
  z-index: 50;
  backdrop-filter: saturate(180%) blur(20px);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--duration-normal) var(--ease-out);
}

header.site::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--bg) 95%, var(--accent) 5%) 0%,
    color-mix(in srgb, var(--bg) 98%, transparent) 100%
  );
  opacity: 0.6;
  pointer-events: none;
}

.bar{ 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  height: 72px;
  position: relative;
  z-index: 1;
}

.logo{ 
  display: flex; 
  align-items: center; 
  gap: var(--space-sm); 
  font-weight: var(--font-weight-semibold);
  font-size: var(--step-1);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--text);
  transition: all var(--duration-fast) var(--ease-out);
}

.logo:hover {
  color: var(--accent-light);
  transform: translateY(-1px);
}

.logo img{ 
  width: 28px; 
  height: 28px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
  transition: all var(--duration-fast) var(--ease-out);
}

.logo:hover img {
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
  transform: rotate(-2deg);
}

nav {
  display: flex;
  gap: var(--space-xs);
}

nav a{ 
  padding: var(--space-sm) var(--space); 
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  font-weight: var(--font-weight-medium);
  color: var(--text-medium);
  position: relative;
  transition: all var(--duration-fast) var(--ease-out);
}

nav a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
  opacity: 0;
  transition: all var(--duration-fast) var(--ease-out);
  z-index: -1;
}

nav a:hover {
  color: var(--text);
  text-decoration: none;
  transform: translateY(-1px);
}

nav a:hover::before {
  opacity: 1;
}

nav a:focus-visible{ 
  outline: 2px solid var(--accent); 
  outline-offset: 2px;
}

nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: var(--font-weight-semibold);
}

nav a[aria-current="page"]::before {
  opacity: 1;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

/* Sophisticated button system with enhanced states */
.button{
  --btn-bg: var(--accent);
  --btn-color: white;
  --btn-border: var(--accent);
  
  display: inline-flex; 
  align-items: center; 
  justify-content: center;
  gap: var(--space-sm);
  
  font-weight: var(--font-weight-semibold);
  font-size: var(--step-0);
  letter-spacing: var(--letter-spacing-normal);
  text-decoration: none;
  
  padding: var(--space) var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--btn-border);
  
  background: var(--btn-bg);
  color: var(--btn-color);
  
  box-shadow: var(--shadow);
  
  transition: all var(--duration-fast) var(--ease-out);
  
  min-width: 44px;
  min-height: 44px;
  
  position: relative;
  overflow: hidden;
}

.button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.1) 0%,
    rgba(255,255,255,0.05) 50%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--btn-color);
  text-decoration: none;
}

.button:hover::before {
  opacity: 1;
}

.button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.button:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

.button--ghost{
  --btn-bg: var(--bg-subtle);
  --btn-color: var(--text);
  --btn-border: var(--border);
}

.button--ghost:hover {
  --btn-bg: var(--card-elevated);
  --btn-border: var(--border);
}

/* Enhanced card system with sophisticated depth */
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow);
  
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
  
  display: block;
  color: inherit;
  text-decoration: none;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.1) 50%,
    transparent
  );
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-xl);
  border-color: color-mix(in srgb, var(--border) 80%, var(--accent) 20%);
  background: var(--card-elevated);
  text-decoration: none;
  color: inherit;
}

.card:hover::before {
  opacity: 1;
}

.card:active {
  transform: translateY(-2px) scale(1.01);
}

.card h3{ 
  margin: 0 0 var(--space-sm);
  font-size: var(--step-1);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  line-height: var(--line-height-tight);
  transition: color var(--duration-fast) var(--ease-out);
}

.card:hover h3 {
  color: var(--accent-light);
}

.card p{ 
  margin: 0;
  color: var(--text-muted);
  line-height: var(--line-height-relaxed);
  transition: color var(--duration-fast) var(--ease-out);
}

.card:hover p {
  color: var(--text-medium);
}

/* Tag styling within cards */
.card .tags {
  font-size: var(--step--1);
  color: var(--text-subtle);
  margin-bottom: var(--space-sm);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  transition: color var(--duration-fast) var(--ease-out);
}

.card:hover .tags {
  color: var(--accent);
}

/* Enhanced grid system with better spacing */
.grid{ 
  display: grid; 
  gap: var(--space-xl);
}

.grid--2{ 
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3{ 
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1024px){
  .grid--3{ 
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px){
  .grid--2, .grid--3{ 
    grid-template-columns: 1fr;
  }
  
  .grid {
    gap: var(--space-lg);
  }
}

/* Sophisticated about section with enhanced visual hierarchy */
.about{ 
  display: grid; 
  grid-template-columns: 200px 1fr; 
  gap: var(--space-2xl); 
  align-items: start;
}

/* Page header for content pages */
.page-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.page-header h1 {
  font-size: var(--step-4);
  font-weight: var(--font-weight-bold);
  margin: 0 0 var(--space);
  color: var(--text);
  letter-spacing: var(--letter-spacing-tight);
  line-height: var(--line-height-tight);
}

.page-description {
  font-size: var(--step-0);
  color: var(--text-muted);
  line-height: var(--line-height-relaxed);
  max-width: 600px;
  margin: 0 auto;
}

.about img{ 
  width: 200px; 
  height: 200px; 
  object-fit: cover; 
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
}

.about img:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: var(--shadow-xl);
}

.about h1{ 
  font-size: var(--step-5);
  font-weight: var(--font-weight-bold);
  margin: 0 0 var(--space-sm);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--text);
  
  background: linear-gradient(
    135deg,
    var(--text) 0%,
    color-mix(in srgb, var(--text) 70%, var(--accent) 30%) 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: gradient-shift 6s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.about .tagline{ 
  font-size: var(--step-1);
  font-weight: var(--font-weight-medium);
  color: var(--text-medium);
  margin-bottom: var(--space-lg);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-normal);
}

.about p {
  font-size: var(--step-0);
  color: var(--text-muted);
  line-height: var(--line-height-relaxed);
  max-width: 65ch; /* Optimal reading width */
}

@media (max-width: 768px) {
  .about {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    text-align: center;
  }
  
  .about img {
    width: 160px;
    height: 160px;
    margin: 0 auto;
  }
  
  .about h1 {
    font-size: var(--step-4);
  }
}

/* Enhanced writings section with sophisticated list styling */
.writings-list {
  display: grid;
  gap: var(--space);
}

.writings-list .item{ 
  display: block; 
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
  
  color: inherit;
  text-decoration: none;
}

.writings-list .item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.writings-list .item:hover {
  background: var(--card-elevated);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--border) 70%, var(--accent) 30%);
  color: inherit;
  text-decoration: none;
}

.writings-list .item:hover::before {
  opacity: 1;
}

.writings-list h3{ 
  margin: 0 0 var(--space-sm);
  font-size: var(--step-1);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  line-height: var(--line-height-tight);
  transition: color var(--duration-fast) var(--ease-out);
}

.writings-list .item:hover h3 {
  color: var(--accent-light);
}

.writings-list p{ 
  margin: 0;
  color: var(--text-muted);
  line-height: var(--line-height-relaxed);
  transition: color var(--duration-fast) var(--ease-out);
}

.writings-list .item:hover p {
  color: var(--text-medium);
}

/* Notes section with clean, readable styling */
.notes-list {
  display: grid;
  gap: var(--space-lg);
}

.note-item {
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.note-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent), var(--accent-light));
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.note-item:hover {
  background: var(--card-elevated);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--border) 80%, var(--accent) 20%);
}

.note-item:hover::before {
  opacity: 1;
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space);
  margin-bottom: var(--space);
}

.note-title {
  margin: 0;
  font-size: var(--step-0);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
  line-height: var(--line-height-tight);
  transition: color var(--duration-fast) var(--ease-out);
  flex: 1;
}

.note-item:hover .note-title {
  color: var(--accent-light);
}

.note-date {
  font-size: var(--step--1);
  color: var(--text-subtle);
  font-weight: var(--font-weight-normal);
  white-space: nowrap;
  transition: color var(--duration-fast) var(--ease-out);
}

.note-item:hover .note-date {
  color: var(--text-muted);
}

.note-content {
  color: var(--text-medium);
  line-height: var(--line-height-relaxed);
  transition: color var(--duration-fast) var(--ease-out);
}

.note-item:hover .note-content {
  color: var(--text);
}

.note-content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all var(--duration-fast) var(--ease-out);
}

.note-content a:hover {
  color: var(--accent-light);
  border-bottom-color: var(--accent-light);
}

.note-content strong {
  color: var(--text);
  font-weight: var(--font-weight-semibold);
}

.note-content em {
  color: var(--text-medium);
  font-style: italic;
}

.note-content code {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 2px 6px;
  font-family: ui-monospace, 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  font-size: 0.9em;
  color: var(--accent-light);
}

/* Sophisticated photo gallery with enhanced masonry layout */
.photo-grid{ 
  columns: 3 280px;
  column-gap: var(--space-xl);
  column-fill: balance;
}

.photo-grid figure{ 
  break-inside: avoid;
  margin: 0 0 var(--space-xl);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow);
  
  transition: all var(--duration-normal) var(--ease-out);
}

.photo-grid figure:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-xl);
}

.photo-grid img{ 
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-xl);
  
  transition: all var(--duration-slow) var(--ease-out);
  filter: brightness(0.95) contrast(1.05) saturate(1.1);
}

.photo-grid figure:hover img {
  filter: brightness(1) contrast(1.1) saturate(1.2);
  transform: scale(1.05);
}

.photo-grid figcaption{ 
  font-size: var(--step--1);
  font-weight: var(--font-weight-medium);
  color: var(--text-muted);
  padding: var(--space) var(--space-lg);
  margin: 0;
  
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.8) 0%,
    rgba(0,0,0,0.4) 50%,
    transparent 100%
  );
  
  backdrop-filter: blur(8px);
  
  opacity: 0;
  transform: translateY(100%);
  transition: all var(--duration-normal) var(--ease-out);
}

.photo-grid figure:hover figcaption {
  opacity: 1;
  transform: translateY(0);
  color: white;
}

@media (max-width: 1024px) {
  .photo-grid {
    columns: 2 280px;
  }
}

@media (max-width: 640px) {
  .photo-grid {
    columns: 1;
    gap: var(--space-lg);
  }
  
  .photo-grid figure {
    margin-bottom: var(--space-lg);
  }
}

/* Enhanced footer with sophisticated styling */
footer{ 
  padding: var(--space-4xl) 0 var(--space-2xl);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  background: linear-gradient(
    180deg,
    var(--bg) 0%,
    color-mix(in srgb, var(--bg) 95%, var(--bg-subtle) 5%) 100%
  );
  
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(1200px, 94vw);
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--border) 20%,
    var(--border) 80%,
    transparent
  );
}

footer .container {
  text-align: center;
}

footer a{ 
  color: var(--text-medium);
  font-weight: var(--font-weight-medium);
  transition: all var(--duration-fast) var(--ease-out);
}

footer a:hover {
  color: var(--accent-light);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Accessibility and performance optimizations */
@media (prefers-reduced-motion: reduce){
  *,
  *::before,
  *::after { 
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border: color-mix(in srgb, var(--text) 20%, transparent);
    --border-subtle: color-mix(in srgb, var(--text) 10%, transparent);
  }
  
  .card:hover {
    border-color: var(--accent);
  }
}

/* Print styles */
@media print {
  header.site,
  footer,
  nav,
  .button {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .section {
    padding: 1rem 0 !important;
    break-inside: avoid;
  }
  
  .card {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    break-inside: avoid;
    margin-bottom: 1rem;
  }
}
