﻿/* ================================
   QuantumLinear — Site Styles (v2)
   Glass panel over responsive background
   ================================ */

/* --- Reset & box model --- */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

:root{
  --link: #7de7ff;
  --linkVisited: #b2f1ff;

  --bg: #070a10;
  --text: #eaf2ff;
  --muted: rgba(234,242,255,0.74);
  --muted2: rgba(234,242,255,0.60);

  --card: rgba(8, 12, 20, 0.62);
  --card2: rgba(8, 12, 20, 0.50);
  --border: rgba(155, 209, 255, 0.18);

  --accent: #58b7ff;
  --accent2:#2ee6c8;

  --shadow: 0 20px 60px rgba(0,0,0,0.55);
}

body{
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
}

/* Typography */
h1, h2, h3{
  font-family: 'Orbitron', 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
}


/* Links (ensure readable on dark backgrounds, especially mobile) */
a{ color: var(--accent); }
a:hover{ filter: brightness(1.08); }
a:visited{ color: var(--accent); }

/* Skip link */
.skip{
  position:absolute;
  left:-999px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}
.skip:focus{
  left: 16px;
  top: 16px;
  width:auto;
  height:auto;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(0,0,0,0.8);
  border: 1px solid var(--border);
  z-index: 9999;
}

/* --- Background layer (responsive) ---
   Desktop default: CurvedSpacetime.jpg
   Mobile: PhoneFriendlySpace.jpg
   Optional alt: CurvedSpaceBlackHole.jpg (swap file in --bg-img below)
*/
.bg{
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: var(--link);
  background-image:
    radial-gradient(1200px 600px at 20% 10%, rgba(88,183,255,0.18), transparent 60%),
    radial-gradient(900px 500px at 80% 30%, rgba(46,230,200,0.10), transparent 65%),
    url("images/CurvedSpacetime.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: saturate(1.05) contrast(1.02);
}

@media (max-width: 700px){
  :root{
    /* Brighter "quasar" links for mobile */
    --accent: #8fe9ff;
  }

  .bg{
    background-image:
      radial-gradient(900px 520px at 50% 0%, rgba(88,183,255,0.16), transparent 62%),
      radial-gradient(800px 520px at 50% 45%, rgba(46,230,200,0.10), transparent 68%),
      url("images/PhoneFriendlySpace.jpg");
    background-position: center top;
  }

  /* Make the top feel more "designed" while keeping papers on deep black */
  .brand{
    padding: 14px 12px;
    border-radius: 20px;
    background: rgba(0,0,0,0.22);
    border: 1px solid rgba(155, 209, 255, 0.14);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .heroCard{
    background: rgba(8, 12, 20, 0.48);
  }

  #papers.panel{
    background: rgba(0,0,0,0.78);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Subtle vignette overlay */
.bg::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(1200px 900px at 50% 10%, transparent 0 55%, rgba(0,0,0,0.55) 80%),
    linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0.75));
  z-index:-1;
}

/* --- Layout container --- */
.container{
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 38px);
  padding-bottom: clamp(26px, 6vw, 70px);
}

/* --- Hero --- */
.hero{
  display: grid;
  gap: clamp(16px, 3vw, 22px);
  margin-top: clamp(6px, 2vw, 20px);
}

.brand{
  text-align: center;
  padding-top: clamp(6px, 2vw, 14px);
}

.brand h1{
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: clamp(2.2rem, 6.2vw, 3.6rem);
  text-shadow: 0 10px 30px rgba(0,0,0,0.55);
}

.tagline{
  margin: 10px 0 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 2.8vw, 1.18rem);
}

.heroCard{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: clamp(16px, 3.5vw, 26px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.heroCard h2{
  text-transform: none;

  margin: 0 0 10px;
  font-weight: 700;
  font-size: clamp(1.25rem, 3.8vw, 1.8rem);
  letter-spacing: 0.01em;
}

.heroCard h3{
  margin: -4px 0 12px;
  font-weight: 600;
  font-size: clamp(1.05rem, 3.1vw, 1.25rem);
  letter-spacing: 0.02em;
  color: rgba(234,242,255,0.92);
}

.heroCard p{
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 3vw, 1.1rem);
}

.ctaRow{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  text-decoration:none;
  font-weight: 600;
  border: 1px solid var(--border);
  background: rgba(10, 14, 24, 0.35);
  color: var(--text);
  transition: transform 0.06s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover{ background: rgba(10, 14, 24, 0.55); border-color: rgba(155, 209, 255, 0.30); }
.btn:active{ transform: translateY(1px); }

.btn.primary{
  background: linear-gradient(135deg, rgba(88,183,255,0.95), rgba(46,230,200,0.80));
  border-color: rgba(255,255,255,0.18);
  color: #061019;
}
.btn.primary:hover{
  filter: brightness(1.04);
}
.btn.ghost{
  backdrop-filter: blur(8px);
}

/* --- Panels --- */
.panel{
  margin-top: clamp(18px, 3vw, 26px);
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: clamp(16px, 3.5vw, 24px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.sectionHead{
  display:grid;
  gap: 6px;
  margin-bottom: 12px;
}

.sectionHead h3{
  margin: 0;
  font-size: clamp(1.2rem, 3.8vw, 1.5rem);
}

.sectionNote{
  margin: 0;
  color: var(--muted2);
  font-size: 0.98rem;
}

/* --- Paper list --- */
.papers{
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 12px;
}

.paper details{
  border: 1px solid rgba(155, 209, 255, 0.16);
  background: rgba(4, 6, 10, 0.40);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 0 0 rgba(0,0,0,0);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.paper details:hover{
  border-color: rgba(155, 209, 255, 0.28);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.paper details:hover{
  border-color: rgba(155, 209, 255, 0.26);
  background: rgba(4, 6, 10, 0.48);
}

.paper summary{
  cursor: pointer;
  padding: 14px 38px 14px 14px; /* room for the chevron */
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  user-select: none;
  outline: none;
  position: relative;
}

/* "Loaded" chevron affordance */
.paper summary::after{
  content: "▸";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(234,242,255,0.72);
  font-size: 1.05rem;
  transition: transform 0.16s ease, color 0.16s ease;
}

.paper details[open] summary::after{
  transform: translateY(-50%) rotate(90deg);
  color: rgba(46,230,200,0.90);
}

/* Chevron indicator ("folding carrot") */
.paper summary::after{
  content: "›";
  font-size: 1.35rem;
  line-height: 1;
  color: rgba(234,242,255,0.65);
  transform: rotate(0deg);
  transition: transform 0.18s ease, color 0.18s ease;
  margin-left: 8px;
}

.paper details[open] summary::after{
  transform: rotate(90deg);
  color: rgba(234,242,255,0.86);
}

/* Chevron affordance ("loaded" feel) */
.paper summary::after{
  content: "›";
  font-size: 1.35rem;
  line-height: 1;
  color: rgba(234,242,255,0.80);
  transform: rotate(90deg);
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0.78;
}
.paper details[open] summary::after{
  transform: rotate(-90deg);
  opacity: 1;
}

.paper summary::-webkit-details-marker{ display:none; }

.num{
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-weight: 700;
  color: rgba(0,0,0,0.9);
  background: linear-gradient(135deg, rgba(88,183,255,0.95), rgba(46,230,200,0.65));
}

.title{
  font-weight: 600;
  line-height: 1.3;
}

.badges{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge{
  font-size: 0.82rem;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.88);
  background: rgba(255,255,255,0.08);
}

.badge.ok{ border-color: rgba(46,230,200,0.28); }
.badge.info{ border-color: rgba(88,183,255,0.30); }
.badge.warn{ border-color: rgba(255,200,80,0.30); }
.badge.soon{ border-color: rgba(170,150,255,0.28); }
.badge.mystery{ border-color: rgba(255,255,255,0.20); }

.pill{
  font-size: 0.82rem;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(155, 209, 255, 0.26);
  color: var(--text);
  background: rgba(88,183,255,0.10);
}
.pill:hover{ background: rgba(88,183,255,0.18); }

.body{
  padding: 0 14px 14px;
  color: var(--muted);
}
.body p{ margin: 10px 0 0; }
.muted{ color: var(--muted2); }

.paper details[open] summary{
  background: rgba(88,183,255,0.06);
  border-bottom: 1px solid rgba(155, 209, 255, 0.16);
}

.paper details[open] summary::after{
  transform: translateY(-50%) rotate(90deg);
  color: rgba(46,230,200,0.85);
}

.paper details[open]{
  border-color: rgba(88,183,255,0.30);
  background: rgba(4, 6, 10, 0.52);
}

.paper details[open]{
  border-color: rgba(88,183,255,0.30);
  box-shadow: 0 18px 50px rgba(0,0,0,0.55);
}

/* Teaser blur */
.blurred{
  filter: blur(0.9px);
  opacity: 0.72;
}

/* --- Figure --- */
.figure{
  margin: 10px 0 0;
  display: grid;
  gap: 10px;
}
.figure img{
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(155, 209, 255, 0.16);
  background: rgba(0,0,0,0.20);
}

.vizWrap{
  position: relative;
  border-radius: 18px;
  overflow: hidden;
}

.vizWrap img{ border-radius: 0; }

.vizPlay{
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(155, 209, 255, 0.28);
  background: rgba(0,0,0,0.55);
  color: rgba(234,242,255,0.92);
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.06s ease, background 0.2s ease, border-color 0.2s ease;
}
.vizPlay:hover{ background: rgba(0,0,0,0.68); border-color: rgba(155, 209, 255, 0.38); }
.vizPlay:active{ transform: translateY(1px); }
.figure figcaption{
  color: var(--muted2);
  font-size: 0.92rem;
  text-align: center;
}

.dl a{
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(143,233,255,0.28);
}
.dl a:hover{ border-bottom-color: rgba(143,233,255,0.60); }

/* --- Contact --- */
.contact{
  text-align: center;
  margin-top: 8px;
}

.contact button{
  background: linear-gradient(135deg, rgba(88,183,255,0.95), rgba(46,230,200,0.80));
  color: #061019;
  border: 1px solid rgba(255,255,255,0.18);
  padding: 12px 18px;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  border-radius: 14px;
  transition: transform 0.06s ease, filter 0.2s ease;
  max-width: 100%;
}

.contact button:hover{ filter: brightness(1.03); }
.contact button:active{ transform: translateY(1px); }

#emailDisplay{
  font-size: 1.05rem;
  color: rgba(234,242,255,0.80);
}
#emailDisplay em{
  color: var(--muted2);
  font-size: 0.92rem;
}

/* --- Footer --- */
.footer{
  margin-top: clamp(18px, 3vw, 28px);
  text-align: center;
}

.fineprint{
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* --- Reduced motion preference --- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ================================
   Mobile polish
   ================================ */
@media (max-width: 700px){
  /* Brighter "quasar" links on mobile */
  a, a:visited{ color: #9cf2ff; }

  .container{ padding: 18px 16px 54px; }

  /* Let the background breathe around the title/intro */
  .brand{
    padding: 14px 12px 6px;
    border-radius: 22px;
    background: rgba(0,0,0,0.28);
    border: 1px solid rgba(155, 209, 255, 0.14);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  .heroCard{
    background: rgba(8, 12, 20, 0.48);
  }

  /* Papers section: more intentional "black stage" */
  #papers.panel{
    background: rgba(0,0,0,0.78);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .paper summary{
    padding: 16px 14px;
  }
  .paper summary::after{ color: rgba(180, 235, 255, 0.95); }

  .pill{
    border-color: rgba(156, 242, 255, 0.35);
    background: rgba(156, 242, 255, 0.10);
    color: rgba(234,242,255,0.95);
  }
}

/* Mission copy */
.mission{
  margin: 0 0 12px;
  color: rgba(234,242,255,0.86);
}
.missionFooter{
  margin-top: 14px;
  color: rgba(234,242,255,0.80);
  font-size: 0.98rem;
}

@media (max-width: 768px) {

  a {
    color: #C3B091;
    text-decoration: none;
    border-bottom: 1px solid rgba(195,176,145,0.4);
    transition: all 0.25s ease;
  }

  a:hover {
    color: #E3D3A3;
    border-bottom: 1px solid #E3D3A3;
  }

}
