:root {
  color-scheme: dark;
  --glass: rgba(11, 16, 25, 0.66);
  --glass-strong: rgba(18, 24, 36, 0.82);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f7f9ff;
  --muted: #98a4b6;
  --shadow: 0 18px 54px rgba(0, 0, 0, 0.38);
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow: hidden;
  background: #070a10;
  color: var(--text);
}

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

button {
  border: 0;
  color: inherit;
  cursor: pointer;
}

a {
  color: #a8ddff;
  text-decoration: none;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.boot-screen,
.desktop,
.login-screen {
  min-height: 100vh;
}

.boot-screen,
.login-screen {
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 35%, rgba(96, 190, 255, 0.18), transparent 32%),
    linear-gradient(135deg, #07111f, #111827 45%, #090b12);
}

.login-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 410px) 220px;
  gap: 28px;
  align-items: start;
  width: min(760px, 100%);
}

.login-card {
  display: grid;
  gap: 13px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(11, 16, 25, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px);
}

.login-card h1 {
  margin: 0;
  font-size: 2.4rem;
  letter-spacing: 0;
}

.login-card p {
  margin: 0;
  color: var(--muted);
}

.login-card input {
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(4, 9, 16, 0.48);
  color: #fff;
  padding: 0 13px;
  outline: none;
}

.login-card input:focus {
  border-color: rgba(92, 214, 255, 0.72);
}

.login-card button {
  height: 42px;
  border-radius: 12px;
  background: #dce7f6;
  color: #0b1019;
  font-weight: 800;
}

.login-error {
  color: #ff9aa8 !important;
}

.sticky-note {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(30, 25, 10, 0.18);
  border-radius: 8px;
  background: linear-gradient(145deg, #fff3a3, #ffd36e);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
  color: #211805;
  transform: rotate(2deg);
}

.sticky-note span {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.86rem;
}

.sticky-note small {
  color: rgba(33, 24, 5, 0.64);
}

.boot-card {
  width: min(460px, 100%);
  text-align: center;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(13, 19, 31, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(30px);
  animation: rise 520ms ease both;
}

.boot-orbit {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, #fff, transparent 8%),
    conic-gradient(from 120deg, #8bd7ff, #c7a6ff, #95e6a4, #8bd7ff);
  box-shadow: 0 0 44px rgba(139, 215, 255, 0.28);
}

.eyebrow,
.widget-kicker {
  margin: 0;
  color: #98dfff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.boot-card h1 {
  margin: 10px 0;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.boot-card p {
  color: var(--muted);
}

.boot-loader {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin: 26px 0;
}

.boot-loader span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  animation: pulse 900ms ease infinite;
}

.boot-loader span:nth-child(2) {
  animation-delay: 120ms;
}

.boot-loader span:nth-child(3) {
  animation-delay: 240ms;
}

.ghost-button,
.settings-view button,
.download-button,
.card-actions button,
.contact-form button,
.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.ghost-button:hover,
.settings-view button:hover,
.download-button:hover,
.card-actions button:hover,
.contact-form button:hover,
.copy-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.14);
}

.desktop {
  position: relative;
  overflow: hidden;
  padding: 64px 22px 92px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 18% 22%, rgba(78, 218, 255, 0.12), transparent 28%),
    linear-gradient(135deg, #070b12, #111720 48%, #06080d);
  background-size: 64px 64px, 64px 64px, auto, auto;
}

.wallpaper-midnight {
  background:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    radial-gradient(circle at 80% 20%, rgba(86, 117, 180, 0.13), transparent 34%),
    linear-gradient(145deg, #07080d, #11131a 58%, #05060a);
  background-size: 62px 62px, 62px 62px, auto, auto;
}

.wallpaper-violet {
  background:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    radial-gradient(circle at 68% 24%, rgba(172, 137, 255, 0.14), transparent 30%),
    linear-gradient(140deg, #0b0d15, #151324 52%, #080911);
  background-size: 66px 66px, 66px 66px, auto, auto;
}

.wallpaper-runway {
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, transparent 48%, rgba(93, 214, 255, 0.16) 49%, transparent 51%),
    radial-gradient(circle at 50% 84%, rgba(93, 214, 255, 0.18), transparent 32%),
    linear-gradient(135deg, #06080c, #10141d 50%, #06080d);
  background-size: 56px 56px, 56px 56px, auto, auto, auto;
}

.wallpaper-radar {
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 52% 50%, transparent 0 14%, rgba(93, 214, 255, 0.04) 14.5% 15%, transparent 15.5% 29%, rgba(93, 214, 255, 0.04) 29.5% 30%, transparent 31%),
    linear-gradient(140deg, #06090d, #0c151d 50%, #05070a);
  background-size: 58px 58px, 58px 58px, auto, auto;
}

.menu-bar,
.dock,
.widget,
.window {
  border: 1px solid var(--line);
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px) saturate(1.25);
}

.menu-bar {
  position: fixed;
  top: 14px;
  left: 18px;
  right: 18px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  padding: 0 10px;
  border-radius: 999px;
}

.brand-pill {
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  font-weight: 700;
}

.menu-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button,
.status-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.clock {
  min-width: 58px;
  color: #edf4ff;
  font-size: 0.86rem;
  text-align: right;
}

.desktop-grid {
  display: grid;
  grid-template-columns: repeat(2, 80px);
  gap: 16px 14px;
  width: 178px;
}

.desktop-icon {
  display: grid;
  gap: 9px;
  justify-items: center;
  padding: 8px 4px;
  border-radius: 16px;
  background: transparent;
  color: #f4f8ff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}

.desktop-icon:hover {
  background: rgba(255, 255, 255, 0.12);
}

.icon-tile {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent), white 20%), color-mix(in srgb, var(--accent), black 45%)),
    rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.28), 0 14px 30px rgba(0, 0, 0, 0.24);
}

.desktop-icon span:last-child {
  font-size: 0.76rem;
  font-weight: 650;
}

.widgets {
  position: fixed;
  top: 84px;
  right: 22px;
  display: grid;
  gap: 14px;
  width: 240px;
}

.widget {
  padding: 14px;
  border-radius: var(--radius);
}

.widget strong {
  display: block;
  margin-top: 6px;
  font-size: 1.05rem;
}

.widget p {
  margin: 10px 0 0;
  color: var(--muted);
}

.widget.mini {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #eaf4ff;
}

.window {
  position: fixed;
  display: grid;
  grid-template-rows: 40px 1fr;
  min-width: 340px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 128px);
  border-radius: var(--radius);
  overflow: hidden;
  animation: windowIn 220ms cubic-bezier(.2, .9, .2, 1) both;
}

.window.is-focused {
  border-color: rgba(255, 255, 255, 0.28);
}

.window-titlebar {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.055);
  cursor: grab;
  user-select: none;
}

.window-titlebar span {
  color: var(--muted);
  font-size: 0.78rem;
}

.traffic {
  display: flex;
  gap: 6px;
}

.traffic button {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: transparent;
}

.traffic button:first-child {
  background: #ff6b6b;
}

.traffic button:nth-child(2) {
  background: #ffd166;
}

.traffic button:hover {
  color: rgba(0, 0, 0, 0.62);
}

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

.window-body {
  overflow: auto;
  padding: 16px;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.resize-handle {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 15px;
  height: 15px;
  cursor: nwse-resize;
}

.resize-handle::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 9px;
  height: 9px;
  border-right: 1px solid rgba(255, 255, 255, 0.38);
  border-bottom: 1px solid rgba(255, 255, 255, 0.38);
  content: "";
}

.dock {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 1001;
  display: flex;
  gap: 8px;
  max-width: calc(100vw - 24px);
  padding: 8px;
  border-radius: 20px;
  transform: translateX(-50%);
}

.dock-item {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.09);
  transition: transform 160ms ease, background 160ms ease;
}

.dock-item span {
  position: absolute;
  bottom: 54px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(4, 7, 12, 0.72);
  color: #fff;
  font-size: 0.75rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
  white-space: nowrap;
}

.dock-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.16);
}

.dock-item:hover span {
  opacity: 1;
  transform: translateY(0);
}

.dock-item.is-open::after {
  position: absolute;
  bottom: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.about-layout,
.contact-layout {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 14px;
}

.profile-card,
.mini-panel,
.project-card,
.gallery-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.065);
}

.profile-card {
  padding: 16px;
  text-align: center;
}

.avatar {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  margin: 0 auto 16px;
  border-radius: 24px;
  background: linear-gradient(145deg, #8bd7ff, #c7a6ff 55%, #95e6a4);
  color: #07111f;
  font-size: 1.45rem;
  font-weight: 850;
}

.profile-card h2,
.project-card h3,
.detail-view h2 {
  margin: 0 0 6px;
}

.profile-card p,
.profile-card span,
.lead,
.project-card p,
.timeline p {
  color: var(--muted);
}

.stack,
.settings-view,
.resume-view {
  display: grid;
  gap: 14px;
}

.lead {
  margin-top: 0;
  font-size: 0.94rem;
  line-height: 1.55;
}

.panel-list {
  display: grid;
  gap: 12px;
}

.mini-panel {
  padding: 13px;
}

.mini-panel h3 {
  margin: 0 0 12px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips span,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #dfe9f8;
  font-size: 0.72rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.project-card,
.gallery-card {
  overflow: hidden;
}

.project-card img,
.gallery-card img,
.detail-view img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

.project-card > div,
.gallery-card > div {
  padding: 11px;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.card-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(139, 215, 255, 0.12);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.gallery-link {
  display: inline-flex;
  margin-top: 10px;
  color: #88dfff;
  font-size: 0.82rem;
}

.gallery-card time {
  display: block;
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 0.8rem;
}

.contact-form {
  display: grid;
  gap: 13px;
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: #d9e7f8;
}

.contact-form input,
.contact-form textarea,
.prompt-row input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(4, 9, 16, 0.38);
  color: #fff;
  outline: none;
}

.contact-form input,
.contact-form textarea {
  padding: 13px 14px;
}

.contact-form input:focus,
.contact-form textarea:focus,
.prompt-row input:focus {
  border-color: rgba(139, 215, 255, 0.7);
}

.contact-panel {
  display: grid;
  gap: 12px;
  align-content: start;
}

.contact-panel a {
  display: grid;
  gap: 2px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.contact-panel span {
  color: var(--muted);
  font-size: 0.8rem;
}

.success-burst {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #95e6a4;
  animation: pop 360ms ease both;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline article {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  position: relative;
}

.timeline time {
  color: #98dfff;
  font-size: 0.86rem;
}

.timeline h3 {
  margin: 0 0 4px;
}

.timeline strong {
  color: #fff;
}

.resume-view ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.terminal-view {
  display: grid;
  grid-template-rows: 1fr auto;
  height: 100%;
  min-height: 250px;
  border-radius: 16px;
  background: rgba(1, 5, 8, 0.62);
  color: #baffdf;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.terminal-output {
  overflow: auto;
  padding: 13px;
}

.terminal-output p {
  margin: 0 0 8px;
  line-height: 1.5;
}

.prompt-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  padding: 10px 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.prompt-row span {
  color: #7dffca;
  white-space: nowrap;
}

.prompt-row input {
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-family: inherit;
}

.settings-view button {
  width: fit-content;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.toggle input {
  width: 18px;
  height: 18px;
}

.wallpaper-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wallpaper-options button.selected {
  border-color: rgba(139, 215, 255, 0.72);
  background: rgba(139, 215, 255, 0.18);
}

.detail-view {
  display: grid;
  gap: 16px;
}

.privacy-panel p {
  color: var(--muted);
  margin-top: 0;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
}

@keyframes pulse {
  50% {
    opacity: 0.35;
    transform: translateY(-4px);
  }
}

@keyframes windowIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
}

@media (max-width: 900px) {
  .widgets {
    display: none;
  }
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .desktop {
    min-height: 100svh;
    padding: 64px 14px 86px;
    overflow: auto;
  }

  .menu-bar {
    left: 10px;
    right: 10px;
  }

  .status-icon {
    display: none;
  }

  .desktop-grid {
    width: auto;
    grid-template-columns: repeat(3, minmax(76px, 1fr));
  }

  .desktop-icon {
    min-height: 90px;
  }

  .window {
    position: fixed;
    inset: auto 0 0 0;
    width: 100%;
    max-width: 100%;
    height: min(84svh, 720px);
    max-height: 84svh;
    border-radius: 20px 20px 0 0;
  }

  .window-titlebar {
    cursor: default;
  }

  .dock {
    overflow-x: auto;
    width: calc(100vw - 20px);
    justify-content: flex-start;
  }

  .dock-item {
    flex: 0 0 50px;
  }

  .about-layout,
  .contact-layout,
  .timeline article {
    grid-template-columns: 1fr;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .sticky-note {
    transform: rotate(-1deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
