/* =====================================================================
   Hafiz - Web Developer (Vibe Coding) Portfolio
   Layout inspired by yusufjuanda.vercel.app, visual design inspired by
   muhammad-sufyan-portfolio.vercel.app (Poppins + purple #6c5ce7).
   ===================================================================== */

:root {
  --primary: #6c5ce7;
  --primary-2: #8b7cf6;
  --primary-dark: #5646d6;
  --pink: #e056a0;
  --sky: #4fa3ff;

  --bg: #ffffff;
  --bg-soft: #f6f5ff;
  --card: #ffffff;
  --text: #111118;
  --muted: #6b6b7b;
  --muted-2: #a0a0b0;
  --line: #e6e4f2;
  --ghost: rgba(17, 17, 24, .07);
  --shadow: 0 10px 30px rgba(108, 92, 231, .10), 0 2px 8px rgba(0, 0, 0, .04);
  --shadow-lg: 0 30px 60px rgba(108, 92, 231, .18);
  --nav-bg: rgba(255, 255, 255, .72);

  --radius: 18px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --container: 1180px;
}

html[data-theme="dark"] {
  --bg: #0d0d14;
  --bg-soft: #14131f;
  --card: #17162a;
  --text: #f2f1fb;
  --muted: #a7a6bb;
  --muted-2: #6f6e86;
  --line: #262541;
  --ghost: rgba(255, 255, 255, .06);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35), 0 2px 8px rgba(0, 0, 0, .3);
  --shadow-lg: 0 30px 60px rgba(0, 0, 0, .5);
  --nav-bg: rgba(13, 13, 20, .72);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* NB: no CSS scroll-behavior:smooth - it breaks ScrollTrigger.refresh(); anchor links smooth-scroll via JS */
body {
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background .4s ease, color .4s ease;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.section { position: relative; padding: 110px 0; scroll-margin-top: 70px; }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--primary);
  display: grid; place-items: center;
  color: #fff;
}
.preloader__inner { text-align: center; }
.preloader__word { display: flex; gap: .05em; font-size: clamp(48px, 8vw, 96px); font-weight: 800; letter-spacing: .06em; }
.preloader__word span { display: inline-block; transform: translateY(110%); opacity: 0; }
.preloader__bar { height: 3px; width: 200px; margin: 18px auto 0; background: rgba(255,255,255,.25); border-radius: 4px; overflow: hidden; }
.preloader__bar i { display: block; height: 100%; width: 0; background: #fff; border-radius: 4px; }

/* ---------- Background blobs ---------- */
.bg-blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55;
  will-change: transform;
}
.blob--1 { width: 60vw; height: 60vw; left: -20vw; top: -10vw; background: radial-gradient(circle, #c9b8ff 0%, #b9c8ff 45%, transparent 70%); }
.blob--2 { width: 50vw; height: 50vw; right: -18vw; top: 5vh;  background: radial-gradient(circle, #c5d7ff 0%, #d8c4ff 50%, transparent 72%); }
.blob--3 { width: 45vw; height: 45vw; left: 30vw; bottom: -25vw; background: radial-gradient(circle, #ffc9ea 0%, #d9c9ff 50%, transparent 72%); }
html[data-theme="dark"] .blob { opacity: .28; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 12px; font-weight: 600; font-size: 15px;
  letter-spacing: .02em; transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s, color .3s, border-color .3s;
  will-change: transform; position: relative; overflow: hidden;
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .35s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn--primary { background: var(--primary); color: #fff; box-shadow: 0 10px 24px rgba(108,92,231,.35); }
.btn--primary:hover { background: var(--primary-dark); box-shadow: 0 16px 34px rgba(108,92,231,.45); }
.btn--outline { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn--outline:hover { background: var(--primary); color: #fff; }
.btn--sm { padding: 10px 18px; font-size: 13px; border-radius: 9px; }
.btn--lg { padding: 18px 34px; font-size: 16px; }
.btn--sm svg { width: 14px; height: 14px; }

/* ---------- Navbar ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 0; transition: padding .35s var(--ease), background .35s, box-shadow .35s, backdrop-filter .35s;
}
.nav.is-scrolled { padding: 10px 0; }
/* blur lives on a pseudo-element: backdrop-filter on .nav itself would trap the fixed mobile drawer inside the header */
.nav::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--nav-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 2px 20px rgba(0,0,0,.06); opacity: 0; transition: opacity .35s; }
.nav.is-scrolled::before { opacity: 1; }
.nav__inner { display: flex; align-items: center; gap: 28px; }
.nav__logo { display: flex; align-items: center; font-weight: 700; font-size: 22px; color: var(--primary); }
.nav__logo-mark { display: none; } /* old cached markup */
.nav__links { display: flex; align-items: center; gap: 30px; font-weight: 500; font-size: 15px; }
.nav__links a { position: relative; padding: 4px 0; color: var(--text); transition: color .3s; }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 100%; background: var(--primary); transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav__links a.is-active { color: var(--primary); }
.nav__cv { display: none; background: var(--text); color: var(--bg) !important; padding: 8px 16px !important; border-radius: 10px; font-weight: 600; }
.nav__cv::after { display: none; }
.nav.is-scrolled .nav__cv { display: inline-block; }
.nav__actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.nav__icon { width: 40px; height: 40px; display: grid; place-items: center; color: var(--text); border-radius: 50%; transition: background .3s, color .3s; }
.nav__icon svg { width: 22px; height: 22px; }
.nav__icon:hover { background: var(--bg-soft); color: var(--primary); }

.theme-toggle { position: relative; width: 54px; height: 30px; border-radius: 30px; background: var(--bg-soft); border: 1px solid var(--line); box-shadow: inset 0 1px 3px rgba(0,0,0,.08); }
.theme-toggle__knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--text); transition: transform .4s var(--ease), background .3s; }
html[data-theme="dark"] .theme-toggle__knob { transform: translateX(24px); }
.theme-toggle svg { position: absolute; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); color: var(--muted); }
.theme-toggle__sun { right: 8px; }
.theme-toggle__moon { left: 8px; }

.nav__burger { display: none; flex-direction: column; gap: 5px; width: 40px; height: 40px; align-items: center; justify-content: center; }
.nav__burger span { width: 22px; height: 2px; background: var(--text); transition: transform .3s, opacity .3s; }
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Floating social + dot nav ---------- */
.social-float { position: fixed; left: 24px; top: 50%; transform: translateY(-50%); z-index: 90; display: flex; flex-direction: column; gap: 14px; }
.social-float a {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); color: var(--primary); box-shadow: var(--shadow); position: relative;
  transition: transform .35s var(--ease), background .3s, color .3s;
}
.social-float a svg { width: 18px; height: 18px; }
.social-float a:hover { transform: translateX(6px) scale(1.08); background: var(--primary); color: #fff; }
.social-float a::after, .dot-nav a::after {
  content: attr(data-tip); position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%) translateX(-6px);
  background: var(--text); color: var(--bg); font-size: 12px; padding: 4px 10px; border-radius: 6px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.social-float a:hover::after { opacity: 1; transform: translateY(-50%) translateX(0); }

.dot-nav { position: fixed; right: 26px; top: 50%; transform: translateY(-50%); z-index: 90; display: flex; flex-direction: column; gap: 14px; }
.dot-nav a { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); position: relative; transition: transform .3s var(--ease), background .3s; }
.dot-nav a.is-active { background: var(--primary); transform: scale(1.5); }
.dot-nav a::after { left: auto; right: calc(100% + 14px); transform: translateY(-50%) translateX(6px); }
.dot-nav a:hover::after { opacity: 1; transform: translateY(-50%) translateX(0); }

/* ---------- Section title with ghost text (Sufyan) ---------- */
.section-title { position: relative; text-align: center; font-size: clamp(32px, 4.5vw, 46px); font-weight: 700; line-height: 1.1; margin-bottom: 14px; }
.section-title span { position: relative; z-index: 1; display: inline-block; }
.section-title::before {
  content: attr(data-ghost); position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -62%); font-size: 1.9em; font-weight: 800; white-space: nowrap;
  color: transparent; background: linear-gradient(180deg, var(--ghost), transparent 85%);
  -webkit-background-clip: text; background-clip: text; letter-spacing: .02em; pointer-events: none;
}
.section-sub { text-align: center; color: var(--muted); max-width: 560px; margin: 0 auto 54px; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 140px 0 60px; text-align: center; overflow: hidden; }
.hero__inner { position: relative; z-index: 2; padding-bottom: 210px; }
@media (max-width: 640px) { .hero__inner { padding-bottom: 170px; } }
.hero__kicker { font-weight: 600; letter-spacing: .12em; color: var(--muted-2); font-size: clamp(12px, 1.3vw, 15px); margin-bottom: 8px; text-transform: none; }
.hero__title { font-size: clamp(44px, 8.6vw, 108px); font-weight: 800; line-height: .98; letter-spacing: -.03em; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .22em; }
.hero__title-line { display: inline-block; white-space: nowrap; }
.hero__title-line--grad { color: var(--primary); filter: drop-shadow(0 8px 30px rgba(108, 92, 231, .35)); }
.hero__title .char { display: inline-block; will-change: transform; }
.hero__sub { margin: 22px auto 30px; max-width: 620px; color: var(--muted); letter-spacing: .03em; font-size: clamp(14px, 1.3vw, 17px); }
.hero__sub strong { color: var(--text); font-weight: 600; }
.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero__tools { position: absolute; left: 50%; bottom: 9%; width: min(760px, 92%); height: 210px; transform: translateX(-50%); z-index: 1; pointer-events: none; }
.hero__tools .tool-wrap { position: absolute; left: var(--x); top: var(--y); animation: floaty 5.5s ease-in-out infinite; animation-delay: var(--d); }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-14px) rotate(4deg); } }

.tool {
  width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
  font-weight: 700; font-size: 17px; letter-spacing: -.02em; color: #fff;
  box-shadow: 0 12px 26px rgba(0,0,0,.14);
}
.tool svg { width: 28px; height: 28px; }
.tool--cc  { background: #d97757; color: #fff; }
.tool--cu  { background: #111; color: #fff; }
.tool--nx  { background: #fff; color: #000; border: 1px solid #ddd; }
.tool--tw  { background: #0f172a; color: #38bdf8; }
.tool--js  { background: #f7df1e; color: #111; }
.tool--sb  { background: #1c1c1c; color: #3ecf8e; }
.tool--vc  { background: #fff; color: #000; border: 1px solid #ddd; }
.tool--gh  { background: #24292f; color: #fff; }


.hero__scroll { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--muted); z-index: 2; }
.hero__scroll i { width: 26px; height: 26px; color: var(--primary); animation: bob 1.8s ease-in-out infinite; }
.hero__scroll svg { width: 26px; height: 26px; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 16px 0; background: var(--bg-soft); }
.marquee__track { display: flex; gap: 34px; width: max-content; white-space: nowrap; font-weight: 600; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); will-change: transform; }
.marquee__track i { color: var(--primary); font-style: normal; }

/* ---------- Skills - stacked cards ---------- */
.skills { padding-bottom: 60px; }
.stack { position: relative; display: grid; gap: 34px; max-width: 820px; margin: 0 auto; }
.stack__card {
  position: sticky; top: 110px;
  display: grid; grid-template-columns: 1fr 1fr; min-height: 380px;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  box-shadow: var(--shadow-lg); transform-origin: top center; will-change: transform;
}
.stack__media { position: relative; overflow: hidden; display: grid; place-items: center; }
.stack__glyph { position: relative; z-index: 1; font-size: 88px; font-weight: 800; letter-spacing: -.04em; color: #fff; text-shadow: 0 14px 40px rgba(0,0,0,.3); }
.stack__glyph svg { width: 120px; height: 120px; }
.stack__orbit { position: absolute; width: 260px; height: 260px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.35); animation: spin 18s linear infinite; }
.stack__orbit::before { content: ""; position: absolute; top: -8px; left: 50%; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 20px #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.stack__media--cc { background: linear-gradient(135deg, #7a3419, #d97757); }
.stack__media--cu { background: linear-gradient(135deg, #0a0a0a, #4b4b6b); }
.stack__media--nx { background: linear-gradient(135deg, #000, #3a3a3a); }
.stack__media--tw { background: linear-gradient(135deg, #0f172a, #0ea5e9); }
.stack__media--sb { background: linear-gradient(135deg, #0b3d2e, #3ecf8e); }
.stack__media--vc { background: linear-gradient(135deg, #111, #6c5ce7); }
.stack__body { padding: 44px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 12px; }
.stack__body h3 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.stack__body p { color: var(--muted); font-size: 15px; }
.level { width: 100%; height: 6px; border-radius: 6px; background: var(--bg-soft); overflow: hidden; margin: 6px 0 8px; }
.level span { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--primary), var(--pink)); transition: width 1.2s var(--ease); }
.level.is-in span { width: var(--w); }

/* ---------- Vertical line connector ---------- */
.vline { display: flex; justify-content: center; height: 160px; }
.vline span { width: 2px; height: 100%; background: var(--line); position: relative; overflow: hidden; }
.vline span::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--primary), var(--pink)); transform: scaleY(0); transform-origin: top; transition: transform 1.2s var(--ease); }
.vline.is-in span::after { transform: scaleY(1); }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 70px; align-items: center; margin-top: 60px; }
.about__photo { position: relative; justify-self: center; }
.about__photo-frame { position: relative; width: min(380px, 80vw); aspect-ratio: 4 / 5; }
.about__photo-frame::before { content: ""; position: absolute; inset: 6% -6% -4% 6%; border-radius: 26px; background: linear-gradient(160deg, var(--primary), var(--primary-2) 60%, #d9c9ff); }
.about__photo-img { position: relative; height: 100%; border-radius: 22px; overflow: hidden; background: #1a1830; box-shadow: var(--shadow-lg); transform: rotate(-5deg); transition: transform .6s var(--ease); }
.about__photo:hover .about__photo-img { transform: rotate(0) scale(1.02); }
.about__photo-img img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.about__photo-placeholder { position: absolute; inset: 0; display: grid; place-items: center; font-size: 160px; font-weight: 800; color: rgba(255,255,255,.12); background: radial-gradient(circle at 30% 20%, #4a3ea8, #1a1830 60%); }
.about__badge { position: absolute; right: -10px; bottom: 26px; background: var(--card); color: var(--text); padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow); font-size: 13px; border-left: 3px solid var(--primary); animation: floaty 5s ease-in-out infinite; }
.about__text h3 { font-size: clamp(26px, 3vw, 34px); font-weight: 700; }
.about__text h4 { font-size: clamp(18px, 2vw, 22px); font-weight: 600; margin: 4px 0 20px; }
.about__text em { font-style: normal; color: var(--primary); }
.about__text p { color: var(--muted); }
.stats { display: flex; gap: 40px; padding: 26px 0; margin: 26px 0; border-block: 1px solid var(--line); }
.stat b { display: block; font-size: 40px; color: var(--primary); font-weight: 800; line-height: 1; }
.stat b::after { content: "+"; }
.stat span { display: block; margin-top: 8px; font-size: 14px; font-weight: 500; }

/* ---------- Works ---------- */
.browser { border-radius: 16px; overflow: hidden; background: var(--card); box-shadow: var(--shadow-lg); border: 1px solid var(--line); margin-bottom: 60px; }
.browser__bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.browser__dot { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.browser__dot:nth-child(2) { background: #febc2e; }
.browser__dot:nth-child(3) { background: #28c840; }
.browser__url { margin-left: 14px; flex: 1; text-align: center; font-size: 12px; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 5px 12px; }
.browser__nav { display: flex; gap: 10px; color: var(--muted-2); font-style: normal; }
.browser__body { position: relative; background: #0f0e1c; }

/* Vibe coding session mockup (interactive) */
.vibe { display: grid; grid-template-columns: 1fr 1.25fr; min-height: 500px; font-family: "JetBrains Mono", ui-monospace, monospace; color: #e6e4f2; position: relative; }
.vibe__chat { display: flex; flex-direction: column; border-right: 1px solid rgba(255,255,255,.08); background: #12111f; font-family: "Poppins", sans-serif; font-size: 13.5px; min-width: 0; }
.vibe__log { flex: 1; padding: 24px 22px 10px; display: flex; flex-direction: column; gap: 18px; overflow: hidden; }
.vibe__msg { display: flex; gap: 12px; align-items: flex-start; }
.vibe__msg p { line-height: 1.55; word-break: break-word; }
.vibe__avatar { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.vibe__avatar--ai { background: #d97757; }
.vibe__avatar svg { width: 16px; height: 16px; }
.vibe__msg--ai { opacity: 0; }
.vibe__msg--ai b { color: #c4b8ff; font-weight: 600; }
.vibe__caret { display: inline-block; width: 2px; height: 1em; background: #fff; vertical-align: -2px; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.vibe__steps { margin-top: 12px; display: grid; gap: 8px; color: #a7a6bb; font-size: 12.5px; }
.vibe__steps li { display: flex; align-items: center; gap: 10px; opacity: 0; }
.vibe__steps li i { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #5c5b73; position: relative; flex: none; transition: background .3s, border-color .3s; }
.vibe__steps li i::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform .3s var(--ease); }
.vibe__steps li.is-done { color: #e6e4f2; }
.vibe__steps li.is-done i { background: #3ecf8e; border-color: #3ecf8e; }
.vibe__steps li.is-done i::after { transform: rotate(45deg) scale(1); }
.vibe__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 22px 0; }
.vibe__chips button { font: inherit; font-size: 11.5px; color: #c4b8ff; background: rgba(108,92,231,.14); border: 1px solid rgba(108,92,231,.35); padding: 5px 10px; border-radius: 20px; transition: background .25s, color .25s, transform .25s var(--ease); }
.vibe__chips button:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.vibe__form { display: flex; gap: 8px; padding: 12px 22px 20px; }
.vibe__form input { flex: 1; min-width: 0; font: inherit; font-size: 13px; color: #fff; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 11px 14px; outline: none; transition: border-color .25s, box-shadow .25s; }
.vibe__form input::placeholder { color: #6f6e86; }
.vibe__form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,92,231,.25); }
.vibe__form button { width: 42px; height: 42px; flex: none; border-radius: 10px; background: var(--primary); color: #fff; display: grid; place-items: center; transition: background .25s, transform .25s var(--ease); }
.vibe__form button:hover { background: var(--primary-dark); transform: translateX(2px); }
.vibe__form button svg { width: 18px; height: 18px; }
.vibe__form.is-busy button { opacity: .5; pointer-events: none; }
.vibe__code { padding: 18px 22px 22px; font-size: 12.5px; line-height: 1.75; overflow: hidden; min-width: 0; }
.vibe__tab { display: inline-block; font-size: 11px; color: #a7a6bb; background: rgba(255,255,255,.06); padding: 4px 12px; border-radius: 6px 6px 0 0; margin-bottom: 8px; border-bottom: 2px solid var(--primary); }
.vibe__code pre { margin: 0; white-space: pre; font-family: inherit; }
.vibe__code .line { display: block; opacity: 0; }
.c-k { color: #c792ea; } .c-f { color: #82aaff; } .c-n { color: #ffcb6b; } .c-t { color: #f07178; } .c-a { color: #c3e88d; } .c-s { color: #89ddff; }
.vibe__preview { position: absolute; right: 22px; bottom: 22px; width: min(46%, 300px); aspect-ratio: 4 / 3; background: #fff; border-radius: 10px; box-shadow: 0 30px 60px rgba(0,0,0,.5); padding: 10px; opacity: 0; transform: translateY(30px) scale(.95); }
.vibe__preview-body { height: 100%; display: flex; flex-direction: column; gap: 8px; }
.vp__nav { display: flex; align-items: center; gap: 6px; }
.vp__nav span { width: 28px; height: 8px; border-radius: 4px; background: var(--primary); margin-right: auto; }
.vp__nav i { width: 16px; height: 5px; border-radius: 3px; background: #ddd; }
.vp__hero { flex: 1; border-radius: 6px; background: linear-gradient(135deg, #eee9ff, #f6f5ff); padding: 10px; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.vp__hero b { width: 60%; height: 9px; border-radius: 4px; background: #222; display: block; }
.vp__hero em { width: 80%; height: 5px; border-radius: 3px; background: #bbb; display: block; }
.vp__hero u { width: 30%; height: 10px; border-radius: 4px; background: var(--primary); display: block; margin-top: 4px; }
.vp__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.vp__grid span { height: 26px; border-radius: 5px; background: #f0eefc; border: 1px solid #e3e0f7; }
.vp__grid--2 { grid-template-columns: repeat(2, 1fr); flex: 1; }
.vp__grid--2 span { height: auto; }
.vp__grid--products { grid-template-columns: repeat(3, 1fr); flex: 1; }
.vp__grid--products span { height: auto; background: linear-gradient(180deg, #e9e6fb 60%, #fff 60%); }
.vp__dash { flex: 1; display: grid; grid-template-columns: 22% 1fr; gap: 6px; }
.vp__dash aside { border-radius: 5px; background: #1a1830; }
.vp__dash section { display: flex; flex-direction: column; gap: 6px; }
.vp__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.vp__stats span { height: 22px; border-radius: 4px; background: #f0eefc; border-left: 3px solid var(--primary); }
.vp__chart { flex: 1; border-radius: 5px; background: #f6f5ff; display: flex; align-items: flex-end; gap: 4px; padding: 6px; }
.vp__chart i { flex: 1; background: var(--primary); border-radius: 2px 2px 0 0; opacity: .8; }
.vp__rows { display: grid; gap: 4px; }
.vp__rows i { height: 6px; border-radius: 3px; background: #e6e4f2; }
.vp__cal { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.vp__cal i { border-radius: 3px; background: #f0eefc; }
.vp__cal i.on { background: var(--primary); }
.vp__post { flex: 1; display: grid; grid-template-columns: 1fr 34%; gap: 6px; }
.vp__post section { display: grid; gap: 5px; align-content: start; }
.vp__post section i { height: 6px; border-radius: 3px; background: #e6e4f2; }
.vp__post section i:first-child { height: 10px; width: 70%; background: #222; }
.vp__post aside { border-radius: 5px; background: #f6f5ff; }
.vibe__deployed { position: absolute; top: -14px; left: 50%; transform: translateX(-50%) scale(0); background: #111; color: #fff; font-family: "Poppins", sans-serif; font-size: 11px; font-weight: 600; padding: 6px 12px; border-radius: 20px; display: flex; align-items: center; gap: 6px; white-space: nowrap; box-shadow: 0 8px 20px rgba(0,0,0,.35); }
.vibe__deployed svg { width: 12px; height: 12px; color: #3ecf8e; }

.works__filter { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.works__filter button { padding: 9px 18px; border-radius: 30px; font-size: 14px; font-weight: 500; border: 1px solid var(--line); background: var(--card); color: var(--muted); transition: all .3s; }
.works__filter button:hover, .works__filter button.is-active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 8px 18px rgba(108,92,231,.3); }

.works__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.work { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); transition: transform .45s var(--ease), box-shadow .45s var(--ease); position: relative; }
.work::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--primary); border-radius: 0 0 18px 18px; transform: scaleX(0); transition: transform .45s var(--ease); }
.work:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.work:hover::after { transform: scaleX(1); }
.work.is-hidden { display: none; }
.work__media { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; margin-bottom: 18px; isolation: isolate; }
.work__media::before { content: ""; position: absolute; inset: 0; background-size: 200% 200%; animation: shimmer 8s ease-in-out infinite; z-index: -1; transition: transform .6s var(--ease); }
.work:hover .work__media::before { transform: scale(1.08); }
@keyframes shimmer { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.work__media--1::before { background-image: linear-gradient(135deg, #6c5ce7, #e056a0, #4fa3ff); }
.work__media--2::before { background-image: linear-gradient(135deg, #0b1220, #1e3a8a, #38bdf8); }
.work__media--3::before { background-image: linear-gradient(135deg, #111, #ff5f9e, #ffb347); }
.work__media--4::before { background-image: linear-gradient(135deg, #0f766e, #22d3ee, #6c5ce7); }
.work__media--5::before { background-image: linear-gradient(135deg, #1e1e1e, #a259ff, #ff7262); }
.work__media--6::before { background-image: linear-gradient(135deg, #2b0f3f, #c93bff, #38bdf8); }
.work__img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s var(--ease); }
.work:hover .work__img { transform: scale(1.04); }
.btn.is-disabled { opacity: .55; cursor: default; pointer-events: none; }
.work__tag { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.9); color: #111; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px; letter-spacing: .04em; }
.work__play { position: absolute; right: 12px; top: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.9); color: #111; display: grid; place-items: center; opacity: 0; transform: translateY(-6px); transition: opacity .35s, transform .35s var(--ease); }
.work__play svg { width: 18px; height: 18px; }
.work:hover .work__play { opacity: 1; transform: translateY(0); }
.work__tag { z-index: 2; }
.work__shot { position: absolute; left: 10%; right: 10%; bottom: -6%; top: 22%; background: #fff; border-radius: 8px 8px 0 0; box-shadow: 0 20px 40px rgba(0,0,0,.3); padding: 8%; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto 1fr; gap: 6%; transition: transform .6s var(--ease); }
.work:hover .work__shot { transform: translateY(-6px); }
.work__shot i { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: #e6e4f2; }
.work__shot b { height: 14px; width: 70%; border-radius: 4px; background: #111; }
.work__shot u { height: 14px; width: 40%; border-radius: 4px; background: var(--primary); justify-self: end; }
.work__shot s { grid-column: 1 / -1; border-radius: 6px; background: #f0eefc; }
.work__shot--b { grid-template-columns: 1fr 2fr; }
.work__shot--b s { grid-column: 2; }
.work__shot--b u { grid-row: 2 / 4; height: auto; width: 100%; justify-self: stretch; background: #f0eefc; }
.work__shot--d s { background: repeating-linear-gradient(90deg, #f0eefc 0 30%, #fff 30% 35%); }
.work__body h3 { font-size: 19px; font-weight: 600; }
.work__tools { color: var(--muted-2); font-size: 13px; font-weight: 500; margin: 4px 0 8px; }
.work__body > p:not(.work__tools) { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.work__actions { display: flex; gap: 10px; margin-top: 18px; }
.works__more { text-align: center; margin-top: 50px; }

/* ---------- CTA ---------- */
.cta-wrap { padding-top: 0; }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; max-width: 980px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 56px 64px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.cta::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: linear-gradient(90deg, var(--primary), var(--pink)); }
.cta small { display: block; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.cta h3 { font-size: clamp(26px, 3.5vw, 40px); font-weight: 300; line-height: 1.1; text-transform: uppercase; }
.cta h2 { font-size: clamp(38px, 6vw, 74px); font-weight: 800; line-height: 1; text-transform: uppercase; letter-spacing: -.02em; background: linear-gradient(180deg, var(--text) 30%, var(--muted-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Contact ---------- */
.contact__grid { display: grid; grid-template-columns: .8fr 1.4fr; gap: 60px; margin-top: 60px; align-items: start; }
.contact__side h3, .contact__form h3 { font-size: 26px; font-weight: 700; color: var(--primary); }
.contact__side > p, .contact__form > p { margin: 6px 0 26px; }
.contact-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 26px 20px; margin-bottom: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); border-bottom: 3px solid var(--primary); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.contact-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.contact-card i { width: 40px; height: 40px; color: var(--primary); display: grid; place-items: center; }
.contact-card i svg { width: 26px; height: 26px; }
.contact-card b { font-weight: 600; }
.contact-card span { color: var(--muted); font-size: 14px; }
.contact-card em { font-style: normal; color: var(--primary); font-size: 14px; }
.field { margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field input, .field textarea { width: 100%; padding: 18px 22px; border-radius: 10px; border: 2px solid var(--primary); background: var(--bg-soft); color: var(--text); font: inherit; font-size: 15px; outline: none; transition: box-shadow .3s, background .3s; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:focus, .field textarea:focus { box-shadow: 0 0 0 4px rgba(108,92,231,.18); background: var(--card); }
.contact__note { margin-top: 14px; font-size: 14px; color: var(--primary); min-height: 1.4em; }

/* ---------- Footer ---------- */
.footer__thanks { padding: 100px 0 70px; }
.footer__thanks h2 { text-align: center; font-size: clamp(28px, 4vw, 40px); font-weight: 700; margin-bottom: 50px; }
.footer__cols { display: grid; grid-template-columns: 1.1fr 1.1fr .9fr; gap: 50px; font-size: 14px; }
.footer__cols h4 { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.footer__cols p { color: var(--muted); }
.footer__tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.footer__tools .tool { width: 36px; height: 36px; border-radius: 9px; font-size: 12px; box-shadow: none; transition: transform .3s var(--ease); }
.footer__tools .tool:hover { transform: translateY(-4px) rotate(-6deg); }
.footer__mail { color: var(--primary); font-weight: 500; }
.footer__bar { background: var(--primary); color: #fff; text-align: center; padding: 70px 0 40px; }
.footer__bar h3 { font-size: 34px; font-weight: 700; }
.footer__bar p { font-size: 18px; margin: 6px 0 40px; }
.footer__nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 28px; font-weight: 500; margin-bottom: 40px; }
.footer__nav a { position: relative; }
.footer__nav a::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 100%; height: 2px; background: #fff; transform: scaleX(0); transition: transform .3s var(--ease); }
.footer__nav a:hover::after { transform: scaleX(1); }
.footer__social { display: flex; justify-content: center; gap: 22px; margin-bottom: 50px; }
.footer__social a { width: 44px; height: 44px; border-radius: 12px; background: #fff; color: var(--primary); display: grid; place-items: center; transition: transform .35s var(--ease); }
.footer__social a svg { width: 18px; height: 18px; }
.footer__social a:hover { transform: translateY(-5px) rotate(-8deg); }
.footer__bar small { font-size: 13px; opacity: .9; }

/* ---------- Back to top ---------- */
.totop { position: fixed; right: 26px; bottom: 26px; width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px rgba(108,92,231,.4); z-index: 95; opacity: 0; transform: translateY(20px); pointer-events: none; transition: opacity .35s, transform .35s var(--ease), background .3s; }
.totop svg { width: 20px; height: 20px; }
.totop.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.totop:hover { background: var(--primary-dark); }

/* ---------- Reveal helpers (GSAP sets final state) ---------- */
.reveal-up, .reveal-left { opacity: 0; }
.js-loaded .reveal-up, .js-loaded .reveal-left { opacity: 1; }
.no-js .reveal-up, .no-js .reveal-left, .no-js .preloader__word span { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .works__grid { grid-template-columns: repeat(2, 1fr); }
  .dot-nav { display: none; }
}
@media (max-width: 900px) {
  .section { padding: 80px 0; }
  .nav__links { position: fixed; inset: 0 0 0 auto; z-index: 1; width: min(320px, 85vw); flex-direction: column; align-items: flex-start; justify-content: center; gap: 26px; padding: 40px; background: var(--card); box-shadow: -20px 0 50px rgba(0,0,0,.15); transform: translateX(100%); transition: transform .45s var(--ease); font-size: 20px; }
  .nav__actions { position: relative; z-index: 2; }
  .nav__links.is-open { transform: translateX(0); }
  .nav__links .nav__cv { display: inline-block; }
  .nav__burger { display: flex; }
  .social-float { left: 12px; gap: 10px; }
  .social-float a { width: 38px; height: 38px; }
  .hero__tools { height: 160px; bottom: 10%; }
  .stack__card { grid-template-columns: 1fr; min-height: 0; }
  .stack__media { height: 200px; }
  .stack__glyph { font-size: 64px; }
  .stack__orbit { width: 180px; height: 180px; }
  .stack__body { padding: 28px; }
  .about__grid, .contact__grid { grid-template-columns: 1fr; gap: 44px; }
  .about__photo-frame { width: min(320px, 78vw); }
  .cta { padding: 40px 32px; justify-content: center; text-align: center; }
  .vibe { grid-template-columns: 1fr; min-height: 0; }
  .vibe__chat { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .vibe__log { min-height: 200px; }
  .vibe__code { padding-bottom: 190px; font-size: 11px; min-height: 380px; }
  .vibe__preview { width: 60%; right: auto; left: 14px; bottom: 14px; }
  .footer__cols { grid-template-columns: 1fr; gap: 34px; }
}
@media (max-width: 640px) {
  .works__grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .stats { gap: 22px; }
  .stat b { font-size: 32px; }
  .social-float { display: none; }
  .hero { padding-top: 120px; }
  .hero__tools { width: 82%; }
  .hero__tools .tool { width: 40px; height: 40px; font-size: 13px; border-radius: 10px; }
  .hero__tools .tool svg { width: 22px; height: 22px; }
  .section-title::before { font-size: 1.5em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* =====================================================================
   Windows XP desktop (interactive showcase)
   ===================================================================== */
.xp { --xp-font: Tahoma, Verdana, "Segoe UI", sans-serif; --xp-blue: #245edb; --xp-blue-2: #1941a5; --xp-face: #ece9d8;
  position: relative; width: 100%; height: clamp(520px, 62vw, 720px); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  font-family: var(--xp-font); font-size: 12px; color: #000; margin-bottom: 60px; user-select: none; background: #000; isolation: isolate; }
.xp * { box-sizing: border-box; }
.xp [hidden] { display: none !important; }
.xp button { font-family: inherit; }

/* boot screen */
.xp__boot { position: absolute; inset: 0; z-index: 50; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px; color: #fff; transition: opacity .6s; }
.xp__boot.is-done { opacity: 0; pointer-events: none; }
.xp__boot-logo { display: flex; flex-direction: column; align-items: center; gap: 2px; font-family: "Trebuchet MS", Tahoma, sans-serif; }
.xp__boot-logo b { font-size: 12px; font-weight: 400; letter-spacing: .05em; }
.xp__boot-logo strong { font-size: 40px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.xp__boot-logo strong span { color: #f5a623; font-size: 26px; font-weight: 400; margin-left: 4px; vertical-align: top; }
.xp__boot-logo .xp__flag { width: 44px; height: 44px; margin-bottom: 8px; transform: skewX(-8deg); }
.xp__boot-bar { width: 150px; height: 14px; border: 1px solid #4a4a4a; border-radius: 4px; overflow: hidden; position: relative; }
.xp__boot-bar i { position: absolute; top: 2px; width: 8px; height: 8px; border-radius: 2px; background: #2f6fd8; box-shadow: 0 0 6px #4f8cff; animation: xpboot 1.6s linear infinite; }
.xp__boot-bar i:nth-child(2) { animation-delay: .12s; } .xp__boot-bar i:nth-child(3) { animation-delay: .24s; }
@keyframes xpboot { 0% { left: -10px; } 100% { left: 150px; } }

/* flag icon (start button + boot) */
.xp__flag { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 18px; height: 18px; flex: none; }
.xp__flag i { border-radius: 2px 6px 2px 6px; }
.xp__flag i:nth-child(1) { background: #f35325; } .xp__flag i:nth-child(2) { background: #81bc06; }
.xp__flag i:nth-child(3) { background: #05a6f0; } .xp__flag i:nth-child(4) { background: #ffba08; }

/* desktop */
.xp__desktop { position: absolute; inset: 0 0 30px 0; overflow: hidden;
  background:
    radial-gradient(120% 70% at 20% 118%, #2f7a1a 0%, #4c9a2a 38%, transparent 60%),
    radial-gradient(90% 55% at 78% 112%, #3e8f22 0%, #5fae35 35%, transparent 58%),
    linear-gradient(180deg, #2b6fd6 0%, #5c9be6 45%, #a9d3f5 75%, #dcefff 100%); }
.xp__desktop::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 42%; background: radial-gradient(140% 100% at 45% 130%, #6cbf3f 0%, #4a9a2a 45%, transparent 62%); }
.xp__icons { position: absolute; left: 12px; top: 12px; display: grid; gap: 8px; z-index: 1; }
.xp__icon { width: 84px; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: #fff; font-size: 11px; text-shadow: 1px 1px 2px #000, 0 0 6px rgba(0,0,0,.6); border-radius: 3px; cursor: pointer; background: transparent; border: 1px solid transparent; text-align: center; line-height: 1.2; }
.xp__icon:hover { background: rgba(255,255,255,.12); }
.xp__icon.is-selected { background: rgba(49,106,197,.55); border-color: rgba(255,255,255,.4); }
.xp__icon .ico { width: 34px; height: 34px; }

/* pixel-ish app icons (CSS/SVG) */
.ico { display: inline-block; width: 22px; height: 22px; flex: none; border-radius: 4px; background-size: contain; background-repeat: no-repeat; background-position: center; }
.ico--vscode { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%2323a9f2' d='M17.6 2.3 8.2 10.9 4.4 8 2 9.2v5.6L4.4 16l3.8-2.9 9.4 8.6L22 19.7V4.3zM17.6 6.6v10.8L11.2 12z'/%3E%3C/svg%3E"); }
.ico--spotify { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%231ed760'/%3E%3Cpath d='M6.5 9.3c3.6-1 8-.7 11 1.1M7.2 12.4c3-.8 6.6-.5 9.2 1M7.9 15.3c2.4-.6 5.2-.4 7.3.8' stroke='%23000' stroke-width='1.6' stroke-linecap='round' fill='none'/%3E%3C/svg%3E"); }
.ico--folder { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23e6b422' d='M2 5h7l2 2h11v13H2z'/%3E%3Cpath fill='%23ffd75e' d='M2 9h20v11H2z'/%3E%3C/svg%3E"); }
.ico--notepad { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' stroke='%236b7fa8' d='M5 2.5h11l3 3v16H5z'/%3E%3Cpath stroke='%2390a4c8' d='M7.5 9h9M7.5 12h9M7.5 15h6'/%3E%3Cpath fill='%233b6fd6' d='M4 2h4v4H4z'/%3E%3C/svg%3E"); }
.ico--ie { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='%231e6fd8'/%3E%3Ctext x='12' y='16.5' font-family='Arial' font-size='13' font-weight='700' fill='%23fff' text-anchor='middle'%3Ee%3C/text%3E%3Cellipse cx='12' cy='12' rx='11' ry='4' fill='none' stroke='%23ffcf3f' stroke-width='1.4' transform='rotate(-25 12 12)'/%3E%3C/svg%3E"); }
.ico--recycle { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23bcd0e8' stroke='%236b7fa8' d='M5 7h14l-1.5 14h-11z'/%3E%3Cpath fill='%23e9f1fa' stroke='%236b7fa8' d='M4 4.5h16V7H4z'/%3E%3Cpath stroke='%2338a838' stroke-width='1.5' fill='none' d='M9 11l3 3 3-3M12 14v-5'/%3E%3C/svg%3E"); }
.ico--file { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' stroke='%236b7fa8' d='M5 2.5h10l4 4v15H5z'/%3E%3Cpath fill='%23dbe4f3' d='M15 2.5v4h4z'/%3E%3C/svg%3E"); }
.ico--web { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='2' y='3' width='20' height='18' rx='2' fill='%23fff' stroke='%236b7fa8'/%3E%3Crect x='2' y='3' width='20' height='4' fill='%233b6fd6'/%3E%3Crect x='5' y='10' width='8' height='8' fill='%236c5ce7'/%3E%3Cpath stroke='%23c7d2e8' d='M15 11h5M15 14h5M15 17h4'/%3E%3C/svg%3E"); }

/* windows */
.xp__windows { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.win { position: absolute; pointer-events: auto; display: flex; flex-direction: column; background: var(--xp-face); border: 3px solid #0831d9; border-top: 0; border-radius: 8px 8px 3px 3px; box-shadow: 0 10px 30px rgba(0,0,0,.45); min-width: 280px; min-height: 160px; }
.win.is-min { display: none; }
.win.is-max { inset: 0 !important; width: auto !important; height: auto !important; border-radius: 0; border-width: 0; }
.win__title { height: 30px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 4px 0 8px; cursor: default; color: #fff; font-weight: 700; font-size: 13px; font-family: "Trebuchet MS", Tahoma, sans-serif; text-shadow: 1px 1px 0 #0a246a; border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #0a5fe6 0%, #0553d9 8%, #0c60ea 40%, #0648c4 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); touch-action: none; }
.win.is-blur .win__title { background: linear-gradient(180deg, #7a9be9 0%, #6d8fe0 40%, #5f7fd2 100%); }
.win__title .ico { width: 16px; height: 16px; }
.win__name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win__btns { display: flex; gap: 2px; }
.win__btns button { width: 21px; height: 21px; border-radius: 3px; border: 1px solid #fff; color: #fff; display: grid; place-items: center; cursor: pointer; background: linear-gradient(180deg, #3d8bff, #1e5fe0 60%, #1750c7); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.win__btns button:hover { filter: brightness(1.15); }
.win__btns button svg { width: 12px; height: 12px; }
.win__btns .win__close { background: linear-gradient(180deg, #e8785e, #d64c3a 55%, #c0392b); }
.win__body { flex: 1; min-height: 0; overflow: hidden; background: #fff; }

/* taskbar */
.xp__taskbar { position: absolute; left: 0; right: 0; bottom: 0; height: 30px; z-index: 60; display: flex; align-items: stretch; background: linear-gradient(180deg, #3168d5 0%, #245edb 6%, #245edb 88%, #1941a5 100%); box-shadow: inset 0 1px 0 #6f9ef3; }
.xp__startbtn { display: flex; align-items: center; gap: 6px; padding: 0 22px 0 8px; margin-right: 8px; color: #fff; font-style: italic; font-weight: 700; font-size: 16px; font-family: "Trebuchet MS", Tahoma, sans-serif; text-shadow: 1px 1px 1px #1a4a1a; border: 0; cursor: pointer; border-radius: 0 12px 12px 0;
  background: linear-gradient(180deg, #4dbb4d 0%, #3a9f3a 20%, #2f8a2f 60%, #257325 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 2px 0 6px rgba(0,0,0,.35); }
.xp__startbtn:hover, .xp__startbtn.is-open { filter: brightness(1.12); }
.xp__tasks { flex: 1; display: flex; gap: 4px; padding: 3px 4px; overflow: hidden; }
.xp__task { display: flex; align-items: center; gap: 6px; width: 160px; max-width: 32%; padding: 0 8px; color: #fff; font-size: 11px; border-radius: 3px; border: 0; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(180deg, #3c81f3, #2a6be0 50%, #1f5bd0); box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.xp__task.is-active { background: linear-gradient(180deg, #1d48a8, #1a3f98); box-shadow: inset 1px 1px 3px rgba(0,0,0,.5); }
.xp__task .ico { width: 16px; height: 16px; }
.xp__task span { overflow: hidden; text-overflow: ellipsis; }
.xp__tray { display: flex; align-items: center; gap: 8px; padding: 0 12px 0 10px; color: #fff; background: linear-gradient(180deg, #1290e9 0%, #0f7fd6 50%, #0b6fc2 100%); box-shadow: inset 2px 0 4px rgba(0,0,0,.25); }
.xp__tray-ico svg { width: 14px; height: 14px; display: block; }
.xp__clock { font-size: 11px; }

/* balloon tip */
.xp__balloon { position: absolute; right: 16px; bottom: 12px; z-index: 40; width: 250px; background: #ffffe1; border: 1px solid #000; border-radius: 8px; padding: 10px 26px 10px 12px; font-size: 11px; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.xp__balloon::after { content: ""; position: absolute; right: 40px; bottom: -12px; border: 6px solid transparent; border-top-color: #000; border-bottom: 0; }
.xp__balloon b { display: block; margin-bottom: 4px; }
.xp__balloon-x { position: absolute; right: 6px; top: 6px; width: 16px; height: 16px; border: 1px solid #000; background: #fff; font-size: 12px; line-height: 1; cursor: pointer; border-radius: 2px; }

/* start menu */
.xp__start { position: absolute; left: 0; bottom: 0; z-index: 45; width: 380px; max-width: calc(100% - 16px); border: 2px solid #2b5fd6; border-radius: 8px 8px 0 0; background: var(--xp-face); box-shadow: 4px 4px 14px rgba(0,0,0,.45); overflow: hidden; }
.xp__start-head { height: 58px; display: flex; align-items: center; gap: 10px; padding: 0 10px; color: #fff; font-size: 14px; font-weight: 700; text-shadow: 1px 1px 0 #0a246a; background: linear-gradient(180deg, #1c5fdb, #2b6fe6 50%, #1a53c9); }
.xp__start-avatar { width: 42px; height: 42px; border-radius: 6px; border: 2px solid #fff; background: linear-gradient(135deg, #6c5ce7, #e056a0); display: grid; place-items: center; font-size: 20px; }
.xp__start-cols { display: grid; grid-template-columns: 1.15fr 1fr; }
.xp__start-left { background: #fff; padding: 6px; }
.xp__start-right { background: #d3e5fa; padding: 6px; border-left: 1px solid #95bdee; }
.xp__start-left button, .xp__start-right button, .xp__start-right a { width: 100%; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; text-align: left; padding: 5px 6px; border: 0; background: transparent; cursor: pointer; border-radius: 3px; color: #000; font-size: 11px; }
.xp__start-left button .ico { grid-row: 1 / 3; width: 26px; height: 26px; }
.xp__start-left button b { font-weight: 700; }
.xp__start-left button small { color: #666; font-size: 10px; }
.xp__start-right button, .xp__start-right a { grid-template-columns: 1fr; color: #0c2c7c; }
.xp__start-left button:hover, .xp__start-right button:hover, .xp__start-right a:hover { background: #316ac5; color: #fff; }
.xp__start-left button:hover small { color: #dbe6fb; }
.xp__start hr { border: 0; border-top: 1px solid #c9d7ef; margin: 4px 0; }
.xp__start-foot { display: flex; justify-content: flex-end; padding: 6px 10px; background: linear-gradient(180deg, #1c5fdb, #2b6fe6 50%, #1a53c9); }
.xp__start-foot button { display: flex; align-items: center; gap: 6px; color: #fff; background: transparent; border: 0; cursor: pointer; font-size: 11px; padding: 4px 6px; border-radius: 3px; }
.xp__start-foot button:hover { background: rgba(255,255,255,.15); }
.xp__pwr { width: 18px; height: 18px; border-radius: 4px; background: linear-gradient(180deg, #f39b7a, #d64c3a); border: 1px solid #fff; display: inline-block; }
.xp__off { position: absolute; inset: 0; z-index: 70; background: #000; color: #f5a623; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font-family: "Trebuchet MS", Tahoma, sans-serif; font-size: 20px; text-align: center; cursor: pointer; }
.xp__off small { color: #777; font-size: 11px; }

/* ---- VS Code app ---- */
.vsc { height: 100%; display: flex; flex-direction: column; background: #1e1e2e; color: #ccc; font-family: "Poppins", sans-serif; }
.vsc__bar { flex: none; height: 26px; display: flex; align-items: center; gap: 14px; padding: 0 12px; font-size: 11px; background: #181825; border-bottom: 1px solid #2a2a3d; }
.vsc__body { flex: 1; min-height: 0; display: grid; grid-template-columns: 40px 1fr; }
.vsc__activity { background: #181825; display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 12px; border-right: 1px solid #2a2a3d; }
.vsc__activity i { width: 20px; height: 20px; border-radius: 4px; background: #45475a; }
.vsc__activity i.on { background: #d97757; }
.vsc .vibe { min-height: 0; height: 100%; }
.vsc__status { flex: none; height: 22px; display: flex; align-items: center; gap: 14px; padding: 0 12px; font-size: 10.5px; color: #fff; background: var(--primary); }
.vsc__status .right { margin-left: auto; }

/* ---- Spotify app ---- */
.sp { height: 100%; display: grid; grid-template-columns: 170px 1fr; grid-template-rows: 1fr 80px; background: #121212; color: #fff; font-family: "Poppins", sans-serif; font-size: 12px; }
.sp__side { background: #000; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.sp__logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.sp__side nav { display: grid; gap: 8px; color: #b3b3b3; font-weight: 600; }
.sp__side nav a { cursor: pointer; } .sp__side nav a.on, .sp__side nav a:hover { color: #fff; }
.sp__side hr { border: 0; border-top: 1px solid #282828; }
.sp__pl { font-weight: 500; color: #fff; } .sp__pl--dim { color: #6a6a6a; font-weight: 400; }
.sp__main { overflow: auto; background: linear-gradient(180deg, #2a1f5e 0%, #121212 260px); padding-bottom: 20px; }
.sp__head { display: flex; align-items: flex-end; gap: 18px; padding: 24px 22px 18px; }
.sp__cover { width: 120px; height: 120px; flex: none; border-radius: 6px; background: linear-gradient(135deg, #6c5ce7, #1ed760); display: grid; place-items: center; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.sp__cover .ico { width: 56px; height: 56px; }
.sp__head small { font-size: 10px; letter-spacing: .08em; font-weight: 600; }
.sp__head h3 { font-size: clamp(24px, 4vw, 44px); font-weight: 800; line-height: 1.05; margin: 4px 0 8px; }
.sp__head p { color: #b3b3b3; }
.sp__embed:empty { display: none; }
.sp__embed iframe { width: calc(100% - 44px); margin: 0 22px 10px; border: 0; border-radius: 12px; height: 352px; }
.sp__list { width: calc(100% - 44px); margin: 0 22px; border-collapse: collapse; }
.sp__list th { text-align: left; font-weight: 500; color: #b3b3b3; font-size: 11px; padding: 6px 8px; border-bottom: 1px solid #2a2a2a; }
.sp__list td { padding: 8px; vertical-align: middle; }
.sp__list tbody tr { cursor: pointer; border-radius: 6px; }
.sp__list tbody tr:hover td { background: #2a2a2a; }
.sp__list tbody tr.is-playing td:nth-child(2) b { color: #1ed760; }
.sp__list td b { display: block; font-weight: 600; font-size: 13px; }
.sp__fav { color: #1ed760; font-size: 12px; margin-left: 4px; } .sp__list td small { color: #b3b3b3; }
.sp__list td:nth-child(1) { width: 30px; color: #b3b3b3; }
.sp__list td:nth-child(3) { color: #b3b3b3; }
.sp__list td:nth-child(4) { color: #b3b3b3; width: 50px; }
.sp__list td:nth-child(5) { width: 30px; }
.sp__list td a { color: #b3b3b3; text-decoration: none; } .sp__list td a:hover { color: #1ed760; }
.sp__list td a svg { width: 14px; height: 14px; }
.sp__player { grid-column: 1 / -1; background: #181818; border-top: 1px solid #282828; display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 0 14px 0 0; gap: 14px; }
.sp__embed-host { height: 80px; min-width: 0; display: flex; align-items: center; }
.sp__embed-host iframe { width: 100%; height: 80px; border: 0; border-radius: 0; display: block; }
.sp__hint { padding: 0 18px; color: #b3b3b3; font-size: 12px; }
.sp__eq { justify-self: end; display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.sp__eq i { width: 4px; height: 4px; background: #1ed760; border-radius: 1px; }
.sp.is-playing .sp__eq i { animation: speq .8s ease-in-out infinite alternate; }
.sp__eq i:nth-child(2) { animation-delay: .15s; } .sp__eq i:nth-child(3) { animation-delay: .3s; } .sp__eq i:nth-child(4) { animation-delay: .45s; }
@keyframes speq { to { height: 18px; } }

/* ---- Explorer / Notepad / IE ---- */
.exp, .np, .ie { height: 100%; display: flex; flex-direction: column; font-family: var(--xp-font); font-size: 11px; }
.exp__bar, .np__bar, .ie__bar { flex: none; display: flex; gap: 12px; padding: 4px 8px; background: var(--xp-face); border-bottom: 1px solid #c8c4b3; }
.exp__addr, .ie__addr { flex: none; display: flex; align-items: center; gap: 8px; padding: 4px 8px; background: var(--xp-face); border-bottom: 1px solid #c8c4b3; }
.exp__addr div, .ie__addr div { flex: 1; display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #7f9db9; padding: 3px 6px; }
.ie__addr button { border: 1px solid #7f9db9; background: linear-gradient(#fff, #e6e3d8); padding: 2px 10px; border-radius: 3px; cursor: pointer; }
.exp__body { flex: 1; min-height: 0; display: grid; grid-template-columns: 180px 1fr; }
.exp__side { background: linear-gradient(180deg, #7aa4e6, #6f8fd9); padding: 12px; display: grid; align-content: start; gap: 6px; color: #fff; }
.exp__side b { display: block; margin-top: 6px; padding-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,.35); }
.exp__side a { color: #fff; text-decoration: underline; cursor: pointer; }
.exp__side p { color: #eaf0ff; }
.exp__files { background: #fff; padding: 14px; display: grid; grid-template-columns: repeat(auto-fill, 110px); gap: 10px; align-content: start; overflow: auto; }
.exp__files--list { grid-template-columns: 1fr; gap: 2px; }
.exp__file { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; text-align: center; border: 1px solid transparent; border-radius: 3px; cursor: pointer; color: #000; text-decoration: none; background: transparent; font-family: inherit; font-size: 11px; }
.exp__file .ico { width: 34px; height: 34px; }
.exp__files--list .exp__file { flex-direction: row; text-align: left; padding: 3px 6px; } .exp__files--list .exp__file .ico { width: 18px; height: 18px; }
.exp__file:hover { background: #e8f0fb; border-color: #a9c6f0; }
.exp__file small { color: #666; font-size: 10px; }
.np__text { flex: 1; width: 100%; resize: none; border: 0; outline: none; padding: 8px; font: 12px/1.5 "Lucida Console", Consolas, monospace; background: #fff; color: #000; }
.ie__page { flex: 1; overflow: auto; padding: 18px 22px; background: #fff; font-family: "Times New Roman", serif; font-size: 15px; }
.ie__page h3 { font-size: 22px; margin-bottom: 10px; color: #000080; }
.ie__page ul { list-style: disc; padding-left: 22px; display: grid; gap: 8px; }
.ie__page a { color: #0000ee; text-decoration: underline; } .ie__page a:visited { color: #551a8b; }
.ie__foot { margin-top: 24px; font-size: 12px; color: #666; }

@media (max-width: 900px) {
  .xp { height: 600px; border-radius: 10px; }
  .xp__icon { width: 72px; font-size: 10px; }
  .xp__start { width: 300px; }
  .sp { grid-template-columns: 1fr; } .sp__side { display: none; }
  .sp__list th:nth-child(3), .sp__list td:nth-child(3) { display: none; }
  .sp__player { grid-template-columns: 1fr; padding: 0; } .sp__eq { display: none; }
  .exp__body { grid-template-columns: 1fr; } .exp__side { display: none; }
  .vsc__body { grid-template-columns: 1fr; } .vsc__activity { display: none; }
  .vsc .vibe { height: auto; min-height: 100%; overflow: auto; }
  .vsc .vibe__code { padding-bottom: 22px; min-height: 0; }
  .vsc .vibe__preview { position: static; width: calc(100% - 44px); margin: 0 22px 26px; transform: none; }
  .vsc .vibe__deployed { top: -10px; }
}
