/*
 * KAM’S CORNER — Stylesheet
 * Rules are grouped in the same order as the page.
 * A selector (such as .window) chooses which HTML elements to style.
 * Each line inside its braces sets one visual property.
 * Spacing shorthand uses: top right bottom left (four values),
 * or top/bottom left/right (two values).
 * Mobile overrides are at the bottom; later rules can override earlier ones.
 */

/* 1. Theme colors — change these variables to customize the main palette. */
:root {
  --navy: #10105a;
  --paper: #fffef0;
  --gray: #c4c4c4;
  --yellow: #fff580;
  --blue: #000080;
}

/* 2. Page defaults and link states */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
}

body {
  margin: 0;
  color: #202033;
  background-color: #164d4b;
  background-image: radial-gradient(#6b8a76 0.65px, transparent .65px);
  background-size: 5px 5px;
  font: 16px/1.6 Georgia, 'Times New Roman', serif;
}

a {
  color: var(--blue);
  text-underline-offset: 3px;
}

a:hover {
  color: #a31b47;
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid #cf3158;
  outline-offset: 4px;
}

/* 3. Outer page and shared typefaces */
.site {
  max-width: 1160px;
  margin: 32px auto;
  padding: 0 36px 20px;
  background: var(--paper);
  border: 2px solid #181834;
  box-shadow: 9px 9px 0 #072f32;
}

.topline,
.bottomline,
.sectionmeta,
.eyebrow,
.titlebar,
.label,
.tags,
.status,
.stamp,
.badges,
.sidefoot,
footer,
.draft {
  font-family: 'Courier New', monospace;
}

.topline {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  font-size: 12px;
  border-bottom: 1px solid #aaa99f;
  letter-spacing: .5px;
}

/* 4. Header, site title, and welcome banner */
header {
  text-align: center;
  padding: 25px 0 0;
}

.eyebrow {
  font-size: 14px;
  letter-spacing: 4px;
  margin: 0 0 2px;
}

h1 {
  font-family: Impact, 'Arial Black', sans-serif;
  font-size: clamp(44px, 7vw, 86px);
  line-height: 1.14;
  letter-spacing: -2px;
  margin: 6px 0;
  color: var(--navy);
  text-shadow: 3px 3px 0 #c3c0dc;
}

h1 span {
  color: #24605a;
}

h1 sup {
  font: 16px 'Courier New', monospace;
  vertical-align: top;
  display: inline-block;
  margin-top: 10px;
}

.tagline {
  font-style: italic;
  font-size: 19px;
  margin: 9px 0 25px;
}

.ticker {
  border-block: 2px solid var(--navy);
  padding: 7px 8px;
  background: var(--yellow);
  font: bold 14px/1.5 'Courier New', monospace;
  letter-spacing: 1px;
}

/* 5. Main layout — sidebar on the left, content on the right */
.layout {
  display: grid;
  grid-template-columns: 215px minmax(0, 1fr);
  gap: 26px;
  margin-top: 28px;
}

/* 6. Reusable retro windows — frame, title bar, and content area */
.window {
  background: var(--gray);
  border: 2px solid;
  border-color: white #555 #555 white;
  box-shadow: 2px 2px 0 #171729;
  margin-bottom: 24px;
  padding: 3px;
}

.titlebar {
  background: var(--navy);
  color: #fff;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 8px;
  font-size: 14px;
  font-weight: bold;
  line-height: 1.5;
}

.inner {
  background: var(--paper);
  margin-top: 3px;
  padding: 24px;
  border: 1px solid #777;
}

/* 7. Sidebar navigation, webmaster note, and badges */
.navlinks {
  padding: 13px 10px;
}

.navlinks a {
  display: block;
  padding: 8px 3px;
  font-weight: bold;
  font-size: 16px;
}

.navlinks a:first-child {
  background: var(--yellow);
  border: 1px dotted var(--navy);
}

.note {
  border: 1px solid #93927c;
  padding: 17px;
  background: #f3efcf;
  margin-top: 27px;
  transform: rotate(-1deg);
}

.label {
  font-size: 12px;
  font-weight: bold;
  line-height: 1.5;
  display: block;
  letter-spacing: 1px;
}

.note p {
  font-size: 15px;
  line-height: 1.6;
}

.signature {
  font-style: italic;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
  margin-top: 26px;
}

.badges span {
  display: block;
  width: 170px;
  background: var(--navy);
  color: white;
  padding: 5px 6px;
  border: 3px ridge #ccc;
  text-align: center;
  font-size: 12px;
  line-height: 1.3;
}

.badges span + span {
  background: #38645c;
  color: #fff7b3;
}

.sidefoot {
  text-align: center;
  font-size: 12px;
  color: #5e605f;
}

/* 8. Section labels, headings, and welcome message */
.sectionmeta {
  font-size: 12px;
  font-weight: bold;
  letter-spacing: .7px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  color: #57595e;
}

.stamp {
  background: var(--yellow);
  color: var(--navy);
  padding: 1px 6px;
  transform: rotate(-3deg);
  border: 1px solid var(--navy);
  font-size: 11px;
}

h2 {
  font-size: 32px;
  line-height: 1.16;
  color: var(--navy);
  margin: 14px 0;
}

p {
  margin: 12px 0;
}

.welcome h2 {
  font-size: 38px;
}

.notice {
  background: #efedde;
  border: 1px dashed #797968;
  font-size: 14px;
  padding: 10px 12px;
  margin-top: 21px;
}

.asterisk {
  color: #ad3350;
  margin-left: 4px;
}

/* 9. Coding project entries and language tags */
.project {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  border-top: 1px solid #bab9aa;
  padding: 21px 0 8px;
  margin-top: 19px;
}

.projectnumber {
  font: 14px 'Courier New', monospace;
  color: #656568;
  padding-top: 5px;
}

.project h3 {
  font-size: 21px;
  margin: 0;
  line-height: 1.3;
}

.project p {
  font-size: 15px;
  margin: 6px 0 10px;
}

.project > a,
.status {
  margin-left: auto;
  white-space: nowrap;
  font-size: 13px;
  padding-top: 4px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
}

.tags span {
  border: 1px solid #aaa99e;
  padding: 1px 6px;
  background: #eeecdf;
}

.empty {
  color: #606165;
}

.empty h3 {
  font-size: 18px;
  font-weight: normal;
  font-style: italic;
}

.status {
  font-size: 11px;
}

/* 10. Report cards and expandable report templates */
.reports {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* Keep each card at its own height when the other template is opened. */
  align-items: start;
  gap: 22px;
}

.reports .inner {
  padding: 21px;
}

.reports h2 {
  font-size: 30px;
}

.reports p {
  font-size: 16px;
}

summary {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-size: 15px;
  margin-top: 20px;
}

details[open] summary {
  margin-bottom: 14px;
}

article {
  border-top: 1px dashed #949488;
  padding-top: 16px;
}

article h3 {
  font-size: 20px;
  margin: 9px 0;
}

article p {
  font-size: 14px !important;
}

.draft {
  font-size: 11px;
  color: #7b304b;
}

/* 11. About section and footer */
.about {
  padding: 5px 3px 20px;
}

.about h2 {
  font-size: 28px;
}

.small {
  font-size: 14px;
  color: #64645d;
}

footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 0;
  border-top: 2px solid var(--navy);
  font-size: 11px;
}

.bottomline {
  text-align: center;
  font-size: 11px;
  letter-spacing: 1px;
  color: #62645f;
  margin-top: 16px;
}

/* 12. Accessibility — show the skip link when reached with the keyboard */
.skip {
  position: absolute;
  left: 10px;
  top: -100px;
  background: white;
  padding: 8px;
  z-index: 2;
}

.skip:focus {
  top: 10px;
}

section {
  scroll-margin-top: 20px;
}

/* 13. Tablet layout — applies when the viewport is 800px wide or smaller */
@media (max-width: 800px) {
  .site {
    margin: 16px;
    padding: 0 20px 20px;
  }

  .layout {
    grid-template-columns: 175px minmax(0, 1fr);
    gap: 18px;
  }

  .reports {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .topline span:last-child {
    display: none;
  }

  .inner {
    padding: 18px;
  }

  .project {
    flex-wrap: wrap;
  }

  .project > div {
    flex: 1;
    min-width: 150px;
  }

  .project > a,
  .status {
    margin-left: 39px;
  }

  .welcome h2 {
    font-size: 32px;
  }

}

/* 14. Phone layout — stacks the sidebar above the content */
@media (max-width: 570px) {
  .site {
    margin: 10px;
    padding: 0 13px 16px;
    box-shadow: 4px 4px 0 #072f32;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 18px;
  }

  header {
    padding-top: 20px;
  }

  h1 {
    letter-spacing: -1px;
    font-size: clamp(34px, 10vw, 55px);
  }

  h1 sup {
    font-size: 10px;
  }

  .eyebrow {
    font-size: 12px;
  }

  .tagline {
    font-size: 16px;
  }

  .ticker {
    font-size: 12px;
  }

  .note,
  .badges,
  .sidefoot {
    display: none;
  }

  .navlinks {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 12px;
    padding: 9px;
  }

  .navlinks a {
    font-size: 14px;
    padding: 4px;
  }

  .window {
    margin-bottom: 20px;
  }

  .welcome h2 {
    font-size: 30px;
  }

  .stamp {
    font-size: 10px;
  }

  .sectionmeta {
    font-size: 11px;
  }

  .inner {
    padding: 18px 15px;
  }

  .bottomline {
    font-size: 10px;
  }

  .project {
    gap: 10px;
  }

  footer {
    font-size: 10px;
  }

}

/* 15. Reduced motion — respect the visitor’s system preference */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

}
