* {
  box-sizing: border-box;
}

:root {
  --glass: rgba(255, 255, 255, 0.12);
  --glass-strong: rgba(255, 255, 255, 0.18);
  --glass-border: rgba(255, 255, 255, 0.22);
  --text-soft: rgba(255, 255, 255, 0.58);
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
  background: #111;
}

button {
  font: inherit;
}

.desktop {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
  color: white;

  background:
    radial-gradient(circle at 75% 20%, #49566a 0, transparent 34%),
    radial-gradient(circle at 20% 85%, #31363e 0, transparent 35%),
    linear-gradient(135deg, #18191c, #08090a);
}


/* ABSTRACT BACKGROUND */

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .25;
  pointer-events: none;
}

.orb-one {
  width: 500px;
  height: 500px;
  background: #7caeff;
  right: -120px;
  top: 100px;
}

.orb-two {
  width: 420px;
  height: 420px;
  background: #8f7cff;
  left: -160px;
  bottom: -180px;
}


/* MENU */

.menu-bar {
  position: relative;
  z-index: 2000;

  height: 34px;
  padding: 0 18px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background: rgba(15,15,15,.28);
  border-bottom: 1px solid rgba(255,255,255,.08);

  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);

  font-size: 12px;
}

.menu-left,
.menu-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.sergio-mark {
  width: 19px;
  height: 19px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background: white;
  color: #111;

  font-size: 10px;
  font-weight: 800;
}


/* HERO */

.hero {
  position: absolute;
  left: 5vw;
  bottom: 11vh;

  width: min(850px, 68vw);

  z-index: 2;
}

.hero-meta {
  display: flex;
  gap: 35px;

  margin-bottom: 18px;

  font-size: 10px;
  letter-spacing: .16em;

  color: rgba(255,255,255,.48);
}

.hero h1 {
  margin: 0;

  font-size: clamp(65px, 8.5vw, 145px);

  line-height: .82;
  letter-spacing: -.075em;

  font-weight: 600;
}

.hero-bottom {
  margin-top: 30px;

  display: flex;
  gap: 70px;

  font-size: 12px;
  line-height: 1.45;

  color: var(--text-soft);
}

.hero-bottom p {
  margin: 0;
}


/* DESKTOP FILES */

.desktop-files {
  position: absolute;

  top: 85px;
  right: 45px;

  display: grid;
  grid-template-columns: repeat(2, 105px);

  gap: 28px 15px;

  z-index: 4;
}

.desktop-item {
  width: 105px;

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 9px;

  padding: 8px;

  border: none;
  border-radius: 9px;

  color: white;
  background: transparent;

  cursor: default;
}

.desktop-item:hover,
.desktop-item:focus {
  background: rgba(255,255,255,.1);
  outline: none;
}

.desktop-item > span {
  font-size: 11px;
  text-align: center;

  text-shadow: 0 2px 5px #000;
}


/* FOLDER */

.folder-icon {
  width: 70px;
  height: 54px;
  position: relative;
}

.folder-tab {
  position: absolute;
  top: 0;
  left: 5px;

  width: 31px;
  height: 14px;

  border-radius: 5px 5px 0 0;

  background: #75baff;
}

.folder-body {
  position: absolute;
  bottom: 0;

  width: 70px;
  height: 47px;

  border-radius: 6px 9px 9px 9px;

  background:
    linear-gradient(180deg,#9bd4ff,#4ca8f7);

  box-shadow:
    inset 0 1px rgba(255,255,255,.55),
    0 8px 20px rgba(0,0,0,.15);
}


/* DOCUMENT */

.document-icon {
  width: 48px;
  height: 61px;

  display: grid;
  place-items: center;

  border-radius: 5px;

  color: #222;

  background: rgba(255,255,255,.92);

  box-shadow: 0 8px 18px rgba(0,0,0,.15);

  font-size: 9px;
  font-weight: 700;
}

.document-icon.pdf {
  color: #e04b45;
}


/* GLASS WINDOWS */

.glass-window {
  position: absolute;

  border: 1px solid var(--glass-border);
  border-radius: 22px;

  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,.19),
      rgba(255,255,255,.08)
    );

  backdrop-filter: blur(38px) saturate(130%);
  -webkit-backdrop-filter: blur(38px) saturate(130%);

  box-shadow:
    0 40px 100px rgba(0,0,0,.42),
    inset 0 1px rgba(255,255,255,.2);

  overflow: hidden;

  z-index: 50;
}

.hidden {
  display: none;
}


/* FINDER */

.finder-window {
  width: min(950px, 78vw);
  height: min(610px, 72vh);

  left: 50%;
  top: 49%;

  transform: translate(-50%,-50%);
}

.window-header {
  height: 52px;

  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  border-bottom: 1px solid rgba(255,255,255,.12);

  font-size: 12px;
}

.traffic-lights {
  position: absolute;
  left: 18px;

  display: flex;
  gap: 8px;
}

.traffic {
  width: 12px;
  height: 12px;

  padding: 0;

  border: none;
  border-radius: 50%;
}

.red {
  background: #ff5f57;
  cursor: pointer;
}

.yellow {
  background: #febc2e;
}

.green {
  background: #28c840;
}

.window-title {
  font-weight: 600;
}

.window-actions {
  position: absolute;
  right: 20px;

  display: flex;
  gap: 18px;

  color: rgba(255,255,255,.65);
}


/* FINDER LAYOUT */

.finder-layout {
  height: calc(100% - 52px);

  display: grid;
  grid-template-columns: 190px 1fr;
}

.finder-sidebar {
  padding: 24px 13px;

  border-right: 1px solid rgba(255,255,255,.12);

  background: rgba(0,0,0,.08);
}

.sidebar-label {
  margin: 0 10px 10px;

  font-size: 9px;
  font-weight: 700;

  letter-spacing: .12em;

  color: rgba(255,255,255,.38);
}

.sidebar-label.second {
  margin-top: 30px;
}

.sidebar-item {
  width: 100%;

  padding: 9px 11px;

  display: flex;
  align-items: center;

  gap: 10px;

  border: none;
  border-radius: 8px;

  background: transparent;
  color: rgba(255,255,255,.75);

  text-align: left;

  font-size: 12px;
}

.sidebar-item.active {
  background: rgba(255,255,255,.13);
  color: white;
}

.sidebar-info {
  padding: 3px 10px;

  font-size: 10px;
  line-height: 1.5;

  color: rgba(255,255,255,.38);
}


/* FINDER MAIN */

.finder-main {
  min-width: 0;
}

.finder-toolbar {
  height: 53px;

  padding: 0 22px;

  display: flex;
  align-items: center;

  border-bottom: 1px solid rgba(255,255,255,.1);

  font-size: 12px;
}

.toolbar-arrows {
  display: flex;
  gap: 5px;

  margin-right: 22px;
}

.toolbar-arrows button {
  width: 27px;
  height: 27px;

  border: none;
  border-radius: 7px;

  color: white;

  background: rgba(255,255,255,.08);
}

.view-options {
  margin-left: auto;

  color: rgba(255,255,255,.5);
}


/* FOLDER GRID */

.folder-grid {
  padding: 42px 35px;

  display: grid;

  grid-template-columns:
    repeat(3,minmax(130px,1fr));

  gap: 45px 22px;
}

.project-folder {
  padding: 12px;

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 7px;

  border: none;
  border-radius: 12px;

  background: transparent;
  color: white;
}

.project-folder:hover {
  background: rgba(255,255,255,.08);
}

.project-folder strong {
  margin-top: 6px;

  font-size: 11px;
}

.project-folder > span {
  font-size: 9px;

  color: rgba(255,255,255,.42);
}

.mini-folder {
  width: 75px;
  height: 50px;

  position: relative;

  border-radius: 6px 9px 9px 9px;

  background:
    linear-gradient(180deg,#9bd4ff,#4ca8f7);

  box-shadow: 0 10px 20px rgba(0,0,0,.15);
}

.mini-folder::before {
  content: "";

  position: absolute;

  left: 5px;
  top: -7px;

  width: 33px;
  height: 13px;

  border-radius: 5px 5px 0 0;

  background: #75baff;
}

.mini-folder.archive {
  filter: saturate(.3);
}


/* ABOUT */

.about-window {
  width: min(610px, 70vw);

  left: 50%;
  top: 50%;

  transform: translate(-50%,-50%);
}

.about-content {
  padding: 50px;
}

.about-number {
  font-size: 10px;

  color: rgba(255,255,255,.4);
}

.about-content h2 {
  margin: 20px 0 25px;

  font-size: 35px;

  line-height: .98;
  letter-spacing: -.045em;
}

.about-content p {
  max-width: 430px;

  margin: 0;

  font-size: 13px;
  line-height: 1.6;

  color: rgba(255,255,255,.6);
}


/* DOCK */

.dock {
  position: absolute;

  left: 50%;
  bottom: 16px;

  transform: translateX(-50%);

  height: 70px;

  padding: 9px 12px;

  display: flex;
  align-items: flex-end;

  gap: 9px;

  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px;

  background: rgba(255,255,255,.12);

  backdrop-filter: blur(30px) saturate(140%);
  -webkit-backdrop-filter: blur(30px) saturate(140%);

  box-shadow:
    0 18px 40px rgba(0,0,0,.25),
    inset 0 1px rgba(255,255,255,.18);

  z-index: 1900;
}

.dock-app {
  position: relative;

  padding: 0;

  border: none;

  background: transparent;

  transition: transform .18s ease;
}

.dock-app:hover {
  transform: translateY(-8px) scale(1.18);
}

.dock-app > span {
  position: absolute;

  left: 50%;
  bottom: 66px;

  transform: translateX(-50%);

  padding: 5px 8px;

  border-radius: 6px;

  background: rgba(0,0,0,.75);

  color: white;

  font-size: 9px;

  opacity: 0;
  pointer-events: none;

  white-space: nowrap;

  transition: opacity .15s;
}

.dock-app:hover > span {
  opacity: 1;
}

.app-icon {
  width: 49px;
  height: 49px;

  display: grid;
  place-items: center;

  border-radius: 11px;

  font-weight: 700;
  font-size: 20px;

  box-shadow:
    inset 0 1px rgba(255,255,255,.15),
    0 6px 15px rgba(0,0,0,.2);
}

.ai {
  background: #321600;
  color: #ff9a00;
}

.ps {
  background: #001e36;
  color: #31a8ff;
}

.id {
  background: #49021f;
  color: #ff3366;
}

.ae {
  background: #00005b;
  color: #9999ff;
}

.figma {
  background: #191919;
  color: white;
}

.keyshot {
  background: linear-gradient(135deg,#e5e5e5,#525252);
  color: white;
}

.dock-separator {
  width: 1px;
  height: 43px;

  margin: 0 4px;

  background: rgba(255,255,255,.18);
}


/* SMALL SCREENS */

@media (max-width: 800px) {

  .menu-left span:not(.sergio-mark),
  .menu-left strong {
    display: none;
  }

  .hero {
    width: 90vw;
  }

  .hero h1 {
    font-size: 15vw;
  }

  .desktop-files {
    right: 15px;
  }

  .finder-window {
    width: 94vw;
  }

  .finder-layout {
    grid-template-columns: 1fr;
  }

  .finder-sidebar {
    display: none;
  }

}

/* Desktop interaction feedback */
.desktop-item.selected {
  background: rgba(255,255,255,.14);
}
.desktop-item:focus-visible,
.traffic.red:focus-visible,
.dock-app:focus-visible {
  outline: 2px solid #9bd4ff;
  outline-offset: 4px;
}
.window-header { cursor: grab; user-select: none; }
.glass-window.dragging .window-header,
.desktop-item.dragging { cursor: grabbing; }
.desktop-item { user-select: none; }
body.is-dragging { user-select: none; }
.dock-app:focus-visible > span { opacity: 1; }

/* Typography belongs to the wallpaper; folder contents scroll independently. */
.hero h1 { user-select: none; -webkit-user-select: none; cursor: default; }
.finder-main { display: flex; flex-direction: column; min-height: 0; }
.finder-toolbar { flex-shrink: 0; }
.folder-grid { overflow-y: auto; min-height: 0; }
#folderPath { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-folder { flex: 1; display: grid; align-content: center; justify-items: center; gap: 12px; padding: 24px; color: var(--text-soft); }
.empty-folder p { margin: 0; }
.empty-folder button { border: 1px solid var(--glass-border); border-radius: 8px; padding: 8px 12px; background: var(--glass); color: white; cursor: pointer; }
.toolbar-arrows button:disabled { opacity: .3; cursor: default; }
.project-folder { user-select: none; -webkit-user-select: none; }
.project-folder:focus-visible { outline: 2px solid #9bd4ff; outline-offset: -2px; }
/* Keep this rule after grid/flex declarations. */
.hidden { display: none; }

/* Original project artwork, with internal vertical scrolling. */
.project-list { overflow-y: auto; min-height: 0; padding: 32px; }
.project-file { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 220px; max-width: 100%; padding: 16px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: white; user-select: none; -webkit-user-select: none; }
.project-file:hover, .project-file:focus { background: rgba(255,255,255,.08); border-color: var(--glass-border); }
.project-file:focus-visible { outline: 2px solid #9bd4ff; }
.project-file strong { font-size: 12px; }
.project-file > span:last-child { font-size: 10px; line-height: 1.5; color: var(--text-soft); }
.project-thumbnail { display: block; width: 110px; height: 150px; overflow: hidden; border-radius: 4px; box-shadow: 0 8px 20px rgba(0,0,0,.2); }
.project-thumbnail img { display: block; width: 100%; height: auto; }
.project-window { width: min(760px, 86vw); height: min(740px, 76vh); left: 50%; top: 48%; transform: translate(-50%,-50%); }
.project-content { height: calc(100% - 52px); overflow-y: auto; overscroll-behavior: contain; padding: 30px; }
.project-intro { margin-bottom: 24px; }
.project-intro p { color: var(--text-soft); font-size: 12px; }
.project-intro .project-client { text-transform: uppercase; letter-spacing: .16em; font-size: 10px; }
.project-intro h2 { margin: 10px 0; font-size: clamp(24px, 3vw, 38px); letter-spacing: -.045em; }
.project-image { display: block; width: 100%; max-width: 952px; height: auto; margin: 0 auto; }
.project-image-error { padding: 24px; border: 1px solid var(--glass-border); border-radius: 12px; line-height: 1.6; }
.hidden { display: none; }

/* Catalog and multi-page projects */
.project-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; align-content: start; }
.project-file { width: 100%; }
#projectMedia figure { margin: 0 0 28px; }
#projectMedia figcaption { text-align: center; margin-top: 10px; color: var(--text-soft); font-size: 11px; }
.cv-links { display: flex; gap: 16px; margin-top: 24px; }
.cv-links a { color: white; padding: 12px 16px; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 10px; text-decoration: none; }
.hidden { display: none; }
