/* ============================================================
   Johannes Debler — Personal Academic Website
   ============================================================ */

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

:root {
  --bg:          #0f1117;
  --bg-alt:      #161b27;
  --surface:     #1e2535;
  --border:      #2a3347;
  --accent:      #4a9eff;
  --accent-dim:  #2d6ab5;
  --accent2:     #64d4b0;
  --text:        #e2e8f0;
  --text-muted:  #8896aa;
  --text-dim:    #5a6a80;
  --white:       #ffffff;
  --nav-h:       60px;
  --radius:      10px;
  --transition:  0.25s ease;
  --font-sans:   'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono:   'Fira Code', 'Consolas', monospace;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent2); }

img { max-width: 100%; display: block; }

/* ---------- Utility ---------- */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

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

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--white);
  letter-spacing: -0.02em;
}

.section-title::after {
  content: '';
  display: block;
  width: 3rem;
  height: 3px;
  background: var(--accent);
  margin-top: 0.5rem;
  border-radius: 2px;
}

.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  margin-top: 0.5rem;
}

/* ---------- Navbar ---------- */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  background: rgba(15, 17, 23, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}

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

.nav-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color var(--transition);
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}

/* Subtle animated starfield background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(74, 158, 255, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(100, 212, 176, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 3.5rem;
  max-width: 860px;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.hero-photo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--accent);
  box-shadow: 0 0 40px rgba(74, 158, 255, 0.25);
  flex-shrink: 0;
}

.hero-text h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--accent2);
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.hero-affil {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: transform var(--transition), box-shadow var(--transition);
}

.badge:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.4); }

.badge-orcid   { background: #a6ce39; color: #111; }
.badge-github  { background: #24292f; color: #fff; border: 1px solid #444; }
.badge-linkedin { background: #0a66c2; color: #fff; }
.badge-bluesky  { background: #0085ff; color: #fff; }

.hero-scroll-hint {
  margin-top: 3.5rem;
  font-size: 1.4rem;
  color: var(--text-dim);
  animation: bounce 2s infinite;
  position: relative;
  z-index: 1;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 3rem;
  margin-bottom: 3rem;
}

.about-text p { margin-bottom: 1rem; color: var(--text); }

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-content: start;
}

.highlight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  transition: border-color var(--transition);
}

.highlight-card:hover { border-color: var(--accent); }

.highlight-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.highlight-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Timeline ---------- */
.edu-section h3,
.exp-col h3 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  margin-top: 2rem;
}

.timeline { position: relative; }

.timeline::before {
  content: '';
  position: absolute;
  left: 72px;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  position: relative;
}

.timeline-year {
  min-width: 72px;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  padding-top: 0.25rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.timeline-content {
  position: relative;
  padding-left: 1.5rem;
}

.timeline-content::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 0.55rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.section-alt .timeline-content::before { border-color: var(--bg-alt); }

.timeline-content strong { display: block; color: var(--white); font-size: 0.95rem; }
.timeline-content .institution { display: block; color: var(--accent2); font-size: 0.85rem; margin-bottom: 0.25rem; }
.timeline-content em { color: var(--text-muted); font-size: 0.88rem; }
.timeline-content p { color: var(--text-muted); font-size: 0.88rem; margin-top: 0.2rem; }

/* ---------- Publications ---------- */
.pub-list { display: flex; flex-direction: column; gap: 0; }

.pub-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.pub-item:last-child { border-bottom: none; }
.pub-item:hover { background: rgba(74, 158, 255, 0.03); }

.pub-year {
  min-width: 44px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  padding-top: 0.15rem;
  letter-spacing: 0.02em;
}

.pub-title {
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.pub-authors {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.15rem;
}

.pub-journal {
  color: var(--accent2);
  font-size: 0.82rem;
  font-style: italic;
  margin-bottom: 0.3rem;
}

.pub-doi {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  display: inline-block;
  transition: color var(--transition), border-color var(--transition);
}

.pub-doi:hover { color: var(--accent); border-color: var(--accent); }

.protocols-note {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent2);
}

.protocols-note h3 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 0.5rem; }
.protocols-note p { font-size: 0.9rem; color: var(--text-muted); }

/* ---------- Presentations ---------- */
.pres-list { display: flex; flex-direction: column; gap: 0; }

.pres-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}

.pres-item:last-child { border-bottom: none; }

.pres-meta {
  min-width: 80px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  padding-top: 0.15rem;
}

.pres-year {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
}

.pres-type {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
}

.pres-talk   { background: rgba(74, 158, 255, 0.15); color: var(--accent); }
.pres-poster { background: rgba(100, 212, 176, 0.15); color: var(--accent2); }

.pres-details strong { color: var(--white); font-size: 0.9rem; display: block; margin-bottom: 0.15rem; }
.pres-details p { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.1rem; }

/* ---------- Awards ---------- */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.award-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition);
}

.award-card:hover { transform: translateY(-3px); border-color: var(--accent); }

.award-year {
  background: var(--accent);
  color: var(--bg);
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.4rem 1rem;
  letter-spacing: 0.05em;
}

.award-body { padding: 1rem; }
.award-body h3 { font-size: 0.95rem; color: var(--white); margin-bottom: 0.4rem; }
.award-body p  { font-size: 0.83rem; color: var(--text-muted); }

/* ---------- Experience ---------- */
.exp-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.membership-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.membership-list li {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 0.4rem 0.8rem;
  background: var(--surface);
  border-radius: 5px;
  border-left: 3px solid var(--accent2);
}

/* ---------- Contact ---------- */
.contact-container { text-align: center; }

.contact-intro {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
}

.contact-item:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.contact-icon {
  font-size: 1.1rem;
  color: var(--accent);
}

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

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

.tng-trigger {
  cursor: pointer;
  color: var(--text-dim);
  transition: color var(--transition), text-shadow var(--transition);
  display: inline-block;
  user-select: none;
}

.tng-trigger:hover {
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

/* ---------- TNG Easter Egg Modal ---------- */
.tng-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 4, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.tng-modal.active {
  opacity: 1;
  pointer-events: all;
}

.tng-modal-inner {
  position: relative;
  max-width: 480px;
  width: 90%;
  background: #080c14;
  border: 2px solid #f5a623;
  border-radius: 6px;
  overflow: hidden;
  font-family: var(--font-mono);
}

.tng-starfield {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.tng-star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
  animation: twinkle 3s infinite alternate;
}

@keyframes twinkle {
  from { opacity: 0.2; }
  to   { opacity: 1; }
}

.tng-close {
  position: absolute;
  top: 0.5rem; right: 0.75rem;
  background: none;
  border: none;
  color: #f5a623;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 2;
  line-height: 1;
}

.tng-content {
  padding: 1.75rem 2rem 1.5rem;
  position: relative;
  z-index: 1;
  text-align: center;
}

.tng-lcars-bar {
  height: 8px;
  background: linear-gradient(90deg, #f5a623 0%, #dd6b33 30%, #f5a623 60%, #99ccff 100%);
  border-radius: 4px;
  margin-bottom: 1.25rem;
}

.tng-lcars-bottom { margin-top: 1.25rem; margin-bottom: 0.75rem; }

.tng-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: #f5a623;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.tng-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: #99ccff;
  margin-bottom: 0.25rem;
}

.tng-rank {
  font-size: 0.78rem;
  color: #f5a623;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.tng-quote {
  font-size: 0.92rem;
  color: #cce4ff;
  font-style: italic;
  line-height: 1.7;
  margin-bottom: 0.4rem;
}

.tng-attribution {
  font-size: 0.75rem;
  color: #7aa4cc;
}

.tng-engage {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.25em;
  color: #f5a623;
  cursor: pointer;
  transition: color var(--transition), text-shadow var(--transition);
  margin-top: 0.25rem;
}

.tng-engage:hover {
  color: #fff;
  text-shadow: 0 0 12px rgba(245, 166, 35, 0.8);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: 1rem 1.5rem; gap: 0.75rem; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }

  .hero-inner { flex-direction: column; text-align: center; gap: 2rem; }
  .hero-photo { width: 160px; height: 160px; }
  .hero-links { justify-content: center; }

  .about-grid { grid-template-columns: 1fr; }
  .about-highlights { grid-template-columns: repeat(4, 1fr); }

  .exp-cols { grid-template-columns: 1fr; }

  .timeline::before { left: 60px; }
  .timeline-year { min-width: 60px; }

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

@media (max-width: 480px) {
  .about-highlights { grid-template-columns: 1fr 1fr; }
  .awards-grid { grid-template-columns: 1fr; }
  .contact-links { flex-direction: column; align-items: stretch; }
}
