* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  min-height: 100vh;
  overflow-y: auto;
}
.main {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1rem 1rem 3rem;
  min-height: 120vh;
}
.xp-window {
  width: clamp(65%, 900px, 95%);
  margin: 1rem auto 3rem auto;
  display: flex;
  flex-direction: column;
}
.xp-content {
  background: #f2eee7;
  color: black;
  padding: 1rem;
}
body.dark .xp-content {
  background: #1c1c2b;
  color: #e0e0ff;
}
.back-home {
  display: inline-block;
  font-family: "font";
  color: blue;
  text-decoration: none;
  font-size: 1.3rem;
  animation: softGlowLink 0.2s ease-in-out infinite alternate;
  padding-bottom: 40px;
}
.back-home:hover {
  text-decoration: underline;
  cursor: url(../assets/Cursors/pointer2x.cur), pointer;
}
@keyframes softGlowLink {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.3); }
}
.portfolio-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px dotted rgba(0, 0, 170, 0.3);
  padding-bottom: 1rem;
}
.portfolio-item:last-child {
  border-bottom: none;
}
.portfolio-slider {
  position: relative;
  width: 420px;
  max-width: 100%;
  aspect-ratio: 16 / 10;
  border: 2px solid #001a66;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.portfolio-slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.portfolio-slider img.active {
  opacity: 1;
}
.slider-controls {
  position: absolute;
  bottom: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
}
.slider-btn {
  width: 14px;
  height: 14px;
  background: #dcdcdc;
  border: 1px solid #555;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}
.slider-btn:hover {
  background: #aaa;
}
.slider-btn.active {
  background: blue;
}
.portfolio-text {
  flex: 1;
}
.portfolio-text h3 {
  font-family: "font2";
  font-size: 1.3rem;
  margin: 0;
  color: #002e8a;
}
.portfolio-text p {
  margin: 0.4rem 0;
  line-height: 1.4;
  font-size: 1.05rem;
}
.portfolio-text a {
  color: #0044cc;
  text-decoration: none;
  font-weight: bold;
}
.portfolio-text a:hover {
  text-decoration: underline;
}
body.dark .portfolio-slider {
  border-color: #7aa2ff;
}
body.dark .slider-btn {
  background: #2c2c54;
  border-color: #999;
}
body.dark .slider-btn.active {
  background: #7aa2ff;
}
body.dark .portfolio-text h3 {
  color: #9bb0ff;
}
body.dark .portfolio-text a {
  color: #7aa2ff;
}
.global-logo {
  position: relative;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.25rem 1rem;
  background: transparent;
}
.global-logo h1 {
  font-family: "font2", sans-serif;
  font-size: clamp(2rem, 3vw, 2.8rem);
  color: rgb(34, 34, 143);
  animation: softGlow 0.4s ease-in-out infinite alternate;
  margin: 0;
}
.viewer-window {
  display: flex;
  flex-direction: column;
}

.viewer-content {
  flex: 1 1 auto;
}

.viewer-footer {
  flex-shrink: 0;
  background: #dcdcdc;
  border-top: 2px solid #0033aa;
}
body.dark .viewer-footer {
  background: #141425;
  border-top: 2px solid #7aa2ff;
}

.Portfolio-title {
  display: flex;
  align-items: center;
  gap: 6px;
}
.Portfolio-title::before {
  content: "";
  width: 16px;
  height: 16px;
  background-image: url("../assets/Other_Projects.png");
  background-size: contain;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  color: white;
}
body.dark .Portfolio-title::before {
  background-image: url("../assets/Dark_Theme/Other_Projects_Dark.png");
}
.xp-image-viewer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: viewerFade 0.25s ease;
  cursor: url("../assets/Cursors/pointer2x.cur"), pointer;
}
.viewer-window {
  background: #dcdcdc;
  border: 3px solid #0033aa;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  image-rendering: pixelated;
  box-shadow: 0 0 0 2px #88aaff, 0 0 35px rgba(0, 0, 0, 0.8);
  width: auto;
  height: auto;
  max-width: 95vw;
  max-height: 90vh;
}
.viewer-titlebar {
  background: linear-gradient(to bottom, #2c5ea8, #1b4a92);
  color: white;
  padding: 6px 12px;
  font-family: "font2", sans-serif;
  font-size: 1.05rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 40px;
  user-select: none;
  line-height: 1;
}
.viewer-controls button {
  background: #c0c0c0;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  color: #001a66;
  width: 22px;
  height: 22px;
  font-weight: bold;
  cursor: pointer;
  image-rendering: pixelated;
  transition: all 0.15s ease;
}
.viewer-controls button:hover {
  background: #d4d0c8;
  border-top: 2px solid #404040;
  border-left: 2px solid #404040;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  color: darkblue;
}
.viewer-controls button:active {
  background: #b0b0b0;
  border-top: 2px solid #404040;
  border-left: 2px solid #404040;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translate(1px, 1px);
}
.viewer-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
  padding: 0;
}
.viewer-content img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border: none;
  background: #000;
  image-rendering: pixelated;
  max-width: 100%;
  max-height: 100%;
}
body.dark .xp-image-viewer {
  background: rgba(10, 10, 25, 0.95);
}
body.dark .viewer-window {
  background: #141425;
  border-color: #7aa2ff;
  box-shadow: 0 0 0 2px #7aa2ff, 0 0 30px rgba(0, 30, 120, 0.6);
}
body.dark .viewer-titlebar {
  background: linear-gradient(to bottom, #2c2c54 0%, #1b1b3a 100%);
  color: #e0e0ff;
  font-family: "font2", sans-serif;
  font-weight: bold;
  text-shadow: 0 0 2px #000;
  border-bottom: 2px solid #0f0f1a;
  box-shadow: inset 0 1px 0 #5a5a8a;
}
body.dark .viewer-controls button {
  background-color: #2c2c54;
  border-top: 2px solid #5a5a8a;
  border-left: 2px solid #5a5a8a;
  border-right: 2px solid #1a1a2e;
  border-bottom: 2px solid #1a1a2e;
  color: #e0e0ff;
  image-rendering: pixelated;
}
body.dark .viewer-controls button:hover {
  background-color: #161628;
  border-top: 2px solid #0f0f1a;
  border-left: 2px solid #0f0f1a;
  border-right: 2px solid #5a5a8a;
  border-bottom: 2px solid #5a5a8a;
}
body.dark .viewer-controls button:active {
  background-color: #161628;
  border-top: 2px solid #0f0f1a;
  border-left: 2px solid #0f0f1a;
  border-right: 2px solid #5a5a8a;
  border-bottom: 2px solid #5a5a8a;
  transform: translate(1px, 1px);
}
body.dark .viewer-content {
  background: #0d0d1a;
}
body.dark .viewer-content img {
  background: #0d0d1a;
}
@media (max-width: 1024px) {
  .portfolio-item {
    gap: 0.8rem;
  }
  .portfolio-text h3 {
    font-size: 1.2rem;
  }
  .portfolio-slider {
    width: 90%;
  }
  .viewer-window {
    width: 95%;
    height: 82vh;
  }
}
@media (max-width: 768px) {
  .portfolio-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .portfolio-slider {
    width: 100%;
    max-width: 480px;
    aspect-ratio: 16 / 10;
  }
  .portfolio-text h3 {
    margin-top: 0.8rem;
    font-size: 1.15rem;
  }
  .portfolio-text p {
    font-size: 1rem;
  }
  .viewer-window {
    width: 96%;
    height: 80vh;
  }
  .viewer-titlebar {
    height: 36px;
    font-size: 0.95rem;
  }
}
@media (max-width: 480px) {
  .xp-window {
    width: 95%;
  }
  .portfolio-slider {
    width: 100%;
    max-width: 360px;
    aspect-ratio: 4 / 3;
  }
  .portfolio-text p {
    font-size: 0.95rem;
  }
  .viewer-window {
    width: 98%;
    height: 75vh;
    border-width: 2px;
  }
  .viewer-titlebar {
    font-size: 0.9rem;
  }
}
@keyframes viewerFade {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.viewer-content img {
  filter: contrast(1.1) brightness(1.05) saturate(1.1);
  box-shadow: 0 0 12px rgba(0, 150, 255, 0.25);
}
@media (max-width: 768px) {
  .viewer-content {
    justify-content: flex-start;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 1rem;
    -webkit-overflow-scrolling: touch;
  }
  .viewer-content img {
    width: auto;
    height: 85vh;
    max-width: none;
    object-fit: contain;
    display: block;
  }
.portfolio-slider img {
  pointer-events: none;
}
.portfolio-slider img.active {
  pointer-events: auto;
}
  .viewer-content::after {
    content: "⇠⇢";
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.2rem;
    pointer-events: none;
    animation: fadeScrollHint 1.8s infinite;
  }
  @keyframes fadeScrollHint {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
  }
}
