/* =========================================================
   PolyChip website styles
   To change the main colors, edit the values just below.
   ========================================================= */
:root {
  --ink: #14202e;        /* main text / dark backgrounds */
  --muted: #5a6675;      /* secondary text */
  --accent: #c8102e;     /* highlight color (red) */
  --accent-dark: #9e0c24;
  --paper: #ffffff;
  --soft: #f4f6f8;       /* light grey section background */
  --line: #e1e5ea;
  --radius: 10px;
  --max: 1100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.02em; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
section { padding: 64px 0; }
section.soft { background: var(--soft); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 720px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .78rem;
  font-weight: 700; color: var(--accent); margin-bottom: .6em;
}

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,.95); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: #000; font-weight: 800; font-size: 1.45rem; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 40px; height: 40px; }
.brand-img { height: 44px; width: auto; }

/* Four-color stripe from the logo (under the header and above the footer) */
.stripe { height: 4px; background: linear-gradient(90deg, #d0141d 0 25%, #f39019 25% 50%, #6aa21e 50% 75%, #0a72bf 75% 100%); }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--ink); padding: 8px 12px; border-radius: 6px; font-size: .95rem; font-weight: 500; }
.nav a:hover { background: var(--soft); text-decoration: none; }
.nav a.active { color: var(--accent); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; font-size: 1.1rem; cursor: pointer; }

@media (max-width: 820px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav.open { display: flex; }
}

/* ---------- Hero (top banner) ---------- */
.hero {
  background: var(--ink) url("images/circuit.svg") repeat;
  color: #fff; padding: 110px 0 100px;
}
.hero .lead { color: #c9d2dc; }
.hero .eyebrow { color: #ff6b7f; }
.page-hero { background: var(--ink) url("images/circuit.svg") repeat; color: #fff; padding: 64px 0 52px; }
.page-hero p { color: #c9d2dc; margin: 0; max-width: 720px; }

.btn { display: inline-block; padding: 12px 22px; border-radius: 8px; font-weight: 600; margin: 8px 10px 0 0; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; }
.btn-ghost { border: 1px solid rgba(255,255,255,.4); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); text-decoration: none; }

/* ---------- Cards and grids ---------- */
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { margin-top: 4px; }
.card .icon { width: 40px; height: 40px; border-radius: 8px; background: #fde8eb; color: var(--accent); display: grid; place-items: center; font-weight: 800; margin-bottom: 12px; }

/* Research topic rows */
.topic { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: center; padding: 40px 0; border-bottom: 1px solid var(--line); }
.topic:last-child { border-bottom: 0; }
.topic .figure { background: var(--soft); border-radius: var(--radius); aspect-ratio: 4/3; display: grid; place-items: center; color: var(--muted); font-size: .9rem; overflow: hidden; }
.topic .figure img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .topic { grid-template-columns: 1fr; gap: 20px; } }

/* People */
.people { display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.person { text-align: center; }
.person .photo { width: 150px; height: 150px; border-radius: 50%; margin: 0 auto 14px; background: var(--soft) center/cover no-repeat; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); display: grid; place-items: center; color: var(--muted); font-size: 2.2rem; font-weight: 700; overflow: hidden; }
.person .photo img { width: 100%; height: 100%; object-fit: cover; }
.person h3 { margin-bottom: 2px; font-size: 1.05rem; }
.person .role { color: var(--accent); font-size: .9rem; font-weight: 600; }
.person .topic-line { color: var(--muted); font-size: .88rem; margin-top: 4px; }

.pi { display: grid; grid-template-columns: 220px 1fr; gap: 36px; align-items: start; }
.pi .photo { width: 220px; height: 220px; border-radius: var(--radius); background: var(--soft); display: grid; place-items: center; color: var(--muted); font-size: 3rem; font-weight: 700; overflow: hidden; }
.pi .photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) { .pi { grid-template-columns: 1fr; } }

/* News list */
.news-item { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.news-item .date { color: var(--muted); font-size: .9rem; font-weight: 600; }
@media (max-width: 600px) { .news-item { grid-template-columns: 1fr; gap: 4px; } }

/* Publications */
.pub-year { margin-top: 40px; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.pub { padding: 14px 0; border-bottom: 1px solid var(--line); }
.pub .title { font-weight: 600; }
.pub .authors { color: var(--muted); font-size: .95rem; }
.pub .venue { font-style: italic; font-size: .95rem; }
.pub .tag { display: inline-block; font-style: normal; font-size: .7rem; font-weight: 700; color: #fff; background: var(--accent); border-radius: 4px; padding: 1px 6px; margin-right: 8px; vertical-align: 1px; }
.pub .tag.c { background: var(--ink); }
.pub .tag.t { background: var(--muted); }
.pub .links a { font-size: .85rem; margin-right: 12px; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #aeb8c4; padding: 40px 0; font-size: .92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.site-footer a { color: #fff; }
.site-footer strong { color: #fff; }
