/* UNLV Computer Science: shared stylesheet for web.cs.unlv.edu (faculty) and tux.cs.unlv.edu (students).
   No external fonts or scripts. Light theme by default; dark via OS setting or the toggle (data-theme). */
:root {
  --scarlet: #b10202; --scarlet-dark: #860101; --on-scarlet: #ffffff;
  --charcoal: #2b2b2b; --ink: #1f1f1f; --text: #333333; --muted: #5f5f5f;
  --rule: #dddddd; --shade: #f4f4f4; --bg: #ffffff; --card: #ffffff; --code-bg: #f1f1f1;
  --ok: #1a7f37; --warn: #9a6700; --bad: #c62828; --none: #d9d9d9; --u99: #57ab5a;
  --focus: #f2b705; --wrap: 1180px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --scarlet: #ff6b63; --scarlet-dark: #ff8f88; --on-scarlet: #141414;
    --charcoal: #0e0e0e; --ink: #f0f0f0; --text: #d6d6d6; --muted: #a3a3a3;
    --rule: #333333; --shade: #1d1d1d; --bg: #141414; --card: #1a1a1a; --code-bg: #232323;
    --ok: #3fb950; --warn: #d29922; --bad: #f85149; --none: #3a3a3a; --u99: #2ea043;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --scarlet: #ff6b63; --scarlet-dark: #ff8f88; --on-scarlet: #141414;
  --charcoal: #0e0e0e; --ink: #f0f0f0; --text: #d6d6d6; --muted: #a3a3a3;
  --rule: #333333; --shade: #1d1d1d; --bg: #141414; --card: #1a1a1a; --code-bg: #232323;
  --ok: #3fb950; --warn: #d29922; --bad: #f85149; --none: #3a3a3a; --u99: #2ea043;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 "Helvetica Neue", Helvetica, Arial, sans-serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--scarlet); }
a:hover { color: var(--scarlet-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0 0 .6rem; text-wrap: balance; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1rem; }
code { font: .92em/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--code-bg); padding: .1em .35em; border-radius: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 16px; }
@media (min-width: 720px) { .wrap { padding-inline: 24px; } }
.skip { position: absolute; left: -999px; top: 0; background: #000; color: #fff; padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 0; }
.small { font-size: .88rem; color: var(--muted); }
.note { border-left: 4px solid var(--warn); background: var(--shade); padding: .7rem 1rem; }
.nowrap { white-space: nowrap; }

/* University utility bar */
.utility { background: var(--charcoal); font-size: .82rem; }
.utility-in { display: flex; justify-content: space-between; align-items: center; gap: .4rem 1.5rem; flex-wrap: wrap; padding-block: .4rem; }
.utility a { color: #fff; text-decoration: none; }
.utility a:hover { text-decoration: underline; color: #fff; }
.utility ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .4rem 1.25rem; flex-wrap: wrap; align-items: center; }
.theme-btn { font: inherit; font-size: .8rem; color: #fff; background: transparent; border: 1px solid #777; border-radius: 3px; padding: .1rem .55rem; cursor: pointer; }
.theme-btn:hover { border-color: #fff; }

/* Masthead + main navigation */
.masthead { background: var(--bg); }
.site-name { display: inline-block; padding: .85rem 0 .8rem 1rem; border-left: 6px solid var(--scarlet); margin-block: .85rem; text-decoration: none; }
.site-name .dept { display: block; font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.85rem); font-weight: 700; color: var(--ink); line-height: 1.15; }
.site-name .college { display: block; font-size: .92rem; color: var(--muted); margin-top: .2rem; }
.mainnav { background: #b10202; }
.mainnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.mainnav a { display: block; color: #fff; text-decoration: none; font-weight: 700; font-size: .9rem; padding: .8rem .95rem; }
.mainnav a:hover, .mainnav a[aria-current="page"] { background: #860101; color: #fff; }
.mainnav a[aria-current="page"] { box-shadow: inset 0 -3px 0 #fff; }
@media (max-width: 640px) { .mainnav a { padding: .55rem .6rem; font-size: .84rem; } }

.crumbs { font-size: .85rem; color: var(--muted); padding-block: .9rem 0; }
.crumbs a { color: var(--muted); }
.pagehead { padding-block: .6rem 0; }
.pagehead h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); margin-bottom: .4rem; }
.pagehead .lede { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }

/* Banners */
.hero { position: relative; color: #fff; }
.hero h1 { color: #fff; font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); max-width: 17ch; margin-bottom: .8rem; }
.hero-kicker { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #ffd0cc; margin-bottom: .6rem; }
.hero-lede { font-size: clamp(1.02rem, .95rem + .3vw, 1.18rem); max-width: 46ch; color: #f0f0f0; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1.5rem 0 0; }
.hero-photo { background: #1c1c1c url("hero-lab.jpg") 72% 30% / cover no-repeat; }
.hero-photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,20,20,.9) 0%, rgba(20,20,20,.74) 38%, rgba(20,20,20,.15) 72%, rgba(20,20,20,0) 100%); }
.hero-photo .hero-in { position: relative; padding-block: clamp(2.5rem, 7vw, 5rem) clamp(4.5rem, 9vw, 6.5rem); }
@media (max-width: 760px) { .hero-photo::before { background: rgba(20,20,20,.72); } }
.hero-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); background: #6e0101; }
.hero-text { background: #b10202; display: flex; align-items: center; justify-content: flex-end; }
.hero-text-in { width: 100%; max-width: calc(var(--wrap) / 2); padding: clamp(2.5rem, 6vw, 4.5rem) 24px clamp(4.5rem, 8vw, 6rem); }
.hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; min-height: 320px; }
@media (max-width: 860px) { .hero-split { grid-template-columns: 1fr; } .hero-text { justify-content: flex-start; } .hero-text-in { max-width: none; padding: 2.25rem 16px 2rem; } .hero-img img { min-height: 220px; max-height: 300px; } .hero-split + .wrap .pathways { margin-top: 1.25rem; } }

/* Pathway cards */
.pathways { list-style: none; margin: -3.25rem 0 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 1rem; }
.pathways a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .9rem; height: 100%;
  padding: 1.1rem 1.15rem; background: var(--card); border-top: 4px solid var(--scarlet); box-shadow: 0 6px 18px rgba(0,0,0,.14); text-decoration: none; color: var(--text); }
.pathways a:hover .pw-title { color: var(--scarlet); text-decoration: underline; }
.pw-icon { grid-row: 1 / span 2; width: 2.5rem; height: 2.5rem; }
.pw-icon svg, .tile-icon svg { width: 100%; height: 100%; fill: none; stroke: var(--scarlet); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pw-title { font-weight: 700; color: var(--ink); font-size: 1.04rem; }
.pw-text { font-size: .88rem; color: var(--muted); }
@media (max-width: 860px) { .pathways { margin-top: -2.25rem; } }

/* Layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2.75rem; padding-block: 2.5rem 3.5rem; align-items: start; }
.layout-sub { padding-top: 1.75rem; }
@media (max-width: 920px) { .layout { grid-template-columns: 1fr; gap: 2rem; } }
main section { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
main section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
main > :first-child { margin-top: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.75rem; align-items: start; }
.split figure { margin: 0; } .split img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1.5rem; }
@media (max-width: 700px) { .split { grid-template-columns: 1fr; } }

/* Buttons */
.button { display: inline-block; background: var(--scarlet); color: var(--on-scarlet); text-decoration: none; font-weight: 700; padding: .65rem 1.15rem; border-radius: 3px; border: 2px solid var(--scarlet); }
.button:hover { background: var(--scarlet-dark); border-color: var(--scarlet-dark); color: var(--on-scarlet); }
.hero .button { background: #b10202; border-color: #b10202; color: #fff; }
.hero .button:hover { background: #860101; border-color: #860101; }
.hero .button-light, .hero .button-outline { background: transparent; border-color: #fff; color: #fff; }
.hero .button-light:hover, .hero .button-outline:hover { background: #fff; color: #b10202; }
.hero-text .button-light { background: #fff; color: #b10202; }
.hero-text .button-light:hover { background: #f0f0f0; color: #860101; }

/* Faculty dropdown */
.fac-dd { border: 1px solid var(--rule); border-top: 4px solid var(--scarlet); background: var(--card); }
.fac-dd > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .5rem; padding: .9rem 1.1rem; font-size: 1.15rem; font-weight: 700; color: var(--ink); background: var(--shade); }
.fac-dd > summary::-webkit-details-marker { display: none; }
.fac-dd > summary::after { content: "\25BE"; margin-left: auto; color: var(--scarlet); transition: transform .15s; }
.fac-dd[open] > summary::after { transform: rotate(180deg); }
.fac-dd .count { font-weight: 400; color: var(--muted); font-size: 1rem; }
.fac-list { list-style: none; margin: 0; padding: .9rem 1.1rem 1.1rem; columns: 3 200px; column-gap: 2rem; border-top: 1px solid var(--rule); }
.fac-list li { break-inside: avoid; padding: .3rem 0; }
.fac-list a { font-weight: 600; }
.fac-list .prof { font-weight: 400; font-size: .8rem; color: var(--muted); margin-left: .35rem; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .fac-dd > summary::after { transition: none; } }

/* News */
ul.news { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 1.25rem; }
ul.news li.none, ul.headlines li.none { grid-column: 1 / -1; }
.news-card { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--rule); background: var(--card); text-decoration: none; color: var(--text); }
.news-card:hover { border-color: var(--scarlet); }
.news-card:hover .headline { color: var(--scarlet); text-decoration: underline; }
.news-card .thumb { display: block; aspect-ratio: 3 / 2; background: var(--shade); overflow: hidden; }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-card .body { display: block; padding: .85rem 1rem 1rem; }
.news-card time, ul.headlines time { display: block; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .25rem; }
.news-card .headline { display: block; font-weight: 700; font-size: 1.02rem; line-height: 1.3; color: var(--ink); }
.news-card p { margin: .4rem 0 0; font-size: .9rem; color: var(--muted); }
ul.headlines { list-style: none; margin: 0; padding: 0; }
ul.headlines li { padding: .65rem 0; border-bottom: 1px solid var(--rule); }
ul.headlines a { font-weight: 600; }
p.more { margin-top: 1rem; font-size: .92rem; font-weight: 700; }

/* Programs */
ul.programs { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 1rem; }
.prog { border: 1px solid var(--rule); border-top: 4px solid var(--scarlet); background: var(--card); padding: 1rem 1.1rem; display: flex; flex-direction: column; }
.prog-level { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.prog h3 { margin: .2rem 0 .5rem; font-size: 1.12rem; }
.prog h3 span { display: block; font-weight: 400; color: var(--muted); font-size: .98rem; }
.prog p { font-size: .92rem; margin-bottom: .75rem; }
.prog-links { margin-top: auto; margin-bottom: 0 !important; display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .86rem; font-weight: 700; }

/* Tables */
.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .94rem; }
table.data th, table.data td { text-align: left; padding: .65rem .75rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.data thead th { background: var(--shade); border-bottom: 2px solid var(--scarlet); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink); }
table.data tbody th { color: var(--ink); font-weight: 700; min-width: 9rem; }
@media (max-width: 640px) {
  table.data thead { display: none; }
  table.data tr { display: block; padding: .6rem 0; border-bottom: 1px solid var(--rule); }
  table.data th, table.data td { display: block; border: 0; padding: .15rem 0; }
}

/* Tiles, steps, commands */
ul.tiles { list-style: none; margin: 1rem 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: .65rem; }
ul.tiles a { display: flex; flex-direction: column; gap: .1rem; height: 100%; padding: .85rem 1rem; border: 1px solid var(--rule); border-left: 4px solid var(--scarlet); background: var(--card); color: var(--ink); text-decoration: none; }
ul.tiles a:hover { border-color: var(--scarlet); }
ul.tiles a:hover b { color: var(--scarlet); text-decoration: underline; }
ul.tiles span { color: var(--muted); font-size: .86rem; }
ol.steps { counter-reset: step; list-style: none; margin: 1rem 0 0; padding: 0; }
ol.steps > li { counter-increment: step; position: relative; padding: 0 0 1.1rem 2.9rem; }
ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: -.05rem; width: 2rem; height: 2rem; border-radius: 50%; background: var(--scarlet); color: var(--on-scarlet); font-weight: 700; display: grid; place-items: center; font-size: .95rem; }
.cmd { display: flex; align-items: stretch; margin: .5rem 0 .25rem; max-width: 34rem; border: 1px solid var(--rule); background: var(--code-bg); }
.cmd code { flex: 1; background: none; padding: .55rem .75rem; overflow-x: auto; white-space: nowrap; }
.cmd .copy { font: inherit; font-size: .82rem; font-weight: 700; border: 0; border-left: 1px solid var(--rule); background: var(--card); color: var(--scarlet); padding: 0 .9rem; cursor: pointer; }
.cmd .copy:hover { background: var(--shade); }

/* Orgs and electives */
ul.orgs { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 1rem; }
ul.orgs li { border: 1px solid var(--rule); background: var(--card); padding: .9rem 1rem; }
ul.orgs h3 { font-size: 1.02rem; margin-bottom: .35rem; }
ul.orgs p { font-size: .9rem; margin: 0; color: var(--muted); }
.electives { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 1.25rem; margin-top: 1rem; }
.electives h3 { font-size: 1rem; border-bottom: 2px solid var(--scarlet); padding-bottom: .3rem; }
ul.plain { margin: 0; padding-left: 1.1rem; }
ul.plain li { margin-bottom: .45rem; }
.none { color: var(--muted); font-style: italic; }

/* Callout */
.thesis > div { background: var(--shade); border-left: 6px solid var(--scarlet); padding: 1.35rem 1.5rem; }
.thesis p:last-child, .thesis ul:last-child { margin-bottom: 0; }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 1.25rem; }
.box { border: 1px solid var(--rule); padding: 1.1rem 1.2rem; background: var(--card); }
.box h2 { font-size: 1.05rem; margin-bottom: .6rem; padding-bottom: .5rem; border-bottom: 1px solid var(--rule); }
.box p:last-child { margin-bottom: 0; }
.box-accent { border-top: 4px solid var(--scarlet); background: var(--shade); }
.status-strip { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .8rem 1rem; border: 1px solid var(--rule); border-left: 6px solid var(--none); background: var(--card); color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem; }
.status-strip .dot { width: .8rem; height: .8rem; border-radius: 50%; background: var(--none); flex: none; }
.status-strip .go { margin-left: auto; font-size: .82rem; color: var(--scarlet); }
.status-strip.operational { border-left-color: var(--ok); } .status-strip.operational .dot { background: var(--ok); }
.status-strip.degraded { border-left-color: var(--warn); } .status-strip.degraded .dot { background: var(--warn); }
.status-strip.outage { border-left-color: var(--bad); } .status-strip.outage .dot { background: var(--bad); }

/* Status page */
.st-banner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.1rem 1.4rem; color: #fff; background: #6b6b6b; margin-bottom: 1.5rem; }
.st-banner.operational { background: #1a7f37; } .st-banner.degraded { background: #9a6700; } .st-banner.outage { background: #c62828; }
.st-banner h2 { color: #fff; margin: 0; font-size: 1.35rem; }
.st-legend { display: flex; gap: 1.1rem; flex-wrap: wrap; font-size: .8rem; color: var(--muted); margin-bottom: 1.5rem; }
.st-legend b { display: inline-block; width: 10px; height: 10px; margin-right: .35rem; vertical-align: -1px; }
.st-legend .ok { background: var(--ok); } .st-legend .u99 { background: var(--u99); } .st-legend .warn { background: var(--warn); } .st-legend .bad { background: var(--bad); } .st-legend .none-b { background: var(--none); }
.st-group { border: 1px solid var(--rule); margin-bottom: 1.5rem; background: var(--card); }
.st-group > h3 { margin: 0; padding: .8rem 1.2rem; font-size: 1rem; border-bottom: 1px solid var(--rule); background: var(--shade); }
.st-svc { padding: 1rem 1.2rem; border-top: 1px solid var(--rule); }
.st-svc:first-of-type { border-top: 0; }
.st-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.st-name { font-weight: 700; color: var(--ink); }
.st-note { color: var(--muted); font-size: .85rem; margin-left: .4rem; }
.st-state { font-size: .9rem; font-weight: 700; white-space: nowrap; }
.st-state.operational { color: var(--ok); } .st-state.degraded { color: var(--warn); } .st-state.outage { color: var(--bad); }
.st-bars { display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 2px; height: 30px; margin: .7rem 0 .35rem; }
.st-bars i { display: block; border-radius: 1px; background: var(--none); }
.st-bars i.u100 { background: var(--ok); } .st-bars i.u99 { background: var(--u99); } .st-bars i.u95 { background: var(--warn); } .st-bars i.ulow { background: var(--bad); }
.st-axis { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); }
.st-inc { border-left: 3px solid var(--rule); padding: .2rem 0 .2rem 1rem; margin-bottom: 1.25rem; }
.st-inc h4 { margin: 0 0 .25rem; font-size: 1rem; color: var(--ink); }
.st-inc .meta { font-size: .8rem; color: var(--muted); margin-bottom: .35rem; }
@media (max-width: 600px) { .st-bars { height: 24px; gap: 1px; } .st-note { display: block; margin: .1rem 0 0; } }

/* Footer */
.footer { background: var(--charcoal); color: #ddd; font-size: .88rem; padding-top: 1.75rem; }
.footer a { color: #fff; }
.footer-in { display: flex; justify-content: space-between; gap: 1.5rem 3rem; flex-wrap: wrap; padding-bottom: 1.25rem; }
.footer strong { color: #fff; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: .35rem; }
.footer .copy { border-top: 1px solid #444; padding-block: .9rem; color: #aaa; font-size: .8rem; }
