/* =========================================
   Anjani Gupta — Growth Portfolio
   ========================================= */

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

:root {
  --lime: #D9FEA9;
  --lime-dark: #b8e87a;
  --blue: #519BF7;
  --blue-dark: #1a73e8;
  --dark: #111111;
  --dark-2: #1e1e1e;
  --gray: #5f6368;
  --gray-mid: #999999;
  --gray-light: #f8f9fa;
  --white: #ffffff;
  --border: #e5e7eb;
  --font: 'Helvetica Neue', HelveticaNeue, Helvetica, Arial, sans-serif;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.14);
  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--dark);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
}

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

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

/* --- Layout --- */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 64px 0; }

/* =========================================
   Navigation
   ========================================= */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.3px;
  color: var(--dark);
}

.nav-logo span {
  display: inline-block;
  background: var(--lime);
  width: 32px; height: 32px;
  border-radius: 8px;
  line-height: 32px;
  text-align: center;
  font-size: 14px;
  margin-right: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  width: 100%;
}

.nav-links li:last-child {
  margin-left: auto;
}

.nav-links a {
  font-size: 16px;
  font-weight: 400;
  color: var(--gray);
  transition: color var(--transition);
}

.nav-links a:hover { color: var(--dark); }

.nav-cta {
  background: #3d7ed9 !important;
  color: var(--white) !important;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 16px !important;
  font-weight: 400 !important;
  transition: all var(--transition) !important;
}

.nav-cta:hover {
  background: #2d6bc4 !important;
  color: #ffffff !important;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: var(--transition);
}

/* =========================================
   Hero
   ========================================= */
#hero {
  background: #222222;
  padding-top: 128px;
  padding-bottom: 64px;
  display: flex;
  align-items: center;
}


.hero-inner {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: center;
}

.hero-eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}

.hero-name {
  font-size: clamp(48px, 6vw, 64px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -2px;
  color: #ffffff;
  margin-bottom: 18px;
}

.hero-name em {
  font-style: normal;
  color: var(--blue);
}

.hero-bio {
  font-size: 16.5px;
  font-weight: 400;
  line-height: 1.55;
  color: #a8a8a8;
  margin-bottom: 28px;
}
.hero-bio p + p {
  margin-top: 12px;
}

.hero-actions {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 400;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.btn-dark {
  background: var(--white);
  color: var(--dark);
}

.btn-dark:hover {
  background: #e0e0e0;
  color: var(--dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  color: #ffffff;
  border-color: rgba(255,255,255,0.8);
  transform: translateY(-1px);
}

.hero-photo-wrap {
  position: relative;
}

.hero-photo {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

.hero-photo-badge {
  position: absolute;
  bottom: -16px;
  left: -16px;
  background: #707070;
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 400;
  color: #ffffff;
  white-space: nowrap;
}

.hero-photo-badge .badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

/* =========================================
   Section Headers
   ========================================= */
.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(81,155,247,0.1);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 32px;
}

.section-sub {
  font-size: 17px;
  color: var(--gray);
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 56px;
}

/* =========================================
   About
   ========================================= */
#about { background: #222222; color: #ffffff; }
#about .section-title { color: #d8d8d8; }

.about-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 8px 20px;
  border-radius: 20px;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  color: var(--gray);
  cursor: pointer;
  transition: all var(--transition);
}

.tab-btn:hover {
  color: #ffffff;
  background: #3a3a3a;
}

.tab-btn.active {
  background: #444444;
  color: #ffffff;
  font-weight: 500;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #3a3a3a;
}

.timeline-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 24px;
  padding-bottom: 40px;
  position: relative;
}

.timeline-dot {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #3a3a3a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.timeline-period {
  font-size: 13px;
  font-weight: 500;
  color: #a8a8a8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.timeline-role {
  font-size: 21px;
  font-weight: 400;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
  color: #d8d8d8;
}

.timeline-company {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 12px;
}

.timeline-desc {
  font-size: 16.5px;
  font-weight: 400;
  color: #a8a8a8;
  line-height: 1.55;
}
.timeline-desc + .timeline-desc {
  margin-top: 12px;
}
.timeline-desc strong {
  color: var(--blue);
  font-size: 18.5px;
  font-weight: 400;
}

.timeline-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
}

.timeline-chevron {
  font-size: 20px;
  color: #a8a8a8;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-top: 4px;
}

.timeline-item.open .timeline-chevron {
  transform: rotate(180deg);
}

.timeline-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0;
}

.timeline-item.open .timeline-details {
  max-height: 600px;
  opacity: 1;
  margin-top: 12px;
}

.timeline-focus {
  font-size: 15.5px;
  font-weight: 400;
  color: #888888;
  line-height: 1.55;
  background: #2e2e2e;
  padding: 10px 16px;
  border-radius: 8px;
  margin-top: 14px;
}

/* Looking For */
.looking-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.looking-card {
  background: #2e2e2e;
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid #3a3a3a;
}

.looking-card h3 {
  font-size: 16px;
  font-weight: 400;
  color: #e0e0e0;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.looking-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.looking-card li {
  font-size: 14px;
  color: #a8a8a8;
  line-height: 1.55;
  padding-left: 18px;
  position: relative;
}

.looking-card li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--blue);
  font-size: 12px;
}

/* Tools */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.tool-pill {
  background: #2e2e2e;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 400;
  color: #e0e0e0;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}

.tool-pill span {
  font-size: 11px;
  font-weight: 400;
  color: #888;
}

.tools-section-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a8a8a8;
  margin: 20px 0 8px;
  grid-column: 1/-1;
}

.tools-section-label:first-child {
  margin-top: 0;
}

/* =========================================
   Impact
   ========================================= */
#impact {
  background: #dcdcdc;
  color: var(--dark);
}

#impact .section-label {
  color: var(--blue);
  background: rgba(81,155,247,0.15);
}

#impact .section-title { color: var(--dark); }
#impact .section-sub { color: var(--gray); }

.impact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: stretch;
}

/* Impact subsections */
.impact-subsection {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid #333;
}
.impact-subsection:first-of-type {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}
.impact-subsection-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.impact-label-somnee { color: var(--blue); }
.impact-label-google { color: var(--blue); }

/* KPI grid (big numbers, 2 cols) */
.impact-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 12px;
}
.impact-kpi-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.impact-kpi-stat {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
}
.impact-kpi-desc {
  font-size: 12px;
  color: #999;
  line-height: 1.4;
}
.somnee-stat { color: var(--blue); }
.google-stat { color: var(--blue); }

/* Row list (channel metrics / Google rows) */
.impact-row-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.impact-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.impact-row-stat {
  font-size: 17px;
  font-weight: 700;
  min-width: 52px;
  flex-shrink: 0;
}
.impact-row-desc {
  font-size: 13px;
  color: #999;
  line-height: 1.4;
}

/* Metric channel tags */
.impact-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 72px;
  text-align: center;
}
.itag-volume    { background: rgba(217,254,169,0.15); color: var(--lime); }
.itag-efficiency{ background: rgba(81,155,247,0.15);  color: var(--blue); }
.itag-retention { background: rgba(251,191,36,0.15);  color: #fbbf24; }
.itag-website   { background: rgba(167,139,250,0.15); color: #a78bfa; }
.itag-email     { background: rgba(45,212,191,0.15);  color: #2dd4bf; }

.impact-card {
  background: #f2f2f2;
  border-radius: 20px;
  padding: 36px;
  border: 1px solid #d0d0d0;
}

.impact-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid #d8d8d8;
}

.impact-company-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 8px;
}

.impact-company-logo {
  height: 42px;
  width: auto;
  opacity: 0.9;
}

.logo-somnee {
  height: 36px;
  filter: invert(1);
}

.google-logo-lockup {
  display: flex;
  align-items: center;
  gap: 8px;
}

.google-logo-icon {
  height: 32px;
  width: auto;
}

.google-logo-wordmark {
  height: 28px;
  width: auto;
}

.badge-somnee {
  background: rgba(81,155,247,0.15);
  color: var(--blue);
}

.badge-google {
  background: rgba(81,155,247,0.15);
  color: var(--blue);
}

.impact-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.metric-item {}

.metric-number {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1;
  margin-bottom: 6px;
}

.metric-somnee .metric-number { color: var(--blue); }
.metric-google .metric-number { color: var(--blue); }

.metric-label {
  font-size: 13px;
  color: #999;
  line-height: 1.4;
}

/* Slide-mirrored impact layouts */
.slide-two-col,
.slide-three-col {
  display: flex;
  gap: 0;
  flex: 1;
}

.slide-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 18px;
}
.slide-col:first-child { padding-left: 0; }
.slide-col:last-child  { padding-right: 0; }

.slide-col-divider {
  width: 1px;
  background: #3a3a3a;
  flex-shrink: 0;
  margin: 0 2px;
}

.slide-col-header {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.scol-somnee { color: var(--dark); }
.scol-google  { color: var(--dark); }

.slide-metric-block {
  margin-bottom: 14px;
}
.slide-metric-block:last-child { margin-bottom: 0; }

/* Chip floats top-right above the big number (mirrors slide positioning) */
.smb-chip-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2px;
}
.smb-chip {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  min-width: 100px;
  text-align: center;
  flex-shrink: 0;
}
.chip-volume     { background: rgba(217,254,169,0.15); color: var(--lime); }
.chip-efficiency { background: rgba(81,155,247,0.15);  color: var(--blue); }
.chip-retention  { background: rgba(251,191,36,0.15);  color: #fbbf24; }
.chip-website    { background: rgba(167,139,250,0.15); color: #a78bfa; }
.chip-email      { background: rgba(45,212,191,0.15);  color: #2dd4bf; }
.chip-blue       { background: #dcdcdc;  color: var(--dark); }
.chip-lime       { background: #dcdcdc;  color: var(--dark); }

/* Somnee vertical sections */
.smb-section {
  margin-bottom: 20px;
}
.smb-section:last-child { margin-bottom: 0; }

.smb-horiz-divider {
  height: 1px;
  background: #d8d8d8;
  margin-bottom: 20px;
}

.smb-metric-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 0;
}
.smb-metric-row .smb-stat-number {
  margin-right: 6px;
}

.smb-stat-inline-desc {
  font-size: 14px;
  color: var(--dark);
  line-height: 1.4;
}

/* Primary metric number + description */
.smb-stat-number {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
  width: 84px;
  flex-shrink: 0;
}
.smb-stat-desc {
  font-size: 12px;
  color: #999;
  line-height: 1.4;
  margin-bottom: 4px;
}

/* Secondary sub-metrics (+4.5% YoY style) */
.smb-sub-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 5px;
}
.smb-sub-number {
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}
.smb-sub-label {
  font-size: 11px;
  color: #999;
  line-height: 1.3;
}

/* =========================================
   Top Projects
   ========================================= */
#projects { background: #dcdcdc; }

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.project-card {
  background: #ebebeb;
  border-radius: 20px;
  padding: 36px;
  border: 1px solid #d0d0d0;
  transition: box-shadow var(--transition), transform var(--transition);
}

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

.project-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.tag-somnee { background: #dcdcdc; color: var(--dark); }
.tag-google { background: #dcdcdc; color: var(--dark); }

.project-card h3 {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.3px;
  margin-bottom: 16px;
  line-height: 1.35;
  color: var(--dark);
}

.project-period {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.project-desc {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 20px;
}

.project-result {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--gray-light);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
}

/* Project field rows */
.pf-row {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #d8d8d8;
}
.pf-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.pf-icon {
  font-size: 14px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  padding-top: 2px;
}
.pf-body {
  flex: 1;
}
.pf-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dark);
  margin-bottom: 4px;
}
.pf-content {
  font-size: 14px;
  color: var(--dark);
  line-height: 1.55;
}
.pf-content + .pf-content {
  margin-top: 8px;
}
.pf-lesson {
  color: var(--gray-mid);
  font-style: italic;
}
.pf-bullets {
  margin: 0;
  padding-left: 16px;
  font-size: 14px;
  color: var(--dark);
  line-height: 1.55;
}
.pf-bullets li {
  margin-bottom: 6px;
}
.pf-bullets li:last-child { margin-bottom: 0; }
.pf-row-results {
  background: transparent;
  border-radius: 0;
  padding: 12px 0;
  border: none;
  margin-top: 0;
}
.pf-row-results .pf-label {
  color: var(--dark);
}
.project-card:has(.tag-google) .pf-row-results .pf-label {
  color: var(--blue);
}
.pf-row-results .pf-content,
.pf-row-results .pf-bullets {
  font-weight: 400;
}

/* Prominent single stat result */
.pf-stat-result {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.pf-stat-big {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  color: #111;
}
.pf-stat-desc {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray);
}

/* Checkmark result rows */
.pf-check-row {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 5px 0;
  font-size: 13px;
  color: var(--dark);
  line-height: 1.5;
}
.pf-check-row + .pf-check-row {
  border-top: 1px solid #e5e7eb;
}
.pf-check {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  flex-shrink: 0;
}
.pf-check-row strong {
  font-size: 14px;
  font-weight: 600;
  color: #111;
}

.project-result-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--lime);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

/* 2x2 Summary Grid */
.projects-grid-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.project-summary-card {
  background: #f2f2f2;
  border-radius: 16px;
  padding: 28px;
  border: 1px solid #d0d0d0;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-summary-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.project-logo-mark {
  height: 28px;
  width: auto;
  object-fit: contain;
  align-self: flex-start;
}

.project-logo-mark[alt="Google"] {
  height: 32px;
}

.project-summary-card h3 {
  font-size: 18px;
  font-weight: 450;
  letter-spacing: -0.2px;
  line-height: 1.4;
  color: var(--dark);
  margin: 0;
}

.project-result-preview {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 15px;
  color: var(--gray);
  line-height: 1.4;
  margin: 0;
}

.project-result-preview strong {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.project-cta {
  font-size: 14px;
  font-weight: 500;
  color: var(--blue);
  margin: 0;
  margin-top: auto;
}

/* Project Modal */
.project-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(0,0,0,0.6);
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.project-modal-overlay.open {
  display: flex;
}

.project-modal {
  background: #fff;
  border-radius: 20px;
  max-width: 720px;
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.project-modal-header {
  padding: 32px 40px 20px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  flex-shrink: 0;
  position: relative;
}

.project-modal-header .project-logo-mark {
  height: 28px;
  margin-bottom: 12px;
}

.project-modal-header h3 {
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.3px;
  line-height: 1.35;
  color: var(--dark);
  margin: 0;
  padding-right: 32px;
}

.project-modal-close {
  position: absolute;
  top: 28px;
  right: 32px;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--gray);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color var(--transition);
}

.project-modal-close:hover {
  color: var(--dark);
}

.project-modal-body {
  overflow-y: auto;
  padding: 24px 40px 40px;
}

/* =========================================
   Portfolio Sections (Somnee + Google)
   ========================================= */
#somnee { background: #222222; }
#somnee .section-title { color: #d8d8d8; }
#somnee .portfolio-card { background: #2e2e2e; border-color: #3a3a3a; }
#somnee .portfolio-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
#somnee .card-title { color: #e0e0e0; }
#somnee .card-desc { color: #a8a8a8; }
#somnee .card-media { background: transparent; }
#somnee .card-media-centered { background: transparent; }
#somnee .set-group { background: transparent; }
#somnee .set-group + .set-group { border-top-color: #3a3a3a; }
#somnee .img-gallery { background: transparent; }
#somnee .email-portrait-wrap { background: transparent; }
#somnee .gif-constrained-wrap { background: transparent; }
#somnee .email-supporting img { background: #2e2e2e; border-color: #3a3a3a; }
#somnee .set-label-tag { background: #3a3a3a; color: #a8a8a8; }
#somnee .filter-btn { color: #888; }
#somnee .filter-btn:hover { color: #ffffff; background: #3a3a3a; }
#somnee .filter-btn.active { background: #444444; color: #ffffff; font-weight: 500; }
#google { background: #dcdcdc; }

.portfolio-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 20px;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  color: var(--gray);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.filter-btn:hover {
  color: #ffffff;
  background: #3a3a3a;
}

.filter-btn.active {
  background: #444444;
  color: #ffffff;
  font-weight: 500;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
  gap: 24px;
}

/* Portfolio Card */
.portfolio-card {
  background: #f2f2f2;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: none;
  border: 1px solid #d0d0d0;
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}

.portfolio-card .card-body { order: -1; }

#google .portfolio-card { background: #f2f2f2; }

.portfolio-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.portfolio-card[style*="display: none"] { display: none !important; }

.card-media {
  position: relative;
  overflow: hidden;
  background: transparent;
  padding: 16px;
}

/* Browser Chrome */
.browser-chrome {
  background: #e8e8e8;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #d0d0d0;
  flex-shrink: 0;
}

.chrome-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chrome-dot.red { background: #ff5f57; }
.chrome-dot.yellow { background: #ffbd2e; }
.chrome-dot.green { background: #28c840; }

.chrome-bar {
  flex: 1;
  height: 22px;
  background: #f5f5f5;
  border-radius: 5px;
  margin: 0 8px;
  border: 1px solid #d0d0d0;
}

.browser-gif-wrap {
  overflow: hidden;
  position: relative;
}

.browser-gif-wrap img {
  width: 100%;
  display: block;
  max-height: 380px;
  object-fit: cover;
  object-position: top;
}

/* GIF Grid (multiple GIFs side by side) */
.gif-row {
  display: grid;
  gap: 2px;
}

.gif-row.cols-2 { grid-template-columns: 1fr 1fr; }
.gif-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

.gif-row .browser-chrome { padding: 7px 10px; }
.gif-row .browser-chrome .chrome-dot { width: 9px; height: 9px; }

.gif-row .browser-gif-wrap img { max-height: 240px; }

/* Image Gallery */
.img-gallery {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding: 16px;
  background: transparent;
  scrollbar-width: none;
}

.img-gallery::-webkit-scrollbar { height: 0; }

.img-gallery:hover {
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}
.img-gallery:hover::-webkit-scrollbar { height: 4px; }
.img-gallery:hover::-webkit-scrollbar-track { background: transparent; }
.img-gallery:hover::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

.img-gallery img {
  height: 220px;
  width: auto;
  flex-shrink: 0;
  border-radius: 8px;
  object-fit: cover;
  cursor: zoom-in;
  transition: opacity var(--transition);
}

.img-gallery img:hover { opacity: 0.9; }

.card-media-centered.card-media {
  display: flex;
  justify-content: center;
  padding: 16px;
  background: transparent;
}

.card-media-centered .device-frame-wrap {
  max-width: 48%;
}

.img-gallery-vertical {
  flex-direction: row;
  overflow: hidden;
  gap: 8px;
  padding: 16px;
  align-items: flex-start;
}

.img-gallery-vertical img {
  width: calc(50% - 4px);
  height: auto;
  flex-shrink: 0;
  object-fit: contain;
}

/* Static image comparison (for A/B tests) */
.ab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
  background: transparent;
}

.ab-cell {}
.ab-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 6px;
  display: inline-block;
}

.ab-label.control { background: #f3f3f3; color: var(--gray); }
.ab-label.test { background: rgba(81,155,247,0.15); color: var(--blue); }

.ab-cell img {
  width: 100%;
  border-radius: 8px;
  max-height: 280px;
  object-fit: cover;
  object-position: top;
}

/* Card Body */
.card-body {
  padding: 24px 28px 14px;
}

.card-category {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0;
  background: none;
  color: var(--blue);
  margin-bottom: 12px;
}

.cat-email,
.cat-messaging,
.cat-social,
.cat-strategy,
.cat-writing,
.cat-campaign,
.cat-research,
.cat-promos,
.cat-reporting,
.cat-testing { background: none; color: var(--blue); }

.card-title {
  font-size: 18px;
  font-weight: 450;
  letter-spacing: -0.2px;
  line-height: 1.4;
  margin-bottom: 8px;
}

.card-desc {
  font-size: 15px;
  color: var(--gray);
  line-height: 1.4;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.card-meta-item {
  font-size: 12px;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-meta-item strong { color: var(--dark); }

/* --- Email portrait layout (approved) --- */
.email-portrait-wrap {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: transparent;
  align-items: flex-start;
}
.email-portrait-gif {
  width: 260px;
  flex-shrink: 0;
}
.email-portrait-gif .browser-gif-wrap img {
  max-height: none;
  object-fit: initial;
  height: auto;
}
.email-supporting {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}
.email-supporting img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #eee;
  object-fit: contain;
  max-height: 160px;
  background: #fff;
}

/* --- Constrained GIF (affiliate etc) --- */
.gif-constrained-wrap {
  max-width: 72%;
  margin: 0 auto;
  padding: 20px 24px;
  background: transparent;
}
.gif-constrained-wrap .browser-gif-wrap img {
  max-height: none;
  height: auto;
  object-fit: initial;
}

/* --- Creative set groups + labels inside card-media --- */
.set-group {
  padding: 0 0 4px;
  background: transparent;
}
.set-group + .set-group {
  border-top: 1px solid #e5e7eb;
  padding-top: 14px;
}
.set-label-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  color: var(--gray);
  background: #f3f3f3;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.set-note {
  font-size: 10px;
  font-style: italic;
  font-weight: 400;
  color: var(--gray-mid);
}
.set-group .img-gallery {
  padding: 0;
  margin-bottom: 4px;
}

.img-gallery-tall {
  padding-top: 0;
}
.img-gallery-tall img {
  height: 290px;
}

.ab-outlined {
  border: 1px solid #d1d1d1;
  border-radius: 8px;
}

.ab-annotated-row {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  padding: 0 16px;
}
.ab-annotated-img {
  flex: 0 1 auto;
  text-align: center;
}
.ab-annotated-img img {
  height: 360px;
  width: auto;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  object-position: top;
}
.ab-tag {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #e8f0fe;
  color: var(--blue);
  font-family: var(--font);
  font-size: 9px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 3px;
  white-space: nowrap;
  line-height: 1.3;
  z-index: 2;
}

.line-by-line-group {
  margin-left: 228px;
}
.line-by-line-group .set-label-tag {
  margin-top: 8px;
}

/* --- GIF doc labels (Google portfolio) --- */
.gif-labeled-wrap { display: flex; flex-direction: column; }
.gif-doc-label {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  color: var(--gray);
  text-align: center;
  padding: 6px 8px;
  background: #f0f0f0;
  border-top: 1px solid #e0e0e0;
}

/* --- Full-width card (Science campaign etc) --- */
.portfolio-card.card-full { grid-column: 1 / -1; }

/* Device Frames */
.device-frame-wrap {
  position: relative;
  display: block;
}
.df-frame {
  width: 100%;
  height: auto;
  display: block;
}
.df-gif {
  position: absolute;
  object-fit: cover;
  object-position: top;
}
.df-laptop .df-gif {
  left: 8.40%; top: 7.54%;
  width: 83.20%; height: 79.70%;
}
.df-tablet .df-gif {
  left: 11.89%; top: 10.07%;
  width: 77.11%; height: 80.21%;
}
.df-mobile .df-gif {
  left: 9.46%; top: 2.15%;
  width: 66.82%; height: 91.11%;
}

/* =========================================
   Lightbox
   ========================================= */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.9);
  align-items: center;
  justify-content: center;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  background: none;
  border: none;
  color: white;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
}

/* =========================================
   Contact / Footer
   ========================================= */
#contact {
  background: #3d7ed9;
  padding: 64px 0;
}

.contact-inner {
  max-width: 640px;
}

.contact-title {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 400;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--white);
}

.contact-subtitle {
  font-size: 15px;
  font-weight: 400;
  color: rgba(255,255,255,0.85);
  margin-bottom: 40px;
  line-height: 1.65;
}

.contact-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}

.footer-nav {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-nav a {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  font-weight: 400;
}

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

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

  .hero-actions {
    justify-content: center;
  }

  .hero-bio {
    margin-left: auto;
    margin-right: auto;
  }

  .impact-grid,
  .projects-grid,
  .projects-grid-2x2,
  .looking-grid {
    grid-template-columns: 1fr;
  }

  .project-modal-overlay {
    padding: 20px;
  }

  .project-modal-header {
    padding: 24px 28px 16px;
  }

  .project-modal-body {
    padding: 20px 28px 28px;
  }

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

@media (max-width: 768px) {
  section { padding: 48px 0; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
    align-items: flex-start;
  }

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

  .impact-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .gif-row.cols-3 { grid-template-columns: 1fr 1fr; }

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

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero-name { letter-spacing: -1px; }
  .gif-row.cols-2 { grid-template-columns: 1fr; }
  .impact-metrics { grid-template-columns: 1fr; }
}
