/* ==========================================================================
   Portfolio — Becca Schutzius
   ========================================================================== */

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

:root {
  --color-bg: #ffffff;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-red: #c4363a;
  --color-red-dark: #a82d30;
  --color-red-light: #ecd0d1;
  --color-border: #e0e0e0;
  --color-card-bg: #f7f7f7;
  --color-section-bg: #fafafa;
  --color-footer-bg: #2c2c2c;
  --font-sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-script: "Lora", Georgia, serif;
  --max-width: 1100px;
  --nav-height: 60px;
}

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

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Sticky-footer pattern: make body fill the viewport and let main grow so
     the footer always sits at the bottom even on short pages. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh; /* progressive enhancement for mobile browser chrome */
}

html {
  /* Match body to viewport so no white space leaks through above body. */
  min-height: 100vh;
  min-height: 100dvh;
}

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

footer {
  flex-shrink: 0;
}

a {
  color: #1d6fa4;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #155a87;
}

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

ul {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-script);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p {
  margin-bottom: 1rem;
}

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

.section {
  padding: 4rem 0;
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}

.nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.nav__logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav__logo:hover {
  color: var(--color-text-light);
}

.nav__links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav__links a {
  color: var(--color-text);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: 2px;
  transition: color 0.2s;
}

.nav__links a:hover,
.nav__links a.active {
  color: #1d6fa4;
  font-weight: 700;
}

/* --- Light Nav Variant (homepage) --- */
.nav--light {
  background: var(--color-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.nav--light .nav__logo {
  color: var(--color-text);
  font-size: 1.4rem;
  letter-spacing: 0.04em;
}

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

.nav--light .nav__links a {
  color: var(--color-text);
  font-size: 0.8rem;
  font-weight: 500;
}

.nav--light .nav__links a:hover,
.nav--light .nav__links a.active {
  color: #1d6fa4;
  font-weight: 700;
}

.nav--light .nav__toggle span {
  background: var(--color-text);
}

/* Mobile nav toggle */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

/* --- Hero (homepage) --- */
.hero {
  padding: 5rem 0 3rem;
}

.hero__subtitle {
  color: var(--color-red);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  max-width: 700px;
}

.hero p {
  color: var(--color-text-light);
  font-size: 1.15rem;
  max-width: 600px;
  line-height: 1.7;
}

/* --- Project Cards --- */
.projects {
  padding: 2rem 0 5rem;
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

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

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

.project-card h3 {
  margin-bottom: 0.75rem;
}

.project-card h3 a {
  color: var(--color-text);
}

.project-card h3 a:hover {
  color: var(--color-red);
}

.project-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
  flex: 1;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.tag {
  background: #d6eaf8;
  color: #1d6fa4;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
}

/* --- Portfolio Image Grid (homepage) --- */
/* --- Home Intro --- */
.home-intro {
  padding: 5rem 0 4.5rem;
  background: linear-gradient(180deg, #f3ebe1 0%, #f8f1e6 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  margin-bottom: 2rem;
}

.home-intro__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 4rem;
  align-items: center;
}

.home-intro__eyebrow {
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 0.75rem;
}

.home-intro__headline {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  max-width: 620px;
}

.home-intro__body {
  color: var(--color-text-light);
  font-size: 1.15rem;
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 1.5rem;
}

.home-intro__link {
  display: inline-block;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1a1a1a;
  background: transparent;
  text-decoration: none;
  padding: 0.85rem 2.5rem;
  border: 2px solid #1a1a1a;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.home-intro__link:hover {
  background: #1a1a1a;
  color: #ffffff;
}

.home-intro__photo-wrap {
  display: flex;
  justify-content: center;
}

.home-intro__photo {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  background: var(--color-card-bg);
}

.home-intro__work-heading {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 1.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.portfolio-grid {
  padding: 2.5rem 0 4rem;
}

.portfolio-grid__items {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(0, auto);
  gap: 1.5rem;
}

.portfolio-grid__item {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1/1;
  border-radius: 16px;
  overflow: hidden;
  padding: 1.75rem;
  background: #f7f5f0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Per-project colored card backgrounds — each card uses the theme color
   of its corresponding case study page. */
.portfolio-grid__item--blue   { background: #1d6fa4; }
.portfolio-grid__item--teal   { background: #0d9488; }
.portfolio-grid__item--purple { background: #6d3fa0; }
.portfolio-grid__item--orange { background: #f97316; }
.portfolio-grid__item--indigo { background: #4338ca; }
.portfolio-grid__item--red    { background: #c4363a; }
.portfolio-grid__item--green  { background: #6ab04c; }

/* Varied widths create visual rhythm; aspect ratios stay close to the
   source images (most are square) so screenshots aren't cropped. */
.portfolio-grid__item:nth-child(1) { grid-column: span 4; aspect-ratio: 16/11; }
.portfolio-grid__item:nth-child(2) { grid-column: span 2; aspect-ratio: 1/1; }
.portfolio-grid__item:nth-child(3) { grid-column: span 3; aspect-ratio: 4/3; }
.portfolio-grid__item:nth-child(4) { grid-column: span 3; aspect-ratio: 4/3; }
.portfolio-grid__item:nth-child(5) { grid-column: span 2; aspect-ratio: 1/1; }
.portfolio-grid__item:nth-child(6) { grid-column: span 4; aspect-ratio: 16/11; }
.portfolio-grid__item:nth-child(7) { grid-column: span 6; aspect-ratio: 21/9; }

/* Preserve the top of each thumbnail so titles/nav are always visible */
.portfolio-grid__img {
  object-position: top;
}

/* Hover caption — slides up from the bottom on hover with an opaque white
   panel showing the project name + short blurb. */
.portfolio-grid__item {
  position: relative;
}

.portfolio-grid__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  pointer-events: none;
}

.portfolio-grid__item:hover .portfolio-grid__caption,
.portfolio-grid__item:focus-visible .portfolio-grid__caption {
  transform: translateY(0);
}

.portfolio-grid__caption-title {
  font-family: var(--font-script);
  font-size: 1.4rem;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
  line-height: 1.15;
}

.portfolio-grid__caption-desc {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: #555;
  line-height: 1.45;
}

.portfolio-grid__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.portfolio-grid__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* Image placeholder cards for portfolio grid */
.portfolio-grid__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  padding: 1.5rem;
}

.portfolio-grid__placeholder--red { background: #c0392b; }
.portfolio-grid__placeholder--green { background: #6ab04c; }
.portfolio-grid__placeholder--purple { background: #9b59b6; }
.portfolio-grid__placeholder--yellow { background: #f1c40f; color: var(--color-text); }
.portfolio-grid__placeholder--teal { background: #1abc9c; }
.portfolio-grid__placeholder--slate { background: #5d6d7e; }
.portfolio-grid__placeholder--navy { background: #2c3e50; }

/* --- Light Footer Variant (homepage) --- */
.footer--light {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
}

/* Note: the homepage uses .footer--light, but we're now styling all
   footers with the dark background. These rules are intentionally a
   no-op so the base .footer + .footer__links rules apply. */

/* ==========================================================================
   Case Study Page
   ========================================================================== */

/* --- Case Study Banner --- */
.cs-banner {
  background: var(--color-red);
  color: #ffffff;
  padding: 3rem 0;
}

.cs-banner--green {
  background: #6ab04c;
}

/* --- Green theme overrides --- */
.cs-theme-green .cs-process__step--research {
  background: #6ab04c;
}

.cs-theme-green .cs-process__step--iterate {
  background: #7ec860;
}

.cs-theme-green .cs-process__step--deliver {
  background: #5a9e3e;
}

.cs-theme-green .cs-section-title--with-line h2::after {
  background: #6ab04c;
}

.cs-theme-green .cs-back-btn a {
  background: transparent;
  color: #6ab04c;
  border-color: #6ab04c;
}

.cs-theme-green .cs-back-btn a:hover {
  background: #6ab04c;
  color: #ffffff;
}

/* --- Blue theme (Document View) --- */
.cs-banner--blue {
  background: #1d6fa4;
}

.cs-theme-blue .cs-process__step--research {
  background: #1d6fa4;
}

.cs-theme-blue .cs-process__step--iterate {
  background: #2583c0;
}

.cs-theme-blue .cs-process__step--deliver {
  background: #155a87;
}

.cs-theme-blue .cs-section-title--with-line h2::after {
  background: #1d6fa4;
}

.cs-theme-blue .cs-back-btn a {
  background: transparent;
  color: #1d6fa4;
  border-color: #1d6fa4;
}

.cs-theme-blue .cs-back-btn a:hover {
  background: #1d6fa4;
  color: #ffffff;
}

/* --- Purple theme (Customization Builder) --- */
.cs-banner--purple {
  background: #6d3fa0;
}

.cs-theme-purple .cs-process__step--research {
  background: #6d3fa0;
}

.cs-theme-purple .cs-process__step--iterate {
  background: #8250b8;
}

.cs-theme-purple .cs-process__step--deliver {
  background: #573286;
}

.cs-theme-purple .cs-section-title--with-line h2::after {
  background: #6d3fa0;
}

.cs-theme-purple .cs-back-btn a {
  background: transparent;
  color: #6d3fa0;
  border-color: #6d3fa0;
}

.cs-theme-purple .cs-back-btn a:hover {
  background: #6d3fa0;
  color: #ffffff;
}

/* --- Teal theme (Checklists) --- */
.cs-banner--teal {
  background: #0d9488;
}

.cs-theme-teal .cs-process__step--research {
  background: #0d9488;
}

.cs-theme-teal .cs-process__step--iterate {
  background: #14b8aa;
}

.cs-theme-teal .cs-process__step--deliver {
  background: #0a7a70;
}

.cs-theme-teal .cs-section-title--with-line h2::after {
  background: #0d9488;
}

.cs-theme-teal .cs-back-btn a {
  background: transparent;
  color: #0d9488;
  border-color: #0d9488;
}

.cs-theme-teal .cs-back-btn a:hover {
  background: #0d9488;
  color: #ffffff;
}

/* --- Orange theme (Markup Tools) --- */
.cs-banner--orange {
  background: #f97316;
}

.cs-theme-orange .cs-process__step--research {
  background: #f97316;
}

.cs-theme-orange .cs-process__step--iterate {
  background: #fb923c;
}

.cs-theme-orange .cs-process__step--deliver {
  background: #ea580c;
}

.cs-theme-orange .cs-section-title--with-line h2::after {
  background: #f97316;
}

.cs-theme-orange .cs-back-btn a {
  background: transparent;
  color: #f97316;
  border-color: #f97316;
}

.cs-theme-orange .cs-back-btn a:hover {
  background: #f97316;
  color: #ffffff;
}

/* --- Indigo theme (Task Management) --- */
.cs-banner--indigo {
  background: #4338ca;
}

.cs-theme-indigo .cs-process__step--research {
  background: #4338ca;
}

.cs-theme-indigo .cs-process__step--iterate {
  background: #5b50d6;
}

.cs-theme-indigo .cs-process__step--deliver {
  background: #352da8;
}

.cs-theme-indigo .cs-section-title--with-line h2::after {
  background: #4338ca;
}

.cs-theme-indigo .cs-back-btn a {
  background: transparent;
  color: #4338ca;
  border-color: #4338ca;
}

.cs-theme-indigo .cs-back-btn a:hover {
  background: #4338ca;
  color: #ffffff;
}

/* --- Before/After Comparison --- */
.cs-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

.cs-comparison__side {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cs-comparison__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-light);
}

/* --- Numbered Findings Grid --- */
.cs-findings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 1.5rem 0 2rem;
}

.cs-finding {
  display: flex;
  gap: 0.75rem;
  align-items: start;
}

.cs-finding__number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-border);
  line-height: 1;
  flex-shrink: 0;
}

.cs-finding p {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.6;
  margin-bottom: 0;
}

/* --- Feature cards (side-by-side text + image) --- */
.cs-feature-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--color-border);
  align-items: start;
}

.cs-feature-card--reverse {
  direction: rtl;
}

.cs-feature-card--reverse > * {
  direction: ltr;
}

.cs-feature-card h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.cs-feature-card p {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

.cs-banner h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.cs-banner p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0;
}

/* --- Case Study Info (Company Details / Team) --- */
.cs-info {
  padding: 3rem 0;
  border-bottom: 1px solid var(--color-border);
}

.cs-info__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.cs-info__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.cs-info__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.cs-info__logo-img {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.cs-info__logo-name {
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text);
}

.cs-info p,
.cs-info li {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

.cs-info ul {
  list-style: disc;
  padding-left: 1.25rem;
}

.cs-info li {
  margin-bottom: 0.25rem;
}

/* --- Case Study Section Headers (script font) --- */
.cs-section-title {
  text-align: center;
  padding: 3rem 0 2rem;
}

.cs-section-title h2 {
  font-family: var(--font-script);
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--color-text);
}

.cs-section-title--with-line h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.cs-section-title--with-line h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: var(--color-red);
}

/* --- Process Steps --- */
.cs-process {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding: 1rem 0 3rem;
  flex-wrap: wrap;
}

.cs-process__step {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
  padding: 1rem;
  line-height: 1.4;
}

.cs-process__step--research {
  background: var(--color-red);
}

.cs-process__step--iterate {
  background: #e05a4e;
}

.cs-process__step--deliver {
  background: #d4726a;
}

/* --- Case Study Content Blocks --- */
.cs-block {
  padding: 2rem 0;
}

.cs-block__heading {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.cs-block__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.cs-block__row--wide-right {
  grid-template-columns: 2fr 3fr;
}

.cs-block__row--wide-left {
  grid-template-columns: 3fr 2fr;
}

.cs-block p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.8;
}

.cs-block ul {
  list-style: disc;
  padding-left: 1.25rem;
}

.cs-block li {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.7;
  margin-bottom: 0.35rem;
}

/* --- Image Placeholders --- */
.img-placeholder {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 0.8rem;
  font-style: italic;
  border-radius: 4px;
  overflow: hidden;
}

.img-placeholder--sm {
  height: 120px;
}

.img-placeholder--md {
  height: 200px;
}

.img-placeholder--lg {
  height: 300px;
}

.img-placeholder--xl {
  height: 400px;
}

.img-placeholder--auto {
  min-height: 150px;
  aspect-ratio: 16/10;
}

/* --- Icon Row (tools used) --- */
.cs-tools {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.cs-tools__item {
  width: 80px;
  height: 80px;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--color-text-light);
  text-align: center;
  padding: 0.5rem;
}

/* --- Full-width Image Block --- */
.cs-full-image {
  padding: 2rem 0;
}

.cs-full-image .img-placeholder {
  width: 100%;
}

/* --- Multiple Image Grid --- */
.cs-image-grid {
  display: grid;
  gap: 1rem;
  padding: 1rem 0;
}

.cs-image-grid--2 {
  grid-template-columns: 1fr 1fr;
}

.cs-image-grid--3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.cs-image-grid--4 {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

/* --- Feature Highlight --- */
.cs-feature {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.cs-feature__heading {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.cs-feature p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.8;
}

/* --- Challenge Section --- */
.cs-challenge {
  padding: 2rem 0 3rem;
}

.cs-challenge h3 {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.cs-challenge p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.8;
  max-width: 800px;
}

/* --- Back to Projects Button --- */
.cs-back-btn {
  display: block;
  text-align: center;
  padding: 3rem 0;
}

.cs-back-btn a {
  display: inline-block;
  background: transparent;
  color: var(--color-red);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.85rem 2.5rem;
  border: 2px solid var(--color-red);
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.cs-back-btn a:hover {
  background: var(--color-red);
  color: #ffffff;
}

/* --- Takeaways Section --- */
.cs-takeaways {
  padding: 2rem 0;
}

.cs-takeaways h3 {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.cs-takeaways p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.8;
  max-width: 900px;
}

/* ==========================================================================
   About Page
   ========================================================================== */
.about {
  padding: 4rem 0 5rem;
}

.about__content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: start;
}

.about__photo {
  width: 100%;
  border-radius: 4px;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--color-card-bg);
}

.about__photo-placeholder {
  width: 100%;
  border-radius: 4px;
  aspect-ratio: 1;
  background: var(--color-card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 0.9rem;
  border: 1px solid var(--color-border);
}

.about__text h1 {
  margin-bottom: 1.5rem;
}

.about__text p {
  color: var(--color-text-light);
  font-size: 1.05rem;
  line-height: 1.8;
}

.about__values {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.about__value {
  padding: 1.25rem;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 4px;
}

.about__value h4 {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.about__value p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* ==========================================================================
   Resume Page
   ========================================================================== */
.resume {
  padding: 4rem 0 5rem;
}

.resume__header {
  margin-bottom: 3rem;
}

.resume__header h1 {
  margin-bottom: 0.5rem;
}

.resume__header p {
  color: var(--color-text-light);
  font-size: 1.05rem;
}

.resume__contact {
  margin-top: 0.75rem;
  font-size: 0.95rem !important;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.resume__contact a {
  color: #1d6fa4;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.resume__contact a:hover {
  border-bottom-color: #1d6fa4;
}

.resume__contact span {
  color: var(--color-text-light);
}

.resume__section {
  margin-bottom: 3rem;
}

.resume__section h2 {
  font-family: var(--font-script);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--color-text);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.resume__entry {
  margin-bottom: 2rem;
  padding-left: 1.25rem;
  border-left: 3px solid var(--color-border);
}

.resume__entry:last-child {
  margin-bottom: 0;
}

.resume__entry h3 {
  font-size: 1.1rem;
  margin-bottom: 0.15rem;
}

.resume__entry .company {
  color: #1d6fa4;
  font-weight: 600;
  font-size: 0.95rem;
}

.resume__entry .dates {
  color: var(--color-text-light);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.resume__entry ul {
  list-style: disc;
  padding-left: 1.25rem;
}

.resume__entry li {
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0.35rem;
}

.resume__entry-lead {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.resume__entry-lead a {
  color: #1d6fa4;
  text-decoration: underline;
}

.resume__skills-group {
  margin-bottom: 1.25rem;
}

.resume__skills-group:last-child {
  margin-bottom: 0;
}

.resume__skills-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
}

.resume__skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: var(--color-footer-bg);
  padding: 2rem 0;
  text-align: center;
}

.footer p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.footer__links a {
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  padding-bottom: 2px;
  transition: border-color 0.15s ease;
}

.footer__links a:hover {
  border-bottom-color: #ffffff;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Medium screens: simplify varied portfolio grid to a tighter 4-col pattern */
@media (max-width: 1100px) {
  .portfolio-grid__items {
    grid-template-columns: repeat(4, 1fr);
  }

  .portfolio-grid__item:nth-child(1) { grid-column: span 4; aspect-ratio: 16/9; }
  .portfolio-grid__item:nth-child(2) { grid-column: span 2; aspect-ratio: 4/3; }
  .portfolio-grid__item:nth-child(3) { grid-column: span 2; aspect-ratio: 4/3; }
  .portfolio-grid__item:nth-child(4) { grid-column: span 2; aspect-ratio: 4/3; }
  .portfolio-grid__item:nth-child(5) { grid-column: span 2; aspect-ratio: 4/3; }
  .portfolio-grid__item:nth-child(6) { grid-column: span 4; aspect-ratio: 16/9; }
  .portfolio-grid__item:nth-child(7) { grid-column: span 4; aspect-ratio: 21/9; }

  .home-intro__grid {
    grid-template-columns: 1.4fr 1fr;
    gap: 2.5rem;
  }

  .home-intro__headline {
    font-size: 2.25rem;
  }
}

@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1rem;
    border-top: 1px solid var(--color-border);
  }

  .nav__links.open {
    display: flex;
  }

  .nav__toggle {
    display: block;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .home-intro {
    padding: 3rem 0 1.5rem;
  }

  .home-intro__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .home-intro__headline {
    font-size: 2rem;
    margin-left: auto;
    margin-right: auto;
  }

  .home-intro__body {
    margin-left: auto;
    margin-right: auto;
  }

  .home-intro__photo-wrap {
    order: -1;
  }

  .home-intro__photo {
    max-width: 200px;
  }

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

  .portfolio-grid__items {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  /* Reset varied sizing on tablet/mobile so items fill the simpler grid cleanly */
  .portfolio-grid__item:nth-child(1),
  .portfolio-grid__item:nth-child(2),
  .portfolio-grid__item:nth-child(3),
  .portfolio-grid__item:nth-child(4),
  .portfolio-grid__item:nth-child(5),
  .portfolio-grid__item:nth-child(6),
  .portfolio-grid__item:nth-child(7) {
    grid-column: span 1;
    aspect-ratio: 4/3;
  }

  /* Keep the wide hero at the bottom spanning the full width */
  .portfolio-grid__item:nth-child(7) {
    grid-column: 1 / -1;
    aspect-ratio: 16/9;
  }

  .nav--light .nav__links {
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
  }

  .nav--light .nav__links a {
    color: var(--color-text);
  }

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

  .about__photo-placeholder {
    max-width: 280px;
  }

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

  /* Case study responsive */
  .cs-info__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cs-block__row,
  .cs-block__row--wide-right,
  .cs-block__row--wide-left {
    grid-template-columns: 1fr;
  }

  .cs-process__step {
    width: 120px;
    height: 120px;
    font-size: 0.7rem;
  }

  .cs-image-grid--3,
  .cs-image-grid--4 {
    grid-template-columns: 1fr 1fr;
  }

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

  .cs-findings {
    grid-template-columns: 1fr 1fr;
  }

  .cs-feature-card {
    grid-template-columns: 1fr;
  }

  .cs-feature-card--reverse {
    direction: ltr;
  }

  .cs-comparison {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1.25rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  .cs-image-grid--2,
  .cs-image-grid--3,
  .cs-image-grid--4 {
    grid-template-columns: 1fr;
  }

  .portfolio-grid__items {
    grid-template-columns: 1fr;
  }

  .cs-findings {
    grid-template-columns: 1fr;
  }

  .cs-process {
    flex-direction: column;
    align-items: center;
  }
}

/* ===== Image Lightbox (case study detail pages only) ===== */
main img.is-zoomable {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 2rem;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.lightbox.is-open {
  display: flex;
  opacity: 1;
}

.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #ffffff;
  padding: 1rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  cursor: default;
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.lightbox__close:hover,
.lightbox__close:focus {
  background: rgba(255, 255, 255, 0.25);
  outline: none;
}

/* ===== Case study carousel ===== */
.cs-carousel {
  position: relative;
  width: 100%;
  margin: 1rem 0;
}

.cs-carousel__slides {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 4px;
  background: var(--color-bg-light, #f5f5f5);
}

.cs-carousel__slide {
  display: none;
}

.cs-carousel__slide.is-active {
  display: block;
}

.cs-carousel__slide img {
  width: 100%;
  height: auto;
  display: block;
}

.cs-carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.75rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.15s ease;
  padding: 0;
}

.cs-carousel__btn:hover,
.cs-carousel__btn:focus {
  background: rgba(0, 0, 0, 0.8);
  outline: none;
}

.cs-carousel__btn--prev { left: 0.75rem; }
.cs-carousel__btn--next { right: 0.75rem; }

.cs-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.cs-carousel__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #ccc;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}

.cs-carousel__dot.is-active {
  background: #333;
  transform: scale(1.2);
}

.cs-carousel__dot:hover,
.cs-carousel__dot:focus {
  background: #888;
  outline: none;
}

/* Carousel variant for tall phone screenshots — caps height and centers each slide */
.cs-carousel--mobile .cs-carousel__slides {
  background: var(--color-bg-light, #f5f5f5);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 720px;
  padding: 4rem 3rem;
}
.cs-carousel--mobile .cs-carousel__slide.is-active {
  display: flex;
  justify-content: center;
}
.cs-carousel--mobile .cs-carousel__slide img {
  max-height: 560px;
  width: auto;
  height: auto;
  display: block;
  border-radius: 28px;
  border: 4px solid #1a2c4e;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

/* Push the prev/next buttons clear of the phone screenshot so the border-area
   stays visible around the image. */
.cs-carousel--mobile .cs-carousel__btn--prev { left: 1.5rem; }
.cs-carousel--mobile .cs-carousel__btn--next { right: 1.5rem; }

/* ==========================================================================
   Case Study Password Gate
   ========================================================================== */
.cs-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(20, 20, 20, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  visibility: visible !important;
  animation: cs-gate-fade-in 0.2s ease;
}

@keyframes cs-gate-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.cs-gate__card {
  background: #fff;
  border-radius: 14px;
  padding: 2.5rem 2.25rem 2rem;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  text-align: left;
}

.cs-gate__title {
  font-family: var(--font-script);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #1a1a1a;
  margin: 0 0 0.6rem;
}

.cs-gate__desc {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: #555;
  line-height: 1.5;
  margin: 0 0 1.4rem;
}

.cs-gate__desc a {
  color: #1d6fa4;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cs-gate__form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cs-gate__label {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  margin-bottom: 0.1rem;
}

.cs-gate__input {
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid #d8d8d8;
  border-radius: 8px;
  background: #fafafa;
  color: #1a1a1a;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.cs-gate__input:focus {
  outline: none;
  border-color: #1a1a1a;
  background: #fff;
}

.cs-gate__error {
  font-family: var(--font-sans);
  color: #c4363a;
  font-size: 0.85rem;
  min-height: 1.2em;
  margin: 0.25rem 0 0;
}

.cs-gate__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  gap: 0.75rem;
}

.cs-gate__back {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: #888;
  text-decoration: none;
  transition: color 0.15s ease;
}

.cs-gate__back:hover {
  color: #1a1a1a;
}

.cs-gate__submit {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.7rem 1.5rem;
  border: 2px solid #1a1a1a;
  border-radius: 999px;
  background: #1a1a1a;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.cs-gate__submit:hover {
  background: #fff;
  color: #1a1a1a;
}

@media (max-width: 480px) {
  .cs-gate__card {
    padding: 2rem 1.5rem 1.5rem;
  }
  .cs-gate__title {
    font-size: 1.4rem;
  }
}

/* --- LinkedIn icon (inline SVG used inside .footer__links and .resume__contact) --- */
.icon-linkedin {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  margin-right: 0.4em;
  fill: currentColor;
  flex-shrink: 0;
}

/* Make sure the link uses an inline-flex layout so icon + text align nicely */
.footer__links a,
.resume__contact a {
  display: inline-flex;
  align-items: center;
}
