/* ============================================================
   HARIS UMER — Developer Portfolio
   Shared stylesheet · Soft UI + Glassmorphism · Manrope
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* surfaces */
  --bg1: #dde3ea;
  --bg2: #c8d1da;
  --paper: #e6ebf0;
  --surface: #e6ebf0;
  --surface-2: #eef2f5;
  --cream: #e6ebf0;
  --gray: #d9e0e7;
  --card: #e6ebf0;

  /* text */
  --ink: #1c2733;
  --ink-soft: #3a4a5c;
  --muted: #5b6b7c;
  --soft: #93a2b0;

  /* accents */
  --navy: #1c2a44;
  --navy-panel: rgba(28, 42, 68, .93);
  --sky: #6fb7ea;
  --sky-deep: #2f6fa8;
  --sky-soft: rgba(111, 183, 234, .22);

  /* soft-ui shadows */
  --shadow-light: rgba(255, 255, 255, .85);
  --shadow-dark: rgba(148, 163, 180, .55);
  --sh-out: 8px 8px 18px var(--shadow-dark), -8px -8px 18px var(--shadow-light);
  --sh-out-sm: 4px 4px 9px var(--shadow-dark), -4px -4px 9px var(--shadow-light);
  --sh-in: inset 4px 4px 9px var(--shadow-dark), inset -4px -4px 9px var(--shadow-light);
  --sh-in-sm: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);

  /* glass */
  --glass: linear-gradient(145deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .24));
  --glass-border: rgba(255, 255, 255, .6);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, .75);
  --glass-blur: blur(18px) saturate(150%);
  --band: rgba(255, 255, 255, .26);

  --line: rgba(255, 255, 255, .55);
  --grad: linear-gradient(135deg, rgba(166, 210, 244, .75) 0%, rgba(231, 237, 241, .8) 55%, rgba(248, 242, 230, .85) 100%);
  --grad-btn: linear-gradient(145deg, #2a3d63 0%, #1c2a44 100%);

  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 13px;
  --maxw: 1180px;
  --display: 'Manrope', sans-serif;
  --body: 'Manrope', sans-serif;
  --mono: 'JetBrains Mono', monospace;

  /* fixed tokens: constant across themes */
  --ink-fixed: #1c2a44;
  --ink-fixed-soft: #2a3a55;
  --header-bg: rgba(230, 235, 240, .55);
  --shadow-color: rgba(100, 116, 139, .28);
}

html[data-theme="dark"] {
  --bg1: #1a1f27;
  --bg2: #12151b;
  --paper: #1e242c;
  --surface: #1e242c;
  --surface-2: #222933;
  --cream: #1e242c;
  --gray: #262d37;
  --card: #1e242c;

  --ink: #eef1f4;
  --ink-soft: #c3ccd5;
  --muted: #a7b1bc;
  --soft: #6b7580;

  --navy: #3b4a6b;
  --navy-panel: rgba(21, 27, 38, .9);
  --sky: #6fb7ea;
  --sky-deep: #7cc0ec;
  --sky-soft: rgba(111, 183, 234, .16);

  --shadow-light: rgba(255, 255, 255, .04);
  --shadow-dark: rgba(0, 0, 0, .6);

  --glass: linear-gradient(145deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .025));
  --glass-border: rgba(255, 255, 255, .09);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, .1);
  --band: rgba(255, 255, 255, .03);

  --line: rgba(255, 255, 255, .1);
  --grad: linear-gradient(135deg, rgba(59, 74, 107, .65) 0%, rgba(34, 41, 51, .8) 100%);
  --grad-btn: linear-gradient(145deg, #4a5b80 0%, #3b4a6b 100%);

  --header-bg: rgba(30, 36, 44, .55);
  --shadow-color: rgba(0, 0, 0, .5);
}

html { scroll-behavior: smooth; scroll-padding-top: 92px; }
html, body { max-width: 100%; overflow-x: hidden; overflow-x: clip; }

html { background: var(--bg2); }

body {
  font-family: var(--body);
  color: var(--ink-soft);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
  transition: color .35s ease;
  padding-top: 80px; /* room for the fixed navbar */
}
/* fixed background layer (works on iOS + full-page captures) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(620px 420px at 8% 6%, rgba(111, 183, 234, .30), transparent 70%),
    radial-gradient(560px 420px at 94% 28%, rgba(176, 160, 232, .22), transparent 70%),
    radial-gradient(640px 460px at 20% 92%, rgba(130, 214, 205, .20), transparent 70%),
    linear-gradient(160deg, var(--bg1), var(--bg2));
}
html[data-theme="dark"] body::before {
  background:
    radial-gradient(620px 420px at 8% 6%, rgba(111, 183, 234, .10), transparent 70%),
    radial-gradient(560px 420px at 94% 28%, rgba(140, 120, 220, .09), transparent 70%),
    radial-gradient(640px 460px at 20% 92%, rgba(80, 180, 170, .07), transparent 70%),
    linear-gradient(160deg, var(--bg1), var(--bg2));
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
h1, h2, h3, h4, .logo-word, .eyebrow, .btn, .mono { font-family: var(--display); letter-spacing: -.015em; }
.mono-font { font-family: var(--mono); }

/* ----- ANIMATIONS ----- */
@keyframes fadeSlideUp { 0% { opacity: 0; transform: translateY(22px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.animate-once { animation: fadeSlideUp .6s ease forwards; }
.stagger-children > * { opacity: 0; animation: fadeSlideUp .5s ease forwards; }
.stagger-children > *:nth-child(1) { animation-delay: .05s; }
.stagger-children > *:nth-child(2) { animation-delay: .1s; }
.stagger-children > *:nth-child(3) { animation-delay: .15s; }
.stagger-children > *:nth-child(4) { animation-delay: .2s; }
.stagger-children > *:nth-child(5) { animation-delay: .25s; }
.stagger-children > *:nth-child(6) { animation-delay: .3s; }

/* ---------- NAV (floating glass bar) ---------- */
header.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 12px 16px 0;
  background: transparent;
}
.nav-inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 14px 10px 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--header-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--sh-out-sm), var(--glass-hi);
}
.logo { display: flex; align-items: center; gap: 10px; flex: none; margin-right: auto; }
.logo-badge { width: 38px; height: 38px; flex: none; border-radius: 12px; box-shadow: var(--sh-out-sm); }
.logo-word { font-size: 16.5px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.logo-word span { color: var(--sky-deep); }
.nav-controls { display: flex; align-items: center; gap: 14px; flex: none; }
nav.links { display: flex; align-items: center; gap: 30px; font-size: 13.5px; color: var(--ink); white-space: nowrap; }
.page-links { display: flex; align-items: center; gap: 6px; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.page-links a { padding: 8px 16px; border-radius: 13px; }
nav.links a { opacity: .72; transition: opacity .2s, box-shadow .2s, background .2s; font-weight: 600; }
nav.links a:hover { opacity: 1; }
nav.links a.active { opacity: 1; font-weight: 800; color: var(--ink); box-shadow: var(--sh-in-sm); background: var(--surface); }
nav.links a.btn.active { box-shadow: none; background: var(--grad-btn); }

.nav-toggle { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 42px; height: 42px; flex: none; background: var(--surface); border: none; border-radius: 14px; padding: 0; z-index: 60; box-shadow: var(--sh-out-sm); }
.nav-toggle:active { box-shadow: var(--sh-in-sm); }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--grad-btn); color: #fff; padding: 13px 26px; border-radius: 15px;
  font-size: 13.5px; font-weight: 700; letter-spacing: 0;
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 6px 6px 14px var(--shadow-dark), -4px -4px 10px var(--shadow-light), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.12); }
.btn:active { transform: translateY(0); box-shadow: inset 3px 3px 7px rgba(0, 0, 0, .4), inset -2px -2px 5px rgba(255, 255, 255, .08); }
.btn.sky { border: 1px solid rgba(255, 255, 255, .1); background: var(--grad-btn); color: #fff; }
.btn.sky:hover { filter: brightness(1.12); }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--glass-border); box-shadow: var(--sh-out-sm); }
.btn.ghost:hover { background: var(--surface-2); filter: none; }
.btn.ghost:active { box-shadow: var(--sh-in-sm); }
.btn.light { background: var(--surface); color: var(--ink); border: 1px solid var(--glass-border); box-shadow: var(--sh-out-sm); }
.btn.light:active { box-shadow: var(--sh-in-sm); }
.btn.block { width: 100%; }
nav.links a.btn { opacity: 1; padding: 11px 22px; }
nav.links a.btn.sky { color: #fff; }

/* ---------- HERO ---------- */
.hero { padding: 70px 0 80px; position: relative; overflow: hidden; background: transparent; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 50px; }
.badge {
  display: inline-flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted);
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 22px; font-family: var(--display); font-weight: 700;
  background: var(--surface); box-shadow: var(--sh-in-sm); padding: 8px 16px 8px 12px; border-radius: 999px;
}

/* ---------- HERO CODE BADGE (live typing) ---------- */
.hero-badge-wrap { display: flex; margin-bottom: 22px; }
.badge.code-badge {
  margin: 0; text-transform: none; letter-spacing: .2px; gap: 0; font-family: var(--mono); font-weight: 500;
  background: var(--navy-panel); border: 1px solid rgba(255, 255, 255, .1); border-radius: 16px;
  color: #b7e6c9; padding: 10px 18px; min-width: 0; max-width: 100%;
  box-shadow: 8px 8px 18px var(--shadow-dark), -6px -6px 14px var(--shadow-light), inset 0 1px 0 rgba(255, 255, 255, .1);
  backdrop-filter: blur(10px);
  width: 348px;
}
.code-badge .prompt { color: #6fb7ea; margin-right: 8px; font-weight: 600; flex: none; }
.code-badge .code-line { white-space: nowrap; overflow: hidden; color: #cfe8fb; font-size: 12px; }
.code-badge .code-line .cd-kw { color: #7cc0ec; }
.code-badge .code-line .cd-str { color: #8fdba8; }
.code-badge .caret { display: inline-block; width: 7px; margin-left: 3px; color: #cfe8fb; flex: none; animation: blink .9s steps(1) infinite; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- THEME TOGGLE ---------- */
.theme-toggle-wrap { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); }
.theme-toggle-wrap .bracket { color: var(--muted); font-size: 17px; font-weight: 600; line-height: 1; user-select: none; }
.theme-toggle {
  position: relative; display: inline-flex; align-items: center; width: 46px; height: 26px;
  background: var(--surface); border: none; border-radius: 999px; padding: 3px;
  box-shadow: var(--sh-in-sm);
  transition: background-color .25s ease;
}
.theme-toggle .toggle-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: var(--navy);
  display: flex; align-items: center; justify-content: center; font-size: 10px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, .3);
  transform: translateX(0); transition: transform .25s ease, background-color .25s ease;
}
.theme-toggle .toggle-thumb::before { font-family: "Font Awesome 6 Free"; font-weight: 900; content: "\f185"; color: #f0b95c; font-size: 10px; }
.theme-toggle[aria-checked="true"] .toggle-thumb { transform: translateX(20px); background: #eef1f5; }
.theme-toggle[aria-checked="true"] .toggle-thumb::before { content: "\f186"; color: #3b4a6b; }

h1.headline { font-size: 50px; line-height: 1.08; font-weight: 800; letter-spacing: -.035em; max-width: 580px; margin: 0 0 20px; color: var(--ink); }
h1.headline em { font-style: normal; background: linear-gradient(135deg, #2f6fa8, #6fb7ea); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-left .sub { font-size: 16px; color: var(--muted); max-width: 470px; margin-bottom: 30px; line-height: 1.75; font-weight: 500; }
.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 34px; }
.hero-stats { display: flex; gap: 18px; flex-wrap: wrap; }
.hero-stats .hstat {
  padding: 14px 20px; border-radius: var(--radius-md); background: var(--surface);
  box-shadow: var(--sh-out-sm);
}
.hero-stats .hstat b { display: block; font-family: var(--display); font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.hero-stats .hstat span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }

/* code editor panel — glass */
.editor-card {
  background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); border-radius: 30px;
  box-shadow: 14px 14px 30px var(--shadow-dark), -12px -12px 26px var(--shadow-light), var(--glass-hi);
  overflow: hidden; position: relative; z-index: 1;
  animation: floaty 6s ease-in-out infinite;
}
.editor-bar { display: flex; align-items: center; gap: 8px; padding: 14px 20px; background: rgba(255, 255, 255, .22); border-bottom: 1px solid var(--glass-border); }
html[data-theme="dark"] .editor-bar { background: rgba(255, 255, 255, .03); }
.editor-bar .dot { width: 11px; height: 11px; border-radius: 50%; box-shadow: inset 1px 1px 2px rgba(255, 255, 255, .5), 1px 1px 3px rgba(0, 0, 0, .2); }
.editor-bar .dot.r { background: #f1786b; }
.editor-bar .dot.y { background: #f0b95c; }
.editor-bar .dot.g { background: #6cc292; }
.editor-bar .filename { margin-left: 10px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.editor-body { padding: 26px 26px 30px; font-family: var(--mono); font-size: 13.5px; line-height: 2; color: var(--ink-soft); }
.editor-body .ln { color: var(--soft); display: inline-block; width: 20px; user-select: none; }
.editor-body .kw { color: var(--sky-deep); }
.editor-body .prop { color: #a76b3e; }
.editor-body .str { color: #3f8a5b; }
.editor-body .punc { color: var(--muted); }
.editor-body .bool { color: #b3548a; }
html[data-theme="dark"] .editor-body .prop { color: #e0a878; }
html[data-theme="dark"] .editor-body .str { color: #8fdba8; }
html[data-theme="dark"] .editor-body .bool { color: #e58fc0; }
.editor-footer { display: flex; align-items: center; gap: 10px; padding: 14px 26px; background: rgba(255, 255, 255, .22); border-top: 1px solid var(--glass-border); font-family: var(--mono); font-size: 12px; color: var(--muted); }
html[data-theme="dark"] .editor-footer { background: rgba(255, 255, 255, .03); }
.editor-footer .live-dot { width: 8px; height: 8px; border-radius: 50%; background: #6cc292; box-shadow: 0 0 10px #6cc292; animation: blink 1.4s infinite; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  h1.headline { font-size: 38px; max-width: 100%; }
}

/* ---------- PAGE HERO ---------- */
.page-hero { padding: 60px 0 30px; background: transparent; }
.page-hero h1 { font-size: 38px; line-height: 1.14; font-weight: 800; letter-spacing: -.03em; max-width: 640px; margin: 0 0 14px; color: var(--ink); }
.page-hero p.lead { font-size: 15.5px; color: var(--muted); max-width: 560px; font-weight: 500; }

/* ---------- SECTIONS ---------- */
.section { padding: 80px 0; }
.section.tight { padding: 52px 0; }
.section.on-cream, .section.on-gray {
  background: var(--band); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 var(--glass-border), inset 0 -1px 0 rgba(148, 163, 180, .18);
}
.section-title { font-size: 28px; font-weight: 800; margin: 0 0 30px; letter-spacing: -.03em; color: var(--ink); }
.eyebrow {
  margin-bottom: 16px; font-size: 11.5px; color: var(--sky-deep); letter-spacing: .16em; text-transform: uppercase;
  font-family: var(--display); font-weight: 800;
}

/* ---------- SPLIT GRID ---------- */
.split-grid { display: grid; grid-template-columns: 300px 1fr; gap: 50px; }
.split-grid.no-divider { border: none; }
.split-lead { font-size: 16.5px; color: var(--ink-soft); line-height: 1.75; font-weight: 500; }
.split-lead.as-heading { font-family: var(--display); font-size: 21px; font-weight: 700; line-height: 1.5; color: var(--ink); letter-spacing: -.02em; }
@media (max-width: 900px) { .split-grid { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- GLASS / SOFT CARD BASE ---------- */
.service-card, .work-card, .process-step, .fact-card, .detail-card, .cred-card, .skill-logo-card, .design-process-box, .contact-side {
  background: var(--glass);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--sh-out), var(--glass-hi);
}

/* ---------- SERVICES ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card {
  border-radius: var(--radius-lg); padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.service-card:hover { transform: translateY(-5px); box-shadow: 12px 16px 28px var(--shadow-dark), -8px -8px 18px var(--shadow-light), var(--glass-hi); }
.service-card .icon {
  width: 48px; height: 48px; border-radius: 16px; background: var(--surface); box-shadow: var(--sh-in-sm);
  display: flex; align-items: center; justify-content: center; font-size: 19px; color: var(--sky-deep);
}
.service-card h3 { font-size: 16.5px; font-weight: 800; color: var(--ink); margin: 0; letter-spacing: -.02em; }
.service-card p { font-size: 13.5px; color: var(--muted); line-height: 1.7; margin: 0; font-weight: 500; }
.service-card.featured { background: var(--grad); }
.service-card.featured .icon { background: rgba(255, 255, 255, .45); }
html[data-theme="dark"] .service-card.featured .icon { background: rgba(255, 255, 255, .06); }

@media (max-width: 900px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services-grid { grid-template-columns: 1fr; } }

/* ---------- DESIGN PROCESS BOX ---------- */
.design-process-box { margin-top: 34px; border-radius: var(--radius-lg); padding: 30px 32px; }
.design-process-box h3 { font-size: 17px; font-weight: 800; color: var(--ink); margin: 0 0 10px; }
.design-process-box > p { font-size: 14px; color: var(--muted); margin: 0 0 14px; font-weight: 500; }
.design-process-list { list-style: none; counter-reset: dstep; display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; }
.design-process-list li { counter-increment: dstep; position: relative; padding-left: 42px; font-size: 14px; color: var(--ink-soft); line-height: 1.65; font-weight: 500; }
.design-process-list li::before {
  content: counter(dstep); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 10px;
  background: var(--grad-btn); color: #fff; font-family: var(--display); font-weight: 800; font-size: 12.5px;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--sh-out-sm);
}
.design-process-list li strong { color: var(--ink); font-weight: 800; }

/* ---------- PROJECT CARDS ---------- */
.works-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.work-card { border-radius: var(--radius-lg); overflow: hidden; transition: transform .25s ease, box-shadow .3s ease; display: flex; flex-direction: column; padding: 10px; }
.work-card:hover { transform: translateY(-6px); box-shadow: 12px 18px 32px var(--shadow-dark), -8px -8px 18px var(--shadow-light), var(--glass-hi); }
.work-shot { aspect-ratio: 16/10.5; overflow: hidden; background: var(--gray); position: relative; border-radius: 18px; box-shadow: var(--sh-in); }
.work-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .5s ease; }
.work-card:hover .work-shot img { transform: scale(1.04); }
.work-body { padding: 18px 14px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.work-body h3 { font-size: 17px; font-weight: 800; color: var(--ink); margin: 0; }
.work-body p { font-size: 13.5px; color: var(--muted); line-height: 1.65; margin: 0; font-weight: 500; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.tag { font-size: 11px; background: var(--surface); box-shadow: var(--sh-in-sm); color: var(--muted); border: none; padding: 5px 12px; border-radius: 999px; font-weight: 700; letter-spacing: .01em; }

@media (max-width: 900px) { .works-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .works-grid { grid-template-columns: 1fr; } }

/* ---------- PROJECTS SHOWCASE ---------- */
.work-shot.placeholder { display: flex; align-items: center; justify-content: center; background: var(--grad); font-size: 42px; color: var(--ink); opacity: .85; }
.project-showcase .work-card.is-extra { display: none; }
.project-showcase.show-all .work-card.is-extra { display: flex; }

/* ---------- STATS / GRADIENT PANEL ---------- */
.gradient-panel {
  background: var(--grad); border-radius: 40px; padding: 60px 50px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--sh-out), var(--glass-hi);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
}
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-row .stat b { display: block; font-family: var(--display); font-size: 36px; font-weight: 800; color: var(--ink); letter-spacing: -.03em; }
.stat-row .stat span { font-size: 12px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; opacity: .85; }
@media (max-width: 700px) { .stat-row { grid-template-columns: 1fr 1fr; row-gap: 30px; } .gradient-panel { padding: 40px 26px; border-radius: 28px; } }

/* ---------- TECH STACK MARQUEE (pressed track) ---------- */
.marquee { overflow: hidden; margin: 0 max(16px, calc((100% - var(--maxw)) / 2 + 16px)); border-radius: 22px; padding: 22px 0; background: var(--surface); box-shadow: var(--sh-in); }
.marquee-track { display: flex; gap: 60px; width: max-content; animation: scrollx 26s linear infinite; }
.marquee-track span { font-family: var(--display); font-weight: 700; font-size: 14.5px; color: var(--muted); white-space: nowrap; display: flex; align-items: center; gap: 10px; }
.marquee-track span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sky-deep); box-shadow: 0 0 8px rgba(111, 183, 234, .8); }
@keyframes scrollx { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- PROCESS STEPS ---------- */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.process-step { border-radius: var(--radius-lg); padding: 26px 22px; position: relative; }
.process-step .n { font-family: var(--display); font-size: 13px; color: var(--sky-deep); font-weight: 800; margin-bottom: 14px; display: inline-block; padding: 4px 11px; border-radius: 10px; background: var(--surface); box-shadow: var(--sh-in-sm); }
.process-step h3 { font-size: 15.5px; font-weight: 800; color: var(--ink); margin: 0 0 8px; }
.process-step p { font-size: 13px; color: var(--muted); line-height: 1.65; margin: 0; font-weight: 500; }
@media (max-width: 900px) { .process-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .process-grid { grid-template-columns: 1fr; } }

/* ---------- TESTIMONIALS ---------- */
.cred-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; align-items: stretch; }
.cred-card { border-radius: var(--radius-lg); padding: 28px; display: flex; flex-direction: column; justify-content: space-between; }
.cred-card p.quote { margin: 0 0 20px; font-size: 14.5px; color: var(--ink-soft); line-height: 1.7; font-style: normal; font-weight: 500; }
.cite { font-size: 12px; color: var(--muted); font-weight: 600; }
.cite b { color: var(--ink); display: block; font-family: var(--display); font-weight: 800; font-size: 13px; margin-bottom: 2px; }
@media (max-width: 900px) { .cred-grid { grid-template-columns: 1fr; } }

/* ---------- CTA SECTION (glass panel) ---------- */
.cta-section {
  position: relative; padding: 80px 0; text-align: center; overflow: hidden;
  width: calc(100% - 32px); max-width: var(--maxw); margin: 40px auto;
  border-radius: 40px; color: var(--ink);
  background: var(--glass);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: 14px 14px 30px var(--shadow-dark), -12px -12px 26px var(--shadow-light), var(--glass-hi);
}
.cta-section::before { content: ""; position: absolute; top: -200px; left: 50%; transform: translateX(-50%); width: 640px; height: 520px; border-radius: 50%; background: radial-gradient(closest-side, rgba(111, 183, 234, .55), transparent); opacity: .7; filter: blur(30px); pointer-events: none; }
.cta-section .wrap { position: relative; z-index: 1; max-width: 680px; }
.cta-section .eyebrow { color: var(--sky-deep); }
.cta-section h2 { font-size: 34px; font-weight: 800; margin: 10px 0 16px; letter-spacing: -.03em; color: var(--ink); }
.cta-section p { font-size: 15px; color: var(--muted); line-height: 1.75; margin-bottom: 30px; font-weight: 500; }

/* ---------- CONTACT ---------- */
.contact-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 26px; align-items: stretch; }
.contact-form-card {
  background: var(--navy-panel); border-radius: var(--radius-lg); padding: 36px; color: #fff;
  display: flex; flex-direction: column; gap: 18px;
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 14px 14px 30px var(--shadow-dark), -10px -10px 22px var(--shadow-light), inset 0 1px 0 rgba(255, 255, 255, .12);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label { font-size: 12px; color: #b9c3d2; letter-spacing: .04em; font-family: var(--display); font-weight: 700; }
.form-field input, .form-field textarea {
  background: rgba(0, 0, 0, .22); border: none; border-radius: var(--radius-sm);
  padding: 13px 16px; color: #fff; font-family: var(--body); font-weight: 600; font-size: 14px; resize: vertical;
  box-shadow: inset 3px 3px 7px rgba(0, 0, 0, .35), inset -2px -2px 6px rgba(255, 255, 255, .06);
}
.form-field input::placeholder, .form-field textarea::placeholder { color: #8591a3; font-weight: 500; }
.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--sky); }
.contact-side { border-radius: var(--radius-lg); padding: 36px; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; }
.contact-side h3 { font-size: 18px; font-weight: 800; margin: 0 0 8px; line-height: 1.4; color: var(--ink); }
.contact-side p { font-size: 13.5px; color: var(--muted); margin: 0; font-weight: 500; }
.pill { display: inline-block; font-size: 12px; background: var(--surface); box-shadow: var(--sh-in-sm); padding: 6px 14px; border-radius: 999px; color: var(--muted); font-family: var(--display); font-weight: 700; }

.details-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 40px; }
.detail-card { border-radius: var(--radius-lg); padding: 22px; }
.detail-card .icon { width: 42px; height: 42px; border-radius: 14px; background: var(--surface); box-shadow: var(--sh-in-sm); color: var(--sky-deep); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; font-size: 16px; }
.detail-card .eyebrow { margin-bottom: 6px; }
.detail-card a, .detail-card span.value { font-size: 14.5px; font-weight: 700; font-family: var(--display); color: var(--ink); word-break: break-word; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } .details-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .details-grid { grid-template-columns: 1fr; } }

/* ---------- LET'S TALK POPUP (glass slide-in) ---------- */
.talk-popup-overlay {
  position: fixed; inset: 0; background: rgba(18, 24, 34, .5); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  opacity: 0; visibility: hidden; z-index: 998;
  transition: opacity .35s ease, visibility 0s linear .35s;
}
.talk-popup-overlay.active { opacity: 1; visibility: visible; transition: opacity .35s ease; }

.talk-popup {
  position: fixed; top: 12px; left: 12px; height: calc(100% - 24px); height: calc(100dvh - 24px);
  width: min(430px, calc(100vw - 24px));
  background: var(--navy-panel); color: #fff;
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 28px;
  backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  z-index: 999;
  transform: translateX(-110%);
  transition: transform .45s cubic-bezier(.16, 1, .3, 1);
  overflow-y: auto;
  box-shadow: 24px 0 60px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .12);
  padding: 28px 26px 40px;
}
.talk-popup.active { transform: translateX(0); }

.talk-popup-close, .success-popup-close {
  position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border-radius: 13px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 15px;
  box-shadow: 3px 3px 8px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .1);
  transition: background .2s ease, transform .2s ease;
}
.talk-popup-close:hover, .success-popup-close:hover { background: rgba(255, 255, 255, .16); transform: rotate(90deg); }

.talk-popup-inner { margin-top: 34px; }
.talk-popup h2 { font-size: 21px; font-weight: 800; margin: 0 0 10px; color: #fff; line-height: 1.32; }
.talk-popup-lead { font-size: 13.5px; color: #b9c3d2; line-height: 1.7; margin: 0 0 24px; font-weight: 500; }

body.talk-popup-open { overflow: hidden; }

@media (max-width: 520px) {
  .talk-popup { top: 8px; left: 8px; width: calc(100vw - 16px); height: calc(100dvh - 16px); padding: 22px 18px 34px; }
  .talk-popup h2 { font-size: 19px; }
}

/* ---------- SUCCESS POPUP ---------- */
.success-popup-overlay {
  position: fixed; inset: 0; background: rgba(18, 24, 34, .5); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  opacity: 0; visibility: hidden; z-index: 1000;
  transition: opacity .35s ease, visibility 0s linear .35s;
}
.success-popup-overlay.active { opacity: 1; visibility: visible; transition: opacity .35s ease; }

.success-popup {
  position: fixed; top: 50%; left: 50%; z-index: 1001;
  width: min(380px, 90vw);
  background: var(--navy-panel); color: #fff;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 30px;
  backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  padding: 40px 32px 34px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .12);
  transform: translate(-50%, -50%) scale(.9);
  opacity: 0; visibility: hidden;
  transition: transform .35s cubic-bezier(.16, 1, .3, 1), opacity .3s ease, visibility 0s linear .35s;
}
.success-popup.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1; visibility: visible;
  transition: transform .35s cubic-bezier(.16, 1, .3, 1), opacity .3s ease;
}
.success-popup-close { top: 16px; right: 16px; width: 36px; height: 36px; font-size: 14px; }
.success-popup-icon {
  width: 66px; height: 66px; border-radius: 22px; margin: 0 auto 18px;
  background: rgba(111, 183, 234, .18); color: #7cc0ec;
  box-shadow: inset 3px 3px 7px rgba(0, 0, 0, .3), inset -2px -2px 6px rgba(255, 255, 255, .06);
  display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.success-popup h2 { font-size: 21px; font-weight: 800; margin: 0 0 10px; color: #fff; line-height: 1.32; }
.success-popup p { font-size: 14px; color: #b9c3d2; line-height: 1.65; margin: 0; font-weight: 500; }

body.success-popup-open { overflow: hidden; }

@media (max-width: 520px) { .success-popup { padding: 34px 24px 28px; } }

/* ---------- TIMELINE ---------- */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { display: grid; grid-template-columns: 120px 26px 1fr; gap: 20px; padding-bottom: 40px; position: relative; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item .t-year { font-family: var(--display); font-size: 13px; color: var(--sky-deep); font-weight: 800; padding-top: 2px; }
.timeline-item .t-dot-col { display: flex; flex-direction: column; align-items: center; }
.timeline-item .t-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--navy); flex: none; margin-top: 4px; box-shadow: 0 0 0 4px var(--surface), var(--sh-out-sm); }
.timeline-item .t-line { flex: 1; width: 4px; border-radius: 4px; background: var(--surface); box-shadow: var(--sh-in-sm); margin-top: 8px; }
.timeline-item:last-child .t-line { display: none; }
.timeline-item h3 { font-size: 16px; font-weight: 800; color: var(--ink); margin: 0 0 6px; }
.timeline-item p { font-size: 13.5px; color: var(--muted); line-height: 1.7; margin: 0; font-weight: 500; }
@media (max-width: 600px) { .timeline-item { grid-template-columns: 22px 1fr; } .timeline-item .t-year { grid-column: 1 / 3; padding-top: 0; } .timeline-item .t-dot-col { grid-row: 2; } }

/* ---------- SKILL BARS ---------- */
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; }
.skill-row { display: flex; flex-direction: column; gap: 8px; }
.skill-row .s-top { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink); font-weight: 700; }
.skill-row .s-top span.pct { color: var(--muted); font-weight: 700; font-family: var(--display); font-size: 12px; }
.skill-bar { height: 10px; border-radius: 999px; background: var(--surface); box-shadow: var(--sh-in-sm); overflow: hidden; }
.skill-bar i { display: block; height: 100%; border-radius: 999px; background: var(--grad-btn); }

.skill-category { margin-bottom: 34px; }
.skill-category:last-child { margin-bottom: 0; }
.skill-cat-title { font-family: var(--display); font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 16px; }
.skill-logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 16px; }
.skill-logo-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center;
  border-radius: var(--radius-md); padding: 18px 10px;
  box-shadow: var(--sh-out-sm), var(--glass-hi);
  transition: transform .25s ease, box-shadow .3s ease;
}
.skill-logo-card:hover { transform: translateY(-4px); box-shadow: 8px 12px 22px var(--shadow-dark), -6px -6px 14px var(--shadow-light), var(--glass-hi); }
.skill-logo-icon { width: 46px; height: 46px; border-radius: 14px; background: #fff; box-shadow: var(--sh-in-sm); display: flex; align-items: center; justify-content: center; padding: 9px; flex: none; }
.skill-logo-icon img { width: 100%; height: 100%; object-fit: contain; }
.skill-logo-name { font-size: 12.5px; font-weight: 700; color: var(--ink); line-height: 1.3; }
@media (max-width: 700px) {
  .skill-logo-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; }
  .skill-logo-card { padding: 14px 8px; }
}
@media (max-width: 700px) { .skills-grid { grid-template-columns: 1fr; } }

/* ---------- FACT CARDS ---------- */
.fact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.fact-card { border-radius: var(--radius-lg); padding: 24px; }
.fact-card .n { font-family: var(--display); font-size: 30px; font-weight: 800; color: var(--sky-deep); margin: 0 0 10px; letter-spacing: -.03em; }
.fact-card h4 { font-size: 13.5px; font-weight: 800; color: var(--ink); margin: 0 0 8px; }
.fact-card p { font-size: 13px; color: var(--muted); line-height: 1.65; margin: 0; font-weight: 500; }
@media (max-width: 700px) { .fact-grid { grid-template-columns: 1fr; } }

/* ---------- FOOTER (dark glass panel) ---------- */
footer {
  position: relative; background: var(--navy-panel); color: #d6dbe3; padding: 64px 0 0; overflow: hidden;
  width: calc(100% - 32px); max-width: calc(var(--maxw) + 40px); margin: 40px auto 16px;
  border-radius: 40px; border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 14px 14px 30px var(--shadow-dark), -10px -10px 22px var(--shadow-light), inset 0 1px 0 rgba(255, 255, 255, .12);
}
footer::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(560px 280px at 12% 0%, rgba(111, 183, 234, .16), transparent 60%),
    radial-gradient(480px 260px at 88% 10%, rgba(176, 160, 232, .12), transparent 60%);
}
footer::after { content: none; }
footer .wrap { position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 46px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.footer-col h6 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .14em; color: #8f9bb0; margin-bottom: 16px; font-family: var(--display); font-weight: 800; }
.footer-col a, .footer-col p { display: block; font-size: 13.5px; color: #b9c3d2; margin-bottom: 10px; line-height: 1.6; font-weight: 500; }
.footer-col a { position: relative; width: fit-content; transition: color .2s ease, transform .2s ease; }
.footer-col a:hover { color: #fff; transform: translateX(2px); }
.footer-brand .logo { margin-bottom: 14px; display: flex; }
.footer-brand p { max-width: 260px; color: #9ba6b8; }
.social-row { display: flex; gap: 12px; margin-top: 16px; }
.social-row a {
  width: 38px; height: 38px; border-radius: 13px; background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 3px 3px 8px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .1);
  display: flex; align-items: center; justify-content: center; font-size: 12px; margin: 0;
  font-family: var(--display); font-weight: 800;
  transition: background .2s ease, color .2s ease, transform .2s ease, border-color .2s ease;
}
.social-row a:hover { background: var(--sky-deep); border-color: var(--sky-deep); color: #fff; transform: translateY(-3px); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; font-size: 12.5px; color: #8f9bb0; flex-wrap: wrap; gap: 10px; font-weight: 500; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .badge.code-badge { width: 305px; }
}

/* ---------- MOBILE NAV DROPDOWN (glass) ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  nav.links {
    display: flex;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--header-bg);
    backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 12px 18px 22px;
    box-shadow: 14px 18px 36px var(--shadow-dark), var(--glass-hi);
    white-space: normal;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
  }
  nav.links.open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
  html[data-theme="light"] nav.links, html:not([data-theme]) nav.links { background: rgba(230, 235, 240, .88); }
  html[data-theme="dark"] nav.links { background: rgba(30, 36, 44, .9); }
  .page-links { position: static; transform: none; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; }
  nav.links a { padding: 14px 4px; opacity: .9; width: 100%; text-align: center; }
  .page-links a { padding: 14px 4px; }
  nav.links a.btn.nav-cta { margin-top: 12px; width: 100%; justify-content: center; }
}

/* ---------- SMALL PHONES ---------- */
@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  header.nav { padding: 8px 10px 0; }
  body { padding-top: 68px; }
  .nav-inner { padding: 8px 10px 8px 14px; border-radius: 20px; }
  h1.headline { font-size: 32px; }
  .section { padding: 56px 0; }
  .section.tight { padding: 40px 0; }
  .section-title { font-size: 24px; }
  .page-hero h1 { font-size: 29px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  footer { border-radius: 30px; width: calc(100% - 20px); }
  .cta-section { padding: 60px 0; border-radius: 30px; width: calc(100% - 20px); }
  .cta-section h2 { font-size: 26px; }
  .btn { padding: 12px 20px; font-size: 13px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
  .hero-stats { gap: 12px; }
  .hero-stats .hstat { padding: 12px 16px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .hero-badge-wrap { margin-bottom: 16px; }
  .badge.code-badge { padding: 8px 12px; }
  .code-badge .code-line { font-size: 10.5px; }
  .contact-form-card, .contact-side { padding: 26px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .animate-once, .stagger-children > *, .editor-card, .marquee-track, .editor-footer .live-dot, .code-badge .caret { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* browsers without backdrop-filter: fall back to a solid soft surface */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav-inner, .service-card, .work-card, .process-step, .fact-card, .detail-card, .cred-card, .skill-logo-card, .design-process-box, .contact-side, .editor-card, .cta-section, .gradient-panel { background: var(--surface); }
}

/* ---------- MISC ---------- */
.center { text-align: center; }
.max-lead { max-width: 640px; margin: 0 auto; text-align: center; }
