/* Minimal, clean system-font design */
:root {
  --max-width: 1200px;
  --bg: #e8d7c3; /* vintage beige paper */
  --bg-darker: #dcc9ad; /* aged paper */
  --text: #2d2419; /* dark brown ink */
  --muted: #6b5d4f; /* faded ink */
  --accent: #8b4513; /* sepia brown */
  --border: #9d8b6f; /* vintage border */
  --header-bg: #1a1611; /* dark vintage */
  --header-text: #e8d7c3;
  --radius: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  /* vintage paper texture with subtle noise */
  background-image:
    radial-gradient(circle at 1px 1px, rgba(139,69,19,0.08) 1px, transparent 0),
    linear-gradient(0deg, transparent 24%, rgba(139,69,19,0.03) 25%, rgba(139,69,19,0.03) 26%, transparent 27%, transparent 74%, rgba(139,69,19,0.03) 75%, rgba(139,69,19,0.03) 76%, transparent 77%, transparent),
    linear-gradient(90deg, transparent 24%, rgba(139,69,19,0.03) 25%, rgba(139,69,19,0.03) 26%, transparent 27%, transparent 74%, rgba(139,69,19,0.03) 75%, rgba(139,69,19,0.03) 76%, transparent 77%, transparent);
  background-size: 16px 16px, 32px 32px, 32px 32px;
}

/* Custom Scrollbar - Vintage Style */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-darker);
  border-left: 2px solid var(--border);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border: 2px solid var(--bg-darker);
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--header-bg);
}

::-webkit-scrollbar-corner {
  background: var(--bg-darker);
}

/* Firefox Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg-darker);
}

.container { max-width: var(--max-width); margin: 0 auto; padding: var(--space-4) var(--space-4); }

/* Typography - Vintage journal style */
h1, h2, h3 { 
  line-height: 1.3; 
  margin: var(--space-6) 0 var(--space-3); 
  font-family: "Georgia", "Times New Roman", serif;
}

h1 { 
  font-size: 2.5rem; 
  font-weight: 400; 
  color: var(--text);
  text-shadow: 1px 1px 2px rgba(139,69,19,0.1);
  letter-spacing: -0.02em;
}
h2 { 
  font-size: 1.6rem; 
  font-weight: 500; 
  color: var(--accent); 
  margin-top: var(--space-8); 
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--space-2);
}
h3 { 
  font-size: 1.3rem; 
  font-weight: 500; 
  color: var(--text);
  margin-top: var(--space-5);
}

p { margin: 0 0 var(--space-4); color: var(--text); }
small, .muted { color: var(--muted); }

/* Links - vintage style */
a { 
  color: var(--accent); 
  text-decoration: underline; 
  text-underline-offset: 3px; 
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(139,69,19,0.4);
  transition: all .2s ease; 
}
a:hover { 
  color: var(--text);
  text-decoration-thickness: 2px;
  text-decoration-color: var(--accent);
}
a:focus-visible { outline: 2px dotted var(--accent); outline-offset: 2px; text-decoration: none; }

/* Skip link */
.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: static; width: auto; height: auto; margin: var(--space-2); padding: var(--space-2) var(--space-3); background: #fff; border: 1px solid var(--text); border-radius: 0; }

/* Header - Brad Woods Digital Garden style */
.site-header { 
  border-bottom: 2px solid var(--border); 
  background: var(--bg); 
  color: var(--text);
  padding: var(--space-4) 0;
}
.site-header a { color: var(--text); text-decoration: none; }
.nav { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: var(--space-4);
}

/* Left side with logo and title */
.nav-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.site-logo {
  display: flex;
  align-items: center;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: var(--text);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  border: 2px solid var(--border);
  box-shadow: 2px 2px 4px rgba(139,69,19,0.1);
}

.site-info {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.site-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 500;
  font-family: "Georgia", "Times New Roman", serif;
  line-height: 1.2;
}

.site-title a {
  color: var(--text);
  text-decoration: none;
}

.site-title a:hover {
  color: var(--accent);
}

.site-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.2;
}

/* Right side navigation */
.nav-links { 
  display: flex; 
  gap: var(--space-2); 
  align-items: center; 
}

.nav-chip {
  padding: 0.4rem 0.8rem;
  border: 2px solid var(--border);
  background: var(--bg-darker);
  color: var(--text);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all .2s ease;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.nav-chip:hover {
  background: var(--header-bg);
  color: var(--header-text);
  border-color: var(--header-bg);
}

.nav-chip[aria-current="page"] {
  background: var(--accent);
  color: var(--header-text);
  border-color: var(--accent);
}

/* Footer */
.site-footer { 
  border-top: 2px solid var(--border); 
  padding: var(--space-5) 0; 
  margin-top: var(--space-6); 
  background: transparent; 
}
.site-footer p { margin: 0; color: var(--muted); }

/* Responsive header */
@media (max-width: 768px) {
  .nav {
    flex-direction: column;
    gap: var(--space-3);
    align-items: flex-start;
  }
  
  .nav-left {
    width: 100%;
  }
  
  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  
  .site-title {
    font-size: 1.2rem;
  }
  
  .site-subtitle {
    font-size: 0.8rem;
  }
}

/* Info Ticker - scrolling info bar */
.info-ticker {
  background: var(--bg);
  border-bottom: 2px solid var(--border);
  color: var(--text);
  width: 100%;  
  white-space: nowrap;
  position: relative;
  height: 2rem;
  overflow: hidden;
}

.ticker-content {
  padding-left: 100%;
  display: inline-block;
  animation: scroll-left 40s linear infinite;
  -webkit-animation: scroll-left 40s linear infinite;
  font-size: 0.9rem;
  font-style: italic;
  letter-spacing: 0.02em;
  position: absolute;
  top: 50%;
  transform: translateY(-50%) translate3d(100%, 0, 0);
  -webkit-transform: translateY(-50%) translate3d(100%, 0, 0);
  left: 0;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.ticker-1 {
  animation-delay: -20s;
}

.ticker-2 {
  animation-delay: -10s;
}

.ticker-3 {
  animation-delay: 0s;
}

/* Responsive ticker */
@media (max-width: 768px) {
  .info-ticker {
    height: 2.5rem;
  }

  .ticker-content {
    animation-duration: 30s;
    font-size: 0.85rem;
  }

  .ticker-1 {
    animation-delay: 0s;
  }

  .ticker-2 {
    animation-delay: -10s;
  }

  .ticker-3 {
    animation-delay: -20s;
  }
}

.ticker-item {
  display: inline-block;
  padding: 0 var(--space-3);
}

.ticker-separator {
  display: inline-block;
  padding: 0 var(--space-2);
  color: var(--accent);
  opacity: 0.6;
}

@keyframes scroll-left {
  0% {
    transform: translateY(-50%) translate3d(100%, 0, 0);
  }
  100% {
    transform: translateY(-50%) translate3d(-100%, 0, 0);
  }
}

/* Pause animation on hover */
.info-ticker:hover .ticker-content {
  animation-play-state: paused;
}

/* Hero - journal intro style */
.hero { 
  margin-top: var(--space-8); 
  margin-bottom: var(--space-8); 
  padding: var(--space-6) var(--space-5);
  background: var(--bg-darker);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 2px 2px 8px rgba(139,69,19,0.1);
}
.hero p { 
  color: var(--muted); 
  font-size: 1.1rem; 
  font-style: italic;
  margin-bottom: 0;
}

/* Sections */
.section { margin: var(--space-6) 0; }
.section-header { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); }

/* Grid list - vintage journal cards */
.project-list { 
  display: grid; 
  gap: var(--space-4); 
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
  margin-top: var(--space-5);
}
.card { 
  border: 2px solid var(--border); 
  border-radius: 0; 
  padding: 0;
  background: var(--bg-darker);
  box-shadow: 
    2px 2px 6px rgba(139,69,19,0.08),
    inset 1px 1px 0 rgba(255,255,255,0.1);
  transition: all .2s ease;
  position: relative;
  overflow: hidden;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}
.card:hover { 
  box-shadow: 
    2px 2px 6px rgba(139,69,19,0.12),
    inset 1px 1px 0 rgba(255,255,255,0.1);
  background: var(--header-bg);
  color: var(--header-text);
}
.card:hover h3 a {
  color: var(--header-text);
  border-bottom-color: var(--header-text);
}
.card:hover p {
  color: rgba(232, 215, 195, 0.9);
}
.card:hover .muted {
  color: rgba(232, 215, 195, 0.7);
}
.card:hover .tag {
  background: rgba(232, 215, 195, 0.1);
  border-color: rgba(232, 215, 195, 0.3);
  color: rgba(232, 215, 195, 0.8);
}
/* Card illustration area */
.card-image {
  height: 140px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 2px solid var(--border);
  position: relative;
  overflow: hidden;
}
.card-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(rgba(139,69,19,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139,69,19,0.08) 1px, transparent 1px);
  background-size: 20px 20px;
}
.card-placeholder {
  width: 80px;
  height: 80px;
  background: var(--accent);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--header-text);
  font-weight: bold;
  font-size: 1.5rem;
  z-index: 1;
  position: relative;
  box-shadow: 2px 2px 8px rgba(139,69,19,0.2);
}

/* Card content */
.card-content {
  padding: var(--space-4);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card h3 { margin-top: 0; margin-bottom: var(--space-2); }
.card h3 a { 
  text-decoration: none;
  color: var(--text);
  border-bottom: 2px solid rgba(139,69,19,0.3);
  transition: all .2s ease;
}
.card h3 a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.card p {
  flex: 1;
  margin-bottom: var(--space-4);
  line-height: 1.6;
}
.card .meta { 
  display: flex; 
  flex-wrap: wrap; 
  gap: var(--space-2) var(--space-3); 
  align-items: center; 
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid rgba(157, 139, 111, 0.2);
}
.card .tech { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* Badges - vintage style */
.badge { 
  display: inline-flex; 
  align-items: center; 
  gap: 0.35rem; 
  padding: 0.3rem 0.7rem; 
  border: 2px solid var(--border); 
  border-radius: 0; 
  font-size: 0.7rem; 
  color: var(--muted); 
  background: var(--bg); 
  white-space: nowrap;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.badge.in-progress { 
  background: var(--accent); 
  color: var(--header-text); 
  border-color: var(--accent); 
}
.badge.completed { 
  background: #5a7c65; 
  color: #fff; 
  border-color: #5a7c65; 
}
.badge.paused { 
  background: var(--bg); 
  color: var(--muted); 
  border-style: dashed;
  border-color: var(--muted);
}

.tag { 
  border: 1px solid var(--border); 
  border-radius: 0; 
  padding: 0.2rem 0.5rem; 
  font-size: 0.7rem; 
  color: var(--muted);
  background: rgba(139,69,19,0.05);
  font-weight: 400;
}

/* Search & Filters */
.search { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.search input[type="search"] { 
  width: 100%; 
  padding: 0.7rem 1rem; 
  border-radius: 0; 
  border: 2px solid var(--border); 
  background: var(--bg-darker); 
  color: var(--text);
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 0.9rem;
  transition: all .2s ease;
}
.search input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139,69,19,0.1);
}

.filters { 
  display: flex; 
  flex-wrap: wrap; 
  gap: var(--space-2); 
  margin-bottom: var(--space-3); 
}
.filter-chip { 
  border: 2px solid var(--border); 
  border-radius: 0; 
  padding: 0.5rem 1rem; 
  background: var(--bg-darker); 
  color: var(--text); 
  cursor: pointer; 
  user-select: none;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all .15s ease;
  text-decoration: none;
  box-shadow: 
    1px 1px 3px rgba(139,69,19,0.08),
    inset 1px 1px 0 rgba(255,255,255,0.1);
  position: relative;
}
.filter-chip:hover { 
  border-color: var(--text);
  background: var(--bg);
  box-shadow: 
    1px 1px 4px rgba(45,36,25,0.15),
    inset 1px 1px 0 rgba(255,255,255,0.15);
  color: var(--text);
}
.filter-chip.active { 
  background: var(--text); 
  color: var(--bg); 
  border-color: var(--text);
  box-shadow: 
    2px 2px 6px rgba(45,36,25,0.2),
    inset 1px 1px 0 rgba(255,255,255,0.1);
}

.results-count { font-size: 0.85rem; color: var(--muted); margin-bottom: var(--space-3); }

/* Section bar - vintage journal tab */
.bar { 
  background: var(--header-bg); 
  color: var(--header-text); 
  padding: 0.5rem 1rem; 
  font-size: 0.8rem; 
  text-transform: uppercase; 
  letter-spacing: .1em; 
  border: 2px solid var(--border);
  border-radius: 0;
  margin-bottom: -2px;
  display: inline-block;
  font-weight: 500;
}

/* Breadcrumbs */
.breadcrumbs {
  margin-bottom: var(--space-4);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border);
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.breadcrumb-link {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb-link:hover {
  color: var(--accent);
}

.breadcrumb-separator {
  color: var(--muted);
  font-size: 0.7rem;
}

.breadcrumb-current {
  color: var(--text);
  font-weight: 500;
}

/* Project Detail Page */
.project-meta {
  margin-bottom: var(--space-6);
  padding: var(--space-4);
  background: var(--bg);
  border: 2px solid var(--border);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-3);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.meta-label {
  font-weight: bold;
  color: var(--muted);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-content > div {
  margin-bottom: var(--space-6);
}

.project-overview,
.project-features,
.project-tech,
.project-challenges,
.project-links {
  padding: var(--space-4);
  background: var(--bg);
  border: 2px solid var(--border);
}

.project-content h2 {
  margin-top: 0;
  margin-bottom: var(--space-4);
  color: var(--accent);
  border-bottom: 2px solid var(--border);
  padding-bottom: var(--space-2);
}

.feature-list,
.challenge-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li,
.challenge-list li {
  padding: var(--space-2);
  margin-bottom: var(--space-2);
  background: var(--bg);
  border-left: 3px solid var(--accent);
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.feature-list li:hover,
.challenge-list li:hover {
  background: var(--header-bg);
  color: var(--header-text);
}

.feature-list li::before {
  content: "✓";
  color: var(--accent);
  font-weight: bold;
  margin-right: var(--space-2);
}

.challenge-list li::before {
  content: "→";
  color: var(--accent);
  font-weight: bold;
  margin-right: var(--space-2);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-4);
}

.tech-item {
  padding: var(--space-3);
  background: var(--bg);
  border: 2px solid var(--border);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.tech-item:hover {
  background: var(--header-bg);
  color: var(--header-text );
}


.tech-item:hover p {
  color: var(--header-text);
}

.tech-item h3 {
  margin-top: 0;
  margin-bottom: var(--space-2);
  color: var(--accent);
  font-size: 1.1rem;
}

.tech-item p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.project-link {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: var(--accent);
  color: var(--header-text);
  text-decoration: none;
  font-weight: bold;
  border: 2px solid var(--accent);
  transition: all 0.3s ease;
}

.project-link:hover {
  background: transparent;
  color: var(--accent);
}

.project-link.live {
  background: #28a745;
  border-color: #28a745;
}

.project-link.live:hover {
  background: transparent;
  color: #28a745;
}

.project-link.github {
  background: #333;
  border-color: #333;
}

.project-link.github:hover {
  background: transparent;
  color: #333;
}

.project-navigation {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 2px solid var(--border);
}

.back-link {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

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

/* Responsive adjustments for project detail */
@media (max-width: 768px) {
  .meta-grid {
    grid-template-columns: 1fr;
  }
  
  .tech-grid {
    grid-template-columns: 1fr;
  }
  
  .links-grid {
    flex-direction: column;
  }
  
  .project-link {
    text-align: center;
  }
}

.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
