/* ==========================================================================
   ORE - Strategic Minerals & Rare Earth Elements Stylesheet
   ========================================================================== */

:root {
  --bg-dark: #080b12;
  --bg-card: #111726;
  --bg-card-hover: #182238;
  --bg-glass: rgba(17, 23, 38, 0.8);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(255, 215, 0, 0.35);

  --accent-gold: #ffd700;
  --accent-gold-light: #ffe066;
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-purple: #8a2be2;
  --accent-violet: #e100ff;
  --accent-emerald: #00e676;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-main: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  --shadow-card: 0 12px 35px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(255, 215, 0, 0.2);
}

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

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 20% 15%, rgba(255, 215, 0, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 80% 55%, rgba(0, 242, 254, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(138, 43, 226, 0.04) 0%, transparent 50%);
  background-attachment: fixed;
}

.shell {
  width: 90%;
  max-width: 1280px;
  margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4 {
  color: var(--text-main);
  line-height: 1.2;
  font-weight: 700;
}

.gold-gradient {
  background: linear-gradient(135deg, var(--accent-gold-light), var(--accent-gold), #d4af37);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cyan-gradient {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(8, 11, 18, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--text-main);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 1px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-cyan));
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
}

.logo-icon::after {
  content: "ORE";
  font-size: 0.75rem;
  font-weight: 900;
  color: #080b12;
  font-family: var(--font-mono);
  letter-spacing: -0.5px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.fav-counter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
}

.fav-counter-btn:hover {
  border-color: var(--accent-gold);
  background: rgba(255, 215, 0, 0.1);
}

.fav-count-badge {
  background: var(--accent-gold);
  color: #080b12;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
}

/* Hero Section */
.hero {
  padding: 6rem 0 4rem;
  position: relative;
  text-align: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.2rem;
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 50px;
  color: var(--accent-gold);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.6rem, 5.5vw, 4.5rem);
  letter-spacing: -1.5px;
  margin-bottom: 1.5rem;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold), #d4af37);
  color: #080b12;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 215, 0, 0.5);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-gold);
  transform: translateY(-2px);
}

/* Stats Strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-bottom: 5rem;
  backdrop-filter: blur(10px);
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  display: block;
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}

/* Section Common */
.section {
  padding: 5rem 0;
  border-top: 1px solid var(--border-color);
}

.section-header {
  margin-bottom: 3rem;
  text-align: center;
}

.section-subtitle {
  color: var(--accent-gold);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-size: 2.4rem;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* Rare Earth Elements (REE) Grid */
.ree-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.ree-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  position: relative;
  transition: var(--transition);
  cursor: pointer;
  overflow: hidden;
}

.ree-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--element-color, var(--accent-gold));
}

.ree-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

.ree-card.active {
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-glow);
}

.ree-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.ree-symbol-box {
  width: 54px;
  height: 54px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
}

.ree-atomic-num {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.ree-symbol {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--element-color, var(--accent-gold));
}

.ree-category-tag {
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.ree-name {
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.ree-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.ree-use-tag {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Gallery & Catalog Controls */
.catalog-controls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.search-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-input-wrapper {
  flex: 1;
  min-width: 280px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.8rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.sort-select {
  padding: 0.8rem 1.2rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  font-size: 0.9rem;
}

.filter-tags {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background: rgba(255, 215, 0, 0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  font-weight: 600;
}

/* Specimens Grid */
.specimens-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.specimen-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

.specimen-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 215, 0, 0.4);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
}

.specimen-img-container {
  height: 220px;
  background: radial-gradient(circle, #1a2233 0%, #0d121f 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.specimen-svg-visual {
  width: 140px;
  height: 140px;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.6));
  transition: transform 0.4s ease;
}

.specimen-card:hover .specimen-svg-visual {
  transform: scale(1.08) rotate(3deg);
}

.rarity-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-mythic { background: rgba(225, 0, 255, 0.2); border: 1px solid var(--accent-violet); color: var(--accent-violet); }
.badge-legendary { background: rgba(255, 215, 0, 0.2); border: 1px solid var(--accent-gold); color: var(--accent-gold); }
.badge-rare { background: rgba(0, 242, 254, 0.2); border: 1px solid var(--accent-cyan); color: var(--accent-cyan); }
.badge-uncommon { background: rgba(0, 230, 118, 0.2); border: 1px solid var(--accent-emerald); color: var(--accent-emerald); }

.fav-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(8, 11, 18, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(5px);
}

.fav-btn:hover, .fav-btn.active {
  color: #ff4757;
  border-color: #ff4757;
  background: rgba(255, 71, 87, 0.15);
}

.specimen-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.specimen-formula {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-gold);
  margin-bottom: 0.3rem;
}

.specimen-name {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.specimen-origin {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.specimen-props {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.8rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.2rem;
  font-size: 0.8rem;
}

.prop-label {
  color: var(--text-dim);
  display: block;
}

.prop-val {
  font-weight: 600;
  color: var(--text-main);
  font-family: var(--font-mono);
}

.specimen-card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.view-details-btn {
  background: none;
  border: none;
  color: var(--accent-gold);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: var(--transition);
}

.view-details-btn:hover {
  color: var(--accent-gold-light);
  gap: 0.5rem;
}

/* Modal Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 6, 10, 0.88);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1.5rem;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.open .modal-content {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-body-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  padding: 2.5rem;
}

@media (max-width: 768px) {
  .modal-body-layout {
    grid-template-columns: 1fr;
  }
}

.modal-visual-column {
  background: radial-gradient(circle, #1a2233 0%, #0d121f 100%);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
}

.modal-visual-column svg {
  width: 180px;
  height: 180px;
}

.modal-info-column h2 {
  font-size: 1.8rem;
  margin-bottom: 0.3rem;
}

.modal-formula {
  font-family: var(--font-mono);
  color: var(--accent-gold);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.modal-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.modal-details-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  border-radius: var(--radius-sm);
}

/* Journal / Educational Section */
.journal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.journal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: var(--transition);
}

.journal-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-5px);
}

.journal-tag {
  font-size: 0.75rem;
  color: var(--accent-purple);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  display: block;
}

.journal-title {
  font-size: 1.25rem;
  margin-bottom: 0.8rem;
}

.journal-snippet {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.journal-read-link {
  color: var(--accent-gold);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Inquiry Form */
.inquiry-container {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-card);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
}

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

/* Footer */
.site-footer {
  background: #04060a;
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-brand p {
  margin-top: 1rem;
  max-width: 300px;
  font-size: 0.85rem;
}

.footer-title {
  color: var(--text-main);
  font-size: 1rem;
  margin-bottom: 1.2rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

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

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem;
  color: var(--text-main);
  box-shadow: var(--shadow-glow);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 3000;
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .nav-menu {
    display: none;
  }
}

/* ==========================================================================
   ADDED: Real specimen photography support
   Photos fill the card/modal image area; the stylised crystal SVG sits behind
   as an automatic fallback that shows only if a photo fails to load.
   ========================================================================== */

/* Card thumbnail photo */
.specimen-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  background: radial-gradient(circle, #1a2233 0%, #0d121f 100%);
  transition: transform 0.5s ease;
}

.specimen-card:hover .specimen-photo {
  transform: scale(1.06);
}

/* Keep badge and favourite button above the photo */
.specimen-img-container .rarity-badge,
.specimen-img-container .fav-btn {
  z-index: 3;
}

/* New "common" rarity badge */
.badge-common {
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid var(--text-muted);
  color: var(--text-muted);
}

/* Modal: framed photo with SVG fallback behind */
.modal-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: radial-gradient(circle, #1a2233 0%, #0d121f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-photo-wrap .specimen-svg-visual {
  width: 160px;
  height: 160px;
}

.modal-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* Photo attribution link (Wikimedia Commons credit + license) */
.photo-credit {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--text-dim);
  text-decoration: none;
  text-align: center;
}

.photo-credit svg {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
}

.photo-credit:hover {
  color: var(--accent-gold);
}
