/* ============================================
   Model Medicine — Landing Page Styles
   Dark theme · DICOM viewer aesthetic
   ============================================ */

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

:root {
  --bg-primary: #08080d;
  --bg-secondary: #0e0e16;
  --bg-card: #12121c;
  --bg-card-hover: #181825;
  --bg-accent: #1a1a2e;

  --text-primary: #e2e2ec;
  --text-secondary: #9a9ab0;
  --text-muted: #6a6a82;

  --accent: #4a9eff;
  --accent-dim: #2d6bbf;
  --accent-glow: rgba(74, 158, 255, 0.12);
  --accent-cyan: #5ce0d8;
  --accent-cyan-dim: rgba(92, 224, 216, 0.10);

  --border: #1e1e30;
  --border-light: #2a2a40;

  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width: 1080px;
  --section-padding: 6rem 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-cyan);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}


/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(8, 8, 13, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

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

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

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: all 0.3s;
}


/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-label {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 2rem;
  line-height: 1.8;
  font-style: italic;
}

.hero-summary {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}


/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-dim);
  border-color: var(--accent-dim);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-light);
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent-dim);
}

.btn-outline:hover {
  background: var(--accent-glow);
  color: var(--accent);
}

.btn-small {
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
}


/* --- Sections --- */
.section {
  padding: var(--section-padding);
}

.section-alt {
  background: var(--bg-secondary);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  margin-bottom: 3rem;
  line-height: 1.7;
}


/* --- Paper Section --- */
.paper-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  margin-top: 1rem;
}

.paper-venue {
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.paper-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.paper-author {
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 500;
}

.paper-affiliation {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.paper-link-row {
  margin-bottom: 2rem;
}

.paper-abstract {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  margin-bottom: 2rem;
}

.paper-abstract h4,
.collaborators h4 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.paper-abstract p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
}

.collaborators {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.collaborator-list {
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.collaborator-list li {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.collab-name {
  font-weight: 600;
  color: var(--text-primary);
}

.collab-model {
  color: var(--accent);
  font-size: 0.85rem;
}

.collab-role {
  color: var(--text-muted);
}


/* --- Taxonomy / Accordion --- */
.taxonomy {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.accordion {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.accordion:hover {
  border-color: var(--border-light);
}

.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  color: var(--text-primary);
  transition: background 0.2s;
}

.accordion-header:hover {
  background: var(--bg-card-hover);
}

.accordion-number {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 2rem;
  text-align: center;
}

.accordion-label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.accordion-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.accordion-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.accordion-icon {
  width: 20px;
  height: 20px;
  position: relative;
  flex-shrink: 0;
}

.accordion-icon::before,
.accordion-icon::after {
  content: '';
  position: absolute;
  background: var(--text-muted);
  border-radius: 1px;
  transition: transform 0.3s;
}

.accordion-icon::before {
  width: 14px;
  height: 2px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.accordion-icon::after {
  width: 2px;
  height: 14px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.accordion-header[aria-expanded="true"] .accordion-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.accordion-body.open {
  max-height: 600px;
}

.discipline-list {
  list-style: none;
  padding: 0 1.5rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.discipline-list li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.discipline-list strong {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.discipline-list span {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}


/* --- Projects Grid --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

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

.project-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}

.project-header {
  margin-bottom: 1rem;
}

.project-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.project-name {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.project-full-name {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.project-details {
  flex: 1;
  margin-bottom: 1.25rem;
}

.project-details h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.modality-list,
.layer-list,
.axis-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.modality-list li,
.layer-list li,
.axis-list li {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.modality-code {
  display: inline-block;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  min-width: 3rem;
  text-align: center;
  margin-right: 0.4rem;
}

.layer-label {
  display: inline-block;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 6.5rem;
}

.axis-poles {
  display: inline-block;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.72rem;
  color: var(--accent-cyan);
  min-width: 10rem;
}

.project-status {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.project-links {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}


/* --- About Section --- */
.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  margin-top: 1rem;
}

.about-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.about-roles {
  list-style: none;
  margin-bottom: 1.25rem;
}

.about-roles li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 0.15rem 0;
  padding-left: 1rem;
  position: relative;
}

.about-roles li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.about-bio {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  max-width: 700px;
}

.about-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.about-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s;
}

.about-links a:hover {
  color: var(--accent);
}


/* --- Footer --- */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-contact {
  margin-top: 0.4rem;
}

.footer-contact a {
  color: var(--text-muted);
}

.footer-contact a:hover {
  color: var(--accent);
}


/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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


/* --- Responsive --- */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

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

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 3.5rem;
    left: 0;
    right: 0;
    background: rgba(8, 8, 13, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0;
    border-bottom: 1px solid var(--border);
  }

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

  .nav-links li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .hero-title {
    font-size: clamp(2.2rem, 10vw, 3.5rem);
  }

  .hero-tagline {
    font-size: 1rem;
  }

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

  .paper-card,
  .about-card {
    padding: 1.5rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .discipline-list {
    padding-left: 1.5rem;
  }

  .accordion-header {
    padding: 1rem 1.25rem;
  }

  .axis-poles {
    display: block;
    margin-bottom: 0.15rem;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    text-align: center;
    max-width: 280px;
  }

  .about-links {
    flex-direction: column;
    gap: 0.75rem;
  }
}
