/* Self-hosted Orbitron — no external dependency */
@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/orbitron-700.woff2') format('woff2'),
       url('../fonts/orbitron-700.woff') format('woff');
}

/* DragonWorx.Bio v2 — Light theme · Reptile palette */
/* Sage/moss background · Orange-amber accents · Dark charcoal type */

:root {
  /* Background spectrum — warm sage/moss greens */
  --bg:        #E8EDE2;   /* main page bg — muted sage green */
  --bg-alt:    #DFE6D8;   /* alternate section */
  --bg-card:   #F2F5EE;   /* card backgrounds */
  --bg-white:  #FAFDF8;   /* near-white panels */
  --bg-dark:   #2A1E14;   /* footer / dark panels */

  /* Reptile fire palette — oranges, ambers, brick */
  --fire-1:   #801100;    /* dark brick — used sparingly */
  --fire-2:   #B62203;    /* dragon red — badges, icons */
  --fire-3:   #D73502;    /* bishop red — primary action */
  --fire-4:   #E85B1A;    /* burnt orange — hover states */
  --fire-5:   #F07B2A;    /* amber orange — highlights */
  --gold:     #C8920A;    /* dark gold — labels, metadata */
  --gold-lt:  #F5C842;    /* bright gold — accent points */

  /* Reptile greens — structural */
  --reptile-1: #3D5A20;   /* deep forest — heavy text on light */
  --reptile-2: #5A7A35;   /* moss — secondary text */
  --reptile-3: #7A9A50;   /* sage — muted text */
  --reptile-4: #A8C080;   /* pale leaf — borders */
  --reptile-5: #C8D8B0;   /* very pale — dividers */

  /* Type */
  --text-primary:  #1E2A10;   /* near-black, warm green tint */
  --text-secondary:#3D5A20;   /* deep forest */
  --text-muted:    #6A8040;   /* sage */
  --text-dim:      #9AB060;   /* light sage */

  /* Borders */
  --border:        #B8CC98;
  --border-strong: #8AA868;

  /* TRL colors */
  --trl2: #D73502;
  --trl3: #E85B1A;
  --trl4: #C8920A;
  --trl5: #5A7A35;
  --trl6: #3D5A20;

  --font-serif: 'Orbitron', 'Arial Black', sans-serif;
  --font-sans:  system-ui, -apple-system, 'Helvetica Neue', 'Segoe UI', Arial, sans-serif;
  --font-mono:  'Courier New', Courier, monospace;
  --radius: 8px;
  --max-w: 1200px;
  --shadow: 0 2px 12px rgba(30,42,16,0.10);
  --shadow-lg: 0 6px 28px rgba(30,42,16,0.14);
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--fire-3); text-decoration: none; transition: color 0.18s; }
a:hover { color: var(--fire-4); }
ul { list-style: none; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 2rem; }

/* EYEBROW */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: bold;
  color: var(--fire-3);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

/* HEADINGS */
h1, h2, h3 { font-family: var(--font-serif); color: var(--text-primary); line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 1.2rem; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); margin-bottom: 0.9rem; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); margin-bottom: 0.6rem; }
.section-intro { font-size: 1.05rem; color: var(--text-muted); max-width: 680px; margin-bottom: 2.5rem; line-height: 1.75; }
.subhead { font-family: var(--font-sans); font-weight: 600; font-size: 1rem; color: var(--text-secondary); margin-bottom: 1.5rem; }

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 0.72rem 1.65rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.18s;
  border: 2px solid transparent;
}
.btn-primary { background: var(--fire-3); color: #fff; border-color: var(--fire-3); }
.btn-primary:hover { background: var(--fire-4); border-color: var(--fire-4); color: #fff; }
.btn-ghost { background: transparent; color: var(--fire-3); border-color: var(--fire-3); }
.btn-ghost:hover { background: var(--fire-3); color: #fff; }

/* NAV */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(232,237,226,0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(30,42,16,0.08);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 2rem;
  height: 62px; display: flex; align-items: center; gap: 1.5rem;
}
.nav-logo { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; flex-shrink: 0; overflow: hidden; }
.nav-logo img { display: block; flex-shrink: 0; }
.nav-dragon { height: 48px !important; width: 46px !important; max-height: 48px !important; max-width: 46px !important; object-fit: contain; flex-shrink: 0; }
.nav-wordmark { display: flex; flex-direction: column; gap: 0; line-height: 1; flex-shrink: 0; }
.nav-brand { font-family: 'Orbitron', sans-serif; font-size: 1.2rem; font-weight: 700; color: var(--fire-3); letter-spacing: 0.02em; line-height: 1.1; white-space: nowrap; }
.nav-sub { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 0.48rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-dim); margin-top: 0.15rem; white-space: nowrap; }
.nav-name { font-family: 'Orbitron', sans-serif; font-size: 1.25rem; font-weight: bold; color: var(--text-primary); }
.nav-name .tld { color: var(--fire-3); }
.nav-links { display: flex; align-items: center; gap: 0.1rem; margin-left: auto; position: relative; }
.nav-links > li > a {
  padding: 0.4rem 0.8rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--text-secondary);
  border-radius: 5px;
  display: block;
  transition: all 0.18s;
}
.nav-links > li > a:hover { color: var(--fire-3); background: rgba(215,53,2,0.07); }
.nav-cta { background: var(--fire-3) !important; color: #fff !important; padding: 0.4rem 1rem !important; font-weight: 600 !important; }
.nav-cta:hover { background: var(--fire-4) !important; }

/* Dropdown */
.has-sub { position: relative; }
.sub-menu {
  display: none;
  position: absolute; top: 100%; left: 0;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 240px;
  padding: 0.5rem 0;
  z-index: 300;
}
.has-sub:hover .sub-menu { display: block; }
.sub-menu li a {
  display: block;
  padding: 0.5rem 1.1rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.sub-menu li a:hover { background: rgba(215,53,2,0.07); color: var(--fire-3); }
.sub-divider {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--gold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.6rem 1.1rem 0.2rem;
  display: block;
  border-top: 1px solid var(--border);
  margin-top: 0.3rem;
}
.hamburger { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.3rem; cursor: pointer; margin-left: auto; }

/* HERO */
#hero { padding: 7rem 0 4rem; background: var(--bg-white); border-bottom: 1px solid var(--border); }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.hero-text h1 span { color: var(--fire-3); font-style: italic; }
.hero-sub { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 2rem; max-width: 500px; line-height: 1.75; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-logo-area { display: flex; flex-direction: column; align-items: center; gap: 2rem; }
.hero-dragon { filter: drop-shadow(0 4px 20px rgba(215,53,2,0.2)); }
.hero-stat-ring { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.hstat { text-align: center; }
.hstat .hv { display: block; font-family: 'Orbitron', sans-serif; font-size: 1.6rem; font-weight: bold; color: var(--fire-3); }
.hstat .hl { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); line-height: 1.3; }

/* SECTIONS */
section { padding: 5rem 0; }
#projects { background: var(--bg); }
#extended-research { background: var(--bg-alt); }
#future-quests { background: var(--bg); }
#about { background: var(--bg-white); }
#downloads { background: var(--bg-alt); }
#contact { background: var(--bg); }

/* PROJECT FEATURE */
.project-feature {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--fire-3);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.proj-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: bold;
  color: var(--fire-3);
  letter-spacing: 0.2em;
  margin-bottom: 0.75rem;
}
.proj-feature-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.proj-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: bold;
  padding: 3px 9px;
  border-radius: 3px;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
}
.proj-badge-active { background: rgba(215,53,2,0.1); color: var(--fire-3); border: 1px solid var(--fire-3); }
.proj-feature-text h3 { font-size: 1.5rem; margin-bottom: 0.75rem; color: var(--text-primary); }
.proj-feature-text p { color: var(--text-muted); line-height: 1.7; margin-bottom: 1.25rem; font-size: 0.97rem; }
.proj-stats { display: flex; gap: 1.5rem; margin-bottom: 1.25rem; }
.pstat { display: flex; flex-direction: column; gap: 0.1rem; }
.pstat span { font-family: 'Orbitron', sans-serif; font-size: 1.5rem; font-weight: bold; color: var(--fire-3); }
.pstat { font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-mono); }
.proj-animals { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.animal-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 8px;
  background: rgba(90,122,53,0.1);
  border: 1px solid var(--reptile-4);
  color: var(--reptile-2);
  border-radius: 4px;
}
.proj-feature-img { overflow: hidden; }
.proj-feature-img img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; max-height: 380px; object-fit: cover; object-position: center top; display: block; }

/* UPCOMING GRID */
.upcoming-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-top: 1rem; }
.upcoming-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  transition: transform 0.18s, box-shadow 0.18s;
}
.upcoming-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.uc-icon { font-size: 1.7rem; margin-bottom: 0.5rem; }
.uc-name { font-family: 'Orbitron', sans-serif; font-size: 1rem; font-weight: bold; color: var(--fire-3); margin-bottom: 0.2rem; }
.uc-source { font-family: var(--font-mono); font-size: 0.67rem; color: var(--reptile-2); margin-bottom: 0.7rem; line-height: 1.3; }
.upcoming-card p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 0.75rem; }
.uc-trl {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: bold;
  padding: 2px 7px;
  border-radius: 3px;
  color: #fff;
}
.trl2 { background: var(--trl2); }
.trl3 { background: var(--trl3); }
.trl4 { background: var(--trl4); }
.trl5 { background: var(--trl5); }
.trl6 { background: var(--trl6); }

/* EXTENDED RESEARCH CARDS */
.section-category-header { margin-bottom: 2.5rem; }
.category-quest h2 { color: var(--reptile-1); }
.research-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.research-grid-3 { grid-template-columns: repeat(3, 1fr); }
.research-card {
  display: block;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all 0.18s;
  color: var(--text-primary);
}
.research-card:hover { border-color: var(--reptile-3); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.rc-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.rc-cat {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: bold;
  color: var(--reptile-2);
  letter-spacing: 0.18em;
  margin-bottom: 0.5rem;
}
.research-card h3 { font-size: 1.25rem; color: var(--text-primary); margin-bottom: 0.75rem; }
.research-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 1.1rem; }
.rc-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.rc-tags span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 2px 7px;
  background: rgba(90,122,53,0.1);
  border: 1px solid var(--reptile-4);
  color: var(--reptile-2);
  border-radius: 3px;
}
.rc-link { font-weight: 700; color: var(--fire-3); font-size: 0.9rem; }

/* QUESTS */
.quests-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.quest-card {
  display: block;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all 0.18s;
  color: var(--text-primary);
  max-width: 760px;
}
.quest-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.qc-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.qc-cat {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: bold;
  color: var(--gold);
  letter-spacing: 0.18em;
  margin-bottom: 0.5rem;
}
.quest-card h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.quest-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 1.1rem; }
.qc-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.qc-tags span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 2px 7px;
  background: rgba(200,146,10,0.1);
  border: 1px solid rgba(200,146,10,0.3);
  color: var(--gold);
  border-radius: 3px;
}
.qc-status {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}
.qc-link { font-weight: 700; color: var(--gold); font-size: 0.9rem; }

/* ABOUT */
.about-inner { display: grid; grid-template-columns: 1fr auto; gap: 4rem; align-items: center; }
.about-text p { color: var(--text-muted); margin-bottom: 1rem; line-height: 1.75; }

/* DOWNLOADS */
.dl-list { display: flex; flex-direction: column; gap: 1rem; }
.dl-row {
  display: flex; align-items: center; gap: 1.5rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.8rem;
  color: var(--text-primary);
  transition: all 0.18s;
  box-shadow: var(--shadow);
}
.dl-row:hover { border-color: var(--fire-3); transform: translateX(4px); color: var(--text-primary); }
.dlr-icon { font-size: 1.8rem; flex-shrink: 0; }
.dlr-info { flex: 1; }
.dlr-title { font-family: 'Orbitron', sans-serif; font-size: 1rem; font-weight: bold; margin-bottom: 0.3rem; }
.dlr-desc { font-size: 0.83rem; color: var(--text-muted); margin-bottom: 0.35rem; }
.dlr-meta { font-family: var(--font-mono); font-size: 0.68rem; color: var(--gold); }
.dlr-dl { font-size: 1.3rem; color: var(--fire-3); flex-shrink: 0; }

/* CONTACT */
.contact-inner h2 { margin-bottom: 1.5rem; }
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; max-width: 640px; }
.contact-item { }
.ci-label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-dim); letter-spacing: 0.12em; margin-bottom: 0.3rem; }
.contact-item a, .contact-item span { font-size: 1rem; color: var(--text-primary); }
.contact-item a:hover { color: var(--fire-3); }

/* FOOTER */
footer { background: var(--bg-dark); padding: 2.5rem 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 0.7rem; }
.footer-brand img { filter: brightness(1.8) saturate(0.6); opacity: 0.85; }
.footer-name { font-family: 'Orbitron', sans-serif; font-size: 1.05rem; font-weight: bold; color: #E8C898; }
.footer-name span { color: var(--fire-5); }
.footer-sub { font-family: var(--font-mono); font-size: 0.68rem; color: #7A6A58; }
.footer-nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-nav a { font-size: 0.82rem; color: #8A7868; }
.footer-nav a:hover { color: var(--fire-5); }
.footer-legal { font-family: var(--font-mono); font-size: 0.66rem; color: #6A5A48; }

/* FADE-IN */
.fade-in { opacity: 0; transform: translateY(16px); transition: opacity 0.55s ease, transform 0.55s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* NAV SCROLL */
#nav.scrolled { border-bottom-color: var(--border-strong); }

/* RESPONSIVE */
@media (max-width: 1100px) {
  .upcoming-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-logo-area { order: -1; }
  .proj-feature-inner { grid-template-columns: 1fr; }
  .research-grid { grid-template-columns: 1fr; }
  .research-grid-3 { grid-template-columns: 1fr; }
  .about-inner { grid-template-columns: 1fr; }
  .about-img { display: none; }
  .proj-stats { gap: 1rem; flex-wrap: wrap; }
  .pstat span { font-size: 1.2rem; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .nav-links.open {
    display: block;
    position: fixed;
    top: 62px; left: 0; right: 0;
    height: calc(100vh - 62px);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 0;
    z-index: 199;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    list-style: none;
  }
  .nav-links.open > li > a {
    display: block; padding: 0.9rem 2rem; font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }
  /* Hide all sub-menus entirely on mobile */
  .sub-menu { display: none !important; }
  .has-sub > a::after { content: none !important; }
  .upcoming-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  /* Project feature tile mobile */
  .project-feature { padding: 1.25rem; }
  .proj-feature-img { display: none; }
  .proj-stats { flex-direction: column; gap: 0.75rem; }
  .pstat { flex-direction: row; align-items: baseline; gap: 0.5rem; }
  .pstat span { font-size: 1.3rem; }
  .proj-animals { gap: 0.35rem; }
  .animal-tag { font-size: 0.68rem; }
}
