/* ========================================
   CSS Custom Properties
======================================== */
:root {
  --color-bg: #ffffff;
  --color-surface: #161616;
  --color-surface-2: #ffffff;
  --color-border: #e290c0;
  --color-text: #000000;
  --color-text-muted: #000000;
  --color-accent: #c1c1c1;
  --color-accent-hover: #e290c0;
  --color-white:  #ffffff;
  --color-text-highlight: #ffb929;

  --font-sans: 'Arial Black', Gadget, sans-serif;
  --font-serif: 'Arial Black', Gadget, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 7rem;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --max-width: 1200px;
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

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

a { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent-hover); }

ul { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--color-text);
}

/* ========================================
   Utilities
======================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

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

.hidden { display: none !important; }

/* ========================================
   Buttons
======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: #0d0d0d;
  border-color: var(--color-accent);
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #0d0d0d;
}

.btn-secondary {
  background: var(--color-surface-2);
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-full { width: 100%; justify-content: center; }

/* ========================================
   Header
======================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* height: 68px; */
}
.site-header img.logo {
  height: 100px;
  object-fit: contain;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: -0.02em;
}
.logo:hover { color: var(--color-accent); }

.nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.nav a {
  color: var(--color-text-muted);
  font-size: 1.8rem;
  font-weight: 500;
  transition: color var(--transition);
}
.nav a:hover, .nav a.active { color: var(--color-accent-hover); }

.btn-nav {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text) !important;
  transition: all var(--transition) !important;
}
.btn-nav:hover {
  border-color: var(--color-accent) !important;
  color: var(--color-accent) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ========================================
   Hero Section
======================================== */
.hero {
  padding: var(--space-2xl) 0;
  overflow: hidden;
  position: relative;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.hero-eyebrow {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-sm);
  line-height: 1.05;
}

.hero-tagline {
  font-size: 1.2rem;
  color: var(--color-accent);
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.hero-body {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 480px;
  margin-bottom: var(--space-lg);
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.hero-graphic {
  display: flex;
  justify-content: center;
  align-items: center;
}


/* Split Layout */
.split-layout {
  display: flex;
  min-height: 100vh; /* Full viewport height */
  justify-content: center; /* Center the entire layout */
}

/* Left Column - Scrollable Content */
.scrollable-content {
  flex: 0 0 500px;
  max-width: 50%;
  padding: 2rem;
  height: auto;
  overflow-y: auto;
  order: 1;
  display: flex;
  justify-content: center;
}

/* Right Column - Sticky Hero */
.sticky-hero {
  flex: 0 0 500px; /* Fixed at 400px width */
  max-width: 50%;
  height: 100vh; /* Full viewport height */
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center; /* Center the container */
  overflow-y: auto; /* Allow scrolling if content overflows */
  padding: 2rem;
  order: 2; /* Ensure it's on the right */
}

/* Container with 800px max-width */
.sticky-hero .container,
.scrollable-content .container {
  width: 100%;
  max-width: 800px; /* Set max-width to 800px */
  padding: 0 1.5rem; /* Add some padding on the sides */
  margin: 0 auto; /* Center the container */
}

/* Alternative: If you want the entire layout to be max 800px total */
.split-layout-wide {
  max-width: 800px;
  margin: 0 auto;
}


/* ========================================
   Section Header
======================================== */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.section-header h2 { font-size: 2rem; }

.section-link {
  font-size: 0.9rem;
  color: var(--color-accent);
}

.category-count {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-family: var(--font-sans);
}

.category-section + .category-section {
  border-top: 1px solid var(--color-border);
}

.skill-group h3 a {
  color: inherit;
  text-decoration: none;
}
.skill-group h3 a:hover { color: var(--color-accent); }

/* ========================================
   Project Cards
======================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-md);
}

.project-card {
  overflow: hidden;
}

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

.card-image-link { display: block; overflow: hidden; }
.card-image { 
  width: 100%; 
  object-fit: cover; 
  /* border-radius:5px; */
}

.card-placeholder {
  /* background: var(--color-surface-2); */
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--color-text-muted);
}

.card-body { 
  padding: var(--space-ms); 
}

.card-title {
  font-size: 1.2rem;
  margin: var(--space-xs) 0;
}
.card-title a { color: var(--color-text); }
.card-title a:hover { color: var(--color-accent); }

.card-description {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-links {
  display: flex;
  gap: var(--space-sm);
  font-size: 0.85rem;
}

.empty-state {
  color: var(--color-text-muted);
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-xl);
}

/* ========================================
   Tags
======================================== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 10px;
  background: rgba(240, 165, 0, 0.1);
  color: var(--color-accent);
  border: 1px solid rgba(240, 165, 0, 0.2);
}

/* ========================================
   Skills Section
======================================== */
.skills-section { background: var(--color-white); }
.skills-section h2 { margin-bottom: var(--space-lg); font-size: 2rem; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-md);
}

.skill-group {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  padding: var(--space-md);
}

.skill-group h3 {
  font-size: 1rem;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.skill-group li {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  padding: 4px 0;
  border-bottom: 1px solid var(--color-border);
}
.skill-group li:last-child { border-bottom: none; }

/* ========================================
   Page Hero
======================================== */
.page-hero {
  padding: var(--space-xl) 0 var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.page-hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: var(--space-sm); }
.page-hero p { font-size: 1.1rem; color: var(--color-text-muted); max-width: 600px; }

/* ========================================
   Project Detail
======================================== */
.project-detail { padding: var(--space-xl) 0; }

.project-header { 
  max-width: 780px; 
  margin-bottom: var(--space-lg); 
  position: relative;
  z-index: 1;
}

.back-link {
  display: inline-block;
  margin-bottom: var(--space-md);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.back-link:hover { color: var(--color-accent); }

.project-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.project-year { font-size: 0.85rem; color: var(--color-text-muted); }

.project-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: var(--space-sm) 0;
}

.project-description {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.project-links { display: flex; gap: var(--space-sm); }

.project-hero {
  overflow: hidden;
  margin-bottom: var(--space-xl);
  border: 1px solid var(--color-surface-2);
}

/* Prose / Rich Content */
.prose { max-width: 780px; }
.prose h2 { font-size: 1.7rem; margin: var(--space-lg) 0 var(--space-sm); }
.prose h3 { font-size: 1.3rem; margin: var(--space-md) 0 var(--space-xs); color: var(--color-text); }
.prose p { margin-bottom: var(--space-sm); color: var(--color-text-muted); }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: var(--space-sm); color: var(--color-text-muted); }
.prose li { margin-bottom: var(--space-xs); list-style: disc; }
.prose code {
  font-size: 0.85em;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  padding: 2px 6px;
}
.prose pre {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: var(--space-md);
  overflow-x: auto;
  margin-bottom: var(--space-sm);
}
.prose pre code { background: none; border: none; padding: 0; }

/* ========================================
   About Page
======================================== */
.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.about-image-placeholder {
  width: 100%;
  /* aspect-ratio: 1; */
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 4rem;
  color: var(--color-text-muted);
}

.about-image-wrap img {
  width: 100%;
  /* aspect-ratio: 1; */
  object-fit: cover;
  border: 1px solid var(--color-border);
}

.about-content h2 { font-size: 2rem; margin-bottom: var(--space-sm); }

.timeline { list-style: none; padding: 0; margin: var(--space-sm) 0 var(--space-lg); }
.timeline li {
  display: flex;
  flex-direction: column;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
}
.timeline li:last-child { border-bottom: none; }
.timeline-year { font-size: 0.8rem; color: var(--color-accent); font-weight: 500; margin-bottom: 2px; }

.about-actions { display: flex; gap: var(--space-sm); flex-wrap: wrap; margin-top: var(--space-lg); }

/* ========================================
   Footer
======================================== */
.site-footer {
  /* border-top: 5px solid var(--color-border); */
  padding: var(--space-2xl) 0;
  margin-top: auto;
}

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

.site-footer p { font-size: 0.85rem; color: var(--color-text-muted); }

.social-links { display: flex; gap: var(--space-md); }
.social-links a { font-size: 0.85rem; color: var(--color-text-muted); }
.social-links a:hover { color: var(--color-accent); }

/* ========================================
   Responsive
======================================== */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-graphic { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .about-image-wrap { max-width: 220px; }
}

@media (max-width: 640px) {
  .nav { display: none; }
  .nav.open { display: flex; position: fixed; inset: 68px 0 0; background: var(--color-bg); flex-direction: column; align-items: center; justify-content: center; z-index: 99; }
  .nav.open ul { flex-direction: column; align-items: center; font-size: 1.4rem; gap: var(--space-lg); }
  .nav-toggle { display: flex; }
  .section-header { flex-direction: column; gap: var(--space-xs); }
  .hero-actions { flex-direction: column; }
}


/* wavey box */
.goo-box {
  position: relative;
  isolation: isolate;
  padding: 2rem;
  --goo-color: 220 210 235; 
}

/* the blob sits behind the content */
.goo-box::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(var(--goo-color));
  border-radius: 32px;
  filter: url(#jg-goo) blur(0px);
}

/* content rides on top automatically thanks to z-index: -1 on ::before */
.goo-box > * { position: relative; }

.goo-item {
  position: relative;
  z-index: 0;
}
.goo-item::before {
  content: "";
  position: absolute;
  inset: -8%;                 /* how far the blob extends past the box */
  z-index: -1;                /* behind the box's content */
  background: rgb(var(--glow, 128 128 128));
  border-radius: 32px;
  filter: url(#jg-goo);
}
.goo-item > * { position: relative; }   /* keep the text above the blob */