/* ===================================================
   Roozbeh Lali — Portfolio
   Clean, modern, light design system
   =================================================== */

/* --- Design Tokens --- */
:root {
  --color-bg: #fafaf9;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-secondary: #5c5c5c;
  --color-text-tertiary: #8a8a8a;
  --color-border: #e8e8e6;
  --color-border-light: #f0f0ee;
  --color-accent: #2563eb;
  --color-accent-soft: #eff6ff;
  --color-accent-hover: #1d4ed8;
  --color-warm: #f5f0eb;
  --color-warm-dark: #e8dfd6;

  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;

  --max-width: 1080px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-sm: 8px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);

  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* --- Utility --- */
.container {
  width: min(calc(100% - 2.5rem), var(--max-width));
  margin: 0 auto;
}

/* --- Typography --- */
h1, h2, h3 {
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
}

h1 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  max-width: 24ch;
}

h3 {
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 249, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border-light);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 0;
}

.brand {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.brand-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--color-text);
  background: rgba(0,0,0,0.04);
}

.nav-links a.active {
  color: var(--color-text);
  background: rgba(0,0,0,0.06);
}

/* --- Nav Dropdowns --- */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: color 0.2s, background 0.2s;
}

.nav-dropdown-toggle:hover,
.nav-dropdown:hover .nav-dropdown-toggle {
  color: var(--color-text);
  background: rgba(0,0,0,0.04);
}

.dropdown-chevron {
  transition: transform 0.2s var(--ease);
  flex-shrink: 0;
}

.nav-dropdown:hover .dropdown-chevron,
.nav-dropdown.open .dropdown-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 50%;
  transform: translateX(-50%);
  min-width: 160px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-6px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
  z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
  display: block;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
  color: var(--color-text);
  background: rgba(0,0,0,0.04);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-text);
  color: var(--color-bg);
}

.btn-primary:hover {
  background: #333;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
}

.btn-outline:hover {
  border-color: var(--color-text-tertiary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background: none;
  color: var(--color-text-secondary);
  padding: 0.75rem 0.5rem;
}

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

/* --- Hero --- */
.hero {
  padding: 6rem 0 4rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 4rem;
  align-items: center;
  margin-bottom: 3rem;
}

.hero-photo {
  flex-shrink: 0;
}

.headshot-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
}

.hero-label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-tertiary);
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
}

.hero h1 {
  margin-bottom: 1.75rem;
  max-width: 16ch;
}

.hero-sub {
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
  max-width: 56ch;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.hero-companies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border-light);
}

.company-tag {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-text-tertiary);
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
}

/* --- Sections --- */
section {
  padding: 5rem 0;
}

.section-header {
  margin-bottom: 3rem;
}

.section-label {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.section-header p.section-desc {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  max-width: 58ch;
  margin-top: 1rem;
  line-height: 1.7;
}

/* --- Card Grid --- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

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

.card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-warm);
  border-radius: 10px;
  margin-bottom: 1.25rem;
  color: var(--color-text);
}

.card h3 {
  margin-bottom: 0.6rem;
}

.card p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* --- Impact --- */
.impact-grid {
  display: grid;
  gap: 0;
}

.impact-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border-light);
}

.impact-item:first-child {
  padding-top: 0;
}

.impact-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.impact-marker {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 0.55rem;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.35);
  border: 1.5px solid rgba(37, 99, 235, 0.5);
}

.impact-item p {
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.65;
}

/* --- Steps / Approach --- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.step {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  position: relative;
}

.step-num {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 500;
  color: var(--color-border);
  line-height: 1;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

.step h3 {
  margin-bottom: 0.6rem;
}

.step p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* --- Timeline / Experience --- */
.timeline {
  display: grid;
  gap: 1.25rem;
}

.role {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
}

.role-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.role-header h3 {
  margin-bottom: 0;
}

.role-date {
  font-size: 0.88rem;
  color: var(--color-text-tertiary);
  font-weight: 500;
}

.role-title {
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.85rem;
}

.role p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.role-tags span {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-text-tertiary);
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg);
}

/* --- Resumes --- */
.resume-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.resume-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease), border-color 0.3s;
}

.resume-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--color-text-tertiary);
}

.resume-type {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.resume-card p {
  color: var(--color-text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}

.resume-action {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-accent);
  transition: color 0.2s;
}

.resume-card:hover .resume-action {
  color: var(--color-accent-hover);
}

/* --- Contact --- */
#contact {
  padding-bottom: 2rem;
}

.contact-box {
  background: var(--color-warm);
  border-radius: var(--radius-lg);
  padding: 4rem 3rem;
  text-align: center;
}

.contact-box h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
  margin: 0 auto 0.75rem;
  max-width: none;
}

.contact-box p {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  max-width: 48ch;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* --- Footer --- */
.footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--color-border-light);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--color-text-tertiary);
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
}

.footer-nav a {
  color: var(--color-text-tertiary);
  transition: color 0.2s;
}

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

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.grid-3 .card:nth-child(2),
.steps .step:nth-child(2) {
  transition-delay: 0.08s;
}

.grid-3 .card:nth-child(3),
.steps .step:nth-child(3) {
  transition-delay: 0.16s;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(250, 250, 249, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    padding: 0.75rem 1.25rem 1rem;
    gap: 0.15rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.65rem 0.75rem;
    width: 100%;
  }

  /* Mobile dropdowns */
  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
  }

  .nav-dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--color-border);
    border-radius: 0;
    padding: 0.25rem 0 0.25rem 0.75rem;
    margin-left: 0.75rem;
    display: none;
    background: transparent;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    display: flex;
  }

  .nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-inner {
    position: relative;
  }

  .hero {
    padding: 3.5rem 0 2.5rem;
  }

  section {
    padding: 3rem 0;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-photo {
    order: -1;
    max-width: 260px;
    margin: 0 auto;
  }

  .grid-3,
  .steps {
    grid-template-columns: 1fr;
  }

  .resume-grid {
    grid-template-columns: 1fr;
  }

  .contact-box {
    padding: 2.5rem 1.5rem;
  }

  .role-header {
    flex-direction: column;
    gap: 0.2rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.1rem;
  }

  h2 {
    font-size: 1.4rem;
  }
}

/* --- Stats Strip --- */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 1.75rem 0 2rem;
  border-top: 1px solid var(--color-border-light);
}

.stat-item {
  padding: 0 1.5rem;
  border-right: 1px solid var(--color-border-light);
}

.stat-item:first-child {
  padding-left: 0;
}

.stat-item:last-child {
  border-right: none;
}

.stat-item strong {
  display: block;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--color-text);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-item span {
  font-size: 0.82rem;
  color: var(--color-text-tertiary);
  line-height: 1.35;
}

/* --- Logos Strip --- */
.logos-strip {
  border-top: 1px solid var(--color-border-light);
  padding: 1.75rem 2rem;
  text-align: center;
}

.logos-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-tertiary);
  margin-bottom: 1.25rem;
  text-align: center;
}

.logos-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 3.5rem;
}

.logo-img {
  height: 32px;
  width: auto;
  display: block;
  opacity: 0.4;
  transition: opacity 0.2s;
}

.logo-img:hover {
  opacity: 0.7;
}

.logo-wordmark {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-tertiary);
  opacity: 0.5;
  letter-spacing: -0.02em;
}

@media (max-width: 768px) {
  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem 0;
  }

  .stat-item {
    border-right: none;
    padding: 0 0.75rem;
  }

  .stat-item:nth-child(odd) {
    padding-left: 0;
    border-right: 1px solid var(--color-border-light);
  }

  .stat-item:nth-child(even) {
    padding-right: 0;
  }
}

/* ===================================================
   Inner Pages — Case Studies, Blog, Skills
   =================================================== */

/* --- Back link --- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 2.5rem;
  padding: 0.4rem 0;
  transition: color 0.2s;
}

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

/* --- Page hero (inner pages) --- */
.page-hero {
  padding: 4rem 0 2rem;
  border-bottom: 1px solid var(--color-border-light);
  margin-bottom: 4rem;
}

.page-title {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  font-family: var(--font-serif);
  font-style: italic;
  margin-top: 0.5rem;
}

/* --- Case studies grid --- */
.case-studies-list {
  padding-bottom: 6rem;
}

.cs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.cs-card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.cs-card:hover {
  border-color: var(--color-text-tertiary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.cs-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: -0.015em;
}

.cs-summary {
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.cs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.cs-tags span,
.post-tags span,
.role-tags span {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-text-tertiary);
  background: var(--color-border-light);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.cs-action {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
}

/* --- Individual case study --- */
.case-study-page {
  padding: 3rem 0 6rem;
}

.cs-header {
  padding: 2rem 0 3rem;
  border-bottom: 1px solid var(--color-border-light);
  margin-bottom: 3rem;
}

.cs-header h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  margin-bottom: 1rem;
}

.cs-lead {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
  max-width: 60ch;
  margin-bottom: 1.5rem;
}

.cs-footer {
  display: flex;
  gap: 1rem;
  padding-top: 3rem;
  border-top: 1px solid var(--color-border-light);
  margin-top: 3rem;
}

/* --- Blog list --- */
.blog-list {
  padding-bottom: 6rem;
}

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-card {
  display: block;
  padding: 2rem 0;
  border-bottom: 1px solid var(--color-border-light);
  transition: opacity 0.2s;
}

.post-card:hover {
  opacity: 0.8;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--color-text-tertiary);
  margin-bottom: 0.65rem;
}

.read-time {
  color: var(--color-text-tertiary);
}

.post-title {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.post-summary {
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 60ch;
  margin-bottom: 0.85rem;
}

/* --- Individual blog post --- */
.blog-post-page {
  padding: 3rem 0 6rem;
}

.post-header {
  padding: 2rem 0 3rem;
  border-bottom: 1px solid var(--color-border-light);
  margin-bottom: 3rem;
}

.post-header h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  margin: 0.5rem 0 1rem;
}

.post-lead {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
  max-width: 60ch;
  margin-bottom: 1.5rem;
}

.post-footer {
  display: flex;
  gap: 1rem;
  padding-top: 3rem;
  border-top: 1px solid var(--color-border-light);
  margin-top: 3rem;
}

/* --- Prose (markdown content) --- */
.prose {
  max-width: 68ch;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text);
}

.prose h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.02em;
}

.prose h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}

.prose p {
  margin-bottom: 1.25rem;
}

.prose ul, .prose ol {
  margin: 1rem 0 1.25rem 1.5rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose strong {
  font-weight: 600;
}

.prose a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose code {
  font-size: 0.88em;
  background: var(--color-border-light);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.prose pre {
  background: var(--color-text);
  color: var(--color-bg);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.88rem;
  line-height: 1.6;
}

.prose pre code {
  background: none;
  padding: 0;
}

.prose blockquote {
  border-left: 3px solid var(--color-border);
  padding-left: 1.25rem;
  color: var(--color-text-secondary);
  font-style: italic;
  margin: 1.5rem 0;
}

.prose img {
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  margin: 2rem 0;
  max-width: 100%;
}

/* --- Skills page --- */
.skills-content {
  padding-bottom: 6rem;
}

.skills-group {
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--color-border-light);
}

.skills-group:last-child {
  border-bottom: none;
}

.skills-group-title {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-tertiary);
  margin-bottom: 1.75rem;
  max-width: none;
}

.skills-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.skill-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.skill-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.skill-card p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

.skill-card--featured {
  border-color: var(--color-accent-soft);
  background: var(--color-accent-soft);
}

.skill-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.skill-btn {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  padding: 0.55rem 1.1rem;
}

@media (max-width: 768px) {
  .cs-grid,
  .skills-cards {
    grid-template-columns: 1fr;
  }

  .cs-footer,
  .post-footer {
    flex-direction: column;
  }

  .page-hero {
    padding: 2.5rem 0 1.5rem;
    margin-bottom: 2.5rem;
  }
}

/* ===================================================
   Skills Page — Section Backgrounds + Logo Layout
   =================================================== */

.skills-section {
  padding: 4rem 0;
}

.skills-section--default {
  background: var(--color-bg);
}

.skills-section--warm {
  background: var(--color-warm);
}

.skills-section--subtle {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
}

.skills-section--accent {
  background: var(--color-accent-soft);
}

.skills-group-header {
  margin-bottom: 1.75rem;
}

.skill-card-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.skill-logo {
  flex-shrink: 0;
  opacity: 0.7;
}

.skill-logo--text {
  width: 28px;
  height: 28px;
  background: var(--color-border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-text-tertiary);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.skills-cards--wide {
  grid-template-columns: 1fr;
  max-width: 560px;
}

/* Remove old bottom border from skills-group since sections handle spacing now */
.skills-section .skills-group {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.skill-card p {
  text-align: left;
}

/* --- LinkedIn button --- */
.btn-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-linkedin svg {
  flex-shrink: 0;
}

/* --- Case study / blog footer CTA group --- */
.cs-footer-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
