/* ============================================
   DEMO.CSS — EXAGGERATED STYLES FOR LEARNING
   All the same ideas as style.css but with
   values pushed far enough that you can
   clearly see what each property is doing.
   ============================================ */


/* ============================================
   RESET & BASE
   ============================================ */

*, *::before, *::after {
  box-sizing: border-box; /* padding and border count INSIDE any width you set — not added on top */
  margin: 0;              /* wipe browser default margins — headings, body, paragraphs all have them by default */
  padding: 0;             /* wipe browser default padding — same idea */
}

html, body {
  height: 100%; /* let the page fill the full window height — some layouts need this to work */
}


/* ============================================
   BODY — BACKGROUND TEXTURE
   The repeating-linear-gradient here is
   cranked up so you can clearly see the
   scan-line effect. In the real site it runs
   at 3% opacity and 4px tile height.
   Here: 18% opacity and 12px tile height.
   ============================================ */

body {
  background-color: #d8d8d8;               /* the base grey that shows through the transparent gaps */

  background-image:
    repeating-linear-gradient(
      0deg,                                 /* 0deg = straight up, so stripes run horizontally */
      transparent 0px,                      /* from pixel 0: fully transparent, base colour shows through */
      transparent 9px,                      /* still transparent up to pixel 9 — the wide gap between lines */
      rgba(0,0,0,0.18) 9px,                 /* at pixel 9: instant sharp jump to 18% black — no blending */
      rgba(0,0,0,0.18) 12px                 /* holds that dark colour to pixel 12, then the 12px tile repeats */
    );
                                            /* result: a visible dark line every 12px down the whole page */
                                            /* in style.css the line is 1px in a 4px tile at 3% opacity */
                                            /* here it is 3px in a 12px tile at 18% opacity — clearly visible */

  color: #111;
  font-family: "Courier New", Courier, monospace;
  min-height: 100vh;
}


/* ============================================
   SITE HEADER
   ============================================ */

#site-header {
  background-color: #111;
  color: #f5f5f5;
  text-align: center;
  padding: 28px 20px 14px;
  border-bottom: 4px double #555;          /* double = two parallel lines — a single value draws both */
  letter-spacing: 0.08em;
}

#site-header h1 {
  font-family: "Times New Roman", Times, serif;
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

#site-header p {
  font-size: 0.75rem;
  color: #aaa;
  margin-top: 6px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}


/* ============================================
   SITE NAV
   ============================================ */

#site-nav {
  background-color: #222;
  border-bottom: 3px solid #000;
  display: flex;
  justify-content: center;
}

#site-nav a {
  display: inline-block;
  padding: 10px 22px;
  color: #ccc;
  text-decoration: none;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-right: 1px solid #444;
}

#site-nav a:first-child { border-left: 1px solid #444; }

#site-nav a:hover      { background-color: #f5f5f5; color: #111; }
#site-nav a.active     { background-color: #f5f5f5; color: #111; font-weight: bold; }


/* ============================================
   TAB CONTAINER
   ============================================ */

.tab-container {
  max-width: 1000px;
  margin: 0 auto;       /* auto left and right margin = horizontally centred */
  padding: 0 20px;
}


/* ============================================
   TAB BUTTONS ROW — THE SHELF

   This is the container that holds all the
   tab buttons in a horizontal row.
   The key line here is border-bottom — it
   draws the "shelf" that the tabs sit on.
   The active tab later paints over its slice
   of this line to fake a connection between
   tab and panel.
   ============================================ */

.tab-buttons {
  display: flex;          /* lay buttons side by side horizontally */
  flex-wrap: wrap;        /* allow wrapping to a new line on narrow screens */
  gap: 0;                 /* no space between buttons — they sit flush */
  margin-top: 36px;
  border-bottom: 6px solid #111; /* EXAGGERATED: 6px instead of 3px — the shelf is clearly visible */
}


/* ============================================
   TAB BUTTON — INACTIVE STATE

   Several things work together here to create
   the classic "folder tab" illusion.
   Each property is labelled with what it
   contributes to the effect.
   ============================================ */

.tab-btn {
  background-color: #bbb;             /* inactive tabs are mid-grey — they read as "behind" the active one */
  color: #111;
  border: 4px solid #111;             /* EXAGGERATED: 4px border instead of 2px — clearly visible outline */
  border-bottom: none;                /* no bottom border — the tab appears open at the base */
                                      /* this is step 1 of the illusion: open bottom suggests connection below */

  padding: 14px 32px;                 /* EXAGGERATED: generous padding makes tabs tall and obvious */

  font-family: "Courier New", Courier, monospace;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;                    /* shows a hand cursor on hover — browsers do this for links but not buttons */

  margin-right: -4px;                 /* EXAGGERATED: pulls each button 4px left to overlap the 4px border */
                                      /* without this, adjacent borders would be 8px wide (4px + 4px) */
                                      /* the negative margin makes them share a single 4px line instead */

  position: relative;                 /* required for 'top' to work — takes the element out of normal flow slightly */
  top: 6px;                           /* EXAGGERATED: nudges button DOWN by 6px so it overlaps the shelf line */
                                      /* the active tab will cover exactly this 6px with a matching-colour border */

  transition: background 0.2s, color 0.2s; /* smooth colour change on hover — 0.2s is noticeably slow here */
}

.tab-btn:hover {
  background-color: #999;             /* darkens slightly on hover to acknowledge the interaction */
}


/* ============================================
   TAB BUTTON — ACTIVE STATE

   This is where the illusion is completed.
   The active button gets a bottom border
   in the same colour as its own background
   and the panel below — painting over the
   shelf line and making tab + panel look
   like one connected surface.
   ============================================ */

.tab-btn.active {
  background-color: #f0f0f0;          /* near-white — matches the panel colour below */
  color: #000;
  font-weight: bold;

  z-index: 1;                         /* brings the active tab in FRONT of everything at this level */
                                      /* necessary so the bottom border paints over the shelf line */
                                      /* without z-index the shelf line could render on top */

  border-bottom: 6px solid #f0f0f0;   /* EXAGGERATED: 6px matches the 6px shelf and the 6px top offset */
                                      /* this border is the same colour as the tab background */
                                      /* it paints over the shelf line beneath the active tab */
                                      /* the result: a gap in the shelf exactly where the tab sits */
                                      /* making the tab and the panel look like one unbroken shape */
                                      /* if you change this colour to red you will see exactly what it's doing */
}


/* ============================================
   TAB PANELS
   ============================================ */

.tab-panel {
  display: none;          /* all panels hidden by default */
  padding: 30px 0 40px;
}

.tab-panel.active {
  display: block;         /* only the active panel is shown — switched by JavaScript */
}


/* ============================================
   CARDS WRAPPER — SCROLLABLE AREA

   A fixed height container with overflow-y:auto
   means cards pile up inside it and scroll
   rather than pushing the page layout down.
   The scrollbar styling below is also
   exaggerated to make it clearly visible.
   ============================================ */

.cards-wrapper {
  max-height: 480px;      /* fixed height — content beyond this scrolls */
  overflow-y: auto;       /* auto = scrollbar appears only when content exceeds the height */
                          /* scroll = scrollbar always visible even when not needed */
                          /* hidden = content clipped, no scrollbar at all */
  padding: 4px 8px 4px 4px;

  scrollbar-width: thin;                  /* Firefox: thin scrollbar track */
  scrollbar-color: #222 #ccc;             /* Firefox: thumb colour then track colour */
}

/* Chrome/Safari scrollbar styling */
.cards-wrapper::-webkit-scrollbar {
  width: 14px;                            /* EXAGGERATED: very wide scrollbar — hard to miss */
}

.cards-wrapper::-webkit-scrollbar-track {
  background: #ccc;
  border: 2px solid #888;
}

.cards-wrapper::-webkit-scrollbar-thumb {
  background-color: #222;                 /* dark thumb on light track */
  border: 2px solid #555;
}


/* ============================================
   CARDS GRID
   ============================================ */

.cards-grid {
  display: flex;
  flex-direction: column;   /* stack cards vertically */
  align-items: center;      /* centre them horizontally within the wrapper */
  gap: 28px;
}


/* ============================================
   CARD

   The box-shadow here uses two layers to
   create a hard-edged offset shadow —
   a deliberately retro look.
   ============================================ */

.card {
  background-color: #fff;
  border: 3px solid #111;                 /* EXAGGERATED: 3px border */

  box-shadow:
    10px 10px 0 #777,                     /* EXAGGERATED: first shadow layer — 10px offset, no blur */
    12px 12px 0 #444;                     /* second layer sits 2px further — creates a stacked effect */
                                          /* the 0 blur radius is what keeps the shadow hard-edged */
                                          /* a soft shadow would use something like 8px blur */

  width: 100%;
  max-width: 660px;
  padding: 26px 30px;
  position: relative;
}

.card::before {
  content: "★";                           /* a purely decorative pseudo-element — no real HTML needed */
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 0.7rem;
  color: #aaa;
}

.card h2 {
  font-family: "Times New Roman", Times, serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  border-bottom: 1px dashed #bbb;        /* dashed line under the heading — a step between solid and dotted */
  padding-bottom: 7px;
}

.card .entry-meta {
  font-size: 0.68rem;
  color: #888;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.card p {
  font-size: 0.88rem;
  line-height: 1.75;
  color: #222;
}


/* ============================================
   FOOTER
   ============================================ */

#site-footer {
  background-color: #111;
  color: #666;
  text-align: center;
  padding: 16px;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-top: 4px double #444;
  margin-top: 48px;
}

#site-footer a { color: #aaa; text-decoration: none; }
#site-footer a:hover { text-decoration: underline; }


/* ============================================
   HIGHLIGHT BOX
   A coloured callout used on the demo page
   to point out what each exaggerated value
   is demonstrating.
   ============================================ */

.demo-note {
  background-color: #111;
  color: #ddd;
  border-left: 6px solid #fff;
  padding: 12px 18px;
  font-size: 0.76rem;
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 660px;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: 0.04em;
}

.demo-note strong {
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
