/* ==========================================================================
   Varholick Lab — bento design system (v2)
   One stylesheet, no framework. Kennesaw State palette: ink / gold / cream.
   ========================================================================== */

:root {
    --ink: #0B1315;
    --ink-soft: #182225;
    --gold: #FDBB30;
    --gold-deep: #E8A71C;
    --paper: #FFFFFF;
    --cream: #F4F2EC;
    --line: #E3E0D7;
    --muted: #5C676B;
    --muted-2: #8B9497;

    --r: 22px;
    --gap: 12px;
    --pad: clamp(14px, 1.3vw, 24px);

    --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
em { font-style: italic; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.1; font-weight: 700; }
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 100; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   Page frame: header / bento grid / footer strip
   -------------------------------------------------------------------------- */
.page {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    padding: var(--gap);
}

/* Header */
.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 4px 6px 2px 6px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 34px; width: auto; }
.brand b { display: block; font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; line-height: 1; }
.brand small { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; letter-spacing: .01em; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav > a, .nav summary {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 13px; border-radius: 999px;
    font-size: 14px; font-weight: 500; color: var(--ink);
    transition: background .15s ease;
}
.nav > a:hover, .nav summary:hover { background: #fff; }
.nav > a.is-active { background: var(--ink); color: #fff; }
.nav .pill { background: var(--gold); font-weight: 600; margin-left: 6px; }
.nav .pill:hover { background: var(--gold-deep); }

.dd { position: relative; }
.dd summary::after { content: "▾"; font-size: .75em; opacity: .7; }
.dd[open] summary { background: #fff; }
.dd-menu {
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 40;
    min-width: 250px; padding: 6px;
    background: #fff; border: 1px solid var(--line); border-radius: 16px;
    box-shadow: 0 18px 40px rgba(11, 19, 21, .12);
    display: flex; flex-direction: column; gap: 2px;
}
.dd-menu a { display: block; padding: 9px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.dd-menu a:hover { background: var(--cream); }
.dd-menu small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 1px; }

/* Mobile nav (details-based, no JS required) */
.mnav { display: none; position: relative; }
.mnav > summary {
    padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line);
    font-size: 14px; font-weight: 600;
}
.mnav-menu {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 50;
    min-width: 250px; padding: 8px;
    background: #fff; border: 1px solid var(--line); border-radius: 18px;
    box-shadow: 0 18px 40px rgba(11, 19, 21, .14);
    display: flex; flex-direction: column;
}
.mnav-menu a { padding: 10px 12px; border-radius: 10px; font-weight: 500; font-size: 15px; }
.mnav-menu a:hover, .mnav-menu a.is-active { background: var(--cream); }
.mnav-menu .sub { padding-left: 26px; font-size: 14px; color: var(--muted); }
.mnav-menu .label { padding: 10px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); }

/* Footer strip */
.foot {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 2px 10px 4px; font-size: 12px; color: var(--muted);
}
.foot nav { display: flex; gap: 16px; }
.foot a:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   Bento grid + tiles
   -------------------------------------------------------------------------- */
.bento {
    flex: 1;
    display: grid;
    gap: var(--gap);
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: auto;
    align-content: start;
}
.tile {
    position: relative; min-width: 0;
    display: flex; flex-direction: column;
    padding: var(--pad);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
}
.tile--ink { background: var(--ink); border-color: var(--ink); color: #fff; }
.tile--gold { background: var(--gold); border-color: var(--gold); }
.tile--soft { background: #FBFAF6; }
.tile--photo { padding: 0; background: #d9d6cc; min-height: 220px; }
.tile--photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile--photo figcaption {
    position: absolute; left: 12px; right: 12px; bottom: 12px;
    padding: 8px 12px; border-radius: 12px;
    background: rgba(11, 19, 21, .72); color: #fff; font-size: 12.5px; line-height: 1.4;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
a.tile { transition: transform .18s ease, box-shadow .18s ease; }
a.tile:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(11, 19, 21, .08); }

.kicker {
    font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 8px;
}
.tile--ink .kicker { color: rgba(255, 255, 255, .6); }
.tile--gold .kicker { color: rgba(11, 19, 21, .6); }
.kicker .num { color: var(--gold); margin-right: 6px; }
.tile--gold .kicker .num { color: var(--ink); }

.tile h2 { font-size: clamp(22px, 2vw, 30px); margin-bottom: 10px; }
.tile h3 { font-size: clamp(16px, 1.2vw, 20px); margin-bottom: 6px; }
.tile p, .tile li { color: var(--muted); font-size: clamp(13px, .9vw, 14.5px); line-height: 1.5; }
.tile p + p { margin-top: 8px; }
.tile--ink p, .tile--ink li { color: rgba(255, 255, 255, .78); }
.tile--gold p, .tile--gold li { color: rgba(11, 19, 21, .78); }
.tile .lead { font-size: clamp(15px, 1.1vw, 18px); color: var(--ink); }
.tile--ink .lead { color: #fff; }

.more {
    margin-top: auto; padding-top: 12px;
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; color: var(--ink);
}
.more::after { content: "→"; transition: transform .15s ease; }
.more:hover::after { transform: translateX(3px); }
.tile--ink .more { color: var(--gold); }
.tile--gold .more { color: var(--ink); }

.inline-link { font-weight: 600; border-bottom: 2px solid var(--gold); color: var(--ink); }
.tile--ink .inline-link { color: #fff; }

/* Section label rows inside a bento grid */
.sec {
    grid-column: 1 / -1;
    display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
    padding: 18px 8px 2px;
}
.sec .num { font-family: var(--font-display); font-weight: 700; color: var(--gold-deep); font-size: 13px; letter-spacing: .1em; }
.sec h2 { font-size: clamp(20px, 1.8vw, 26px); }
.sec p { color: var(--muted); font-size: 14px; max-width: 62ch; }

/* Buttons */
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: 999px;
    font-size: 14px; font-weight: 600; border: 1.5px solid transparent;
    transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-deep); }
.btn-ghost { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #000; }
.btn-line { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-line:hover { border-color: var(--ink); }

/* Compact lists (news, resources, links) */
.list { list-style: none; display: flex; flex-direction: column; }
.list li { padding: 9px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; padding-top: 0; }
.tile--ink .list li { border-color: rgba(255, 255, 255, .14); }
.list .when { display: block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 2px; }
.list .what { display: block; font-weight: 600; color: var(--ink); font-size: 14px; line-height: 1.35; }
.list a.what:hover { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.list small { display: block; color: var(--muted); font-size: 12.5px; }

/* Chips (the levels-of-organization chain, tags) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { padding: 6px 12px; border-radius: 999px; background: var(--cream); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.chip--gold { background: var(--gold); border-color: var(--gold); }
.chips .arrow { color: var(--muted-2); font-size: 13px; }

/* --------------------------------------------------------------------------
   HOME — locked-viewport bento on desktop, flowing stack elsewhere
   -------------------------------------------------------------------------- */
.hero { justify-content: center; }
.hero h1 { font-size: clamp(26px, 1.9vw + 1.2vh, 50px); line-height: 1.05; letter-spacing: -0.028em; max-width: 24ch; }
.hero h1 .l1 { display: block; color: var(--gold); }
.hero h1 .l2 { display: block; color: #fff; }
.hero .lede { margin-top: 14px; max-width: 62ch; font-size: clamp(14px, .7vw + .5vh, 17px); color: rgba(255, 255, 255, .8); }
.hero .affil { display: block; margin-bottom: 14px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.hero .actions { margin-top: 16px; }

@media (min-width: 1024px) {
    .home .bento { grid-template-rows: minmax(0, 3fr) minmax(0, 1.4fr); }
    .t-hero  { grid-column: 1 / 9;   grid-row: 1; }
    .t-photo { grid-column: 9 / 13;  grid-row: 1; }
    .t-news  { grid-column: 1 / 5;   grid-row: 2; }
    .t-paper { grid-column: 5 / 8;   grid-row: 2; }
    .t-res   { grid-column: 8 / 11;  grid-row: 2; }
    .t-join  { grid-column: 11 / 13; grid-row: 2; }
    .t-hero  { min-height: 360px; }
}
/* Lock the home page to the viewport when there is room for it */
@media (min-width: 1024px) and (min-height: 760px) {
    .home { height: 100dvh; overflow: hidden; }
    .home .bento { min-height: 0; align-content: stretch; }
    .home .tile { min-height: 0; }
}
@media (min-width: 640px) and (max-width: 1023px) {
    .home .bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .t-hero  { grid-column: 1 / 7; min-height: 58vh; }
    .t-photo { grid-column: 1 / 7; min-height: 280px; }
    .t-news  { grid-column: 1 / 7; }
    .t-paper, .t-res { grid-column: span 3; }
    .t-join  { grid-column: 1 / 7; }
}
@media (max-width: 639px) {
    .bento { grid-template-columns: minmax(0, 1fr); }
    .bento > * { grid-column: 1 / -1; }
    .t-hero { min-height: 72vh; }
    .t-photo { min-height: 260px; }
    .hero h1 { font-size: clamp(30px, 9vw, 40px); }
}
.home .list li { padding: 6px 0; }
.home .list li:first-child { padding-top: 0; }
.home .list .what { font-size: 13.5px; }
.home .list small { font-size: 12px; }

/* --------------------------------------------------------------------------
   Generic column spans for inner pages (12-col desktop, 6-col tablet)
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
    .c2 { grid-column: span 2; } .c3 { grid-column: span 3; } .c4 { grid-column: span 4; }
    .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c7 { grid-column: span 7; }
    .c8 { grid-column: span 8; } .c9 { grid-column: span 9; } .c12 { grid-column: 1 / -1; }
}
@media (min-width: 640px) and (max-width: 1023px) {
    .bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .c2, .c3, .c4, .c5, .c6 { grid-column: span 3; }
    .c7, .c8, .c9, .c12 { grid-column: 1 / -1; }
}

/* Page intro tile (inner pages) */
.intro h1 { font-size: clamp(28px, 3vw, 46px); line-height: 1.05; letter-spacing: -0.025em; max-width: 22ch; margin-bottom: 14px; }
.intro .lead { max-width: 64ch; }

/* Two-column content inside a tile (e.g. PI bio) */
.split { display: grid; gap: 22px; align-items: start; }
@media (min-width: 760px) { .split { grid-template-columns: 220px 1fr; } }
.split img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; }

/* Team cards */
.person img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; margin-bottom: 14px; border: 3px solid var(--cream); }
.person h3 { margin-bottom: 2px; }
.person .role { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 10px; }
.person p { font-size: 13.5px; }

/* Definition rows ("What we measure") */
.kv { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.tile--ink .kv { border-color: rgba(255, 255, 255, .14); }
.kv .k { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 4px; }
.kv .v { font-size: 13.5px; color: var(--ink); }
.tile--ink .kv .v { color: #fff; }

/* --------------------------------------------------------------------------
   Publications list
   -------------------------------------------------------------------------- */
.pubs h2 { font-size: 20px; margin: 6px 0 2px; }
.pubs .group { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-deep); margin: 18px 0 6px; }
.pubs .group:first-of-type { margin-top: 6px; }
.pub {
    display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: start;
    padding: 18px 0; border-top: 1px solid var(--line);
}
.pub img { width: 96px; height: 72px; object-fit: cover; border-radius: 10px; background: var(--cream); }
.pub h4 { font-size: 16px; line-height: 1.25; margin-bottom: 4px; }
.pub .cite { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.pub .blurb { font-size: 13.5px; color: var(--muted); }
.pub .links { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 10px; }
.pub .links a { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff; }
.pub .links a:hover { border-color: var(--ink); }
.pub:target { background: #FFF7DF; margin: 0 calc(-1 * var(--pad)); padding-left: var(--pad); padding-right: var(--pad); border-radius: 12px; }
@media (max-width: 520px) { .pub { grid-template-columns: 1fr; } .pub img { width: 100%; height: 140px; } }

/* --------------------------------------------------------------------------
   News list
   -------------------------------------------------------------------------- */
.news-item { padding: 18px 0; border-top: 1px solid var(--line); }
.news-item:first-child { border-top: 0; padding-top: 0; }
.news-item .when { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 4px; }
.news-item h3 { font-size: 17px; margin-bottom: 6px; }
.news-item p { font-size: 14px; }
.news-item .tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; background: var(--gold); color: var(--ink); padding: 2px 8px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }
.news-item:target { background: #FFF7DF; margin: 0 calc(-1 * var(--pad)); padding-left: var(--pad); padding-right: var(--pad); border-radius: 12px; }

/* --------------------------------------------------------------------------
   Responsive header
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .nav { display: none; }
    .mnav { display: block; }
    .brand small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn, a.tile, .more::after { transition: none !important; }
}

/* Tile header row: kicker on the left, small link on the right */
.tile-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tile-head .more { margin-top: 0; padding-top: 0; }
.tile-head .arrow { color: var(--muted-2); font-weight: 600; transition: transform .15s ease, color .15s ease; }
a.tile:hover .tile-head .arrow { color: var(--ink); transform: translateX(3px); }
.home .t-news .what { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Simple inner grids */
.grid3 { display: grid; gap: 16px 24px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.grid3 h4 { font-size: 14px; margin-bottom: 2px; }
.grid3 p { font-size: 13.5px; }
.note { font-size: 12.5px; color: var(--muted-2); }

/* Readability caps inside wide tiles */
.news-item p, .pub .blurb, .intro p { max-width: 90ch; }
.intro p:not(.lead) { font-size: 14.5px; }
@media (min-width: 1024px) { .grid3 { grid-template-columns: repeat(3, 1fr); } }
