/* ============================================================
   Spiroligomer Nanostructures Lab — site styles
   One file controls the look of every page.
   Tweak the variables below to reskin the whole site.
   ============================================================ */

:root {
  /* ---- Theme: Gradient Tech ---- */
  --ink:        #1a1f2b;   /* main text            */
  --ink-soft:   #55607a;   /* secondary text       */
  --accent:     #7c3aed;   /* links, highlights (violet) */
  --accent-dk:  #6d28d9;
  --bg:         #ffffff;
  --bg-soft:    #f7f8fc;   /* section backgrounds  */
  --line:       #e6e9f2;   /* borders/dividers     */
  --max:        980px;     /* content width        */
  --radius:     10px;
  --shadow:     0 1px 3px rgba(20,30,60,.08), 0 6px 24px rgba(20,30,60,.06);
  /* the vivid hero banner gradient — reused on every page's hero */
  --hero-gradient: linear-gradient(120deg, #2563eb 0%, #7c3aed 45%, #06b6d4 100%);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- layout helpers ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section--soft { background: var(--bg-soft); border-block: 1px solid var(--line); position: relative; }
/* colorful gradient accent line at the top of alternating sections */
.section--soft::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--hero-gradient);
}

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max); margin: 0 auto; padding: 14px 24px;
}
.nav__brand { font-weight: 700; letter-spacing: -.01em; color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.nav__brand span { color: var(--accent); }
.nav__links { display: flex; gap: 22px; }
.nav__links a { color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--accent); }

/* ---------- hero ---------- */
.hero {
  padding: 84px 0 72px;
  background: var(--hero-gradient);
  color: #fff;
}
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 .4em; color: #fff; }
.hero p.lead { font-size: 1.2rem; color: rgba(255,255,255,.9); max-width: 640px; margin: 0 0 1.6em; }
.hero p.lead strong { color: #fff; }
/* on the gradient, links inside the hero read white */
.hero a:not(.btn):not(.btn--ghost) { color: #fff; text-decoration-color: rgba(255,255,255,.6); }

/* hero buttons need light styling to sit on the gradient */
.hero .btn { background: #fff; color: var(--accent-dk); }
.hero .btn:hover { background: #f0ecff; color: var(--accent-dk); }
.hero .btn--ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.55); }
.hero .btn--ghost:hover { background: rgba(255,255,255,.18); color: #fff; }

/* ---------- typography ---------- */
h2 { font-size: 1.7rem; letter-spacing: -.01em; margin: 0 0 .6em; }
h3 { font-size: 1.25rem; margin: 0 0 .35em; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-dk); }
.muted { color: var(--ink-soft); }
.center { text-align: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 11px 20px; border-radius: 8px;
  background: var(--accent); color: #fff; text-decoration: none; font-weight: 600;
  box-shadow: var(--shadow);
}
.btn:hover { background: var(--accent-dk); color: #fff; }
.btn--ghost { background: transparent; color: var(--accent); box-shadow: none; border: 1px solid var(--line); }
.btn--ghost:hover { background: var(--bg-soft); color: var(--accent-dk); }

/* ---------- cards / grid ---------- */
.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .grid--2, .grid--3 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card__tag { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--accent); margin-bottom: .5em; }

/* ---------- research areas ---------- */
.area { padding: 40px 0; border-top: 1px solid var(--line); }
.area:first-of-type { border-top: 0; }
.area__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 760px) { .area__grid { grid-template-columns: 1fr; } }

/* ---------- figures ---------- */
figure { margin: 0; }
figure img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); display: block; cursor: zoom-in; }
figcaption { font-size: .9rem; color: var(--ink-soft); margin-top: .5em; }

/* ---------- lightbox (click a figure to enlarge) ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: center; justify-content: center;
  padding: 5vh 5vw;
  background: rgba(10,14,24,.9);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.lightbox.is-open { display: flex; }
.lightbox__inner { display: flex; flex-direction: column; align-items: center; max-width: 92vw; }
.lightbox__img {
  max-width: 92vw; max-height: 80vh; width: auto; height: auto;
  border-radius: 8px; background: #fff;               /* keeps transparent diagrams readable */
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
}
.lightbox__cap {
  color: #eef2f8; font-size: .95rem; line-height: 1.5;
  margin: 16px auto 0; max-width: 720px; text-align: center;
}
.lightbox__close {
  position: absolute; top: 18px; right: 22px;
  width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.14); color: #fff;
  font-size: 1.6rem; line-height: 1;
}
.lightbox__close:hover { background: rgba(255,255,255,.28); }

/* ---------- references ---------- */
.refs { counter-reset: ref; list-style: none; padding: 0; }
.refs li { counter-increment: ref; position: relative; padding-left: 2.4em; margin-bottom: .9em; color: var(--ink); }
.refs li::before {
  content: "[" counter(ref) "]"; position: absolute; left: 0; top: 0;
  color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums;
}
.refs .authors { font-weight: 500; }
.refs .venue { font-style: italic; color: var(--ink-soft); }

/* ---------- people ---------- */
.person { display: flex; gap: 18px; align-items: flex-start; }
.person img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); flex: 0 0 auto; }
.person h3 { margin-bottom: .1em; }
.person .role { color: var(--accent); font-weight: 600; font-size: .95rem; }

/* ---------- news ---------- */
.news-item { display: grid; grid-template-columns: 130px 1fr; gap: 20px; padding: 22px 0; border-top: 1px solid var(--line); }
.news-item:first-child { border-top: 0; }
.news-item time { color: var(--ink-soft); font-variant-numeric: tabular-nums; font-weight: 600; }
.news-item h3 { margin: 0 0 .2em; font-size: 1.1rem; }
@media (max-width: 620px) { .news-item { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); }
.site-footer .wrap { padding-block: 40px; color: var(--ink-soft); font-size: .92rem; }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--accent); }
