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

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  background: #000;
  color: #00ff7f;
  font-family:
    'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    'Liberation Mono', 'Courier New', monospace;
  display: flex;
  align-items: center;
  justify-content: center;
}

html.skip-boot #boot-screen {
  display: none !important;
}

html.skip-boot #desktop {
  display: flex !important;
}

.screen {
  width: min(900px, 100vw - 2rem);
  height: min(560px, 100vh - 2rem);
  border-radius: 8px;
  border: 2px solid #00ff7f;
  box-shadow: 0 0 24px rgba(0, 255, 127, 0.35);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.screen-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.98rem;
}

.boot-inner {
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.boot-title {
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.boot-bar-outer {
  width: 100%;
  max-width: 520px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid #00ff7f;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.8);
  box-shadow: 0 0 14px rgba(0, 255, 127, 0.4);
}

.boot-bar-inner {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #007f4b, #00ff7f);
  box-shadow: 0 0 20px rgba(0, 255, 127, 0.9);
  transition: width 0.1s linear;
  animation: bootLoad 1500ms linear forwards;
}

@keyframes bootLoad {
  to {
    width: 100%;
  }
}

.hidden {
  display: none !important;
}

/* Desktop / OS layout */
.desktop {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: #000;
  color: #c0ffe0;
}

.desktop-inner {
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  border: 2px solid #00ff7f;
  box-shadow: 0 0 30px rgba(0, 255, 127, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.92);
}

.modal-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  z-index: 20;
}

.modal-window {
  height: auto !important;
  min-height: 0 !important;
  max-height: 85vh;
  width: 100%;
  max-width: 380px;
}

.modal-window .window-body {
  text-align: center;
  gap: 0.6rem;
  flex: none;
}

.modal-ok {
  margin-top: 0.8rem;
  background-color: #00ff7f;
  color: #000;
  border: 2px solid #00ff7f;
  padding: 0.45rem 1.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-ok:hover {
  background-color: #7cffbf;
  color: #001a0e;
  border-color: #7cffbf;
  box-shadow: 0 0 12px rgba(0, 255, 127, 0.6);
  transform: translateY(-1px);
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.75rem;
  background: linear-gradient(to bottom, #00351b, #001a0e);
  border-bottom: 1px solid #00ff7f;
  font-size: 0.8rem;
  flex-shrink: 0;
  z-index: 10;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.menu-dropdown {
  position: relative;
}

.logo-button {
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #00ff7f;
  background: transparent;
  border: 1px solid transparent;
  padding: 0.2rem 0.45rem;
  cursor: pointer;
  text-transform: none;
  transition: all 0.2s ease;
}

.logo-button:hover,
.logo-button[aria-expanded='true'] {
  color: #cffff0;
  border-color: rgba(0, 255, 127, 0.7);
  background: rgba(0, 255, 127, 0.12);
  box-shadow: 0 0 12px rgba(0, 255, 127, 0.25);
}

.logo-button:focus-visible,
.dropdown-item:focus-visible {
  outline: 1px solid #7cffbf;
  outline-offset: 2px;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 210px;
  padding: 0.35rem;
  border: 1px solid #00ff7f;
  background: linear-gradient(to bottom, #002412, #000);
  box-shadow: 0 0 18px rgba(0, 255, 127, 0.25);
  z-index: 25;
}

.dropdown-item {
  width: 100%;
  font: inherit;
  font-weight: 700;
  color: #c0ffe0;
  background: transparent;
  border: 1px solid transparent;
  padding: 0.45rem 0.6rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  color: #001a0e;
  background: #7cffbf;
  border-color: #7cffbf;
}

.desktop.time-travel-active .desktop-inner {
  opacity: 0.5;
  transform: scale(0.985);
  filter: blur(1.5px) saturate(0.8);
}

.desktop-inner {
  transition:
    opacity 0.35s ease,
    transform 0.35s ease,
    filter 0.35s ease;
}

.time-travel-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at center, rgba(0, 255, 127, 0.08), transparent 42%),
    rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(2px);
}

.time-travel-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.92;
  filter:
    saturate(1.1)
    drop-shadow(0 0 18px rgba(0, 255, 127, 0.35));
}

.time-travel-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(0, 255, 127, 0.08) 0,
      rgba(0, 255, 127, 0.08) 1px,
      transparent 1px,
      transparent 4px
    );
  mix-blend-mode: screen;
  opacity: 0.35;
}

.time-travel-flash {
  position: fixed;
  inset: 0;
  z-index: 60;
  background:
    radial-gradient(circle at center, #7cffbf 0%, #00ff7f 40%, #00a95a 100%);
  opacity: 0;
  pointer-events: none;
}

.time-travel-flash.active {
  animation: timeTravelFlash 240ms ease-out forwards;
}

@keyframes timeTravelFlash {
  0% {
    opacity: 0;
  }

  35% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

.top-item {
  cursor: pointer;
  opacity: 0.8;
  transition: all 0.25s ease;
}

.top-item:hover {
  opacity: 1;
  color: #7cffbf;
  text-shadow:
    0 0 6px #00ff7f,
    0 0 12px #00ff7f,
    0 0 20px rgba(0, 255, 127, 0.8);
  transform: translateY(-1px);
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-variant-numeric: tabular-nums;
}

.top-icons {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.top-icon {
  color: #00ff7f;
  font-size: 1.22rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.top-icon:hover {
  color: #7cffbf;
  transform: scale(1.18) translateY(-1px);
  text-decoration: none;
}

.desktop-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.windows-area {
  flex: 1;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #00ff7f rgba(0, 255, 127, 0.2);
}

.windows-area::-webkit-scrollbar {
  width: 8px;
}

.windows-area::-webkit-scrollbar-thumb {
  background: #00ff7f;
  border-radius: 4px;
}

.window {
  border-radius: 6px;
  border: 1px solid rgba(0, 255, 127, 0.6);
  background: radial-gradient(circle at top left, #002818, #000 70%);
  display: flex;
  flex-direction: column;
  width: 100%;
  flex-shrink: 0;
  min-height: 340px;
}

.window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.5rem;
  background: linear-gradient(to right, #004526, #002414);
  border-bottom: 1px solid rgba(0, 255, 127, 0.7);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.btn-close {
  background: transparent;
  border: 1px solid rgba(0, 255, 127, 0.7);
  border-radius: 2px;
  color: inherit;
  font-size: 0.7rem;
  width: 1.2rem;
  height: 1.1rem;
  padding: 0;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-close:hover {
  background: rgba(0, 255, 127, 0.2);
  border-color: #00ff7f;
  color: #00ff7f;
  box-shadow: 0 0 12px rgba(0, 255, 127, 0.9);
  transform: scale(1.15);
}

.btn-close:active {
  transform: scale(0.95);
  background: rgba(0, 255, 127, 0.3);
}

.window-body {
  padding: 0.6rem 0.7rem;
  font-size: 0.84rem;
  line-height: 1.5;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  color: #f8f8f2;
}

/* IDE-STYLE COLORING */
.window-body strong,
.window-body .section-title {
  color: #50fa7b;
}

.paper-title {
  color: #8be9fd;
  font-weight: 600;
}

.degree {
  color: #bd93f9;
}

.location {
  color: #ffb86c;
}

.date {
  color: #f1fa8c;
}

.course-year {
  color: #bd93f9;
}

.course-length {
  color: #ff79c6;
}

.course-location {
  color: #f1fa8c;
}

.window-body a {
  color: #50fa7b;
  text-decoration: underline;
}

.window-body a:hover {
  color: #8be9fd;
}

.project-list .bullet {
  color: #50fa7b;
  font-weight: bold;
}

.project-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.bullet {
  margin-right: 0.3rem;
  color: #00ff7f;
}

/* SKILLS WINDOW */
#skills-window .window-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  min-height: 0;
  flex: 1;
  align-content: start;
}

.skills-subwindow {
  border: 1px solid rgba(0, 255, 127, 0.35);
  border-radius: 4px;
  background: rgba(0, 28, 16, 0.62);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.skills-subwindow-header {
  padding: 0.35rem 0.55rem;
  border-bottom: 1px solid rgba(0, 255, 127, 0.35);
  background: linear-gradient(to right, rgba(0, 69, 38, 0.9), rgba(0, 36, 20, 0.9));
  letter-spacing: 0.03em;
}

.skills-subwindow-body {
  padding: 0.5rem 0.55rem 0.6rem;
  overflow: visible;
  min-height: 0;
}

.skills-subwindow-body p {
  margin-bottom: 0.35rem;
}

.skills-subwindow-body .project-list + p {
  margin-top: 0.5rem;
}

.skills-subwindow-hardware {
  grid-column: 1;
  grid-row: 1 / span 3;
}

.skills-subwindow-software {
  grid-column: 2;
  grid-row: 1;
}

.skills-subwindow-ai {
  grid-column: 2;
  grid-row: 2;
}

.skills-subwindow-web {
  grid-column: 2;
  grid-row: 3;
}

.skills-subwindow-wide {
  grid-column: 1 / -1;
  grid-row: 4;
}

/* ABOUT WINDOW */
.about-card {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.about-image {
  flex: 0 0 300px;
}

.about-image img,
.about-image video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  border: 1px solid rgba(0, 255, 127, 0.4);
  box-shadow: 0 0 10px rgba(0, 255, 127, 0.2);
}

.about-content {
  flex: 1;
  min-width: 260px;
}

.about-content p {
  margin-bottom: 1.05rem;
}

.name-title {
  font-size: 1.68rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.highlight-role {
  color: #ff79c6;
  font-weight: 600;
}

.education-columns {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

.education-column {
  flex: 1;
  min-width: 240px;
  background: rgba(0, 40, 24, 0.35);
  border: 1px solid rgba(0, 255, 127, 0.25);
  border-radius: 5px;
  padding: 1.1rem 1.25rem;
}

.education-column .degree {
  font-size: 1.05rem;
  font-weight: 600;
  display: block;
  margin-bottom: 0.6rem;
}

.education-column p {
  margin-bottom: 0.45rem;
  line-height: 1.45;
}

.education-column .date {
  font-style: italic;
  font-size: 0.9rem;
  opacity: 0.9;
}

.projects-columns {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

.project-column {
  flex: 1;
  min-width: 240px;
  background: rgba(0, 40, 24, 0.35);
  border: 1px solid rgba(0, 255, 127, 0.25);
  border-radius: 5px;
  padding: 1.1rem 1.25rem;
  text-align: center;
}

.project-column img.project-logo {
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid rgba(0, 255, 127, 0.4);
  box-shadow: 0 0 10px rgba(0, 255, 127, 0.2);
  margin-bottom: 1rem;
}

.project-column h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #bd93f9;
  margin-bottom: 0.6rem;
}

.project-column h3 a {
  color: inherit;
  text-decoration: none;
}

.project-column h3 a:hover {
  color: #50fa7b;
}

.project-column .role {
  color: #ff79c6;
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.project-column .date {
  color: #f1fa8c;
  font-style: italic;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Mobile behavior */
@media (max-width: 700px) {

  .education-columns,
  .projects-columns {
    flex-direction: column;
    gap: 1.25rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .skills-subwindow,
  .skills-subwindow-hardware,
  .skills-subwindow-software,
  .skills-subwindow-ai,
  .skills-subwindow-web,
  .skills-subwindow-wide {
    grid-column: auto;
    grid-row: auto;
  }

  .about-card {
    flex-direction: column;
    gap: 1.8rem;
  }

  .about-image {
    flex: none;
    width: 300px;
    max-width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 900px) {
  body {
    align-items: center;
  }

  .desktop-inner {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
}

@media (max-width: 600px) {
  .screen {
    padding: 1rem;
  }

  .screen-inner {
    font-size: 0.86rem;
  }
}

@media (max-width: 820px) {
  .top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.55rem 1rem;
  }

  .top-bar-left {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
  }

  .top-bar-right {
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
  }

  .top-icons {
    width: 100%;
    justify-content: center;
    gap: 1rem;
  }
}

/* Extra-fine mobile tuning */
@media (max-width: 620px) {
  .top-bar-left {
    gap: 0.5rem;
  }

  .top-item {
    font-size: 0.76rem;
  }

  .top-icons {
    gap: 0.85rem;
  }
}
