/* ============================================
   Christoph Foulger — Portfolio Static Site
   Clean custom design for GitHub Pages
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700;800&family=PT+Serif:ital,wght@0,400;0,700;1,400&display=swap');

/* --- CSS Variables --- */
:root {
  --blue: #0097ff;
  --blue-dark: #0078cc;
  --text: #353738;
  --text-light: #6b7280;
  --bg: #f6f8f9;
  --white: #ffffff;
  --border: #e5e7eb;
  --card-bg: #f6f8f9;
  --heading-font: 'Nunito', sans-serif;
  --body-font: 'Nunito', 'SF Pro Rounded', sans-serif;
  --max-width: 1280px;
  --section-gap: 80px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body-font);
  color: var(--text);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.7;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }


/* --- Typography --- */
h1, h2, h3, h4, h5 {
  font-family: var(--heading-font);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-light);
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* --- Nav --- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(16px);
  border-bottom: 2px solid var(--border);
  padding: 0 32px;
  box-shadow: 0 0 10px 0 rgb(42 42 42 / 0.1);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav-logo {
  font-family: var(--heading-font);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-light);
}
.nav-logo span { color: var(--blue); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  align-items: center;
  font-family: var(--heading-font);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-light);
  padding: 6px 14px;
  border-radius: 99px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--white); background: var(--blue); text-decoration: none; }
.nav-links a.active { color: var(--blue); }
.nav-links a.active:hover { color: var(--white); }
.nav-links a.btn-outline {
  border: 1px solid var(--blue);
  color: var(--blue);
  border-radius: 99px;
  padding: 5px 16px;
}
.nav-links a.btn-outline:hover { background: var(--blue); color: var(--white); }


/* --- Hero Section (Home) --- */
.hero {
  padding: 156px 32px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.hero-eyebrow {
  font-family: var(--heading-font);
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 8px;
  line-height: 1.15;
}
.hero h1 .highlight { color: var(--blue); }
.hero h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 24px;
}
.hero .subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 720px;
  line-height: 1.75;
  margin-bottom: 36px;
}
.hero p {
  font-size: 1rem;
  color: var(--text);
  max-width: 720px;
  line-height: 1.75;
  margin-bottom: 36px;
}
.hero-ctas { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 22px;
  border-radius: 99px;
  transition: all 0.2s;
  text-decoration: none;
  cursor: pointer;
}
button.btn { border: none; }
.btn-primary { background: var(--blue); color: white; }
.btn-primary:hover { background: var(--blue-dark); color: white; text-decoration: none; }
.btn-secondary {
  border: 1px solid var(--text);
  color: var(--text);
  background: var(--white);
}
.btn-secondary:hover { background: var(--blue); border-color: var(--blue); color: white; text-decoration: none; }
.full-width { min-width: 100%; justify-content: center; }

/* --- Project Cards (Home) --- */
.projects-section { padding: 0 32px var(--section-gap); }
.projects-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 64px;
}
.project-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.project-card:hover {
  text-decoration: none;
}
.project-card.reverse { direction: rtl; }
.project-card.reverse > * { direction: ltr; }
.project-card-image { overflow: hidden; }
.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.project-card:hover .project-card-image img { transform: scale(1.07); }
.project-card-body { 
  padding: 24px 40px 24px 0;
  min-height: 100%;
  align-content: center;
}
.project-tag {
  display: inline-block;
  font-family: var(--heading-font);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}
.project-card-body h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--text);
}
.project-card-body p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
}
.project-link {
  font-family: var(--heading-font);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.project-link::after { content: '→'; }


/* --- Contact Section (Home) --- */
.contact-section {
  background: var(--text);
  color: white;
  padding: var(--section-gap) 32px;
}
.contact-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.contact-inner h2 {
  font-family: var(--heading-font);
  font-size: 2rem;
  color: white;
  margin-bottom: 12px;
}
.contact-inner p { color: #9ca3af; margin-bottom: 36px; }
.contact-form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  color: white;
  font-family: var(--body-font);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #6b7280; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--blue);
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form .btn-primary { align-self: flex-start; margin-top: 4px; }

/* --- Footer --- */
footer {
  background: #111;
  padding: 32px;
  text-align: center;
}
footer p {
  font-family: var(--heading-font);
  font-size: 0.85rem;
  color: #6b7280;
}
footer a { color: var(--blue); }

/* --- About Page --- */
.about-hero {
  padding: 64px 32px 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
  align-items: start;
}
.about-avatar img {
  width: 200px;
  height: 200px;
  border-radius: 16px;
  object-fit: cover;
}
.about-content h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 8px;
}
.about-content h1 .highlight { color: var(--blue); }
.about-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 24px;
}
.about-content p {
  color: var(--text);
  margin-bottom: 16px;
  font-size: 1rem;
}
.about-ctas { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }


/* --- Case Study / Project Pages --- */
.case-hero {
  padding: 80px 32px 60px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.case-hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.breadcrumb {
  font-family: var(--heading-font);
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb span { margin: 0 6px; }
.case-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 16px;
}
.case-hero .subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 720px;
  line-height: 1.75;
  margin-bottom: 36px;
}
.case-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  padding: 28px;
  margin-top: 36px;
  background: var(--bg);
  opacity: 0.75;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}
.meta-item label {
  display: block;
  font-family: var(--heading-font);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 4px;
}
.meta-item p {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}

/* --- Case Study Body --- */
.case-body {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 32px 32px;
  background-color: var(--white);
}
.case-section { margin-bottom: var(--section-gap); }
.section-label {
  display: inline-block;
  font-family: var(--heading-font);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.625;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 16px;
  border-bottom: 3px solid var(--blue);
}
.case-section h2 {
  font-size: 1.6rem;
  color: var(--text);
  margin-bottom: 16px;
}
.case-section h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--text);
}
.case-section p {
  color: var(--text);
  margin-bottom: 16px;
  max-width: 960px;
  font-size: 1rem;
  line-height: 1.5;
}
.case-section p.caption {
  font-size: .8rem;
  text-align: center;
  margin-top: 12px;
}
.case-section ul, .case-section ol {
  margin: 0 0 16px 20px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.5;
}
.case-section ul li, .case-section ol li { margin-bottom: 6px; }


/* --- Process steps + Outcome stats --- */
.process-steps, .stats-row {
  display: flex;
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
.process-step, .stat-item {
  flex: 1;
  min-width: 100px;
  text-align: center;
  padding: 24px 12px;
  background: var(--bg);
  font-family: var(--heading-font);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}
.process-step {
  border-right: 2px solid var(--border);
}
.process-step .step-num, .stat-item .stat-number {
 font-family: var(--heading-font);
 font-size: 1.6rem;
 font-weight: 900;
 color: var(--blue);
 display: block;
 line-height: 1;
 margin-bottom: 8px;
}
.process-step .process-label, .stat-item .stat-label {
 color: var(--text-light);
 font-family: var(--heading-font);
}
.process-step:last-child { border-right: none; }
.process-step.active { background: var(--blue); color: white; }
.process-step.active .step-num { color: rgba(255,255,255,0.7); }

/* --- Next projects (footer nav in case studies) --- */
.more-work {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 32px;
}
.more-work-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.more-work h2 {
  font-family: var(--heading-font);
  font-size: 1rem;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 24px;
}
.more-work-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.more-work-links a {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1rem;
  color: var(--blue);
  padding: 12px 24px;
  border: 1px solid var(--blue);
  border-radius: 99px;
  transition: all 0.2s;
}
.more-work-links a:hover { background: var(--blue); color: white; text-decoration: none; }

/* --- Highlight box --- */
.highlight-box {
  background: #e8f4ff;
  border-left: 4px solid var(--blue);
  padding: 20px 24px;
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
}
.highlight-box p { color: var(--text); margin: 0; font-style: italic; }


/* --- Image layouts in case studies --- */
.img-wide { 
  width: calc(100% + 64px);
  max-width: none;
  margin: 0 -32px;
  box-shadow: none; 
}
.img-full {
  width: 100vw;
  margin: 0;
  box-shadow: none;
}
img + .case-section {
  margin-top: var(--section-gap);
}
.img-grid img { box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08); }
.img-grid {
  display: grid;
  gap: 4px;
  margin: 32px 0;
}
.img-grid-2 { grid-template-columns: 1fr 1fr; }
.img-grid-3 { grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr; }
.img-noshadow { box-shadow: none !important; }
.img-scrollable { 
  max-height: 300px;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  overflow-y: scroll;
}

/* --- Two-column text + image layout --- */
.two-col-text-img {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 96px;
  margin: 32px 0 24px;
}
.two-col-text-img img {
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  width: 100%;
}
.two-col-text-img div{
  height: 100%;
  align-content: center;
}
.two-col-text-img h3:first-child,
.two-col-text-img .col-text > h3:first-child { margin-top: 0; }
.two-col-text-img p:last-child,
.two-col-text-img ul:last-child, .two-col-text-img ol:last-child { margin-bottom: 0; }
.two-col-text-img + .two-col-text-img, .img-grid + .two-col-text-img { margin-top: var(--section-gap)}
.section-label + .two-col-text-img { margin-top: 16px; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .two-col-text-img {
    grid-template-columns: 1fr;
  }
  .two-col-text-img.img-first img { order: -1; }

  .hero { padding: 60px 20px 48px; }
  .projects-section { padding: 0 20px 60px; }

  .project-card {
    grid-template-columns: 1fr;
  }
  .project-card.reverse { direction: ltr; }
  .project-card-body { padding: 24px !important; }
  .project-card-image { aspect-ratio: 16/9; }

  .about-hero {
    grid-template-columns: 1fr;
    padding: 60px 20px 40px;
    gap: 32px;
  }
  .about-avatar img { width: 140px; height: 140px; }

  .case-meta { grid-template-columns: 1fr 1fr; }
  .img-grid-2, .img-grid-3 { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }

  .case-body { padding: 40px 20px; }
  .case-hero { padding: 60px 20px 40px; }

  .contact-section { padding: 60px 20px; }
  nav { padding: 0 20px; }
  .container { padding: 0 20px; }

  .process-steps { flex-wrap: wrap; }
  .process-step { flex: 0 0 calc(50% - 1px); border-right: 1px solid var(--border); }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
  .hero h2 { font-size: 1.2rem; }
  .case-hero h1 { font-size: 1.8rem; }
  .stats-row { grid-template-columns: 1fr; }
  .nav-links a:not(.btn-outline) { display: none; }
}
