/* GeoCities Theme Stylesheet */

:root {
  --bg-color: #000000;
  --text-primary: #00FF00;
  --text-secondary: #FFFF00;
  --link-color: #00FFFF;
  --link-visited: #FF00FF;
  --accent-red: #FF0000;
}

body {
  background-color: var(--bg-color);
  background-image: url('assets/bg.png'); /* The starry night background */
  color: var(--text-primary);
  font-family: "Comic Sans MS", "Chalkboard SE", sans-serif;
  margin: 0;
  padding: 10px;
}

h1, h2, h3 {
  color: var(--text-secondary);
  font-family: "Times New Roman", Times, serif;
  text-align: center;
  text-shadow: 2px 2px #FF0000;
}

a {
  color: var(--link-color);
  text-decoration: underline;
  font-weight: bold;
}

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

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

/* Classic table layouts */
.container {
  width: 80%;
  margin: 0 auto;
  background-color: rgba(0, 0, 0, 0.8); /* Slight dark overlay to make text readable against stars */
  border: 5px ridge #808080;
  padding: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  border: 3px outset #00FF00;
}

th, td {
  border: 2px inset #00FF00;
  padding: 10px;
  text-align: left;
}

th {
  background-color: #008000;
  color: #FFFF00;
  font-family: "Times New Roman", Times, serif;
}

/* The legendary blink effect */
.blink {
  animation: blinker 1s linear infinite;
  color: var(--accent-red);
  font-weight: bold;
}

/* First cell: bold friendly name on top, description as a subheading under it */
body:not(.theme-clean) .proj-name {
  display: block;
  font-weight: bold;
}
body:not(.theme-clean) .proj-desc {
  display: block;
  margin-top: 3px;
  font-weight: normal;
  font-size: 0.8em;
  color: #00CC00;
}

/* Small "views are my own" disclaimer + table footnote (Fun view) */
body:not(.theme-clean) .disclaimer {
  font-size: 0.8em;
  color: #00CC00;
}
body:not(.theme-clean) .table-note {
  font-size: 0.8em;
  color: #00CC00;
  margin-top: 10px;
}

/* Accordion / Details */
details.accordion-section {
  margin-bottom: 20px;
}
details.accordion-section summary {
  cursor: pointer;
  list-style: none;
  outline: none;
}
details.accordion-section summary::-webkit-details-marker {
  display: none;
}
details.accordion-section summary h2 {
  display: inline-block;
}
details.accordion-section summary::before {
  content: "[+] ";
  color: #00FF00;
  font-size: 1.2em;
  font-family: "Courier New", Courier, monospace;
}
details[open].accordion-section summary::before {
  content: "[-] ";
  color: #FF00FF;
}

@keyframes blinker {
  50% {
    opacity: 0;
  }
}

/* Marquee styling for compatibility if needed, though standard marquee tag usually works */
marquee {
  font-size: 24px;
  color: var(--text-secondary);
  background-color: #000080;
  border: 2px solid #FFFF00;
  padding: 5px;
  margin-bottom: 20px;
}

hr {
  border: 0;
  height: 5px;
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(255, 255, 0, 0.75), rgba(0, 0, 0, 0));
  margin: 30px 0;
}

.center {
  text-align: center;
}

/* Images */
img.retro-img {
  border: 3px outset #808080;
  max-width: 100%;
}

/* Case-study screenshots (retro view) — desktop + mobile pairs */
.cs-shots-note {
  color: #00CC00;
  font-size: 0.85em;
  text-align: center;
  margin: 0 0 14px 0;
}
.cs-shots {
  margin: 16px 0;
}
.cs-shot {
  margin: 0 0 24px 0;
  text-align: center;
}
.cs-shot-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  justify-content: center;
  flex-wrap: wrap;
}
.cs-shot-row .shot-frame {
  display: inline-block;
  text-decoration: none;
}
.cs-shot-row .shot-frame img {
  display: block;
  height: auto;
  border: 3px outset #808080;
  background: #000;
}
.cs-shot-row .shot-frame.desktop { flex: 0 1 460px; }
.cs-shot-row .shot-frame.desktop img { width: 100%; }
.cs-shot-row .shot-frame.mobile { flex: 0 0 auto; width: 140px; }
.cs-shot-row .shot-frame.mobile img { width: 100%; }
.cs-shots figcaption {
  color: var(--text-secondary);
  font-size: 0.85em;
  margin-top: 8px;
}

.hit-counter {
  font-family: "Courier New", Courier, monospace;
  font-size: 20px;
  background-color: #000000;
  color: #FF0000;
  border: 2px solid #808080;
  padding: 5px;
  display: inline-block;
  letter-spacing: 5px;
}

/* Specific Project Sections */
.projects-section {
  border: 2px dashed var(--text-secondary);
  padding: 15px;
  margin-bottom: 20px;
}

/* Lists */
ul {
  list-style-type: square;
}

#theme-toggle {
    position: fixed;
    top: 10px;
    right: 10px;
    background-color: #C0C0C0;
    color: #000;
    border: 3px outset #FFFFFF;
    border-bottom-color: #808080;
    border-right-color: #808080;
    padding: 5px 10px;
    font-family: "Courier New", Courier, monospace;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000;
}
#theme-toggle:active {
    border-style: inset;
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
  .container {
    width: 95%;
    padding: 10px 10px 90px; /* bottom padding so content clears the fixed theme toggle */
    border-width: 3px;
  }
  
  /* Projects table -> stacked cards on mobile (no side-scroll) */
  body:not(.theme-clean) table,
  body:not(.theme-clean) tbody,
  body:not(.theme-clean) tr,
  body:not(.theme-clean) td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
  body:not(.theme-clean) th,
  body:not(.theme-clean) tr:not(.project-item) {
    display: none; /* hide the column-header row; each field is labeled in the card */
  }
  body:not(.theme-clean) tr.project-item {
    margin-bottom: 16px;
    padding: 10px;
    border: 2px inset #00FF00;
  }
  body:not(.theme-clean) td {
    border: none;
    padding: 2px 0;
    white-space: normal;       /* wrap instead of side-scrolling */
    overflow-wrap: anywhere;   /* break long repo names / URLs */
  }
  body:not(.theme-clean) td:first-child {
    color: var(--text-secondary);
    font-weight: bold;
    font-size: 1.1em;
    padding-bottom: 2px;
  }
  /* Compact card body: the links row on its own line, then status · date. */
  body:not(.theme-clean) td.links {
    display: block;
    padding: 2px 0;
  }
  body:not(.theme-clean) td:nth-child(3),
  body:not(.theme-clean) td:nth-child(4) {
    display: inline;
    padding: 0;
    font-size: 0.85em;
  }
  body:not(.theme-clean) td:nth-child(4)::before { content: " · Last updated: "; color: #00CC00; }
  
  h1 {
    font-size: 1.8em;
  }
  
  h2 {
    font-size: 1.4em;
  }
  
  /* Touch Targets */
  a {
    display: inline-block;
    padding: 5px 0; /* Increase touch area slightly */
  }
  
  #theme-toggle {
    top: auto;
    bottom: 10px;
    right: 10px;
    font-size: 14px;
    padding: 12px 16px; /* Ensuring > 44px touch target */
  }
}

/* Headshot & Socials */
.headshot {
  border: 4px outset #FFFFFF;
  margin-bottom: 15px;
  background-color: #000;
}

.social-links {
  margin: 15px 0;
}

.social-links a {
  display: inline-block;
  margin: 0 10px;
  color: var(--link-color);
  transition: transform 0.2s;
}

.social-links a:hover {
  color: #FFFFFF;
  transform: scale(1.1);
  background-color: transparent;
}

/* Filter Buttons */
.filter-bar {
  background-color: #000080;
  padding: 10px;
  border: 3px ridge #808080;
}

.filter-btn {
  background-color: #C0C0C0;
  color: #000;
  font-family: "Comic Sans MS", "Chalkboard SE", sans-serif;
  font-weight: bold;
  border: 3px outset #FFFFFF;
  border-bottom-color: #808080;
  border-right-color: #808080;
  padding: 12px 15px;
  margin: 5px;
  cursor: pointer;
}

.filter-btn:focus-visible,
#theme-toggle:focus-visible,
details.accordion-section summary:focus-visible,
a:focus-visible {
    outline: 3px solid #00FF00;
    outline-offset: 2px;
}

.filter-btn:active, .filter-btn.active {
  border-style: inset;
  background-color: #808080;
  color: #FFFFFF;
}

/* Desktop: keep the Links, Status and (friendly) date columns on a single line;
   only the first column (the question) is allowed to wrap. */
@media screen and (min-width: 769px) {
  body:not(.theme-clean) th:not(:first-child),
  body:not(.theme-clean) td:not(:first-child) {
    white-space: nowrap;
  }
}

/* Tighter vertical rhythm for the Fun (retro) view only */
body:not(.theme-clean) marquee { margin-bottom: 10px; }
body:not(.theme-clean) h1 { margin: 0.3em 0; }
body:not(.theme-clean) .headshot { margin-bottom: 6px; }
body:not(.theme-clean) .center p { margin: 0.5em 0; }
body:not(.theme-clean) .social-links { margin: 6px 0; }
body:not(.theme-clean) hr { margin: 12px 0; }
body:not(.theme-clean) details.accordion-section { margin-bottom: 10px; }

/* Media / Writings lists rendered as a retro table (ruled lines, no bullets) — Fun view only.
   Scoped to the homepage accordion so case-study content lists keep normal bullets. */
body:not(.theme-clean) details.accordion-section .projects-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 3px outset #00FF00;
}
body:not(.theme-clean) details.accordion-section .projects-section li {
  list-style: none;
  border-bottom: 2px inset #00FF00;
  padding: 10px;
}
body:not(.theme-clean) details.accordion-section .projects-section li:last-child {
  border-bottom: none;
}

/* Keep the 5 filter chips on a single row on phones (Fun view) */
@media screen and (max-width: 768px) {
  body:not(.theme-clean) .filter-bar {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 4px;
  }
  body:not(.theme-clean) .filter-btn {
    margin: 0;
    padding: 7px 8px;
    font-size: 0.78em;
    white-space: nowrap;
  }
}
