/* ============================================
   MAX RICHARDSON — DARK MODERN PORTFOLIO
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@200;300;400;500;600;700&family=Syne:wght@400;500;600;700;800&display=swap');

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

:root {
  --bg-primary: #0a0a0a;
  --bg-surface: #111111;
  --bg-elevated: #1a1a1a;
  --bg-card: #141414;
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0a0;
  --text-muted: #555555;
  --border-color: #222222;
  --border-subtle: #1a1a1a;
  --accent: #c8c8c8;
  --accent-dim: rgba(200,200,200,0.08);
  --font-heading: 'Syne', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --max-width: 800px;
  --max-width-wide: 1140px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.85;
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

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

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s ease, opacity 0.3s ease;
}
a:hover { color: var(--accent); }

::selection {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* ============================================
   FADE-IN ANIMATIONS
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-up {
  animation: fadeUp 0.8s var(--ease-out) both;
}

.fade-up-1 { animation-delay: 0.05s; }
.fade-up-2 { animation-delay: 0.12s; }
.fade-up-3 { animation-delay: 0.2s; }
.fade-up-4 { animation-delay: 0.28s; }

/* ============================================
   HEADER
   ============================================ */
.site-header {
  text-align: center;
  padding: 56px 24px 0;
}

.site-header__name {
  font-family: var(--font-heading);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.site-header__tagline {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 20px 0;
  margin-top: 28px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.site-nav a {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.site-nav a:hover { color: var(--text-primary); }

/* ============================================
   PORTFOLIO LABEL
   ============================================ */
.portfolio-label {
  text-align: center;
  margin: 48px auto 10px;
  max-width: var(--max-width);
  position: relative;
}

.portfolio-label::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 24px;
  right: 24px;
  height: 1px;
  background: var(--border-color);
}

.portfolio-label span {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-primary);
  padding: 0 18px;
  position: relative;
  z-index: 1;
}

/* ============================================
   PROJECT TITLE
   ============================================ */
.project-title {
  text-align: center;
  padding: 14px 24px 36px;
}

.project-title h1 {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  text-align: center;
  margin: 14px 0 22px;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-secondary);
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--text-muted);
  margin: 10px auto 0;
}

/* ============================================
   DIVIDERS
   ============================================ */
.divider {
  max-width: var(--max-width);
  margin: 36px auto;
  padding: 0 24px;
}
.divider hr {
  border: none;
  border-top: 1px solid var(--border-color);
}

.divider-dots {
  text-align: center;
  margin: 32px 0;
  color: var(--text-muted);
  font-size: 14px;
  letter-spacing: 1em;
}

/* ============================================
   CONTENT
   ============================================ */
.content-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   TEXT BLOCKS
   ============================================ */
.text-block {
  text-align: center;
  margin-bottom: 18px;
}
.text-block p {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.85;
  color: var(--text-secondary);
}
.text-block .label {
  font-weight: 600;
  color: var(--text-primary);
}
.text-block--left { text-align: left; }

/* ============================================
   VIDEO
   ============================================ */
.video-container {
  max-width: var(--max-width);
  margin: 0 auto 28px;
  padding: 0 24px;
}
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 6px;
}
.video-wrapper iframe,
.video-wrapper video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* ============================================
   IMAGE GRID
   ============================================ */
.image-grid {
  max-width: var(--max-width);
  margin: 0 auto 14px;
  padding: 0 24px;
  display: grid;
  gap: 8px;
}
.image-grid--2col { grid-template-columns: 1fr 1fr; }
.image-grid--3col { grid-template-columns: 1fr 1fr 1fr; }
.image-grid--1col { grid-template-columns: 1fr; }
.image-grid img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.image-placeholder {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 24px;
}

/* ============================================
   WORKFLOW LIST
   ============================================ */
.workflow-list {
  max-width: var(--max-width);
  margin: 0 auto 28px;
  padding: 0 24px;
  text-align: left;
}
.workflow-list > p {
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.workflow-list ol {
  list-style: none;
  padding-left: 0;
  counter-reset: step;
}
.workflow-list ol li {
  counter-increment: step;
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.8;
  font-weight: 300;
  color: var(--text-secondary);
  padding-left: 32px;
  position: relative;
}
.workflow-list ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.workflow-list ol li strong {
  font-weight: 600;
  color: var(--text-primary);
}

/* ============================================
   INSIGHT LIST
   ============================================ */
.insight-list {
  max-width: var(--max-width);
  margin: 0 auto 28px;
  padding: 0 24px;
  text-align: left;
}
.insight-list ul {
  list-style: none;
  padding-left: 0;
}
.insight-list ul li {
  margin-bottom: 14px;
  font-size: 15px;
  line-height: 1.8;
  font-weight: 300;
  color: var(--text-secondary);
  padding-left: 18px;
  position: relative;
}
.insight-list ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
}
.insight-list ul li strong {
  font-weight: 600;
  color: var(--text-primary);
}

/* ============================================
   IMPACT BLOCK
   ============================================ */
.impact-block {
  max-width: var(--max-width);
  margin: 0 auto 20px;
  padding: 20px 24px;
}
.impact-block p {
  font-size: 14px;
  line-height: 1.85;
  font-weight: 300;
  color: var(--text-secondary);
  padding: 18px 24px;
  background: var(--bg-surface);
  border-left: 2px solid var(--text-muted);
  border-radius: 0 4px 4px 0;
}
.impact-block strong {
  font-weight: 600;
  color: var(--text-primary);
}

/* ============================================
   MEDIUMS BLOCK
   ============================================ */
.mediums-block {
  text-align: center;
  margin: 24px auto;
  max-width: var(--max-width);
  padding: 0 24px;
}
.mediums-block h3 {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 14px;
}
.mediums-block h3::after {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--text-muted);
  margin: 10px auto 0;
}
.mediums-block .roles {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.mediums-block .tools {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.mediums-block .ownership {
  font-size: 13px;
  font-weight: 300;
  font-style: italic;
  color: var(--text-muted);
}

/* ============================================
   RELATED PROJECTS
   ============================================ */
.related-projects {
  max-width: var(--max-width-wide);
  margin: 48px auto;
  padding: 0 24px;
  text-align: center;
}
.related-projects__label {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.related-projects__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.related-card {
  text-align: center;
  display: block;
  transition: transform 0.4s var(--ease-out);
}
.related-card:hover {
  transform: translateY(-4px);
  opacity: 1;
}
.related-card__image {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 300;
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.3s ease;
}
.related-card:hover .related-card__image {
  border-color: #333;
}
.related-card__image img {
  width: 100%; height: 100%; object-fit: cover;
}
.related-card__title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
  transition: color 0.3s ease;
}
.related-card:hover .related-card__title {
  color: var(--text-primary);
}

/* ============================================
   POST NAV
   ============================================ */
.post-nav {
  max-width: var(--max-width);
  margin: 36px auto;
  padding: 0 24px;
}
.post-nav a {
  display: inline-block;
  padding: 14px 20px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.post-nav a:hover {
  border-color: #333;
  background: var(--bg-surface);
  opacity: 1;
}
.post-nav__label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
}
.post-nav__title {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  display: block;
  margin-top: 4px;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  margin-top: 48px;
  padding: 24px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.site-footer a { color: var(--text-muted); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .related-projects__grid { grid-template-columns: 1fr 1fr; }
  .image-grid--2col, .image-grid--3col { grid-template-columns: 1fr; }
  .site-nav { gap: 22px; flex-wrap: wrap; }
  .site-header__name { font-size: 28px; }
  .site-footer { flex-direction: column; gap: 8px; text-align: center; }
}
@media (max-width: 480px) {
  .related-projects__grid { grid-template-columns: 1fr; }
  .site-header__name { font-size: 24px; }
  .project-title h1 { font-size: 22px; }
  .site-nav { gap: 16px; }
}
