/* ========================================
   marty64.net - Main Styles
   ======================================== */

:root {
  /* Colors - warm, approachable palette */
  --bg: #fafaf9;
  --bg-alt: #f5f5f4;
  --bg-dark: #1c1917;
  --text: #1c1917;
  --text-muted: #78716c;
  --text-light: #a8a29e;
  --border: #e7e5e4;
  
  /* Accent - warm orange/amber */
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --accent-light: #fcd34d;
  
  /* Secondary - cool blue for contrast */
  --secondary: #3b82f6;
  --secondary-dark: #2563eb;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Lora', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.5rem;
  
  /* Layout */
  --max-width: 1200px;
  --content-width: 720px;
}

/* ========================================
   Reset & Base
   ======================================== */

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

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  color: var(--secondary-dark);
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-md);
}

.lead {
  font-size: var(--text-xl);
  color: var(--text-muted);
  line-height: 1.5;
}

/* ========================================
   Layout Components
   ======================================== */

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

.container--narrow {
  max-width: var(--content-width);
}

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

.section--alt {
  background: var(--bg-alt);
}

.section--dark {
  background: var(--bg-dark);
  color: white;
}

.section--dark .text-muted {
  color: var(--text-light);
}

/* ========================================
   Navigation
   ======================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 249, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text);
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-sm) 0;
  position: relative;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link--active {
  color: var(--text);
}

.nav-link--active::after {
  width: 100%;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border);
  }
  
  .nav-links.active {
    display: flex;
  }
}

/* ========================================
   Hero
   ======================================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 64px;
}

.hero-content {
  max-width: 800px;
}

.hero-label {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--accent-dark);
  background: rgba(245, 158, 11, 0.1);
  padding: var(--space-xs) var(--space-md);
  border-radius: 100px;
  margin-bottom: var(--space-lg);
}

.hero h1 {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-lg);
}

.hero .lead {
  margin-bottom: var(--space-xl);
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}

.btn--primary {
  background: var(--accent);
  color: white;
}

.btn--primary:hover {
  background: var(--accent-dark);
  color: white;
}

.btn--secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

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

.btn--ghost {
  background: transparent;
  color: var(--text);
}

.btn--ghost:hover {
  color: var(--accent);
}

/* ========================================
   Section Headers
   ======================================== */

.section-header {
  margin-bottom: var(--space-3xl);
}

.section-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.section-title {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-md);
}

.section-desc {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 600px;
}

/* ========================================
   Project Cards
   ======================================== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-xl);
}

.project-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.project-card__image {
  aspect-ratio: 16/10;
  background: var(--bg-alt);
  overflow: hidden;
}

.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card__content {
  padding: var(--space-xl);
}

.project-card__tags {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.project-card__tag {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-alt);
  padding: var(--space-xs) var(--space-sm);
  border-radius: 4px;
}

.project-card__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
}

.project-card__desc {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-md);
}

.project-card__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--secondary);
}

.project-card__link:hover {
  color: var(--secondary-dark);
}

/* Featured project - larger */
.project-card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}

.project-card--featured .project-card__image {
  aspect-ratio: auto;
}

.project-card--featured .project-card__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-3xl);
}

@media (max-width: 768px) {
  .project-card--featured {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Skills/Expertise
   ======================================== */

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3xl);
}

@media (max-width: 768px) {
  .expertise-grid {
    grid-template-columns: 1fr;
  }
}

.expertise-block h3 {
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.expertise-block h3 .icon {
  font-size: var(--text-2xl);
}

.skill-list {
  list-style: none;
}

.skill-item {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.skill-name {
  font-weight: 500;
}

.skill-level {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ========================================
   VG101 / Knowledge Base Promo
   ======================================== */

.kb-promo {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #292524 100%);
  color: white;
  border-radius: 16px;
  padding: var(--space-3xl);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

@media (max-width: 768px) {
  .kb-promo {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.kb-promo__content h2 {
  margin-bottom: var(--space-md);
}

.kb-promo__content p {
  color: var(--text-light);
  margin-bottom: var(--space-xl);
}

.kb-promo__preview {
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: var(--space-xl);
}

.kb-promo__preview h4 {
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.kb-preview-list {
  list-style: none;
}

.kb-preview-list li {
  padding: var(--space-sm) 0;
  color: var(--text-light);
  font-size: var(--text-sm);
}

.kb-preview-list li::before {
  content: '→';
  margin-right: var(--space-sm);
  color: var(--accent);
}

/* ========================================
   About Section
   ======================================== */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-3xl);
  align-items: start;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

.about-image {
  aspect-ratio: 1;
  background: var(--bg-alt);
  border-radius: 12px;
  overflow: hidden;
}

.about-content h2 {
  margin-bottom: var(--space-lg);
}

.about-content p {
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.about-content p:last-of-type {
  margin-bottom: var(--space-xl);
}

.about-links {
  display: flex;
  gap: var(--space-md);
}

/* ========================================
   Footer
   ======================================== */

.footer {
  background: var(--bg-dark);
  color: white;
  padding: var(--space-3xl) 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.footer-link {
  color: var(--text-light);
  font-size: var(--text-sm);
}

.footer-link:hover {
  color: white;
}

/* Writings */
.writings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: var(--space-lg);
}

.writing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.writing-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.writing-card--placeholder {
  opacity: 0.6;
  border-style: dashed;
}

.writing-card__meta {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  font-size: var(--text-sm);
}

.writing-card__type {
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.writing-card__date {
  color: var(--text-muted);
}

.writing-card__title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-sm);
  color: var(--text);
}

.writing-card__excerpt {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.writing-card__link {
  color: var(--secondary);
  font-weight: 500;
}

.writing-card__link:hover {
  text-decoration: underline;
}

.footer-copy {
  color: var(--text-light);
  font-size: var(--text-sm);
}

/* ========================================
   Project Page Specifics
   ======================================== */

.project-hero {
  padding-top: calc(64px + var(--space-3xl));
  padding-bottom: var(--space-3xl);
}

.project-hero__meta {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.project-hero__meta span {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.project-content {
  max-width: var(--content-width);
  margin: 0 auto;
}

.project-content h2 {
  margin-top: var(--space-3xl);
  margin-bottom: var(--space-lg);
}

.project-content p {
  margin-bottom: var(--space-lg);
}

.project-content img {
  border-radius: 8px;
  margin: var(--space-xl) 0;
}

.project-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: var(--space-lg);
  font-style: italic;
  color: var(--text-muted);
  margin: var(--space-xl) 0;
}

/* ========================================
   Contact
   ======================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-info h3 {
  margin-bottom: var(--space-lg);
}

.contact-methods {
  list-style: none;
}

.contact-methods li {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
}

.contact-methods li:last-child {
  border-bottom: none;
}

.contact-methods a {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  color: var(--text);
}

.contact-methods a:hover {
  color: var(--secondary);
}

/* ========================================
   KB Integration Styles
   ======================================== */

.kb-nav {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) 0;
}

.kb-nav-inner {
  display: flex;
  gap: var(--space-lg);
  overflow-x: auto;
}

.kb-nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  padding: var(--space-sm) var(--space-md);
  border-radius: 6px;
}

.kb-nav-link:hover {
  background: white;
  color: var(--text);
}

.kb-nav-link--active {
  background: white;
  color: var(--text);
}

/* ========================================
   Utilities
   ======================================== */

.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
