/* Miller Lab Remote Access — research computing / portal-style UI */

:root {
  /* Deep burgundy family; red only for sparse highlights */
  --burgundy: #3d2229;
  --burgundy-deep: #2a151c;
  --burgundy-bar: #231018;
  --accent-line: rgba(115, 68, 82, 0.5);
  --accent-highlight: #7a3d4d;
  --white: #ffffff;
  --gray-40: #f2f1f2;
  --gray-50: #ebeaeb;
  --gray-100: #e2e0e1;
  --gray-200: #cecacc;
  --gray-500: #6b6568;
  --gray-600: #524c4f;
  --gray-800: #2a2628;
  --text: #252122;
  --text-muted: #5a5356;
  --border: #c9c4c6;
  --border-strong: #b0a9ac;
  --link: #5c3540;
  --link-hover: #3d2229;
  --font-sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
  --header-toolbar-height: 3.5rem;
  --max-width: 72rem;
  --radius-ui: 3px;
  --radius-module: 2px;
  /* Space below the host Open OnDemand chrome so this page does not sit flush */
  --ood-header-offset: 1rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-top: var(--ood-header-offset);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--gray-40);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--link-hover);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--white);
  color: var(--burgundy-deep);
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  outline: 2px solid var(--accent-highlight);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ----- Header: identity banner + toolbar ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.identity-banner {
  background: linear-gradient(168deg, #2f1822 0%, var(--burgundy-bar) 48%, #1a0c12 100%);
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.identity-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: radial-gradient(ellipse 120% 80% at 85% 20%, rgba(255, 255, 255, 0.07) 0%, transparent 55%);
}

.identity-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.75rem 1.5rem 1.65rem;
}

.identity-copy {
  max-width: 42rem;
}

.identity-eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.55);
}

.identity-home {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.12s ease, border-color 0.12s ease;
}

.identity-home:hover {
  color: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.35);
}

.identity-home:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
  border-radius: 2px;
}

.identity-headline {
  margin: 0 0 0.45rem;
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--white);
}

.identity-supporting {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.62);
  max-width: 36rem;
}

.header-toolbar {
  background: #1e1016;
  color: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--accent-line);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  min-height: var(--header-toolbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.toolbar-service-id {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.45);
  user-select: all;
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-ui);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: rgba(255, 255, 255, 0.92);
  margin: 0 auto;
}

.nav-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

.nav-list a {
  display: block;
  padding: 0.4rem 0.7rem;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: var(--radius-ui);
  letter-spacing: 0.01em;
}

.nav-list a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

/* ----- Hero ----- */
.hero {
  position: relative;
  background:
    radial-gradient(ellipse 90% 70% at 12% 0%, rgba(110, 62, 76, 0.14) 0%, transparent 52%),
    radial-gradient(ellipse 55% 45% at 50% 110%, rgba(40, 22, 30, 0.35) 0%, transparent 45%),
    radial-gradient(ellipse 65% 55% at 100% 85%, rgba(0, 0, 0, 0.28) 0%, transparent 48%),
    linear-gradient(172deg, #351c26 0%, #2a151d 40%, #1f1016 100%);
  color: var(--white);
  overflow: hidden;
}

/* Faint lattice + node motif (hero only; very low contrast) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 1;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='0.4'%3E%3Cpath d='M16 72 L48 40 L80 72' stroke-opacity='0.022'/%3E%3Cpath d='M16 32 L48 64 L80 32' stroke-opacity='0.022'/%3E%3Cpath d='M48 24 L48 72' stroke-opacity='0.018'/%3E%3Cpath d='M32 48 L64 48' stroke-opacity='0.018'/%3E%3C/g%3E%3Cg fill='%23ffffff' fill-opacity='0.035'%3E%3Ccircle cx='48' cy='48' r='1.2'/%3E%3Ccircle cx='16' cy='32' r='0.9'/%3E%3Ccircle cx='80' cy='32' r='0.9'/%3E%3Ccircle cx='16' cy='72' r='0.9'/%3E%3Ccircle cx='80' cy='72' r='0.9'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.025' stroke-width='0.45'%3E%3Cpath d='M32 8 L54 20 L54 44 L32 56 L10 44 L10 20 Z'/%3E%3Cpath d='M32 20 L46 28 L46 36 L32 44 L18 36 L18 28 Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 96px 96px, 64px 64px;
  background-position: 0 0, 32px 16px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    -19deg,
    transparent,
    transparent 56px,
    rgba(255, 255, 255, 0.008) 56px,
    rgba(255, 255, 255, 0.008) 57px
  );
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem 4.5rem;
  display: grid;
  gap: 2.75rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 25rem);
    gap: 3.25rem;
    align-items: center;
    padding: 4.5rem 1.5rem 5rem;
  }
}

.hero-copy {
  min-width: 0;
  max-width: 38rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.hero-title {
  font-family: var(--font-sans);
  font-size: clamp(2.125rem, 4.2vw, 3.375rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 1.0625rem;
  letter-spacing: -0.028em;
  color: var(--white);
}

.hero-subtitle {
  font-size: clamp(0.9375rem, 1.35vw, 1.0625rem);
  font-weight: 400;
  margin: 0 0 1.1875rem;
  color: rgba(255, 255, 255, 0.58);
  max-width: 36rem;
  line-height: 1.55;
}

.hero-lede {
  margin: 0;
  padding-top: 1.1875rem;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  max-width: 36rem;
  font-size: 0.9375rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.62;
}

.hero-visual {
  justify-self: stretch;
  width: 100%;
}

@media (min-width: 900px) {
  .hero-visual {
    justify-self: end;
    max-width: 25rem;
  }
}

.hero-logo-panel {
  border-radius: var(--radius-ui);
  border: 1px solid rgba(90, 48, 58, 0.26);
  background: rgba(252, 250, 250, 0.98);
  padding: clamp(1.6rem, 3.5vw, 2.4rem) clamp(1.4rem, 3vw, 2rem);
}

.hero-logo-link {
  display: block;
  text-decoration: none;
  line-height: 0;
}

.hero-logo-link:focus-visible {
  outline: 2px solid var(--burgundy-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

.hero-logo-img {
  display: block;
  width: 100%;
  max-width: 22.5rem;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
}

/* ----- Content sections ----- */
.section {
  padding: 4.25rem 0;
}

.section:nth-of-type(even) {
  background: var(--white);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-heading {
  font-family: var(--font-sans);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--gray-800);
  margin: 0 0 1.25rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--burgundy-deep);
  display: block;
  letter-spacing: -0.015em;
}

.section-intro {
  margin: 0 0 1.75rem;
  color: var(--text-muted);
  max-width: 42rem;
  font-size: 0.9375rem;
}

.welcome-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .welcome-grid {
    grid-template-columns: 1fr minmax(240px, 300px);
    align-items: start;
  }
}

.welcome-prose p {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
}

.welcome-prose p:last-child {
  margin-bottom: 0;
}

.info-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-module);
  padding: 1.25rem 1.35rem;
  box-shadow: none;
}

.welcome-section .info-panel {
  background: var(--gray-40);
}

.info-panel-title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.85rem;
  color: var(--burgundy-deep);
}

.info-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
}

.info-list li {
  padding: 0.55rem 0;
  border-top: 1px solid var(--border);
}

.info-list li:first-child {
  border-top: none;
  padding-top: 0;
}

.info-label {
  display: block;
  font-weight: 700;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  color: var(--burgundy);
  margin-bottom: 0.25rem;
}

/* ----- System information / MOTD ----- */
.motd-section .section-heading {
  margin-bottom: 0.65rem;
}

.motd-panel {
  border: 1px solid #a8a0a4;
  border-left: 4px solid var(--burgundy-deep);
  border-radius: 0 var(--radius-ui) var(--radius-ui) 0;
  background: var(--white);
  box-shadow:
    0 1px 0 rgba(45, 40, 42, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.motd-panel-header {
  padding: 1.1rem 1.35rem 0.95rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #ece9ea 0%, var(--white) 72%);
}

.motd-panel-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 0.4rem;
}

.motd-panel-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--gray-800);
  letter-spacing: -0.01em;
}

.motd-host-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem 0.22rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--gray-600);
  background: rgba(45, 38, 40, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-ui);
}

.motd-host-label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
}

.motd-panel-meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.71875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.motd-meta-label {
  color: var(--gray-600);
  font-weight: 500;
}

.motd-meta-sep {
  margin: 0 0.2rem;
  opacity: 0.5;
}

.motd-status {
  color: #2a5239;
  font-weight: 600;
}

.motd-panel-body {
  padding: 0.65rem 1.35rem 1.25rem;
  background: var(--white);
}

.motd-dl {
  margin: 0;
}

.motd-row {
  display: grid;
  gap: 0.35rem 1.25rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border);
}

@media (min-width: 640px) {
  .motd-row {
    grid-template-columns: 7.5rem 1fr;
    align-items: baseline;
    gap: 0.5rem 1.5rem;
  }
}

.motd-row:first-child {
  border-top: none;
  padding-top: 0.5rem;
}

.motd-row:last-child {
  padding-bottom: 0.15rem;
}

.motd-dt {
  font-family: var(--font-mono);
  font-size: 0.65625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--burgundy-deep);
  margin: 0;
}

.motd-dd {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text);
  word-break: break-word;
}

.motd-dd a {
  font-weight: 600;
  word-break: break-all;
}

/* ----- Quick links: system modules ----- */
.links-section .section-heading {
  margin-bottom: 0.65rem;
}

.links-section .section-intro {
  margin-bottom: 1.85rem;
}

.card-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  align-items: stretch;
}

@media (min-width: 600px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 599px) {
  .card-title {
    min-height: 0;
  }
}

@media (min-width: 960px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card-grid > li {
  display: flex;
  min-height: 100%;
}

.resource-card {
  display: grid;
  grid-template-columns: 0.625rem 1fr;
  column-gap: 1rem;
  row-gap: 0;
  align-items: start;
  flex: 1;
  width: 100%;
  min-height: 7.5rem;
  padding: 1.25rem 1.35rem 1.3rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-module);
  box-shadow: none;
  text-decoration: none;
  color: var(--text);
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.links-section .resource-card {
  background: var(--white);
  border-color: #c4bec1;
}

.resource-card:hover {
  background: var(--gray-40);
  border-color: var(--border-strong);
  color: var(--text);
}

.resource-card:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 1px;
}

.card-icon {
  width: 0.625rem;
  padding-top: 0.4rem;
}

.card-icon::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  background: var(--burgundy);
  opacity: 0.85;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  flex: 1;
}

.card-title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--gray-800);
  line-height: 1.35;
  letter-spacing: -0.01em;
  min-height: 2.7rem;
}

.card-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex-grow: 1;
}

/* ----- Footer ----- */
.site-footer {
  background: var(--burgundy-bar);
  color: rgba(255, 255, 255, 0.86);
  padding: 3rem 0 2.25rem;
  margin-top: 0;
  border-top: 1px solid var(--accent-line);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-brand {
  margin-bottom: 1.75rem;
  padding-bottom: 1.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-title {
  display: block;
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
}

.footer-tagline {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.45;
}

.footer-columns {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 640px) {
  .footer-columns {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-heading {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0 0 0.5rem;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}

.footer-text {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
}

.site-footer a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
}

.site-footer a:hover {
  color: var(--white);
  text-decoration-color: rgba(255, 255, 255, 0.65);
}

.footer-meta {
  margin: 2.25rem 0 0;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ----- Mobile nav ----- */
@media (max-width: 639px) {
  .toolbar-service-id {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: #1e1016;
    border-bottom: 1px solid var(--accent-line);
    padding: 0.35rem 1rem 0.85rem;
    gap: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    display: none;
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-list a {
    padding: 0.65rem 0.5rem;
    border-radius: var(--radius-ui);
  }

  .identity-inner {
    padding: 1.35rem 1.25rem 1.25rem;
  }

  .hero-logo-panel {
    padding: 1.5rem 1.25rem;
  }

  .hero-logo-img {
    max-width: min(22.5rem, 100%);
  }
}

body.nav-open {
  overflow: hidden;
}
