/* UTSA Robotics - lab notebook style sheet */

:root {
  --ink: #0c2340;      /* UTSA navy */
  --accent: #f15a22;   /* UTSA orange */
  --paper: #fbfaf6;
  --grid: rgba(12, 35, 64, .07);
}

*, *::before, *::after { box-sizing: border-box; }
::selection { background: var(--accent); color: #fff; }

/* graph paper */
body {
  font: 15px/1.65 ui-monospace, "Cascadia Mono", Consolas, "Lucida Console", monospace;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  background-attachment: fixed;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
  min-height: 100vh;
  counter-reset: section;
}

/* ---------- text ---------- */

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px dashed var(--accent); outline-offset: 3px; }

h1, h2, h3 { font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif; }

h1 {
  font-size: clamp(2rem, 7vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -.02em;
  margin: 0;
}
/* blinking terminal cursor after page titles */
/* h1::after {
  content: "_";
  color: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } } */

/* numbered section headings with a rule running to the right */
h2 {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: 1.05rem;
  margin: 3rem 0 .4rem;
  counter-increment: section;
}
h2::before {
  content: counter(section, decimal-leading-zero);
  font-family: ui-monospace, Consolas, monospace;
  font-size: .8rem;
  color: #fff;
  background: var(--accent);
  padding: .05rem .4rem;
}
h2::after {
  content: "";
  flex: 1;
  border-top: 1px dashed currentColor;
  opacity: .4;
}

h3 {
  font-size: .92rem;
  margin: 0 0 .3rem;
  line-height: 1.25;
}

p { margin: .3rem 0; }
ul { margin: .3rem 0 .3rem 1.2rem; padding: 0; }
li { margin: .1rem 0; }
li::marker { color: var(--accent); content: "+ "; }

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

blockquote {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  background: #fff;
  border: 1px solid var(--ink);
  border-left: 6px solid var(--accent);
  font-size: 1.05rem;
  max-width: 780px;
}

/* ---------- nav ---------- */

body > nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .4rem 1.5rem;
  padding: .7rem 0.25rem;
  margin-bottom: 2.5rem;
  border-top: 6px solid var(--accent);
  border-bottom: 2px solid var(--ink);
  background-color: var(--paper);
  /* -webkit-backdrop-filter: blur(8px); */
  /* backdrop-filter: blur(8px); */
}

body > nav a[rel="home"] {
  font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.35rem;
}
body > nav a[rel="home"]::before {
  content: "\25A0  ";  /* small orange square */
  color: var(--accent);
}

body > nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem .5rem;
  list-style: none;
  margin: 0;
}
body > nav li::marker { content: none; }

body > nav ul a {
  display: inline-block;
  padding: .15rem .45rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: lowercase;
}
body > nav ul a:hover { background: var(--ink); color: #fff; }
body > nav ul a[aria-current="page"] { background: var(--accent); color: #fff; }
body > nav ul a[aria-current="page"]::before { content: "["; }
body > nav ul a[aria-current="page"]::after  { content: "]"; }

/* ---------- page header ---------- */

main > header {
  padding: 1rem 0 2rem;
  margin-bottom: 1rem;
}
main > header img {
  display: block;
  margin-bottom: 1.25rem;
  border: 2px solid var(--ink);
  padding: 4px;
  background: #fff;
}
main > header p {
  margin-top: 1rem;
  max-width: 600px;
  font-size: 1.05rem;
  padding-left: .9rem;
  border-left: 3px solid var(--accent);
}

/* ---------- boxes ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.25rem;
  margin: 1rem 0 0;
}

article, aside {
  position: relative;
  background: #fff;
  border: 1px solid var(--ink);
  border-top: 4px solid var(--ink);
  padding: 1rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
article:hover {
  border-top-color: var(--accent);
  box-shadow: 0 8px 0 -4px var(--accent);
}

article ul { font-size: .85rem; }
article > p { font-size: .85rem; }

/* person cards: photo flush to the top, grayscale until hovered */
article > img:first-child {
  display: block;
  width: calc(100% + 2rem);
  max-width: none;
  margin: -1rem -1rem .8rem;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-bottom: 1px solid var(--ink);
  background: #e6e9ee;
  /* filter: grayscale(1) contrast(1.05); */
  transition: filter .25s ease;
}
article:hover > img:first-child { filter: none; }

article > img + h3 + p {
  display: inline-block;
  margin: 0 0 .2rem;
  padding: 0 .35rem;
  font-size: .72rem;
  color: #fff;
  background: var(--ink);
}

dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .1rem .6rem;
  margin: .7rem 0 0;
  padding-top: .55rem;
  border-top: 1px dotted var(--ink);
  font-size: .72rem;
}
dt { color: var(--accent); font-weight: 700; }
dd { margin: 0; }

/* call-to-action box */
aside {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin: 3rem 0 0;
  border: 2px dashed var(--accent);
  background: #fff8f4;
}

aside p { 
  max-width: 620px; margin: 0; 
}

/* orange action button */
a.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--ink);
  padding: .9rem 1.4rem;
  font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  box-shadow: 4px 4px 0 var(--ink);
  transition: box-shadow .12s ease, transform .12s ease, background .12s ease;
}
a.button:hover {
  color: #fff;
  background: var(--ink);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

/* image + text side by side */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  margin-top: 1rem;
}
.split figure { margin: 0; }
.split img {
  display: block;
  width: 100%;
  border: 2px solid var(--ink);
  padding: 6px;
  background: #fff;
}
figcaption { font-size: .72rem; margin-top: .3rem; }
figcaption::before { content: "fig. "; color: var(--accent); font-weight: 700; }

/* in-page jump links */
main > p.jump { font-size: .78rem; }
main > p.jump::before { content: "jump to: "; color: var(--accent); font-weight: 700; }
main > p.jump a { text-decoration: underline; text-decoration-style: dotted; }

/* ---------- footer ---------- */

body > footer {
  margin-top: 4rem;
  padding: .9rem 1rem;
  background: var(--ink);
  color: #fff;
  border-top: 6px solid var(--accent);
  font-size: .75rem;
}
body > footer a { text-decoration: underline; }
body > footer a:hover { color: var(--accent); }

/* ---------- small screens / motion ---------- */

@media (max-width: 700px) {
  .split { grid-template-columns: 1fr; }
  body {
    padding: 0 0 1rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .001ms !important;
  }
  a.button:hover { transform: none; }
}
