:root {
  --glass: rgba(246, 250, 255, 0.54);
  --glass-strong: rgba(250, 252, 255, 0.72);
  --ink: #161a22;
  --muted: rgba(22, 26, 34, 0.62);
  --line: rgba(255, 255, 255, 0.46);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
  --dock-height: 116px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", sans-serif;
  color: var(--ink);
  background: #090b12;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.portfolio-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-width: 960px;
  min-height: 620px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(149, 206, 255, 0.32), transparent 26%),
    radial-gradient(circle at 85% 78%, rgba(255, 211, 110, 0.24), transparent 28%),
    #0b0e17;
}

.loading-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 650;
}

.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

[hidden] {
  display: none !important;
}

.macbook-stage,
.lockscreen,
.desktop {
  position: absolute;
  inset: 0;
  transition: opacity 700ms ease, visibility 700ms ease;
}

.macbook-stage {
  display: grid;
  place-items: center;
  perspective: 1500px;
}

.macbook {
  position: relative;
  width: min(72vw, 980px);
  height: 520px;
  transform-style: preserve-3d;
  animation: settle 2.5s ease forwards;
}

.lid {
  position: absolute;
  left: 7%;
  bottom: 118px;
  width: 86%;
  height: 420px;
  border: 12px solid #1d2230;
  border-radius: 24px 24px 14px 14px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.13), transparent 22%),
    url("assets/wallpaper.png") center / cover;
  box-shadow: 0 42px 130px rgba(0, 0, 0, 0.58), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  transform-origin: bottom center;
  transform: rotateX(-88deg);
  animation: openLid 2.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.screen-glow {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: radial-gradient(circle at 48% 44%, rgba(255, 255, 255, 0.72), transparent 18%);
  mix-blend-mode: screen;
  opacity: 0;
  animation: glowIn 2.8s ease forwards;
}

.apple-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.base {
  position: absolute;
  left: 1%;
  bottom: 44px;
  width: 98%;
  height: 110px;
  border-radius: 18px 18px 40px 40px;
  background: linear-gradient(180deg, #dfe3ea, #8f98a7 64%, #555d6b);
  box-shadow: 0 44px 90px rgba(0, 0, 0, 0.5);
  transform: rotateX(64deg);
}

.trackpad {
  position: absolute;
  left: 50%;
  top: 22px;
  width: 30%;
  height: 46px;
  transform: translateX(-50%);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(0, 0, 0, 0.14);
}

.lockscreen {
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(8, 11, 18, 0.12), rgba(8, 11, 18, 0.32)),
    url("assets/wallpaper.png") center / cover;
}

.lock-panel {
  display: grid;
  justify-items: center;
  gap: 16px;
  width: 420px;
  padding: 36px 34px;
  color: white;
  text-align: center;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.38);
}

.avatar {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.7), transparent 18%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.36);
  backdrop-filter: blur(28px);
  box-shadow: inset 0 1px 18px rgba(255, 255, 255, 0.22), 0 18px 58px rgba(0, 0, 0, 0.24);
  font-size: 46px;
  font-weight: 650;
}

.date-line {
  margin: 0;
  font-size: 18px;
  opacity: 0.82;
}

.lock-panel h1 {
  margin: 0;
  font-size: 44px;
  font-weight: 680;
  letter-spacing: 0;
}

#nameForm {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

#nameInput {
  width: 100%;
  height: 48px;
  padding: 0 18px;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 24px;
  outline: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.1)),
    radial-gradient(circle at 16% 0%, rgba(255, 255, 255, 0.46), transparent 32%);
  backdrop-filter: blur(28px) saturate(1.5);
  box-shadow: inset 0 1px 18px rgba(255, 255, 255, 0.14);
}

#nameInput::placeholder {
  color: rgba(255, 255, 255, 0.66);
}

#nameForm button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.6), transparent 20%),
    rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(28px) saturate(1.6);
}

.desktop {
  background:
    linear-gradient(rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.04)),
    url("assets/wallpaper.png") center / cover;
}

.menu-bar {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: 0;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 16px;
  height: 32px;
  padding: 0 18px;
  color: rgba(255, 255, 255, 0.94);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(20, 28, 42, 0.28)),
    rgba(16, 21, 31, 0.22);
  backdrop-filter: blur(24px) saturate(1.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 14px;
}

.apple-button {
  width: 24px;
  height: 24px;
  padding: 0;
  color: white;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.active-app {
  font-weight: 700;
}

.greeting {
  justify-self: center;
  font-weight: 600;
}

.desktop-icons {
  position: absolute;
  top: 66px;
  right: 34px;
  display: grid;
  gap: 20px;
  z-index: 2;
}

.photos-widget,
.mobile-photos-widget {
  position: relative;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08)),
    rgba(17, 23, 34, 0.24);
  backdrop-filter: blur(34px) saturate(1.7);
  box-shadow: inset 0 1px 18px rgba(255, 255, 255, 0.14), 0 18px 48px rgba(0, 0, 0, 0.22);
}

.photos-widget {
  position: absolute;
  z-index: 1;
  display: grid;
  grid-template-columns: 72px 1fr;
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 0 12px;
  left: 48px;
  bottom: calc(var(--dock-height) + 38px);
  width: 250px;
  min-height: 104px;
  padding: 14px;
  text-align: left;
  border-radius: 18px;
}

.photos-stack {
  grid-row: 1 / span 2;
  display: block;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.58);
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
}

.photos-stack img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photos-widget strong,
.mobile-photos-widget strong {
  font-size: 18px;
  line-height: 1.05;
}

.photos-widget small,
.mobile-photos-widget small {
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

.desktop-folder {
  display: grid;
  justify-items: center;
  gap: 7px;
  width: 84px;
  color: white;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.desktop-folder:hover {
  transform: scale(1.08);
}

.desktop-folder:active {
  transform: scale(0.95);
  opacity: 0.8;
}

.desktop-folder span {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(180deg, #68d5ff, #2b7dca);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.28);
}

.desktop-folder span img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}

.desktop-folder strong {
  font-size: 12px;
  font-weight: 500;
}

/* Social window */
.social-window {
  width: 340px;
  height: auto;
  top: 80px;
  right: 140px;
}

.social-window-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-window-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  flex-shrink: 0;
}

.social-window-icon img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.social-open-link {
  text-decoration: none;
  color: inherit;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.social-open-link:hover {
  opacity: 1;
}

.social-window-body {
  padding: 0;
  overflow: hidden;
  border-radius: 0 0 14px 14px;
}

.social-profile-card {
  display: flex;
  flex-direction: column;
}

.social-profile-hero {
  height: 90px;
  display: grid;
  place-items: center;
  position: relative;
}

.social-hero-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  position: absolute;
  bottom: -28px;
}

.social-hero-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.social-profile-info {
  padding: 40px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.social-profile-handle {
  font-size: 1.05em;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
}

.social-profile-desc {
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  line-height: 1.5;
}

.social-profile-cta {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 28px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: white;
  text-decoration: none;
  font-size: 0.88em;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s;
}

.social-profile-cta:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
}

.welcome-card {
  position: absolute;
  left: 48px;
  top: 92px;
  width: 410px;
  padding: 28px;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.28), transparent 34%),
    rgba(16, 21, 31, 0.28);
  backdrop-filter: blur(34px) saturate(1.65) contrast(1.05);
  box-shadow: var(--shadow);
}

.welcome-card p,
.welcome-card h2,
.welcome-card span {
  margin: 0;
}

.welcome-card p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
}

.welcome-card h2 {
  margin-top: 8px;
  font-size: 40px;
  line-height: 1.02;
  letter-spacing: 0;
}

.welcome-card span {
  display: block;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.78);
}

.window-layer {
  position: absolute;
  inset: 44px 28px calc(var(--dock-height) + 12px) 28px;
  pointer-events: none;
}

.floating-layer {
  position: absolute;
  inset: 44px 28px calc(var(--dock-height) + 12px) 28px;
  z-index: 32;
  pointer-events: none;
}

.liquid-glass {
  isolation: isolate;
}

.liquid-glass::before,
.liquid-glass::after,
.dock::before,
.dock::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  border-radius: inherit;
}

.liquid-glass::before,
.dock::before {
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 255, 255, 0.72), transparent 18%),
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.24), transparent 22%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.08) 48%, rgba(255, 255, 255, 0.28));
  mix-blend-mode: screen;
  opacity: 0.78;
  z-index: -1;
}

.liquid-glass::after,
.dock::after {
  inset: 1px;
  background:
    linear-gradient(115deg, transparent 0 22%, rgba(255, 255, 255, 0.28) 28%, transparent 36% 100%),
    radial-gradient(circle at 50% 120%, rgba(255, 255, 255, 0.32), transparent 34%);
  filter: url("#none");
  opacity: 0.55;
  z-index: -1;
}

.app-window {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  grid-template-rows: 42px 1fr;
  width: min(900px, calc(100vw - 112px));
  height: min(620px, calc(100vh - 196px));
  overflow: hidden;
  transform: translate(-50%, -50%) scale(0.96);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(239, 246, 255, 0.48)),
    radial-gradient(circle at 8% 0%, rgba(255, 255, 255, 0.7), transparent 28%);
  backdrop-filter: blur(44px) saturate(1.8) contrast(1.06);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.86), inset 0 -18px 44px rgba(255, 255, 255, 0.16), var(--shadow);
  pointer-events: auto;
  animation: windowIn 260ms cubic-bezier(0.2, 1, 0.2, 1) forwards;
}

.app-window.fullscreen {
  width: calc(100vw - 44px);
  height: calc(100vh - var(--dock-height) - 62px);
}

.window-titlebar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(36, 45, 59, 0.12);
  background: rgba(255, 255, 255, 0.42);
}

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

.traffic button,
.traffic span {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 50%;
}

.close-control {
  background: #ff5f57;
}

.min-control {
  background: #ffbd2e;
}

.full-control {
  background: #28c840;
}

.muted-control {
  opacity: 0.36;
}

.traffic button {
  display: block;
}

.window-titlebar h2 {
  margin: 0;
  font-size: 14px;
  text-align: center;
}

.window-badge {
  color: var(--muted);
  font-size: 13px;
}

.window-content {
  overflow: auto;
  padding: 26px;
}

.window-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: end;
  padding-bottom: 24px;
}

.window-hero p,
.window-hero h3 {
  margin: 0;
}

.window-hero p {
  color: var(--muted);
  font-size: 15px;
}

.window-hero h3 {
  margin-top: 8px;
  max-width: 620px;
  font-size: 34px;
  line-height: 1.06;
  letter-spacing: 0;
}

.metric-stack {
  display: flex;
  gap: 10px;
}

.metric {
  min-width: 96px;
  padding: 12px;
  border: 1px solid rgba(36, 45, 59, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.28)),
    rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 1px 12px rgba(255, 255, 255, 0.35);
}

.metric strong,
.metric span {
  display: block;
}

.metric strong {
  font-size: 22px;
}

.metric span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

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

.project-card {
  display: grid;
  grid-template-columns: 118px 1fr;
  min-height: 154px;
  overflow: hidden;
  border: 1px solid rgba(36, 45, 59, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.34)),
    rgba(255, 255, 255, 0.46);
  box-shadow: inset 0 1px 16px rgba(255, 255, 255, 0.24);
  cursor: pointer;
}

.project-art {
  display: grid;
  place-items: center;
  min-height: 154px;
  color: white;
  font-size: 34px;
  background: var(--accent);
  box-shadow: inset 0 1px 22px rgba(255, 255, 255, 0.48), inset 0 -18px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  position: relative;
}

.project-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-orb {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.82), transparent 25%),
    rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 14px rgba(255, 255, 255, 0.34);
}

.project-info {
  padding: 16px;
}

.project-info h4,
.project-info p {
  margin: 0;
}

.project-info h4 {
  font-size: 17px;
}

.project-info p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.42;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.tag-row span {
  padding: 5px 8px;
  color: rgba(22, 26, 34, 0.72);
  border-radius: 999px;
  background: rgba(36, 45, 59, 0.08);
  font-size: 12px;
}

.project-open-button,
.video-launch-button {
  margin-top: 14px;
  padding: 9px 12px;
  color: white;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #2f7cff, #25d4ff);
  box-shadow: 0 12px 22px rgba(47, 124, 255, 0.2);
  font-size: 12px;
  font-weight: 800;
}

.floating-window {
  position: absolute;
  display: grid;
  grid-template-rows: 42px 1fr;
  overflow: hidden;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(239, 246, 255, 0.5)),
    radial-gradient(circle at 8% 0%, rgba(255, 255, 255, 0.72), transparent 28%);
  backdrop-filter: blur(44px) saturate(1.8) contrast(1.06);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.86), var(--shadow);
  pointer-events: auto;
}

.project-detail-window {
  left: 7%;
  top: 6%;
  width: min(720px, 66vw);
  height: min(600px, 82%);
}

.video-player-window {
  right: 5%;
  bottom: 5%;
  width: min(560px, 44vw);
  height: min(390px, 48%);
}

.project-detail-content,
.video-player-content {
  overflow: auto;
  padding: 22px;
}

.project-detail-hero {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 18px;
  align-items: center;
  padding-bottom: 20px;
}

.project-detail-hero > span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  color: white;
  border-radius: 22px;
  background: var(--accent);
  box-shadow: inset 0 1px 22px rgba(255, 255, 255, 0.48), 0 16px 32px rgba(0, 0, 0, 0.16);
  font-size: 34px;
}

.project-detail-hero p,
.project-detail-hero h3,
.project-detail-hero small,
.project-detail-grid h4,
.project-detail-grid p {
  margin: 0;
}

.project-detail-hero p,
.project-detail-hero small {
  color: var(--muted);
}

.project-detail-hero h3 {
  margin-top: 5px;
  font-size: 32px;
  line-height: 1.05;
}

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

.project-detail-grid section {
  padding: 16px;
  border: 1px solid rgba(36, 45, 59, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.project-detail-grid h4 {
  margin-bottom: 8px;
}

.project-detail-grid p {
  color: var(--muted);
  line-height: 1.46;
}

.no-video-note {
  margin-top: 14px !important;
  font-size: 13px;
}

.project-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.project-photo-grid figure {
  margin: 0;
}

.project-photo-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
}

.project-photo-grid figcaption {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.video-player-content {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 14px;
  background: rgba(11, 14, 23, 0.9);
}

.video-player-content iframe {
  width: 100%;
  height: 100%;
  min-height: 220px;
  border: 0;
  border-radius: 8px;
  background: #05070d;
}

.video-player-meta {
  display: grid;
  gap: 4px;
  color: white;
}

.video-player-meta span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.software-window {
  width: min(1040px, calc(100vw - 112px));
}

.software-content {
  padding: 24px;
}

.software-hero h3 {
  max-width: 700px;
}

.software-groups {
  display: grid;
  gap: 18px;
}

.software-group {
  padding: 18px;
  border: 1px solid rgba(36, 45, 59, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.26)),
    rgba(255, 255, 255, 0.38);
  box-shadow: inset 0 1px 18px rgba(255, 255, 255, 0.22);
}

.software-group header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.software-group-icon,
.software-icon {
  display: grid;
  place-items: center;
  color: white;
  background: var(--accent);
  box-shadow: inset 0 1px 18px rgba(255, 255, 255, 0.48), inset 0 -14px 28px rgba(0, 0, 0, 0.12), 0 10px 22px rgba(0, 0, 0, 0.12);
}

.software-group-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 14px;
  font-weight: 800;
}

.software-group h3,
.software-group p,
.software-group h4 {
  margin: 0;
}

.software-group h3 {
  font-size: 18px;
}

.software-group p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

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

.software-tile {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 9px;
  min-height: 104px;
  padding: 12px 8px;
  text-align: center;
  border: 1px solid rgba(36, 45, 59, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.3)),
    rgba(255, 255, 255, 0.42);
}

.software-tile.compact {
  min-height: 90px;
}

.software-icon {
  position: relative;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border-radius: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.software-icon::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.82), transparent 22%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.34), transparent 42%);
  mix-blend-mode: screen;
}

.software-icon .brand-fallback,
.software-mini .brand-fallback {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  font-size: 15px;
}

.software-tile strong {
  max-width: 100%;
  color: rgba(22, 26, 34, 0.82);
  font-size: 12px;
  line-height: 1.15;
}

.favorite-tools-group {
  border-color: rgba(255, 255, 255, 0.34);
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.52), transparent 26%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.3)),
    rgba(255, 255, 255, 0.44);
}

.favorites-grid {
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
}

.brand-icon {
  background: var(--accent);
}

.brand-icon img {
  position: absolute;
  z-index: 2;
  width: 62%;
  height: 62%;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.22));
}

.about-window {
  width: min(960px, calc(100vw - 112px));
}

.about-content {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 0;
  padding: 0;
}

.settings-sidebar {
  overflow: auto;
  padding: 16px 12px;
  border-right: 1px solid rgba(36, 45, 59, 0.1);
  background: rgba(255, 255, 255, 0.24);
}

.settings-sidebar button {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 7px 9px;
  color: rgba(22, 26, 34, 0.78);
  text-align: left;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.settings-sidebar button.active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 12px rgba(255, 255, 255, 0.28);
}

.settings-sidebar span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: white;
  border-radius: 8px;
  background: linear-gradient(135deg, #2f7cff, #25d4ff);
  font-weight: 800;
}

.settings-sidebar strong {
  font-size: 13px;
}

.settings-pane {
  overflow: auto;
  padding: 24px;
}

.settings-profile {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 24px;
  align-items: center;
}

.about-photo-preview {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.about-photo-preview img,
.photo-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-profile p,
.settings-profile h3,
.settings-profile span {
  margin: 0;
}

.settings-profile p {
  color: var(--muted);
}

.settings-profile h3 {
  margin-top: 8px;
  max-width: 560px;
  font-size: 34px;
  line-height: 1.06;
}

.settings-profile span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.4;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.see-photos-button,
.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  color: white;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #2f7cff, #25d4ff);
  box-shadow: 0 12px 24px rgba(47, 124, 255, 0.24);
  font-weight: 700;
  text-decoration: none;
}

.settings-prose {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.settings-prose p,
.cv-entry {
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(36, 45, 59, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--muted);
  line-height: 1.44;
}

.settings-list h3 {
  margin: 0 0 14px;
  font-size: 32px;
}

.settings-list ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.settings-list li {
  color: rgba(22, 26, 34, 0.74);
  line-height: 1.45;
}

.cv-entry + .cv-entry {
  margin-top: 12px;
}

.cv-entry-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.cv-entry h4,
.cv-entry p {
  margin: 0;
}

.cv-entry h4 {
  color: var(--ink);
  font-size: 18px;
}

.cv-entry p,
.cv-entry-head span {
  color: var(--muted);
}

.cv-entry-head span {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
}

.photo-gallery {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.photo-gallery.visible {
  display: grid;
}

.photo-gallery figure {
  margin: 0;
}

.photo-gallery figure img {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
}

.photo-gallery figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.familiar-block {
  margin-top: 16px;
}

.familiar-block h4 {
  margin-bottom: 10px;
  color: rgba(22, 26, 34, 0.62);
  font-size: 12px;
  text-transform: uppercase;
}

.compact-grid {
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}

.dock {
  position: absolute;
  z-index: 25;
  left: 50%;
  bottom: 18px;
  display: flex;
  align-items: end;
  gap: 14px;
  max-width: calc(100vw - 56px);
  min-height: var(--dock-height);
  padding: 12px 18px 14px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 24px;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.16)),
    radial-gradient(circle at 30% 0%, rgba(255, 255, 255, 0.66), transparent 28%),
    rgba(247, 249, 255, 0.32);
  backdrop-filter: blur(42px) saturate(1.85) contrast(1.08);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.9), inset 0 -22px 44px rgba(255, 255, 255, 0.12), 0 22px 70px rgba(0, 0, 0, 0.32);
}

.dock button {
  position: relative;
  display: grid;
  grid-template-rows: 74px 18px;
  place-items: center;
  gap: 6px;
  width: 76px;
  height: 98px;
  padding: 0;
  color: white;
  border: 0;
  background: transparent;
  transition: transform 160ms ease, filter 160ms ease;
}

.dock button:hover,
.dock button.active {
  transform: translateY(-12px) scale(1.05);
  filter: saturate(1.1) brightness(1.05);
}

.dock button::after {
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 4px;
  height: 4px;
  content: "";
  transform: translateX(-50%);
  border-radius: 50%;
  background: transparent;
}

.dock button.active::after {
  background: rgba(255, 255, 255, 0.86);
}

.app-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  background: var(--accent);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.92),
    inset 0 -22px 34px rgba(0, 0, 0, 0.16),
    inset 0 22px 34px rgba(255, 255, 255, 0.18),
    0 13px 26px rgba(0, 0, 0, 0.24);
}

.app-icon::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 28% 16%, rgba(255, 255, 255, 0.82), transparent 19%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.48), transparent 38% 100%);
  mix-blend-mode: screen;
}

.icon-sheen {
  position: absolute;
  left: -28%;
  top: -42%;
  width: 88%;
  height: 140%;
  transform: rotate(22deg);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.04));
  filter: blur(1px);
}

.icon-symbol {
  position: relative;
  z-index: 1;
  color: white;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.24);
  font-size: 29px;
  font-weight: 760;
  line-height: 1;
}

.brand-app-icon img {
  position: absolute;
  z-index: 2;
  width: 62%;
  height: 62%;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.24));
}

.icon-name {
  max-width: 88px;
  color: white;
  text-align: center;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.54);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.05;
}

.ios-home {
  display: none;
}

.swipe-unlock {
  display: none;
}

@keyframes openLid {
  0% {
    transform: rotateX(-88deg);
  }
  100% {
    transform: rotateX(-8deg);
  }
}

@keyframes settle {
  0% {
    transform: translateY(42px) scale(0.96);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes glowIn {
  48% {
    opacity: 0;
  }
  100% {
    opacity: 0.42;
  }
}

@keyframes windowIn {
  to {
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (max-width: 1024px) {
  :root {
    --dock-height: 0px;
  }

  body {
    overflow: hidden;
  }

  .portfolio-shell {
    min-width: 0;
    min-height: 100svh;
    height: 100svh;
  }

  .macbook-stage {
    display: none;
  }

  .lockscreen {
    display: grid;
    padding: 18px;
  }

  .lock-panel {
    align-content: end;
    width: min(100%, 460px);
    min-height: 100%;
    padding: 0 8px 38px;
  }

  .avatar {
    width: 86px;
    height: 86px;
    font-size: 38px;
  }

  .lock-panel h1 {
    font-size: 34px;
  }

  #nameForm {
    display: grid;
    gap: 12px;
  }

  #nameInput {
    height: 54px;
    text-align: center;
    font-size: 18px;
  }

  #nameForm > button {
    display: none;
  }

  .swipe-unlock {
    --swipe-progress: 0;
    position: relative;
    display: block;
    width: 100%;
    height: 58px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 29px;
    background:
      linear-gradient(90deg, rgba(255, 255, 255, calc(0.1 + var(--swipe-progress) * 0.22)), rgba(255, 255, 255, 0.08)),
      rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(28px) saturate(1.6);
  }

  .swipe-unlock .swipe-label {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.78);
    font-size: 16px;
  }

  .swipe-unlock button {
    position: absolute;
    left: 3px;
    top: 3px;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    color: #111722;
    background:
      radial-gradient(circle at 30% 18%, #ffffff, rgba(255, 255, 255, 0.65) 44%, rgba(255, 255, 255, 0.28)),
      rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 1px 10px rgba(255, 255, 255, 0.7), 0 8px 26px rgba(0, 0, 0, 0.22);
    touch-action: none;
  }

  .desktop {
    background:
      linear-gradient(rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.2)),
      url("assets/wallpaper.png") center / cover;
  }

  .menu-bar,
  .desktop-icons,
  .photos-widget,
  .welcome-card,
  .dock {
    display: none;
  }

  .ios-home {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-rows: 58px 1fr 18px 24px;
    padding: env(safe-area-inset-top) 14px env(safe-area-inset-bottom);
    color: white;
    overflow: hidden;
  }

  .ios-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
  }

  .ios-slide-track {
    display: flex;
    width: 200%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    transition: transform 320ms cubic-bezier(0.2, 1, 0.2, 1);
    touch-action: pan-y;
  }

  .ios-slide {
    position: relative;
    width: 50%;
    min-width: 50%;
    min-height: 0;
    overflow: hidden;
    padding-top: 14px;
  }

  .ios-skills {
    align-content: start;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px 14px;
    padding-top: 18px;
  }

  .ios-skills button {
    display: grid;
    justify-items: center;
    gap: 8px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .ios-skills .app-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
  }

  .ios-skills .icon-name {
    width: 76px;
    font-size: 12px;
  }

  .ios-home-indicator {
    justify-self: center;
    align-self: end;
    width: 134px;
    height: 5px;
    margin-bottom: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
  }

  .ios-page-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
  }

  .ios-page-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.38);
  }

  .ios-page-dots span.active {
    background: rgba(255, 255, 255, 0.9);
  }

  .mobile-photos-widget {
    display: grid;
    grid-template-columns: 82px 1fr;
    grid-template-rows: 1fr auto;
    align-items: center;
    gap: 0 14px;
    width: 100%;
    min-height: 112px;
    padding: 14px;
    text-align: left;
    border-radius: 22px;
  }

  .mobile-app-library {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 22px;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08)),
      rgba(18, 24, 36, 0.3);
    backdrop-filter: blur(32px) saturate(1.75);
    box-shadow: inset 0 1px 20px rgba(255, 255, 255, 0.18), 0 18px 46px rgba(0, 0, 0, 0.24);
  }

  .mobile-library-header {
    display: grid;
    grid-template-columns: 46px 1fr;
    align-items: center;
    gap: 10px;
    padding: 12px;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }

  .mobile-library-header span {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: linear-gradient(135deg, #f6f8ff, #79d7ff 48%, #6a63ff);
    box-shadow: inset 0 1px 14px rgba(255, 255, 255, 0.58);
    font-size: 23px;
  }

  .mobile-library-header strong,
  .mobile-library-header small {
    display: block;
  }

  .mobile-library-header strong {
    font-size: 18px;
  }

  .mobile-library-header small {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
  }

  .mobile-software-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 14px 12px 18px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  .mobile-software-list::-webkit-scrollbar {
    display: none;
  }

  .mobile-software-group {
    display: grid;
    gap: 10px;
    margin-bottom: 22px;
  }

  .mobile-software-group h3 {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
  }

  .mobile-software-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 10px;
  }

  .software-mini {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 0;
    color: white;
    border: 0;
    background: transparent;
  }

  .software-mini > span {
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 15px;
    background: var(--accent);
    box-shadow: inset 0 1px 14px rgba(255, 255, 255, 0.48), inset 0 -12px 22px rgba(0, 0, 0, 0.12), 0 8px 18px rgba(0, 0, 0, 0.18);
    font-size: 13px;
    font-weight: 800;
  }

  .software-mini small {
    width: 68px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.52);
    font-size: 10px;
    font-weight: 650;
  }

  .software-mini img {
    position: absolute;
    z-index: 2;
    width: 62%;
    height: 62%;
    object-fit: contain;
  }

  .window-layer {
    inset: 0;
    z-index: 30;
  }

  .floating-layer {
    inset: 0;
    z-index: 42;
  }

  .app-window,
  .app-window.fullscreen {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: min(86svh, 760px);
    transform: translateY(100%);
    border-radius: 22px 22px 0 0;
    animation: sheetIn 280ms cubic-bezier(0.2, 1, 0.2, 1) forwards;
  }

  .floating-window {
    left: 0;
    right: auto;
    bottom: 0;
    top: auto;
    width: 100vw;
    max-width: none;
    transform: translateY(100%);
    border-radius: 22px 22px 0 0;
    animation: sheetIn 280ms cubic-bezier(0.2, 1, 0.2, 1) forwards;
  }

  .project-detail-window {
    height: min(88svh, 780px);
  }

  .video-player-window {
    height: min(58svh, 520px);
  }

  .project-detail-content,
  .video-player-content {
    padding: 18px;
  }

  .project-detail-hero {
    grid-template-columns: 66px 1fr;
  }

  .project-detail-hero > span {
    width: 66px;
    height: 66px;
    border-radius: 18px;
    font-size: 28px;
  }

  .project-detail-hero h3 {
    font-size: 26px;
  }

  .project-photo-grid {
    grid-template-columns: 1fr;
  }

  .video-player-content iframe {
    min-height: 190px;
  }

  .window-titlebar {
    height: 48px;
  }

  .window-content {
    padding: 20px;
  }

  .window-hero {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .window-hero h3 {
    font-size: 28px;
  }

  .metric-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .project-card {
    grid-template-columns: 96px 1fr;
  }

  .project-art {
    min-height: 136px;
  }

  .software-window,
  .about-window,
  .software-window.fullscreen {
    height: min(90svh, 800px);
  }

  .software-content {
    padding: 18px;
  }

  .software-grid,
  .compact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .software-tile {
    min-height: 96px;
    padding: 10px 6px;
  }

  .software-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .settings-content {
    grid-template-columns: 138px 1fr;
    padding: 0;
  }

  .settings-sidebar {
    padding: 12px 8px;
  }

  .settings-sidebar button {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 5px;
    padding: 8px 4px;
    text-align: center;
  }

  .settings-sidebar strong {
    font-size: 11px;
  }

  .settings-pane {
    padding: 18px;
  }

  .settings-profile {
    grid-template-columns: 1fr;
  }

  .settings-profile h3 {
    font-size: 28px;
  }

  .settings-prose,
  .photo-gallery {
    grid-template-columns: 1fr;
  }

  .cv-entry-head {
    display: grid;
  }

  @keyframes sheetIn {
    to {
      transform: translateY(0);
    }
  }

  @media (max-width: 380px) {
    .ios-skills {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 20px 10px;
    }
  }
}

@media (min-width: 1025px) and (max-height: 720px) {
  :root {
    --dock-height: 98px;
  }

  .dock {
    gap: 10px;
    min-height: 96px;
    padding: 10px 14px 12px;
  }

  .dock button {
    grid-template-rows: 60px 16px;
    width: 64px;
    height: 80px;
  }

  .dock .app-icon {
    width: 58px;
    height: 58px;
    border-radius: 15px;
  }

  .dock .icon-symbol {
    font-size: 24px;
  }
}
