:root {
  --bg-top: #f4efe7;
  --bg-bottom: #d4e7ff;
  --glass: rgba(248, 251, 255, 0.85);
  --text-main: #1c2431;
  --text-soft: #55627a;
  --accent: #ff8a3d;
  --accent-soft: #ffd2b3;
  --line: rgba(28, 36, 49, 0.12);
  --shadow: 0 24px 40px rgba(20, 34, 56, 0.18);
}

* {
  box-sizing: border-box;
}

.clock-widget {
  position: absolute;
  width: 76px;
  height: 76px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "arboria", monospace, sans-serif;
  font-size: 1.8rem;
  font-weight: 400;
  font-style: normal;
  color: var(--text-main);
  letter-spacing: 0.02em;
  box-shadow: 0 8px 16px rgba(20, 34, 56, 0.12);
  cursor: grab;
  user-select: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
  touch-action: none;
  will-change: transform;
}

.clock-widget:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.85);
}

.clock-widget.is-dragging {
  cursor: grabbing;
  box-shadow: 0 18px 26px rgba(20, 34, 56, 0.15);
  background: rgba(255, 255, 255, 0.22);
}

button,
input,
textarea,
select {
  font: inherit;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "arboria", sans-serif;
  font-weight: 400;
  font-style: normal;
  color: var(--text-main);
  position: relative;
  overflow-x: hidden;
  background: radial-gradient(circle at 20% 0%, var(--bg-top), var(--bg-bottom));
}

.desktop-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 45%),
    radial-gradient(circle at 10% 75%, rgba(255, 211, 178, 0.5), rgba(255, 211, 178, 0) 40%);
  z-index: -1;
}

.desktop {
  position: relative;
  min-height: calc(100vh - 120px);
  padding: 16px 28px;
}

.desktop-topbar {
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  width: min(320px, 100%);
  background: var(--glass);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.apple-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #101722;
}

.topbar-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.desktop-icons {
  position: absolute;
  inset: 88px 28px 112px;
  display: block;
}

.folder-icon {
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 14px;
  position: absolute;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
  touch-action: none;
  will-change: transform;
}

.folder-icon:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.3);
}

.folder-icon.is-dragging {
  cursor: grabbing;
  box-shadow: 0 18px 26px rgba(20, 34, 56, 0.15);
  background: rgba(255, 255, 255, 0.22);
}

.folder-graphic {
  width: 86px;
  height: 64px;
  border-radius: 12px;
  background:
    linear-gradient(145deg, #ffbe8d, #ff8a3d);
  position: relative;
  box-shadow: 0 14px 20px rgba(255, 138, 61, 0.33);
}

.folder-graphic::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 10px;
  width: 34px;
  height: 14px;
  border-radius: 10px 10px 0 0;
  background: #ffc89e;
}

.folder-label {
  font-size: 0.95rem;
  font-weight: 600;
}

.window {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  width: min(980px, calc(100% - 28px));
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow);
  animation: pop-in 260ms ease;
}

.window-header {
  background: #f5f6f8;
  border-bottom: 1px solid #e1e5ea;
  display: flex;
  align-items: center;
  padding: 10px 14px;
}

.window-header {
  cursor: grab;
  user-select: none;
}

.window.is-dragging .window-header {
  cursor: grabbing;
}

.window {
  z-index: 50;
}

.window.is-focused {
  z-index: 1000;
  box-shadow: 0 32px 70px rgba(20, 34, 56, 0.26);
}

.window.is-maximized {
  inset: 8px 8px 64px 8px;
  width: calc(100% - 16px) !important;
  height: calc(100% - 80px) !important;
  top: 8px !important;
  left: 8px !important;
  transform: none !important;
  border-radius: 6px !important;
}

.window-controls {
  display: flex;
  gap: 8px;
}

.control {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 0;
  display: inline-block;
}

.control.close {
  background: #ff5f57;
  cursor: pointer;
}

.control.minimize {
  background: #febc2e;
}

.control.maximize {
  background: #28c840;
}

.window-title {
  margin: 0 auto;
  font-weight: 600;
  color: var(--text-soft);
  font-size: 0.9rem;
  transform: translateX(-22px);
}

.window-content {
  display: grid;
  grid-template-columns: 210px 1fr;
  min-height: 460px;
}

.finder-sidebar {
  border-right: 1px solid #e5e9ef;
  background: #f8f9fb;
  padding: 20px 16px;
}

.sidebar-title {
  margin: 0 0 10px;
  font-weight: 600;
  color: var(--text-soft);
}

.finder-sidebar ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  color: #3e4a5f;
}

.finder-main {
  padding: 22px;
}

.finder-main h2 {
  margin: 0;
}

.finder-hint {
  margin: 8px 0 20px;
  color: var(--text-soft);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

.project-tile {
  border: 1px solid #e3e8ef;
  background: #fbfdff;
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease;
}

.project-tile:hover {
  transform: translateY(-2px);
  border-color: #ffb68a;
}

.project-tile h3 {
  margin: 0;
  font-size: 1rem;
}

.project-tile p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.about-content {
  display: block;
  padding: 26px;
}

.about-content h2 {
  margin-top: 0;
}

.project-view {
  width: min(980px, calc(100% - 28px));
  margin: 80px auto 0;
}

.back-button {
  border: 1px solid #d3dbe6;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
}

.project-card {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  padding: 28px;
}

.project-card h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.project-card .meta {
  margin-top: 8px;
  color: var(--text-soft);
}

.project-card .description {
  margin-top: 18px;
  line-height: 1.55;
}

.project-card .tags {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-card .tags span {
  border-radius: 999px;
  border: 1px solid #ffd8c1;
  background: #fff5ee;
  color: #8f420f;
  font-size: 0.85rem;
  padding: 6px 10px;
}

.dock {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
  padding: 10px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.dock-item {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  user-select: none;
  transition: transform 160ms ease;
}

.dock-item:hover {
  transform: translateY(-2px) scale(1.03);
}

.mode-item {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: #fff;
  cursor: pointer;
  user-select: none;
  transition: transform 160ms ease, filter 160ms ease;
}

.mode-item:hover {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.05);
}

.mode-item.is-active {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85) inset;
}

.mode-tidy {
  background: linear-gradient(145deg, #8f9bb3, #5d6b82);
}

.mode-disorganized {
  background: linear-gradient(145deg, #f59e0b, #7c3aed);
}

.dock-finder {
  background: linear-gradient(145deg, #4a5f7f, #1f2937);
  color: #fff;
  font-size: 1.1rem;
}

.dock-apps {
  background: linear-gradient(145deg, #6b7280, #374151);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 300;
}

.documents-list {
  padding: 16px;
  color: var(--text-soft);
}

.document-link {
  display: inline-block;
  padding: 10px 12px;
  border: 1px solid #e3e8ef;
  border-radius: 10px;
  background: #fbfdff;
  color: var(--text-main);
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease;
}

.document-link:hover {
  border-color: #ffb68a;
  transform: translateY(-1px);
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.app-card {
  border: 1px solid #e3e8ef;
  background: #fbfdff;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  transition: border-color 180ms ease;
}

.app-card:hover {
  border-color: #ffb68a;
}

.app-card strong {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.app-desc {
  font-size: 0.85rem;
  color: var(--text-soft);
}

.app-figma {
  background: linear-gradient(135deg, #f24e1e 0%, #a259ff 52%, #1abcfe 100%);
}

.app-illustrator {
  background: #2f1604;
  color: #ff9a00;
}

.app-photoshop {
  background: #021a34;
  color: #31a8ff;
}

.app-webflow {
  background: linear-gradient(145deg, #0047ff, #1a6bff);
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@media (max-width: 760px) {
  .window {
    top: 75px;
  }

  .window-content {
    grid-template-columns: 1fr;
  }

  .finder-sidebar {
    display: none;
  }

  .desktop-icons {
    inset: 84px 18px 104px;
  }

  .folder-graphic {
    width: 74px;
    height: 56px;
  }

  .dock {
    width: calc(100% - 20px);
    justify-content: space-between;
  }

  .dock-item {
    width: 40px;
    height: 40px;
    font-size: 0.8rem;
  }

  .mode-item {
    width: 40px;
    height: 40px;
  }
}
