* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #0a0a0a; color: #e0e0e0; overflow-x: hidden; }
a { color: #64ffda; text-decoration: none; }
a:hover { text-decoration: underline; }


/* Single-page splash transition */
.site-shell { opacity: 1; visibility: visible; transition: opacity 0.35s ease; }
body.start-splash { overflow: hidden; }
body.start-splash .site-shell { opacity: 0; visibility: hidden; }
body.start-splash.splash-leaving .site-shell { opacity: 1; visibility: visible; }
body.start-home .site-shell { opacity: 1; visibility: visible; }

/* Navigation */
nav { position: fixed; top: 0; width: 100%; padding: 1rem 2rem; background: rgba(10,10,10,0.9);
      backdrop-filter: blur(10px); z-index: 1000; display: flex; justify-content: space-between; align-items: center;
      overflow: hidden; gap: 1.5rem; }
nav .logo { flex: 0 0 auto; font-size: 1.5rem; font-weight: bold; color: #64ffda; }
nav .links { flex: 1 1 auto; min-width: 0; margin-right: 1rem; overflow-x: auto; overflow-y: hidden; white-space: nowrap; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
nav .links a { display: inline-block; margin-left: 1.5rem; color: #e0e0e0; font-size: 0.95rem; }
nav .links a:hover { color: #64ffda; }

/* Hero */
#hero { min-height: 100dvh; min-width: 100dvw; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; max-width: none !important; padding: 0 !important; width: 100%; margin: 0; overflow: hidden; }
#hero-bg { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 100dvw; min-width: 100%; height: 100%; z-index: 0; overflow: hidden; }

#hero-bg canvas { width: 100dvw !important; min-width: 100% !important; height: 100% !important; display: block; }

#hero .content { position: relative; z-index: 1; }
#hero h1 { font-size: 3.5rem; margin-bottom: 0.5rem; color: #fff; }
#hero .tagline { font-size: 1.3rem; color: #64ffda; }

/* Sections */
section { padding: 6rem 2rem; max-width: 900px; margin: 0 auto; }
section h2 { font-size: 2rem; margin-bottom: 2rem; color: #64ffda; border-bottom: 2px solid #1a1a2e; padding-bottom: 0.5rem; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.card { background: #1a1a2e; border-radius: 10px; padding: 1.5rem; transition: transform 0.3s, box-shadow 0.3s; }
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(100,255,218,0.1); }
.card h3 { color: #64ffda; margin-bottom: 0.5rem; }

/* Publications */
.pub-list { list-style: none; }
.pub-list li { padding: 1rem 0; border-bottom: 1px solid #1a1a2e; }
.pub-list li:hover { background: #1a1a2e; border-radius: 5px; padding-left: 1rem; }
.pub-list li.pub-note { color: #aaa; font-style: italic; border-bottom: none; }
.pub-list li.pub-note:hover { background: transparent; padding-left: 0; border-radius: 0; }
.pub-note-tight { padding-top: 0; }
.pub-note-no-bottom { padding-bottom: 0; }
.pub-subheading { color: #64ffda; margin-top: 2rem; margin-bottom: 1rem; }
.pub-subheading-working { margin-top: 3rem; }

/* Contact */
.contact-links { display: flex; gap: 2rem; flex-wrap: wrap; }
.contact-links-spaced { margin-bottom: 2rem; }
.contact-links a { font-size: 1.1rem; padding: 0.8rem 1.5rem; border: 1px solid #64ffda; border-radius: 5px;
                   transition: background 0.3s; }
.contact-links a:hover { background: rgba(100,255,218,0.1); text-decoration: none; }
.contact-intro { color: #e0e0e0; margin-bottom: 1rem; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; max-width: 500px; }
.contact-input { padding: 0.8rem; border-radius: 5px; border: none; background: #ffffff; color: #000000; }
textarea.contact-input { resize: vertical; }
.contact-submit { padding: 0.8rem 1.5rem; border: 1px solid #64ffda; border-radius: 5px; background: transparent; color: #64ffda; font-size: 1.1rem; cursor: pointer; transition: background 0.3s; }
.contact-submit:hover { background: rgba(100,255,218,0.1); }
.contact-result-container { margin-top: 1rem; }
.contact-result { font-weight: bold; }
.contact-result.success { color: #64ffda; }
.contact-result.error { color: #ff6b6b; }
.about-placeholder { color:#666; font-style:italic; margin-bottom:1rem; }

/* Audio toggle */
#audio-toggle { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 1000; background: rgba(26,26,46,0.8);
                border: 1px solid #64ffda; color: #64ffda; font-size: 1.5rem; width: 50px; height: 50px;
                border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
                transition: background 0.3s; backdrop-filter: blur(10px); }
#audio-toggle:hover { background: rgba(100,255,218,0.15); }

/* Footer */
footer { text-align: center; padding: 2rem; color: #666; font-size: 0.85rem; }


@media (max-width: 700px) {
  nav { padding: 0.85rem 1rem; gap: 1rem; }
  nav .logo { font-size: 1.35rem; line-height: 1.05; }
  nav .links { margin-right: 0; padding-bottom: 0.25rem; }
  nav .links a { margin-left: 1rem; font-size: 0.95rem; }
  #hero h1 { font-size: clamp(2.6rem, 12vw, 4rem); }
  #hero .tagline { font-size: 1.05rem; padding: 0 1rem; }
  section { padding: 5rem 1.5rem; }
  .contact-form { max-width: 100%; }
  .contact-input, .contact-submit { font-size: 1rem; }
}

@media (max-width: 500px) {
  nav { padding: 0.8rem 0.75rem; gap: 0.75rem; }
  nav .logo { font-size: 1.25rem; max-width: 7.5rem; }
  nav .links a { margin-left: 0.85rem; font-size: 0.9rem; }
  section { padding: 4.5rem 1rem; }
  #audio-toggle { bottom: 1rem; right: 1rem; width: 46px; height: 46px; font-size: 1.35rem; }
}

@media (max-width: 1024px) and (orientation: landscape) and (max-height: 500px) {
  nav { padding: 0.55rem 1rem; }
  section { padding-top: 4.25rem; padding-bottom: 4rem; }
  #hero h1 { font-size: 2.6rem; }
}
