/* Enhanced visual styling merging Apple and Biosciences tokens */

/* Import Morphic base variables */
@import url('theme-morphic.css');

:root {
  /* Typography tokens (Apple) */
  --font-sf-pro-text: 'Inter', system-ui, sans-serif;
  --font-sf-pro-display: 'Inter', system-ui, sans-serif;

  /* Apple color accents */
  --color-apple-blue: #0071e3;
  --color-electric-link: #2997ff;
  --color-cobalt-link: #0066cc;

  /* Biosciences accent */
  --color-bioluminescent-lime: #cef79e;

  /* Radii adjustments */
  --radius-card: 28px; /* Apple cards */
  --radius-pill: 9999px;
  --radius-button: 8px; /* Biosciences compact */
}

/* Global font smoothing */
body {
  font-family: var(--font-sf-pro-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Navigation */
.nav {
  background: var(--color-obsidian, var(--color-pure-black));
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 clamp(20px, 5vw, 76px);
  border-bottom: 1px solid var(--line);
  transition: background .3s, border-color .3s;
}
.nav.scrolled {
  background: rgba(5,5,5,.82);
  backdrop-filter: blur(14px);
  border-color: var(--line);
}
.nav-cta {
  background: var(--color-apple-blue);
  color: var(--color-paper-white);
  border-radius: var(--radius-button);
  padding: 8px 16px;
  font-size: 13px;
  letter-spacing: -0.12px;
  text-transform: uppercase;
  transition: background .2s, transform .2s;
}
.nav-cta:hover {
  background: var(--color-electric-link);
  transform: translateY(-2px);
}

/* Hero display (large headings) */
.chapter h1, .chapter h2 {
  font-family: var(--font-sf-pro-display);
  color: var(--color-porcelain);
  font-size: clamp(48px, 8vw, 96px);
  line-height: 1.04;
  letter-spacing: -1.44px;
  text-shadow: 0 0 4px rgba(0,0,0,0.4);
}

/* Gallery cards */
.gallery-card {
  background: var(--surface-card);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.gallery-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}
.gallery-card img {
  border-radius: 0; /* image inherits card radius via container */
  object-fit: cover;
  height: 100%;
  width: 100%;
}

/* Photo‑more (gallery opener) */
.photo-more {
  background: var(--color-void, #0a0a0a);
  color: var(--color-paper-white);
  border-radius: var(--radius-card);
  transition: background .2s, border-color .2s;
}
.photo-more:hover {
  background: var(--color-bioluminescent-lime);
  border-color: var(--color-bioluminescent-lime);
}

/* Infinite gallery controls */
.infinite-controls button {
  background: rgba(16,16,17,.78);
  border: 1px solid rgba(255,255,255,.24);
  border-radius: var(--radius-pill);
  color: var(--color-paper-white);
  font-size: 15px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, border-color .2s;
}
.infinite-controls button:hover {
  background: rgba(40,40,42,.92);
  border-color: rgba(255,255,255,.56);
}

/* Links */
a {
  color: var(--color-electric-link);
  text-decoration: underline;
  transition: color .2s;
}
a:hover {
  color: var(--color-cobalt-link);
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--color-electric-link);
  outline-offset: 4px;
}

/* Responsive tweaks */
@media (max-width: 700px) {
  .nav { height: 38px; }
  .nav-cta { font-size: 12px; padding: 6px 12px; }
  .chapter h1, .chapter h2 { font-size: clamp(32px, 10vw, 64px); }
}
