/* ==========================================================
   RETRO THEME — Windows 95 desktop pastiche
   Loaded on every page (taskbar + footer are shared chrome)
   ========================================================== */

/* ---- Reset ---- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

/* ---- Variables ---- */
:root {
  --win-gray: #c0c0c0;
  --win-dark: #808080;
  --win-light: #ffffff;
  --win-black: #000000;
  --win-blue: #008080;
  --win-yellow: #ffcc00;
  --win-sidebar: #000066;
  --win-red: #ff0000;
  --win-green: #00ff00;
  --win-footer: #000033;
  --win-cyan: #00ffff;
  --font-retro: 'MS Sans Serif', Arial, sans-serif;
  --font-retro-mono: 'Courier New', monospace;
}

/* ---- Base ---- */
body {
  background-color: var(--win-blue);
  font-family: var(--font-retro);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Taskbar (components/header.html) ---- */
.win95-taskbar {
  background-color: var(--win-gray);
  height: 40px;
  display: flex;
  align-items: center;
  padding: 2px;
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-black);
  border-bottom: 2px solid var(--win-black);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.start-button {
  display: flex;
  align-items: center;
  background-color: var(--win-gray);
  padding: 2px 6px;
  margin-right: 2px;
  font-weight: bold;
  font-size: 14px;
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-black);
  border-bottom: 2px solid var(--win-black);
  cursor: pointer;
  text-decoration: none;
  color: var(--win-black);
}

.start-button:active, .start-button.active {
  border-top: 2px solid var(--win-black);
  border-left: 2px solid var(--win-black);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
  padding: 3px 5px 1px 7px;
}

.separator {
  width: 2px;
  height: 24px;
  background-color: var(--win-dark);
  border-left: 1px solid var(--win-light);
  border-right: 1px solid var(--win-black);
  margin: 0 8px;
}

.nav-item {
  text-decoration: none;
  color: var(--win-black);
  font-size: 14px;
  padding: 2px 12px;
  margin-right: 4px;
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-black);
  border-bottom: 2px solid var(--win-black);
  background-color: var(--win-gray);
  cursor: pointer;
  white-space: nowrap;
}

.nav-item:hover {
  background-color: #d0d0d0;
}

.nav-item:active, .nav-item.active {
  border-top: 2px solid var(--win-black);
  border-left: 2px solid var(--win-black);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
  padding: 5px 11px 3px 13px;
  background-color: #b0b0b0;
}

.spacer {
  flex-grow: 1;
}

.lang-switcher {
  margin-right: 8px;
}

.win95-taskbar-btn {
  background-color: var(--win-gray);
  color: var(--win-black);
  font-family: var(--font-retro);
  font-size: 12px;
  padding: 2px 8px;
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-black);
  border-bottom: 2px solid var(--win-black);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.win95-taskbar-btn:hover {
  background-color: #d0d0d0;
}

.win95-taskbar-btn:active {
  border-top: 2px solid var(--win-black);
  border-left: 2px solid var(--win-black);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
  padding: 3px 7px 1px 9px;
}

.clock {
  background-color: var(--win-gray);
  padding: 4px 10px;
  font-size: 12px;
  border-top: 2px solid var(--win-dark);
  border-left: 2px solid var(--win-dark);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
  margin-left: 8px;
}

/* ---- Page header banner (index.html) ---- */
.header {
  background-color: var(--win-yellow);
  color: var(--win-black);
  padding: 15px;
  text-align: center;
  border: 3px solid var(--win-light);
  margin: 50px 10px 10px 10px;
}

/* ---- "Under construction" banner (index.html) ---- */
.construction-banner {
  background: repeating-linear-gradient(
    45deg,
    #ffff00,
    #ffff00 10px,
    #000000 10px,
    #000000 20px
  );
  padding: 15px;
  border: 3px double var(--win-black);
  text-align: center;
  margin: 10px;
}

.construction-icon {
  width: 40px;
  height: 40px;
  vertical-align: middle;
}

.construction-text {
  background-color: var(--win-light);
  padding: 5px 15px;
  display: inline-block;
  font-family: Arial, sans-serif;
  color: var(--win-red);
}

/* ---- Table layout (index.html) ---- */
.main-layout {
  width: 90%;
  max-width: 1000px;
  margin: 10px auto;
  border-collapse: collapse;
}

.sidebar {
  width: 220px;
  background-color: var(--win-sidebar);
  vertical-align: top;
  padding: 15px;
  border-right: 2px solid var(--win-light);
  color: var(--win-light);
}

.sidebar h3 {
  margin-top: 0;
  color: var(--win-yellow);
}

.sidebar ul {
  list-style-type: square;
  padding-left: 20px;
}

.sidebar a {
  color: var(--win-light);
  text-decoration: underline;
}

.content {
  background-color: var(--win-light);
  color: var(--win-black);
  padding: 20px;
  vertical-align: top;
}

.content h2 {
  color: #000080;
}

.content a {
  color: var(--win-black);
  text-decoration: underline;
}

.content a:visited {
  color: #800080;
}

/* ---- Visitor counter (not wired into a page yet) ---- */
.counter-container {
  background-color: var(--win-black);
  padding: 10px;
  border: 3px inset var(--win-dark);
  display: inline-block;
  margin: 10px 0;
}

.counter-label {
  color: var(--win-green);
  font-family: var(--font-retro-mono);
  font-size: 12px;
  margin-right: 10px;
}

.counter-display {
  display: inline-flex;
  gap: 2px;
}

.digit {
  background-color: var(--win-black);
  color: var(--win-red);
  font-family: var(--font-retro-mono);
  font-weight: bold;
  font-size: 24px;
  padding: 2px 6px;
  border: 1px solid var(--win-red);
  text-shadow: 0 0 5px var(--win-red);
}

/* ---- Download button (index.html) ---- */
.win95-button {
  display: inline-block;
  background-color: var(--win-gray);
  color: var(--win-black);
  font-family: var(--font-retro);
  font-size: 14px;
  padding: 6px 12px;
  text-decoration: none;
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-black);
  border-bottom: 2px solid var(--win-black);
  cursor: pointer;
  transition: all 0.1s;
}

.win95-button:hover {
  background-color: #d0d0d0;
}

.win95-button:active {
  border-top: 2px solid var(--win-black);
  border-left: 2px solid var(--win-black);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
  transform: translate(1px, 1px);
}

.button-icon {
  margin-right: 5px;
}

/* ---- Footer (components/footer.html) ---- */
footer {
  text-align: center;
  padding: 20px;
  background-color: var(--win-footer);
  color: var(--win-light);
  margin-top: 20px;
}

footer a {
  color: var(--win-cyan);
}

.email-icon {
  vertical-align: middle;
  width: 20px;
}

.email-link {
  color: var(--win-black);
  text-decoration: underline;
  animation: blinkText 1.5s infinite;
}

@keyframes blinkText {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ---- Project list (projects.html / projects/*.html) ---- */
.project-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-entry {
  background-color: var(--win-gray);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-black);
  border-bottom: 2px solid var(--win-black);
  padding: 10px 14px;
}

.project-entry a {
  color: #000080;
  font-weight: bold;
  text-decoration: underline;
}

.project-entry p {
  margin-top: 4px;
  color: var(--win-black);
}

/* ---- Blog list (blog.html / blog/*.html) ---- */
.blog-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.blog-entry {
  background-color: var(--win-gray);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-black);
  border-bottom: 2px solid var(--win-black);
  padding: 10px 14px;
}

.blog-entry a {
  color: #000080;
  font-weight: bold;
  text-decoration: underline;
}

.blog-entry p {
  margin-top: 4px;
  color: var(--win-black);
}

/* ---- Gallery grid (gallery.html) ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.gallery-item {
  background-color: var(--win-light);
  border: 3px inset var(--win-dark);
  padding: 4px;
  text-align: center;
}

.gallery-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.gallery-item figcaption {
  font-size: 12px;
  padding-top: 4px;
  color: var(--win-black);
}

/* ---- Guestbook embed frame (index.html) ---- */
.guestbook-frame {
  background-color: var(--win-light);
  border: 3px inset var(--win-dark);
  padding: 15px;
  margin-top: 10px;
}

.guestbook-frame iframe {
  display: block;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .main-layout {
    display: block;
  }

  .sidebar, .content {
    display: block;
    width: 100%;
    border-right: none;
  }

  .win95-taskbar {
    flex-wrap: wrap;
    height: auto;
    padding: 2px;
  }

  .nav-item {
    font-size: 12px;
    padding: 2px 8px;
  }
}
