/* 98 theme - only active when data-theme="98" */
html[data-theme="98"],
html[data-theme="98"] *,
html[data-theme="98"] body {
  font-family: Tahoma, Verdana, 'Segoe UI', Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: optimizeLegibility !important;
}

html[data-theme="98"],
html[data-theme="98"] body {
  background-color: #008080 !important; /* Windows 98 teal desktop */
  color: #000;
  cursor: default;
  font-weight: 500;
}

html[data-theme="98"] * {
  cursor: default;
}

html[data-theme="98"] a,
html[data-theme="98"] button {
  cursor: pointer;
}

html[data-theme="98"] .cv-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0;
}

/* Window container styling */
html[data-theme="98"] .window {
  margin-bottom: 1rem;
}

html[data-theme="98"] .section {
  margin-bottom: 1rem;
}

html[data-theme="98"] .title-bar {
  background: linear-gradient(to right, #000080, #1084d0);
}

/* Section titles */
html[data-theme="98"] .section-title {
  font-size: 1.1rem;
  margin: 1.5rem 0 1rem 0;
  padding: 0.5rem;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
}

html[data-theme="98"] .subsection-title {
  font-size: 1rem;
  margin: 1rem 0 0.75rem 0;
  font-weight: bold;
}

/* Profile image styling */
html[data-theme="98"] .profile-img {
  border: 2px solid #000;
  margin-right: 1rem;
}

/* Header layout */
html[data-theme="98"] .header-content-98 {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

html[data-theme="98"] .header-text-98 h1 {
  font-size: 2rem;
  margin: 0 0 0.75rem 0;
  font-weight: bold;
  color: #000080;
  text-decoration: underline;
  text-decoration-color: #000080;
  text-underline-offset: 4px;
}

html[data-theme="98"] .header-text-98 p {
  margin: 0.25rem 0;
  font-size: 0.95rem;
}

html[data-theme="98"] .keywords-98 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

html[data-theme="98"] .keyword-chip {
  padding: 0.25rem 0.5rem;
  background: #c0c0c0;
  border: 1px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  font-size: 0.85rem;
}

/* Field styling */
html[data-theme="98"] .field-row {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

html[data-theme="98"] .field-row label {
  font-weight: bold;
  margin-right: 0.5rem;
}

/* Window body content */
html[data-theme="98"] .window-body {
  padding: 1rem;
  line-height: 1.6;
}

html[data-theme="98"] .window-body h3 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem 0;
}

html[data-theme="98"] .window-body h4 {
  font-size: 1rem;
  margin: 0.75rem 0 0.5rem 0;
}

html[data-theme="98"] .window-body p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
}

html[data-theme="98"] .window-body ul {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
  font-size: 0.95rem;
}

html[data-theme="98"] .window-body li {
  margin: 0.25rem 0;
}

/* Fieldset styling */
html[data-theme="98"] fieldset {
  margin: 1rem 0;
  padding: 0.75rem;
  border: 1px solid;
  border-color: #808080 #ffffff #ffffff #808080;
}

html[data-theme="98"] legend {
  font-weight: bold;
  padding: 0 0.5rem;
  font-size: 0.95rem;
}

/* Status bar */
html[data-theme="98"] .status-bar {
  margin-top: 1rem;
}

html[data-theme="98"] .status-bar-field {
  font-size: 0.85rem;
}

/* Tree view for skills */
html[data-theme="98"] .tree-view {
  list-style: none;
  padding-left: 1rem;
  font-size: 0.95rem;
}

html[data-theme="98"] .tree-view ul {
  list-style: none;
  padding-left: 1.5rem;
}

html[data-theme="98"] .tree-view li {
  margin: 0.25rem 0;
}

html[data-theme="98"] .tree-view strong {
  color: #000080;
}

/* Contact links */
html[data-theme="98"] .contact-links-98 {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

html[data-theme="98"] .contact-links-98 a {
  color: #0000ff;
  text-decoration: underline;
}

/* Values list */
html[data-theme="98"] .values-list-98 {
  list-style: disc;
  padding-left: 1.5rem;
}

html[data-theme="98"] .values-list-98 li {
  margin: 0.5rem 0;
}

/* Legal text */
html[data-theme="98"] .legal-text-98 {
  font-size: 0.85rem;
  font-style: italic;
  padding: 1rem;
  background: #fffbf0;
  border: 1px solid #808080;
}

/* SVG Icon styling */
html[data-theme="98"] .icon {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  margin-right: 0.4rem;
  vertical-align: middle;
  position: relative;
  top: 0.25em;
}

html[data-theme="98"] .icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  display: block;
}

/* Windows 98 decorative elements */

/* Start bar at bottom */
html[data-theme="98"]::after {
  content: '';
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: #c0c0c0;
  border-top: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  z-index: 999;
}

/* Start button (real element created by JS) */
html[data-theme="98"] .win98-start-button {
  position: fixed;
  bottom: 2px;
  left: 2px;
  height: 28px;
  padding: 0 1rem;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #000000 #000000 #ffffff;
  font-family: Tahoma, sans-serif;
  font-size: 0.9rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  z-index: 1000;
  box-shadow: inset 1px 1px 0 #dfdfdf;
  cursor: pointer;
}

html[data-theme="98"] .win98-start-button:hover {
  background: #d4d4d4;
}

html[data-theme="98"] .win98-start-button:active {
  border-color: #000000 #ffffff #ffffff #000000;
  box-shadow: inset -1px -1px 0 #dfdfdf;
}

html[data-theme="98"] .win98-start-button .start-icon {
  width: 16px;
  height: 16px;
  margin-right: 0.25rem;
  image-rendering: pixelated;
  vertical-align: middle;
}

/* Desktop icons container */
html[data-theme="98"] .desktop-icons-container {
  position: fixed;
  top: 1rem;
  left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 1;
  pointer-events: auto;
}

html[data-theme="98"] .desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
  padding: 0.5rem;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  border: 2px solid transparent;
}

html[data-theme="98"] .desktop-icon.selected {
  background: rgba(0, 0, 128, 0.3);
  border: 2px dotted #fff;
}

html[data-theme="98"] .desktop-icon:hover {
  background: rgba(255, 255, 255, 0.1);
}

html[data-theme="98"] .desktop-icon .icon-image {
  font-size: 2.5rem;
  margin-bottom: 0.25rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

html[data-theme="98"] .desktop-icon .icon-image img {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
}

html[data-theme="98"] .desktop-icon .icon-label {
  font-size: 0.75rem;
  color: #fff;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.9);
  font-family: Tahoma, sans-serif;
  word-wrap: break-word;
  max-width: 70px;
}

/* Clippy assistant (interactive) */
html[data-theme="98"] .clippy-assistant,
html[data-theme="98"] [data-clippy] {
  position: fixed;
  bottom: 50px;
  right: 20px;
  width: 100px;
  height: 140px;
  z-index: 998;
  animation: clippy-bounce 2s ease-in-out infinite;
  filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
  cursor: pointer;
  pointer-events: auto;
  -webkit-user-select: none;
  user-select: none;
}

html[data-theme="98"] .clippy-assistant img,
html[data-theme="98"] [data-clippy] img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

html[data-theme="98"] .clippy-assistant:hover,
html[data-theme="98"] [data-clippy]:hover {
  transform: scale(1.1);
  filter: drop-shadow(3px 3px 6px rgba(0,0,0,0.5));
}

@keyframes clippy-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Start Menu */
html[data-theme="98"] .start-menu {
  position: fixed;
  bottom: 34px;
  left: 2px;
  width: 250px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #000000 #000000 #ffffff;
  z-index: 1001;
  display: flex;
}

html[data-theme="98"] .start-menu.hidden {
  display: none;
}

html[data-theme="98"] .start-menu-sidebar {
  background: linear-gradient(180deg, #000080 0%, #1084d0 100%);
  color: #fff;
  padding: 0.5rem;
  writing-mode: vertical-rl;
  font-weight: bold;
  font-size: 1.2rem;
  letter-spacing: 2px;
  font-family: Tahoma, sans-serif;
}

html[data-theme="98"] .start-menu-items {
  list-style: none;
  padding: 0.25rem 0;
  margin: 0;
  flex: 1;
}

html[data-theme="98"] .start-menu-items li {
  padding: 0.5rem 2rem 0.5rem 2.5rem;
  cursor: pointer;
  position: relative;
  font-size: 0.9rem;
  font-family: Tahoma, sans-serif;
}

html[data-theme="98"] .start-menu-items li:hover {
  background: #000080;
  color: #fff;
}

html[data-theme="98"] .start-menu-items li span {
  position: absolute;
  left: 0.5rem;
}

html[data-theme="98"] .start-menu-items li .menu-icon {
  position: absolute;
  left: 0.5rem;
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
  vertical-align: middle;
}

html[data-theme="98"] .start-menu-items li.separator {
  height: 2px;
  background: #808080;
  margin: 0.25rem 0;
  padding: 0;
  cursor: default;
}

html[data-theme="98"] .start-menu-items li.separator:hover {
  background: #808080;
}

/* Explorer Windows */
html[data-theme="98"] .explorer-window,
html[data-theme="98"] .clippy-dialog,
html[data-theme="98"] .options-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1002;
}

html[data-theme="98"] .explorer-window .window,
html[data-theme="98"] .clippy-dialog .window,
html[data-theme="98"] .options-dialog .window {
  box-shadow: 4px 4px 10px rgba(0,0,0,0.5);
}

html[data-theme="98"] .clippy-btn {
  min-width: 80px;
  margin-right: 0.5rem;
}

/* Explorer Window Styling */
html[data-theme="98"] .explorer-window-body {
  padding: 0 !important;
  min-height: 300px;
}

html[data-theme="98"] .explorer-toolbar {
  background: #c0c0c0;
  padding: 0.25rem;
  border-bottom: 1px solid #808080;
  display: flex;
  gap: 0.25rem;
}

html[data-theme="98"] .explorer-toolbar .toolbar-btn {
  background: transparent;
  border: none;
  padding: 0.25rem 0.5rem;
  font-family: Tahoma, sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
}

html[data-theme="98"] .explorer-toolbar .toolbar-btn:hover {
  background: #000080;
  color: #fff;
}

html[data-theme="98"] .explorer-address-bar {
  background: #c0c0c0;
  padding: 0.5rem;
  border-bottom: 1px solid #808080;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

html[data-theme="98"] .explorer-address-bar label {
  font-family: Tahoma, sans-serif;
  font-size: 0.85rem;
}

html[data-theme="98"] .explorer-address-bar input {
  flex: 1;
  padding: 0.25rem;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  background: #fff;
  font-family: Tahoma, sans-serif;
  font-size: 0.85rem;
}

html[data-theme="98"] .explorer-content {
  background: #fff;
  padding: 1rem;
  min-height: 200px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 1.5rem;
  align-content: start;
}

html[data-theme="98"] .explorer-content.empty-recycle {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #808080;
  font-size: 0.9rem;
}

html[data-theme="98"] .explorer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  padding: 0.5rem;
  border: 1px solid transparent;
}

html[data-theme="98"] .explorer-item:hover {
  background: #d4d4d4;
}

html[data-theme="98"] .explorer-item img {
  width: 32px;
  height: 32px;
  margin-bottom: 0.25rem;
  image-rendering: pixelated;
}

html[data-theme="98"] .explorer-item span {
  font-family: Tahoma, sans-serif;
  font-size: 0.75rem;
  color: #000;
  word-wrap: break-word;
  max-width: 70px;
}

/* Tabs styling */
html[data-theme="98"] menu[role="tablist"] {
  display: flex;
  gap: 0.25rem;
  padding: 0;
  margin: 0 0 1rem 0;
  border-bottom: 2px solid #808080;
}

html[data-theme="98"] menu[role="tablist"] button {
  padding: 0.5rem 1rem;
  border: 2px solid;
  border-color: #ffffff #000000 #000000 #ffffff;
  background: #c0c0c0;
  cursor: pointer;
  font-family: Tahoma, sans-serif;
}

html[data-theme="98"] menu[role="tablist"] button[aria-selected="true"] {
  background: #fff;
  border-bottom-color: #fff;
  margin-bottom: -2px;
}

/* Hide NES theme elements when 98 is active */
html[data-theme="98"] [data-theme-target="nes"] {
  display: none;
}

html[data-theme="98"] [data-theme-target="98"] {
  display: block;
}

/* Hide desktop icons on medium screens to avoid covering CV windows */
@media screen and (max-width: 1200px) {
  html[data-theme="98"] .desktop-icons-container {
    display: none;
  }
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  html[data-theme="98"] .cv-container {
    margin: 0.5rem;
    margin-bottom: 50px; /* Spazio per la start bar */
    max-width: 100%;
    overflow-x: hidden;
  }

  html[data-theme="98"] .window {
    max-width: 100%;
    box-sizing: border-box;
  }

  html[data-theme="98"] .window-body {
    overflow-x: auto;
    overflow-wrap: break-word;
    word-wrap: break-word;
  }

  html[data-theme="98"] .window-body * {
    max-width: 100%;
    box-sizing: border-box;
  }

  html[data-theme="98"] .header-content-98 {
    flex-direction: column;
  }

  html[data-theme="98"] .profile-img {
    width: 120px !important;
    height: 120px !important;
  }

  /* Hide desktop icons on mobile */
  html[data-theme="98"] .desktop-icons-container {
    display: none;
  }

  /* Smaller start button on mobile */
  html[data-theme="98"] .win98-start-button {
    font-size: 0.7rem;
    padding: 0 0.5rem;
  }

  /* Smaller start menu on mobile */
  html[data-theme="98"] .start-menu {
    width: 200px;
  }

  /* Smaller dialogs on mobile */
  html[data-theme="98"] .explorer-window .window,
  html[data-theme="98"] .clippy-dialog .window,
  html[data-theme="98"] .options-dialog .window {
    width: 90vw !important;
    max-width: 350px;
  }

  /* Fix overflow issues on mobile */
  html[data-theme="98"] .technologies,
  html[data-theme="98"] .field-row {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  html[data-theme="98"] ul,
  html[data-theme="98"] ol {
    padding-left: 1.5rem;
    margin-right: 0;
  }

  html[data-theme="98"] pre,
  html[data-theme="98"] code {
    overflow-x: auto;
    word-break: break-all;
    white-space: pre-wrap;
  }

  /* Clippy sizing on mobile */
  html[data-theme="98"] .clippy-assistant,
  html[data-theme="98"] [data-clippy] {
    width: 75px;
    height: 105px;
    bottom: 60px;
    right: 10px;
  }
}

/* Shutdown Screen (DOS Terminal) */
html[data-theme="98"] .shutdown-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

html[data-theme="98"] .dos-terminal {
  width: 100%;
  height: 100%;
  background: #000;
  padding: 2rem;
  overflow-y: auto;
}

html[data-theme="98"] .dos-content,
html[data-theme="98"] .dos-content * {
  font-family: 'VT323', 'Courier New', Courier, monospace !important;
  color: #c0c0c0 !important;
  font-size: 1.3rem !important;
  line-height: 1.4 !important;
  white-space: pre-wrap;
  letter-spacing: 0.5px;
  -webkit-font-smoothing: auto !important;
  -moz-osx-font-smoothing: auto !important;
}

html[data-theme="98"] .dos-content div {
  margin: 0.2rem 0;
}

/* Blue Screen of Death */
html[data-theme="98"] .bsod-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #0000aa;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

html[data-theme="98"] .bsod-content,
html[data-theme="98"] .bsod-content * {
  font-family: 'VT323', 'Courier New', Courier, monospace !important;
  color: #fff !important;
  letter-spacing: 0.5px;
  -webkit-font-smoothing: auto !important;
  -moz-osx-font-smoothing: auto !important;
}

html[data-theme="98"] .bsod-content {
  width: 90%;
  max-width: 800px;
  font-size: 1.2rem !important;
  line-height: 1.5 !important;
  padding: 2rem;
}

html[data-theme="98"] .bsod-content h1 {
  font-size: 1.8rem !important;
  font-weight: bold;
  margin: 0 0 1rem 0;
  text-align: center;
  background: #aaa;
  color: #0000aa !important;
  padding: 0.5rem;
}

html[data-theme="98"] .bsod-content p {
  margin: 0.25rem 0;
}

@media (max-width: 768px) {
  html[data-theme="98"] .dos-terminal {
    padding: 1rem;
  }

  html[data-theme="98"] .dos-content,
  html[data-theme="98"] .dos-content * {
    font-size: 1.1rem !important;
  }

  html[data-theme="98"] .bsod-content {
    font-size: 1rem !important;
    padding: 1rem;
  }

  html[data-theme="98"] .bsod-content h1 {
    font-size: 1.4rem !important;
  }
}

/* Updated: 1771264919 */
