/* ==========================================================================
   Windows 98 Resume - Retro Stylesheet (powered by 98.css)
   ========================================================================== */

:root {
  --win-teal: #008080;
  --win-gray: #c0c0c0;
  --win-blue: #000080;
  --win-taskbar-height: 34px;
  --win-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4);
}

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

body,
html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Pixelated MS Sans Serif', 'MS Sans Serif', 'Tahoma', sans-serif;
  background-color: var(--win-teal);
  background-image: url('../images/webwall.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* Desktop Canvas */
#desktop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--win-taskbar-height);
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px;
  overflow: hidden;
}

/* Desktop Shortcut Icons */
.desktop-icon {
  width: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  padding: 5px 4px;
  border: 1px dotted transparent;
  border-radius: 2px;
}

.desktop-icon:hover {
  background-color: rgba(0, 0, 128, 0.25);
}

.desktop-icon:focus-visible {
  border-color: #ffffff;
  background-color: rgba(0, 0, 128, 0.5);
  outline: none;
}

.desktop-icon img,
.desktop-icon .icon-svg {
  width: 32px;
  height: 32px;
  margin-bottom: 4px;
  filter: drop-shadow(1px 1px 0px rgba(0, 0, 0, 0.5));
}

/* Labels wrap on the spaces in a filename, never mid-word. */
.desktop-icon span {
  color: #ffffff;
  font-size: 11px;
  line-height: 1.25;
  text-shadow: 1px 1px 1px #000000;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
}

/* Draggable Windows */
.window {
  position: absolute !important;
  min-width: 280px;
  max-width: 90vw;
  max-height: calc(100vh - var(--win-taskbar-height) - 16px);
  box-shadow: var(--win-shadow);
  display: none;
}

.window.active {
  display: flex;
  flex-direction: column;
}

.window.minimized {
  display: none !important;
}

.window-body {
  margin: 8px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.title-bar {
  cursor: move;
  flex-shrink: 0;
  background: #808080;
}

.title-bar-active {
  background: linear-gradient(90deg, #000080, #1084d0);
}

.title-bar-text {
  display: flex;
  align-items: center;
  gap: 6px;
}

.title-icon {
  vertical-align: middle;
  margin-top: -2px;
  flex-shrink: 0;
}

.inline-icon {
  vertical-align: middle;
  margin-right: 4px;
}

/* -------------------------------------------------------------- About Me */

.profile-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.avatar-box {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  background: #000;
  border: 2px inset #dfdfdf;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00ff00;
  font-family: monospace;
  font-weight: bold;
  font-size: 22px;
}

.profile-header h3 {
  font-size: 15px;
  margin-bottom: 3px;
  line-height: 1.2;
}

.profile-header p {
  font-size: 11px;
  line-height: 1.4;
}

.contact-line {
  color: #444;
  white-space: nowrap;
}

.contact-line a {
  color: #000080;
}

.location-line {
  margin-top: 3px;
  font-weight: bold;
  color: #000;
  white-space: normal;
}

.summary-p {
  margin-bottom: 8px;
  line-height: 1.45;
  font-size: 12px;
}

.summary-p.last {
  margin-bottom: 0;
}

.honest-list {
  font-size: 11px;
  line-height: 1.5;
}

.honest-list p {
  margin-bottom: 4px;
}

.honest-list p:last-child {
  margin-bottom: 0;
}

.philosophy {
  font-size: 11px;
  font-style: italic;
  line-height: 1.45;
}

.philosophy p {
  margin-bottom: 4px;
}

.philosophy p:last-child {
  margin-bottom: 0;
}

.fieldset-spaced {
  margin-top: 8px;
}

.fieldset-spaced-bottom {
  margin-bottom: 10px;
}

/* ------------------------------------------------------- Work Experience */

.terminal-body {
  background-color: #000;
  color: #0f0;
  font-family: 'Courier New', Courier, monospace;
  padding: 10px;
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.term-line {
  margin-bottom: 12px;
}

.term-job {
  margin-bottom: 16px;
}

.term-role {
  font-weight: bold;
}

.term-date {
  color: #0c0c0c;
  color: #00cc00;
  margin-bottom: 4px;
}

.term-bullets {
  margin-left: 12px;
  border-left: 1px solid #009900;
  padding-left: 10px;
}

.term-bullets p {
  margin-bottom: 5px;
}

.term-prompt {
  margin-top: 4px;
}

/* ------------------------------------------------------------- Skills */

.skill-groups {
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill-group strong {
  display: inline-block;
}

.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.chip {
  padding: 2px 6px;
  font-size: 11px;
}

.cert-list {
  font-size: 12px;
  line-height: 1.4;
}

.cert-note {
  font-size: 11px;
  color: #555;
  margin-left: 16px;
  margin-bottom: 7px;
  line-height: 1.4;
}

.edu-line {
  font-size: 11px;
  margin-left: 16px;
  line-height: 1.4;
}

/* ------------------------------------------------------------- Tabs */

.tablist {
  display: flex;
  gap: 2px;
  padding: 2px 2px 0 2px;
  flex-wrap: wrap;
}

.tab {
  position: relative;
  top: 3px;
  padding: 3px 10px;
  font-size: 11px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  border-bottom: none;
  border-radius: 3px 3px 0 0;
  cursor: pointer;
  color: #000;
  font-family: inherit;
}

.tab[aria-selected="true"] {
  top: 0;
  padding-bottom: 5px;
  font-weight: bold;
  z-index: 1;
}

.tab:focus-visible {
  outline: 1px dotted #000;
  outline-offset: -4px;
}

.tab-panel {
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  background: #c0c0c0;
  padding: 10px;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
}

.tab-content h4 {
  font-size: 13px;
  margin-bottom: 6px;
  line-height: 1.3;
}

.tab-desc {
  font-size: 11px;
  line-height: 1.45;
  margin-bottom: 8px;
}

.tab-list {
  font-size: 11px;
  line-height: 1.5;
  margin-left: 16px;
}

.tab-list li {
  margin-bottom: 2px;
}

.tab-note {
  font-size: 11px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #a0a0a0;
  color: #333;
}

.tab-note a {
  color: #000080;
  font-weight: bold;
}

/* --------------------------------------------------- Resume download */

.cv-file-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px;
  background: #fff;
  border: 2px inset #dfdfdf;
  margin-bottom: 10px;
}

.cv-name {
  font-size: 12px;
  margin-bottom: 3px;
}

.cv-meta {
  font-size: 11px;
  color: #555;
  line-height: 1.4;
}

.cv-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  padding: 5px 12px;
  font-size: 11px;
  font-family: inherit;
  font-weight: bold;
  text-decoration: none;
  color: #000;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
  cursor: pointer;
}

.download-btn:hover {
  background: #d0d0d0;
}

.download-btn:active {
  border-color: #808080 #ffffff #ffffff #808080;
  box-shadow: inset 1px 1px 0 #808080;
  padding: 6px 11px 4px 13px;
}

.download-btn.secondary {
  font-weight: normal;
}

.cv-hint {
  font-size: 11px;
  color: #555;
  line-height: 1.4;
  font-style: italic;
}

/* -------------------------------------------------------- Recycle Bin */

.tree-view {
  background: white;
  padding: 8px;
  max-height: 250px;
  overflow-y: auto;
}

.recycle-intro {
  font-size: 12px;
  margin-bottom: 8px;
}

.recycle-item {
  font-size: 11px;
  color: #444;
  text-decoration: line-through;
}

.recycle-note {
  font-size: 11px;
  margin-top: 8px;
  color: #555;
  font-style: italic;
}

/* ------------------------------------------------------------- README */

.readme-title {
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 8px;
}

.readme-sub {
  font-weight: bold;
  font-size: 12px;
  margin-bottom: 8px;
}

.readme-blurb {
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 10px;
}

.readme-list {
  font-size: 11px;
  line-height: 1.5;
  margin-left: 16px;
}

.readme-list li {
  margin-bottom: 4px;
}

.readme-list.advice {
  font-style: italic;
}

.readme-contact {
  font-size: 11px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #a0a0a0;
}

/* ------------------------------------------------------------- CHHA */

.chha-body {
  padding: 6px;
  margin: 6px;
}

.chha-panel {
  background: #808080;
  padding: 6px;
  text-align: center;
  overflow: auto;
  max-height: 340px;
}

.chha-image {
  max-width: 100%;
  height: auto;
  border: 1px solid #000;
  display: block;
  margin: 0 auto;
}

.chha-caption {
  font-size: 11px;
  margin-top: 6px;
  color: #333;
  line-height: 1.4;
}

/* ---------------------------------------------------------- Taskbar */

#taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  min-height: var(--win-taskbar-height);
  height: auto;
  background: var(--win-gray);
  border-top: 2px solid #ffffff;
  display: flex;
  align-items: center;
  padding: 2px 4px;
  z-index: 9999;
}

#start-button {
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  height: 26px;
  flex-shrink: 0;
}

#start-button img {
  width: 16px;
  height: 16px;
}

#taskbar-divider {
  width: 2px;
  height: 20px;
  border-left: 1px solid #808080;
  border-right: 1px solid #ffffff;
  margin: 0 4px;
  flex-shrink: 0;
}

#taskbar-items {
  display: flex;
  gap: 4px;
  flex: 1;
  overflow: hidden;
}

.taskbar-item {
  height: 26px;
  min-width: 110px;
  max-width: 180px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.taskbar-item.focused {
  font-weight: bold;
  background: #dfdfdf;
  border: 2px inset #ffffff;
}

#system-tray {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 8px;
  border: 2px inset #dfdfdf;
  height: 24px;
  font-size: 11px;
  background: var(--win-gray);
  flex-shrink: 0;
}

.tray-icon {
  vertical-align: middle;
  margin-top: -2px;
}

/* Start Menu Popup */
#start-menu {
  position: fixed;
  bottom: var(--win-taskbar-height);
  left: 2px;
  width: 220px;
  background: var(--win-gray);
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 10000;
}

#start-menu.open {
  display: flex;
}

.start-sidebar {
  width: 30px;
  background: linear-gradient(to top, #000080, #1084d0);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: #ffffff;
  font-weight: bold;
  font-size: 16px;
  padding: 10px 4px;
  letter-spacing: 2px;
  text-shadow: 1px 1px 1px #000;
}

.start-items {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 2px 0;
}

.start-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 11px;
  cursor: pointer;
  color: #000000;
  text-decoration: none;
}

.start-item:hover {
  background: #000080;
  color: #ffffff;
}

.start-divider {
  height: 1px;
  border-top: 1px solid #808080;
  border-bottom: 1px solid #ffffff;
  margin: 4px 2px;
}

/* Status Bar */
.status-bar {
  margin: 0 8px 8px 8px;
  flex-shrink: 0;
}

/* Terminal / CMD Cursor Blink */
.cmd-blink {
  animation: blink-animation 1s step-end infinite;
}

@keyframes blink-animation {
  50% {
    opacity: 0;
  }
}

/* ========================================================== Boot sequence */

#boot-screen {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
}

/* `hidden` must win over the flex layout above. */
#boot-screen[hidden],
.bios-screen[hidden],
.boot-splash[hidden] {
  display: none;
}

/* ---- Phase 1: BIOS / POST */

.bios-screen {
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  line-height: 1.55;
  color: #d8d8d8;
  width: min(720px, calc(100vw - 40px));
}

.bios-line {
  opacity: 0;
  white-space: pre-wrap;
}

.bios-line-on {
  opacity: 1;
}

.bios-line-final {
  color: #ffffff;
  font-weight: bold;
}

/* ---- Phase 2: Windows 98 splash */

.boot-splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: min(560px, calc(100vw - 40px));
}

.boot-splash-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.boot-logo {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
}

.boot-brand {
  font-size: 15px;
  color: #d8d8d8;
  letter-spacing: 0.5px;
}

.boot-product {
  font-size: 34px;
  font-weight: bold;
  color: #ffffff;
  line-height: 1.05;
}

.boot-product sup {
  font-size: 15px;
  vertical-align: super;
}

.boot-track {
  width: 100%;
  height: 12px;
  background: #101010;
  border: 1px solid #404040;
  overflow: hidden;
}

.boot-track-fill {
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, #0000a0, #1084d0, #0000a0);
  animation: boot-sweep 1.1s linear infinite;
}

@keyframes boot-sweep {
  0% {
    transform: translateX(-110%);
  }

  100% {
    transform: translateX(360%);
  }
}

.boot-caption {
  font-size: 12px;
  color: #808080;
  letter-spacing: 1px;
}

.boot-skip {
  position: absolute;
  bottom: 24px;
  font-size: 11px;
  color: #606060;
}

/* ========================================================== Desktop clock */

/* The clock is a "desk accessory": narrow, so it overrides the window min-width. */
.clock-window {
  min-width: 0;
}

.clock-window .window-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  overflow: visible;
}

.clock-face {
  position: relative;
  width: 132px;
  height: 132px;
}

.clock-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Rotation is the only transform set in JS, so the hands pivot exactly on the
   face centre: left:50% + negative margin centres each width deterministically,
   and transform-origin sits on the hand's bottom tip. */
.clock-hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  transform-origin: 50% 100%;
  background: #000000;
}

.clock-hand.hour {
  width: 5px;
  height: 34px;
  margin-left: -2.5px;
}

.clock-hand.minute {
  width: 3px;
  height: 48px;
  margin-left: -1.5px;
}

.clock-hand.second {
  width: 1px;
  height: 52px;
  margin-left: -0.5px;
  background: #c00000;
}

.clock-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  background: #000000;
  border-radius: 50%;
}

.clock-digital {
  font-family: 'Courier New', Courier, monospace;
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 1px;
  background: #000000;
  color: #00ff00;
  padding: 3px 8px;
  border: 2px inset #dfdfdf;
  width: 100%;
  text-align: center;
}

.clock-date {
  font-size: 11px;
  color: #333333;
  text-align: center;
  line-height: 1.35;
}

/* --------------------------------------------------------- Small screens */

@media (max-width: 768px) {

  /* The taskbar carries the navigation on a phone, so the icon grid is redundant
     clutter behind the windows. */
  #desktop {
    display: none;
  }

  .window {
    min-width: 0;
    max-width: 100vw;
    max-height: calc(100vh - var(--win-taskbar-height) - 16px);
  }

  .contact-line {
    white-space: normal;
  }

  .taskbar-item {
    min-width: 0;
    flex: 1;
    max-width: none;
  }

  .tab {
    padding: 3px 6px;
    font-size: 10px;
  }
}
