/* ==========================================================================
   Sam Hamedi Rad — Deep-Tech Personal Website
   Palette: Deep Obsidian (#09090B) / Slate (#111318) / Cyan (#22D3EE) / Emerald (#10B981)
   ========================================================================== */

:root {
  --bg: #09090B;
  --surface: #111318;
  --surface-elevated: #151821;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --border-accent: rgba(34, 211, 238, 0.34);

  --text-primary: #F4F4F5;
  --text-secondary: #A1A1AA;
  --text-muted: #71717A;

  --cyan: #22D3EE;
  --cyan-soft: rgba(34, 211, 238, 0.1);
  --emerald: #10B981;
  --emerald-soft: rgba(16, 185, 129, 0.12);

  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-height: 70px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 24px);
  background-color: var(--bg);
  color: var(--text-primary);
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

::selection {
  background: rgba(34, 211, 238, 0.22);
  color: #FFFFFF;
}

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

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

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Sticky Navigation (Minimal Glassmorphism)
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(9, 9, 11, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.site-header.is-scrolled {
  background: rgba(9, 9, 11, 0.88);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  transition: opacity 0.2s ease;
}

.wordmark:hover {
  opacity: 0.85;
}

.wordmark-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.65);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text-primary);
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--cyan);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #09090B;
  background: var(--text-primary);
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease-out), background-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-cta:hover {
  background: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.22);
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(17, 19, 24, 0.8);
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.hamburger-line {
  width: 16px;
  height: 1.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.22s var(--ease-out), opacity 0.22s ease;
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-line:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.mobile-menu-btn[aria-expanded="true"] .hamburger-line:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

.mobile-nav {
  background: rgba(9, 9, 11, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.mobile-nav-inner {
  display: flex;
  flex-direction: column;
  padding: 16px 24px 24px;
  gap: 4px;
}

.mobile-nav-link {
  padding: 12px 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-nav-link:hover {
  color: var(--text-primary);
}

.mobile-nav-cta {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--text-primary);
  color: #09090B;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ==========================================================================
   Section 1: Hero (Split Layout)
   ========================================================================== */

.hero {
  position: relative;
  padding: 76px 0 64px;
  overflow: hidden;
}

/* Architectural dot-grid texture fading softly at edges */
.hero-dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.13) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 82% 72% at 50% 34%, #000 18%, transparent 82%);
  -webkit-mask-image: radial-gradient(ellipse 82% 72% at 50% 34%, #000 18%, transparent 82%);
  opacity: 0.65;
  pointer-events: none;
}

/* Restrained high-tech ambient glow */
.hero-ambient-glow {
  position: absolute;
  top: -120px;
  right: 8%;
  width: 520px;
  height: 420px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.08) 0%, rgba(16, 185, 129, 0.03) 42%, transparent 72%);
  filter: blur(40px);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(280px, 0.78fr);
  gap: 56px;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(17, 19, 24, 0.85);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #D1FAE5;
  margin-bottom: 26px;
}

.status-dot-wrap {
  position: relative;
  width: 8px;
  height: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
}

.status-dot-ping {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.45);
  animation: pulse-ring 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.7);
    opacity: 0.85;
  }
  70%, 100% {
    transform: scale(2.1);
    opacity: 0;
  }
}

.hero-title {
  font-size: clamp(2.65rem, 5.4vw, 4.15rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: #FAFAFA;
  margin-bottom: 20px;
}

.hero-subheadline {
  font-size: clamp(1.18rem, 2.1vw, 1.42rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: #E4E4E7;
  max-width: 34ch;
  margin-bottom: 20px;
}

.hero-bio {
  font-size: 1rem;
  line-height: 1.72;
  color: var(--text-secondary);
  max-width: 58ch;
  margin-bottom: 32px;
}

/* CTA Row & Buttons */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 0.89rem;
  font-weight: 600;
  line-height: 1;
  transition: transform 0.22s var(--ease-out), border-color 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease, color 0.22s ease;
}

.btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-arrow {
  width: 14px;
  height: 14px;
  opacity: 0.72;
  transition: transform 0.22s var(--ease-out), opacity 0.22s ease;
}

.btn:hover .btn-arrow {
  transform: translate(2px, -2px);
  opacity: 1;
}

.btn-primary {
  background: #FAFAFA;
  color: #09090B;
  border: 1px solid #FAFAFA;
}

.btn-primary:hover {
  background: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(34, 211, 238, 0.16);
}

.btn-secondary {
  background: transparent;
  color: #D4D4D8;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-accent);
  color: #FFFFFF;
  transform: translateY(-2px);
}

/* Hero Portrait Column */
.hero-portrait-col {
  display: flex;
  justify-content: flex-end;
}

.portrait-frame {
  position: relative;
  width: 100%;
  max-width: 370px;
  padding: 10px;
  border-radius: 22px;
  background: #111318;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

.portrait-glow {
  display: none;
}

.media-shell {
  position: relative;
  overflow: hidden;
  background: #0D0F14;
}

.portrait-shell {
  aspect-ratio: 1 / 1;
  border-radius: 14px;
}

.managed-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.45s var(--ease-out), transform 0.6s var(--ease-out);
  position: relative;
  z-index: 2;
}

.portrait-img {
  object-position: center 18%;
  filter: brightness(0.88) contrast(1.06) saturate(0.95);
}

[data-image-frame].is-loaded .managed-img {
  opacity: 1;
}

[data-image-frame].is-loaded .media-fallback {
  opacity: 0;
  pointer-events: none;
}

.media-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  background: radial-gradient(circle at 50% 35%, #161A23 0%, #0C0E13 100%);
  transition: opacity 0.35s ease;
}

.fallback-graphic {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.fallback-meta {
  position: relative;
  z-index: 2;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fallback-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--cyan);
}

.fallback-path {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.portrait-vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(ellipse 68% 66% at 50% 44%, transparent 36%, rgba(9, 9, 11, 0.42) 74%, rgba(9, 9, 11, 0.84) 100%),
    linear-gradient(180deg, rgba(9, 9, 11, 0.34) 0%, transparent 24%, transparent 62%, rgba(9, 9, 11, 0.72) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.portrait-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 6px 4px;
  font-family: var(--font-mono);
  font-size: 0.69rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.caption-sep {
  opacity: 0.45;
}

.caption-role {
  color: var(--text-secondary);
}

/* ==========================================================================
   Section 2: Impact Strip (4-Column Metric Bar)
   ========================================================================== */

.impact-section {
  padding: 12px 0 36px;
}

.impact-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.metric-item {
  padding: 28px 24px;
  position: relative;
  transition: background-color 0.25s ease;
}

.metric-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 22px;
  right: 0;
  width: 1px;
  background: var(--border);
}

.metric-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.metric-value {
  font-family: var(--font-mono);
  font-size: clamp(1.85rem, 3vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #FAFAFA;
  margin-bottom: 8px;
}

.metric-accent {
  color: var(--cyan);
}

.metric-label {
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

/* ==========================================================================
   Shared Section Layout
   ========================================================================== */

.section {
  padding: 88px 0;
}

.section-bordered {
  border-top: 1px solid var(--border);
}

.section-header {
  max-width: 680px;
  margin-bottom: 44px;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--cyan);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.16;
  color: #FAFAFA;
  margin-bottom: 14px;
}

.section-subtitle {
  font-size: 1rem;
  line-height: 1.68;
  color: var(--text-secondary);
}

/* ==========================================================================
   Section 3: Selected Work (2x2 Bento Grid)
   ========================================================================== */

.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.bento-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  transition: transform 0.28s var(--ease-out), border-color 0.28s ease, background-color 0.28s ease, box-shadow 0.28s ease;
  overflow: hidden;
}

/* Subtle cursor-tracking spotlight sheen */
.bento-card::before,
.podcast-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 0%),
    rgba(34, 211, 238, 0.08),
    transparent 62%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.bento-card:hover::before,
.podcast-card:hover::before {
  opacity: 1;
}

.bento-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  background: #13161D;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.38);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.card-top-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.card-tag-live {
  background: rgba(16, 185, 129, 0.09);
  border-color: rgba(16, 185, 129, 0.24);
  color: #A7F3D0;
}

.tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
}

.card-dates {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.card-toggle {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.card-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-accent);
  background: var(--cyan-soft);
}

.toggle-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.25s var(--ease-out);
}

.bento-card[data-expanded="true"] .toggle-icon {
  transform: rotate(180deg);
}

.card-heading-group {
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.card-company {
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #FAFAFA;
  margin-bottom: 6px;
}

.role-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--cyan);
}

.card-summary {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.card-details {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding-top: 18px;
  overflow: hidden;
  transition: max-height 0.35s var(--ease-out), opacity 0.28s ease, padding-top 0.28s ease;
}

.bento-card[data-expanded="false"] .card-details {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  border-top-color: transparent;
}

.bento-card[data-expanded="false"] .card-summary {
  margin-bottom: 0;
}

.card-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.card-bullets li {
  position: relative;
  padding-left: 16px;
  font-size: 0.89rem;
  line-height: 1.6;
  color: #D4D4D8;
}

.card-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.65);
}

.card-bullets strong {
  color: #FAFAFA;
  font-weight: 600;
}

/* ==========================================================================
   Section 4: Selected Publications & Media
   ========================================================================== */

.podcast-anchor {
  scroll-margin-top: calc(var(--nav-height) + 28px);
  margin-bottom: 32px;
}

.podcast-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 30px 32px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(17, 19, 24, 0.96) 0%, rgba(15, 23, 30, 0.92) 100%);
  border: 1px solid rgba(34, 211, 238, 0.22);
  overflow: hidden;
  transition: transform 0.26s var(--ease-out), border-color 0.26s ease, box-shadow 0.26s ease;
}

.podcast-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.36);
}

.podcast-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.podcast-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--cyan);
  margin-bottom: 12px;
}

.mic-icon {
  width: 14px;
  height: 14px;
}

.podcast-title {
  font-size: clamp(1.18rem, 2.2vw, 1.42rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: #FAFAFA;
  margin-bottom: 10px;
}

.podcast-desc {
  font-size: 0.93rem;
  line-height: 1.62;
  color: var(--text-secondary);
}

.podcast-action {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.podcast-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px 12px 14px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.35);
  color: #ECFEFF;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.22s ease, border-color 0.22s ease, transform 0.22s var(--ease-out);
}

.podcast-btn:hover {
  background: rgba(34, 211, 238, 0.2);
  border-color: var(--cyan);
  transform: translateY(-1px);
}

.play-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--cyan);
  color: #09090B;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.play-circle svg {
  width: 13px;
  height: 13px;
  margin-left: 1px;
}

/* Publications Table / Minimal List */
.pub-list-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.pub-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 26px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.71rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.pub-list-count {
  color: var(--text-secondary);
}

.pub-list {
  list-style: none;
}

.pub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 26px;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease;
}

.pub-row:hover {
  background: rgba(255, 255, 255, 0.025);
}

.pub-main {
  min-width: 0;
}

.pub-title {
  font-size: 0.96rem;
  font-weight: 500;
  line-height: 1.5;
  color: #F4F4F5;
}

.pub-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.journal-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #D4D4D8;
  white-space: nowrap;
}

.journal-nature {
  background: rgba(34, 211, 238, 0.08);
  border-color: rgba(34, 211, 238, 0.24);
  color: #A5F3FC;
}

.pub-year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  min-width: 38px;
  text-align: right;
}

.pub-footer {
  padding: 18px 26px;
  background: rgba(255, 255, 255, 0.015);
}

.scholar-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--cyan);
  transition: color 0.2s ease;
}

.scholar-link:hover {
  color: #67E8F9;
}

.scholar-arrow {
  transition: transform 0.2s var(--ease-out);
}

.scholar-link:hover .scholar-arrow {
  transform: translateX(4px);
}

/* ==========================================================================
   Section 5: Beyond the Lab (2-Row Editorial Photo Gallery)
   ========================================================================== */

.gallery-bento {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.gallery-row-top {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(0, 1fr);
  gap: 18px;
}

.gallery-row-bottom {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.gallery-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.28s ease, transform 0.28s var(--ease-out), box-shadow 0.28s ease;
}

.gallery-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.42);
}

.gallery-shell {
  width: 100%;
  height: 100%;
}

.gallery-feature .gallery-shell {
  height: 380px;
}

.gallery-tile .gallery-shell {
  height: 260px;
}

.gallery-img {
  filter: brightness(0.96) contrast(1.03) saturate(0.98);
}

.img-pos-center {
  object-position: center 50%;
}

.img-pos-halfdome {
  object-position: center 36%;
}

.img-pos-upper {
  object-position: center 22%;
}

.img-pos-valley {
  object-position: center 58%;
}

.gallery-card:hover .gallery-img {
  transform: scale(1.04);
}

.gallery-vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(9, 9, 11, 0.04) 0%, rgba(9, 9, 11, 0.12) 55%, rgba(9, 9, 11, 0.82) 100%);
}

.gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 15px 18px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.gallery-tag {
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #FAFAFA;
  white-space: nowrap;
}

.gallery-note {
  font-size: 0.77rem;
  color: rgba(244, 244, 245, 0.78);
  text-align: right;
}

/* Keep fallback path clearly visible above caption when image isn't loaded yet */
.gallery-card:not(.is-loaded) .fallback-meta {
  padding-bottom: 52px;
}

/* ==========================================================================
   Section 6: Footer / Connect & Contact Form
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 88px 0 42px;
  background: linear-gradient(180deg, rgba(17, 19, 24, 0.35) 0%, var(--bg) 100%);
}

.connect-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: start;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--border);
}

.connect-copy {
  max-width: 480px;
}

.connect-title {
  font-size: clamp(2.1rem, 4.2vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: #FAFAFA;
  margin-bottom: 14px;
}

.connect-subtext {
  font-size: 1rem;
  line-height: 1.68;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.connect-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Contact Form Card */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.contact-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.contact-card-label {
  color: var(--text-secondary);
  font-weight: 600;
}

.contact-form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #09090B;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.93rem;
  line-height: 1.5;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:hover {
  border-color: var(--border-hover);
}

.form-input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
  background: #0B0C10;
}

.form-textarea {
  resize: vertical;
  min-height: 112px;
}

.recaptcha-wrap {
  min-height: 78px;
  display: flex;
  align-items: center;
  overflow-x: auto;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding-top: 2px;
}

.form-submit {
  cursor: pointer;
}

.form-submit:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.submit-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(9, 9, 11, 0.25);
  border-top-color: #09090B;
  animation: spin 0.7s linear infinite;
}

.form-submit.is-loading .submit-spinner {
  display: inline-block;
}

.form-submit.is-loading .submit-arrow {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.submit-hint {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.submit-hint.is-ready {
  color: var(--emerald);
}

.form-status {
  padding: 13px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.5;
  border: 1px solid var(--border);
}

.form-status.is-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.35);
  color: #D1FAE5;
}

.form-status.is-error {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.35);
  color: #FECDD3;
}

.footer-bottom {
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
}

.footer-links {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.footer-links a {
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--cyan);
}

.footer-sep {
  opacity: 0.4;
}

/* ==========================================================================
   Scroll Reveal Motion
   ========================================================================== */

.js-reveal-ready .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}

.js-reveal-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .status-dot-ping {
    animation: none;
  }
  .js-reveal-ready .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .bento-card,
  .podcast-card,
  .gallery-card,
  .gallery-img,
  .btn {
    transition: none;
  }
}

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

@media (max-width: 960px) {
  .hero {
    padding: 52px 0 48px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-portrait-col {
    justify-content: flex-start;
  }

  .portrait-frame {
    max-width: 340px;
  }

  .impact-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-item:nth-child(2)::after {
    display: none;
  }

  .metric-item:nth-child(1),
  .metric-item:nth-child(2) {
    border-bottom: 1px solid var(--border);
  }

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

  .podcast-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    padding: 26px;
  }

  .gallery-row-top {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-feature .gallery-shell {
    height: 310px;
  }

  .gallery-row-bottom {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-tile-wide-tablet {
    grid-column: 1 / -1;
  }

  .gallery-tile-wide-tablet .gallery-shell {
    height: 300px;
  }

  .connect-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .connect-copy {
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .section {
    padding: 64px 0;
  }

  .status-pill {
    font-size: 0.66rem;
    padding: 6px 12px;
    letter-spacing: 0.05em;
  }

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

  .metric-item::after {
    display: none;
  }

  .metric-item:not(:last-child) {
    border-bottom: 1px solid var(--border);
  }

  .bento-card {
    padding: 22px;
  }

  .card-top {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .pub-list-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px 20px;
  }

  .pub-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 18px 20px;
  }

  .pub-footer {
    padding: 16px 20px;
  }

  .gallery-row-top,
  .gallery-row-bottom {
    grid-template-columns: 1fr;
  }

  .gallery-feature .gallery-shell,
  .gallery-tile .gallery-shell,
  .gallery-tile-wide-tablet .gallery-shell {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .gallery-portrait-shot .gallery-shell {
    aspect-ratio: 4 / 5;
  }

  .form-row-two {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 20px;
  }

  .contact-card-header {
    padding: 12px 20px;
  }

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