@import url('/assets/css/fonts.css');

:root {
  font-family: var(--mono-font-stack, "Cascadia Mono", "Cascadia Code", Consolas, "Courier New", monospace);
  font-weight: 300;
  background-color: #d2b48c;
  color: #111;
}

* {
  box-sizing: border-box;
}
/* Manual weight overrides */

/* Paragraphs = Light */
p {
  font-weight: 250 !important;
  font-family: var(--mono-font-stack) !important;
}

/* Headings = Regular */
h1, h2, h3, h4, h5, h6 {
  font-weight: 400 !important;
  font-family: var(--mono-font-stack) !important;
}

/* Bold text = Regular */
b, strong {
  font-weight: 400 !important;
  font-family: var(--mono-font-stack) !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: inherit;
  color: inherit;
  font-weight: 300;
}

a {
  color: inherit;
}

main a {
  text-decoration: none;
  padding: 0.15rem 0.4rem;
  border: 1px solid rgba(0, 0, 0, 0.5);
  display: inline-block;
}

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

.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;
}

.shell {
  width: min(85%, 960px);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

header {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.3);
  padding-bottom: 1rem;
  align-items: center;
}

.brand-avatar {
  width: 140px;
  flex-shrink: 0;
}

.masthead-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.masthead-copy p {
  margin: 0.3rem 0 0.6rem;
}

nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  padding: 0.2rem 0.45rem;
  border: 1px solid rgba(0, 0, 0, 0.5);
}

nav a.active,
nav a[aria-current="page"] {
  background-color: rgba(0, 0, 0, 0.08);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  text-decoration: none;
  padding: 0.2rem 0.45rem;
  border: 1px solid rgba(0, 0, 0, 0.5);
  background: none;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  cursor: pointer;
}

.nav-dropdown-toggle.active {
  background-color: rgba(0, 0, 0, 0.08);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  background-color: #d2b48c;
  border: 1px solid rgba(0, 0, 0, 0.5);
  border-top: none;
  flex-direction: column;
  gap: 0;
  z-index: 10;
  min-width: 160px;
  top: 100%;
  left: 0;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: flex;
}

.nav-dropdown-menu a {
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  display: block;
}

.nav-dropdown-menu a:last-child {
  border-bottom: none;
}

.nav-dropdown-menu a:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.nav-dropdown-menu a.active {
  background-color: rgba(0, 0, 0, 0.08);
}

main {
  display: flex;
  flex-direction: column;
  gap: 0rem;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  padding: 0;
}

.link-card {
  border: 1px solid rgba(0, 0, 0, 0.5);
  padding: 1rem;
  background: rgba(0, 0, 0, 0.02);
}

.link-card h2 {
  margin-top: 0;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.links-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.links-list li {
  line-height: 1.4;
}

section {
  background-color: rgba(255, 255, 255, 0.08);
  padding: 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.35);
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  padding: 0;
  list-style: none;
  margin: 0;
}

.file-card {
  border: 1px solid rgba(0, 0, 0, 0.4);
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.03);
}

.file-card h3 {
  margin-top: 0;
}

.file-card p {
  margin-bottom: 0.5rem;
}

.file-meta {
  font-size: 0.9rem;
  opacity: 0.85;
}

table {
  width: 95%;
  margin: 2rem auto;
  border-collapse: collapse;
}

th,
td {
  border: 1px solid #111;
  padding: 0.4rem;
  vertical-align: top;
}

footer {
  margin-top: 3rem;
  font-size: 0.85rem;
  opacity: 0.85;
}

.footer-social {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.footer-social img {
  width: 28px;
  height: auto;
}

/* Calendar Styles */
.calendar-container {
  max-width: 960px;
  margin: 2rem auto;
  text-align: center;
}

.calendar-wrap {
  width: 100%;
  overflow-x: auto;
}

.calendar {
  border-collapse: collapse;
  width: 100%;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.06);
  font-family: inherit;
  font-size: 1rem;
}

.calendar th,
.calendar td {
  border: 1px solid rgba(0, 0, 0, 0.35);
  width: 14.2%;
  min-width: 40px;
  height: 3.3em;
  vertical-align: top;
  padding: 0.6em 0.3em;
  box-sizing: border-box;
  word-break: break-word;
  text-align: left;
}

.calendar th {
  background: rgba(0, 0, 0, 0.12);
  color: #111;
  font-size: 1.1em;
  padding: 0.5em;
  font-weight: 400;
}

.today {
  background: rgba(0, 0, 0, 0.14) !important;
  color: #111 !important;
  font-weight: 400;
  border: 2px solid rgba(0, 0, 0, 0.35);
}

.caldate {
  font-size: 1.03em;
  font-weight: bold;
  margin-bottom: 0.09em;
  display: block;
  color: inherit;
}

.event-details {
  margin: 0.08em 0 0.05em 0;
  padding: 0.07em 0.17em;
  background: rgba(0, 0, 0, 0.08);
  border-left: 2px solid rgba(0, 0, 0, 0.55);
  font-size: 0.92em;
  color: inherit;
  line-height: 1.22;
}

.event-details a {
  color: inherit;
  text-decoration: none;
  font-weight: 400;
  padding: 0;
  border: none;
  display: inline;
}

a.calnav {
  color: inherit;
  font-size: 1.15rem;
  text-decoration: none;
  margin: 0 1.2rem;
  border: 1px solid rgba(0, 0, 0, 0.4);
  padding: 0.15rem 0.45rem;
}

.calendar caption {
  margin-bottom: 1.2rem;
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  background: transparent;
}

@media (max-width: 700px) {
  header {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }

  .masthead-copy {
    width: 100%;
    order: 2;
  }

  nav {
    width: 100%;
    justify-content: center;
    order: 3;
  }

  nav a,
  nav button {
    width: fit-content;
  }

  .calendar th,
  .calendar td {
    min-width: 55px;
    height: 4em;
    font-size: 0.95em;
    padding: 0.4em 0.2em;
  }
  .calendar {
    font-size: 0.92rem;
  }
}
