/* =========================================================
   Gomile L. Chimbalanga — Portfolio
   Type: Fraunces everywhere (elegant high-contrast serif, variable). Self-hosted. To use a licensed font such as The Seasons instead,
   add its @font-face and change --font-display below.
   Light, warm palette with dark accent bands.
   Colours, type and spacing live in :root — tweak there first.
   ========================================================= */

@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/fraunces-latin-standard-normal.woff2") format("woff2-variations");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/fraunces-latin-standard-italic.woff2") format("woff2-variations");
  font-weight: 100 900; font-style: italic; font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0b0b0c;
  --bg-2: #111112;
  --surface: #161715;
  --ink: #f2f0e9;
  --muted: #9b998f;
  --faint: #64635c;
  --line: rgb(242 240 233 / 10%);
  --line-2: rgb(242 240 233 / 18%);
  --accent: #c6f36b;
  --accent-deep: #c6f36b;          /* accent used as text on the page background */
  --fill: #f2f0e9;                  /* inverse fill: buttons, pills, number chips */
  --on-fill: #131411;
  --fill-accent: #3d6912;
  --band: #131412;                  /* dark bands: marquee, more work, contact */
  --band-border: rgb(242 240 233 / 10%);
  --on-dark: #f3f1ea;
  --on-dark-muted: #a3a197;
  --line-dark: rgb(243 241 234 / 12%);
  --dark: #131411;                  /* text on lime */
  --glass: rgb(22 23 21 / 82%);
  --header-bg: rgb(11 11 12 / 80%);
  --footer-big: #161715;
  --cursor-line: rgb(242 240 233 / 45%);
  --hl-color: var(--accent);
  --hl-bg: none;
  --cv-1: 28%; --cv-2: 40%; --cv-3: 13%;
  --shadow: 0 20px 40px -28px rgb(0 0 0 / 70%);
  --font: "Fraunces", Georgia, "Times New Roman", serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --w: 1240px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f1ea;
  --bg-2: #eae7dd;
  --surface: #fbfaf6;
  --ink: #131411;
  --muted: #5d5c55;
  --faint: #9d9b91;
  --line: rgb(19 20 17 / 10%);
  --line-2: rgb(19 20 17 / 18%);
  --accent-deep: #3d6912;
  --fill: #131411;
  --on-fill: #f3f1ea;
  --fill-accent: #c6f36b;
  --band: #131411;
  --band-border: transparent;
  --glass: rgb(251 250 246 / 90%);
  --header-bg: rgb(243 241 234 / 82%);
  --footer-big: #e4e1d7;
  --cursor-line: rgb(19 20 17 / 40%);
  --hl-color: var(--accent-deep);
  --hl-bg: none;
  --cv-1: 82%; --cv-2: 70%; --cv-3: 90%;
  --shadow: 0 1px 0 rgb(255 255 255 / 70%) inset, 0 20px 40px -28px rgb(19 20 17 / 35%);
}
html { transition: background-color .4s ease; }
body { transition: background-color .4s ease, color .4s ease; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16.5px; line-height: 1.65; font-optical-sizing: auto; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 4px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--dark); }
h1, h2, h3, p { margin: 0; }
main { overflow-x: clip; }
[hidden] { display: none !important; }
strong { font-weight: 700; }
.container { width: min(var(--w), 100% - 64px); margin-inline: auto; }
.section { padding-block: clamp(90px, 11vw, 140px); }
.skip-link { position: fixed; top: -80px; left: 10px; z-index: 200; padding: 10px 14px; background: var(--fill); color: var(--on-fill); }
.skip-link:focus { top: 10px; }

/* Signature: light condensed words with a lime highlighter stroke */
.hl { font-family: var(--font-display); font-style: italic; font-weight: 400; letter-spacing: -.02em; color: var(--hl-color); background: var(--hl-bg); -webkit-box-decoration-break: clone; box-decoration-break: clone; padding-inline: .04em; }
.thin { font-family: var(--font-display); font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: -.02em; }

/* ---------- Preloader ---------- */
.loader { position: fixed; inset: 0; z-index: 150; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: var(--bg); color: var(--ink); transition: opacity .6s ease .15s, visibility .6s .15s; }
.js .loader { display: flex; }
.loader-ring { position: relative; width: 210px; height: 210px; margin-bottom: 18px; }
.loader-ring svg { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; transform: rotate(-90deg); }
.loader-ring circle { fill: none; stroke-width: 2.5; }
.ring-track { stroke: var(--line-2); }
.ring-bar { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 351.86; stroke-dashoffset: 351.86; }
.loader-ring picture { position: absolute; inset: 4px; border-radius: 50%; overflow: hidden; }
.loader-ring img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.loader-name { font-family: var(--font-display); font-size: 19px; font-weight: 500; letter-spacing: -.01em; }
.loader-sub { font-size: 12.5px; color: var(--muted); }
.loader-count b { font-weight: 600; color: var(--accent-deep); font-variant-numeric: tabular-nums; }
.loader-count::after { content: "%"; color: var(--accent-deep); font-weight: 600; }
body.loaded .loader { opacity: 0; visibility: hidden; }
body.loaded .loader-ring { transform: scale(.9); transition: transform .6s var(--ease); }

.progress { position: fixed; top: 0; left: 0; z-index: 120; height: 3px; width: 100%; background: var(--accent-deep); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Custom cursor ---------- */
.cursor, .cursor-dot { display: none; }
@media (pointer: fine) {
  .js .cursor, .js .cursor-dot { position: fixed; top: 0; left: 0; z-index: 140; pointer-events: none; border-radius: 50%; }
  .js .cursor { display: grid; place-items: center; width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 1px solid var(--cursor-line); transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s var(--ease), border-color .35s var(--ease); }
  .js .cursor-dot { display: block; width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--ink); }
  .cursor-label { font-size: 13px; font-weight: 700; color: var(--dark); opacity: 0; transform: scale(.6); transition: .3s var(--ease); }
  .cursor.is-link { width: 58px; height: 58px; margin: -29px 0 0 -29px; border-color: var(--ink); }
  .cursor.is-view { width: 96px; height: 96px; margin: -48px 0 0 -48px; background: var(--accent); border-color: var(--accent); }
  .cursor.is-view .cursor-label { opacity: 1; transform: none; }
  .cursor.is-view + .cursor-dot { opacity: 0; }
  .cursor.on-dark { border-color: rgb(243 241 234 / 45%); }
  .cursor.on-dark + .cursor-dot { background: var(--accent); }
}

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 100; border-bottom: 1px solid transparent; transition: background .4s ease, border-color .4s ease, transform .5s var(--ease); }
.site-header.scrolled { background: var(--header-bg); border-color: var(--line); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); }
.site-header.hide { transform: translateY(-100%); }
.nav-wrap { height: 78px; display: flex; align-items: center; gap: 28px; }
.brand { font-size: 24px; font-weight: 800; letter-spacing: -.04em; }
.brand span { color: var(--accent-deep); }
.main-nav { display: flex; gap: 30px; margin-left: auto; }
.main-nav a { position: relative; font-size: 15px; font-weight: 500; color: var(--muted); transition: color .3s ease; }
.main-nav a::after { content: ""; position: absolute; left: 0; bottom: -5px; width: 100%; height: 2px; background: var(--accent-deep); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.main-nav a:hover, .main-nav a.active { color: var(--ink); }
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 99px; background: var(--fill); color: var(--on-fill); font-size: 14px; font-weight: 600; white-space: nowrap; transition: background .3s ease, color .3s ease; }
.nav-cta:hover { background: var(--accent); color: var(--dark); }
.pulse-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: #7fc41f; box-shadow: 0 0 0 0 rgb(127 196 31 / 55%); animation: pulse 2s infinite; }
.nav-cta .pulse-dot { background: var(--accent); }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgb(127 196 31 / 0%); } 100% { box-shadow: 0 0 0 0 rgb(127 196 31 / 0%); } }
.theme-toggle { position: relative; display: grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0; border: 1px solid var(--line-2); border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer; overflow: hidden; transition: background .3s ease, border-color .3s ease, transform .5s var(--ease); }
.theme-toggle:hover { border-color: var(--accent-deep); transform: rotate(-20deg); }
.theme-toggle svg { position: absolute; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--ease), opacity .3s ease; }
.theme-toggle .ic-moon { transform: translateY(140%) rotate(-40deg); opacity: 0; }
[data-theme="light"] .theme-toggle .ic-sun { transform: translateY(-140%) rotate(40deg); opacity: 0; }
[data-theme="light"] .theme-toggle .ic-moon { transform: none; opacity: 1; }
.menu-toggle { display: none; position: relative; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-2); border-radius: 50%; background: var(--surface); cursor: pointer; }
.menu-toggle span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--ink); transition: transform .4s var(--ease), top .4s var(--ease); }
.menu-toggle span:first-child { top: 17px; }
.menu-toggle span:last-child { top: 25px; }
.menu-open .menu-toggle span:first-child { top: 21px; transform: rotate(45deg); }
.menu-open .menu-toggle span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Buttons & links ---------- */
.btn { position: relative; display: inline-flex; align-items: center; gap: 14px; height: 56px; padding: 0 26px; border: 0; border-radius: 99px; font-size: 15.5px; font-weight: 600; overflow: hidden; isolation: isolate; cursor: pointer; transition: color .4s var(--ease); }
.btn i { font-style: normal; transition: transform .4s var(--ease); }
.btn:hover i { transform: translateX(3px); }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--accent); transform: translateY(101%); transition: transform .5s var(--ease); }
.btn:hover::before { transform: none; }
.btn-dark { background: var(--fill); color: var(--on-fill); }
.btn-dark:hover { color: var(--dark); }
.btn-ghost { border: 1.5px solid var(--ink); }
.btn-accent { background: var(--accent); color: var(--dark); }
.btn-accent::before { background: var(--on-dark); }
.btn-block { width: 100%; justify-content: center; }
.inline-link { font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; transition: color .3s ease; }
.inline-link:hover { color: var(--accent-deep); }
.magnetic { will-change: transform; }

/* ---------- Labels & headings ---------- */
.label { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.label .num { display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 8px; border-radius: 99px; background: var(--fill); color: var(--fill-accent); font-size: 12px; letter-spacing: .04em; }
.section-head { max-width: 920px; margin-bottom: clamp(48px, 6vw, 76px); }
.section-head-split { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; }
.section-head-split > div { max-width: 840px; }
.section-title { font-family: var(--font-display); font-size: clamp(28px, 2.9vw, 42px); font-weight: 500; line-height: 1.12; letter-spacing: -.015em; }
.section-aside { max-width: 320px; color: var(--muted); font-size: 16px; }

/* ---------- Reveal animations ---------- */
.js .reveal { opacity: 0; transform: translateY(36px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }
.split .ln { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.split .ln > span { display: inline-block; }
.js .split .ln > span { transform: translateY(110%); transition: transform 1.15s var(--ease); }
.js .split.in .ln > span { transform: none; }
.split .ln:nth-child(2) > span { transition-delay: .1s; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 120px 0 40px; overflow: hidden; }
.hero-grid-lines { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 88px 88px; mask-image: radial-gradient(ellipse 75% 65% at 30% 40%, #000 10%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 75% 65% at 30% 40%, #000 10%, transparent 75%); opacity: .7; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 40px; }
.hero .label { color: var(--ink); letter-spacing: .1em; }
.hero-title { font-family: var(--font-display); font-size: clamp(40px, 4.6vw, 66px); font-weight: 500; line-height: 1.04; letter-spacing: -.02em; margin-bottom: 18px; }
.hero-title .hl { font-weight: 400; letter-spacing: -.01em; }
.roles { display: flex; align-items: baseline; flex-wrap: wrap; gap: .35em; min-height: 1.4em; margin-bottom: 20px; font-size: clamp(19px, 1.9vw, 26px); font-weight: 600; letter-spacing: -.03em; }
.roles-static { color: var(--muted); font-weight: 400; }
.roles-swap { display: inline-flex; align-items: baseline; color: var(--accent-deep); }
.caret { display: inline-block; width: 2px; height: .95em; margin-left: 4px; background: var(--accent-deep); transform: translateY(.12em); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-intro { max-width: 560px; margin-bottom: 36px; color: var(--muted); font-size: 18px; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }

.hero-visual { position: relative; justify-self: end; width: min(100%, 500px); }
.portrait { position: relative; aspect-ratio: 1; border-radius: 50% 50% 28px 28px / 40% 40% 28px 28px; overflow: hidden; background: #08080a; box-shadow: 0 40px 80px -40px rgb(19 20 17 / 60%); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 30%; transform: scale(1.08); }
.js .portrait img { transition: transform 1.6s var(--ease); }
html.js body:not(.loaded) .portrait img { transform: scale(1.25); }
.float-chip { position: absolute; z-index: 2; display: flex; flex-direction: column; padding: 10px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 16px 30px -18px rgb(19 20 17 / 40%); animation: float 6s ease-in-out infinite; }
.float-chip b { font-size: 14px; font-weight: 700; }
.float-chip span { font-size: 12px; color: var(--muted); }
.chip-a { top: 20%; left: -16%; }
.chip-b { bottom: 10%; right: -8%; animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-12px); } }
.badge { position: absolute; z-index: 3; top: -4%; right: -2%; width: 120px; height: 120px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--dark); box-shadow: 0 16px 30px -16px rgb(61 105 18 / 60%); }
.badge svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 16s linear infinite; }
.badge text { font-family: var(--font); font-size: 10px; font-weight: 600; letter-spacing: .1em; fill: var(--dark); }
.badge span { font-size: 24px; font-weight: 800; letter-spacing: .05em; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-foot { position: relative; display: flex; align-items: center; margin-top: clamp(40px, 5vw, 64px); padding-top: 20px; border-top: 1px solid var(--line-2); }
.stat { display: flex; align-items: center; gap: 10px; padding-right: 26px; margin-right: 26px; border-right: 1px solid var(--line-2); }
.stat:nth-child(3) { border-right: 0; }
.stat b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.stat b i { font-style: normal; color: var(--accent-deep); margin-inline: 3px; }
.stat sup { font-size: .45em; color: var(--accent-deep); }
.stat span { color: var(--muted); font-size: 12px; line-height: 1.35; }
.hero-loc { display: flex; align-items: center; gap: 8px; margin-left: auto; color: var(--muted); font-size: 13px; }
.pin { width: 10px; height: 10px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--accent-deep); }

/* ---------- Marquee (dark band) ---------- */
.marquee { overflow: hidden; padding-block: 11px; background: var(--band); border-block: 1px solid var(--band-border); color: var(--on-dark); }
.marquee-track { display: flex; align-items: center; gap: 22px; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { font-size: clamp(14px, 1.4vw, 19px); font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.marquee span.thin { color: var(--accent); }
.marquee em { color: var(--accent); font-style: normal; font-size: 11px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(40px, 7vw, 100px); align-items: center; }
.about-photo { position: relative; }
.about-photo::before { content: ""; position: absolute; inset: 16px -14px -14px 16px; z-index: -1; border-radius: 28px; background: var(--accent); }
.about-frame { position: relative; aspect-ratio: 4 / 4.9; border-radius: 28px; overflow: hidden; background: #0b0b0b; }
.about-frame img { position: absolute; left: 0; top: -10%; width: 100%; height: 120%; object-fit: cover; object-position: 50% 30%; will-change: transform; }
.about-caption img { width: 26px; height: auto; }
.about-caption { position: absolute; left: 20px; bottom: 20px; display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 99px; background: var(--glass); font-size: 14px; font-weight: 600; }
.about-copy .section-title { margin-bottom: 22px; font-size: clamp(26px, 2.6vw, 36px); }
.about-copy > p:not(.label) { color: var(--muted); font-size: 17px; margin-bottom: 16px; max-width: 600px; }
.about-copy > p.lead { color: var(--ink); font-size: 19px; }
.soft { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line-2); }
.soft-title { margin-bottom: 14px; font-size: 13px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.soft-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.soft-list li { padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); font-size: 14px; font-weight: 500; transition: background .3s ease, border-color .3s ease; }
.soft-list li:hover { color: var(--dark); background: var(--accent); border-color: var(--accent); }

/* ---------- Services (bento) ---------- */
.services { background: var(--bg-2); }
.bento { display: grid; grid-template-columns: 1.25fr 1fr 1fr; grid-template-rows: repeat(2, minmax(240px, auto)); grid-auto-rows: auto; gap: 16px; }
.service-card { position: relative; display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--line); border-radius: 26px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; isolation: isolate; transition: transform .5s var(--ease), border-color .4s ease; }
.service-card:hover { transform: translateY(-5px); border-color: var(--line-2); }
.service-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgb(198 243 107 / 35%), transparent 50%); opacity: 0; transition: opacity .4s ease; }
.service-card:hover::before { opacity: 1; }
.service-num { position: absolute; top: 26px; right: 26px; font-size: 13px; font-weight: 600; color: var(--faint); }
.service-icon { width: 54px; height: 54px; margin-bottom: auto; display: grid; place-items: center; border-radius: 16px; background: var(--bg-2); transition: background .4s var(--ease), transform .5s var(--ease); }
.service-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.service-card:hover .service-icon { background: var(--accent); transform: rotate(-8deg) scale(1.05); }
.service-card h3 { margin: 40px 0 10px; font-size: 20px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.service-card p { color: var(--muted); font-size: 15px; }
.s-feature { grid-row: span 2; background: var(--band); color: var(--on-dark); border-color: var(--band-border); }
.service-card:hover .service-icon svg, .s-feature .service-icon svg { stroke: var(--dark); }
.s-feature::before { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgb(198 243 107 / 18%), transparent 50%); }
.s-feature .service-icon { background: var(--accent); }
.s-feature h3 { font-size: clamp(24px, 2.2vw, 30px); margin-top: 80px; }
.s-feature p { color: var(--on-dark-muted); font-size: 16px; }
.s-feature ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.s-feature li { padding: 6px 13px; border: 1px solid var(--line-dark); border-radius: 99px; font-size: 13.5px; }
.s-feature .service-num { color: var(--on-dark-muted); }
.s-wide { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr 1.4fr; align-items: center; gap: 28px; min-height: 0; padding-block: 24px; }
.s-wide .service-icon { margin: 0; }
.s-wide h3 { margin: 0; }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.skill-card { position: relative; padding: 30px; border: 1px solid var(--line); border-radius: 26px; background: var(--surface); box-shadow: var(--shadow); transition: transform .5s var(--ease), border-color .4s ease; }
.skill-card:hover { transform: translateY(-4px); border-color: var(--line-2); }
.skill-wide { grid-column: 1 / -1; display: grid; grid-template-columns: .8fr 1.2fr; grid-template-rows: auto 1fr; gap: 6px 40px; align-items: start; }
.skill-wide > p { grid-column: 1; }
.skill-wide ul { grid-column: 2; grid-row: 1 / span 2; }
.skill-card header { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.skill-ic { display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 12px; background: var(--fill); color: var(--fill-accent); font-size: 13px; font-weight: 700; }
.skill-card h3 { font-size: 19px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.skill-card > p { margin-bottom: 20px; color: var(--muted); font-size: 15px; }
.skill-card ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.skill-card ul + ul { margin-top: 8px; }
.skill-card li { padding: 8px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: 14.5px; font-weight: 500; transition: background .3s ease, transform .3s var(--ease); }
.skill-card li:hover { background: var(--accent); color: var(--dark); transform: translateY(-2px); }
.skill-card .hl-chips li { background: var(--fill); color: var(--fill-accent); border-color: var(--fill); font-weight: 700; }

/* ---------- Projects ---------- */
.case { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(36px, 6vw, 90px); padding-block: 56px; border-top: 1px solid var(--line-2); }
.section-head + .case, .projects .container > .case:first-of-type { border-top: 0; padding-top: 0; }
.case-flip .case-visual { order: 2; }
.case-visual { --hue: 145deg; position: relative; display: grid; place-items: center; aspect-ratio: 16 / 11.5; padding: 7% 8% 17%; border-radius: 28px; overflow: hidden; background: radial-gradient(120% 90% at 15% 0%, hsl(var(--hue) 60% var(--cv-1)), transparent 60%), radial-gradient(100% 90% at 100% 100%, hsl(var(--hue) 60% var(--cv-2) / .7), transparent 60%), hsl(var(--hue) 30% var(--cv-3)); transform-style: preserve-3d; transition: transform .6s var(--ease); cursor: pointer; }
.case-visual::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Ccircle cx='1' cy='1' r='1' fill='%23131411' fill-opacity='.08'/%3E%3C/svg%3E"); }
[data-theme="dark"] .case-visual::after, :root:not([data-theme="light"]) .case-visual::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Ccircle cx='1' cy='1' r='1' fill='%23ffffff' fill-opacity='.07'/%3E%3C/svg%3E"); }
.mock { position: relative; z-index: 1; width: 100%; border-radius: 12px; overflow: hidden; background: #fbfaf6; color: #1b1b1d; box-shadow: 0 40px 70px -30px rgb(19 20 17 / 45%), 0 0 0 1px rgb(19 20 17 / 6%); transform: translateZ(40px); transition: transform .8s var(--ease); }
.case-visual:hover .mock { transform: translateZ(40px) translateY(-8px) scale(1.02); }
.case-visual .shot { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.case-visual.has-shot { display: block; aspect-ratio: auto; padding: 0; background: var(--surface); border: 1px solid var(--line); }
.case-visual.has-shot .mock { display: none; }
.case-visual.has-shot .shot { position: static; display: block; width: 100%; height: auto; object-fit: contain; }
.case-visual.has-shot::after { display: none; }
.case-visual.has-shot .media-actions { position: static; padding: 12px 14px; border-top: 1px solid var(--line); }
.mock-bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: #ebe9e1; }
.mock-bar i { width: 8px; height: 8px; border-radius: 50%; background: #cfccc1; }
.mock-bar span { margin-left: 10px; font-size: 11px; color: #77756c; }
.mock-body { min-height: 210px; padding: 18px; }

.media-actions { position: absolute; z-index: 3; left: 20px; bottom: 18px; display: flex; gap: 8px; }
.media-btn { display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 16px 0 14px; border: 0; border-radius: 99px; background: var(--glass); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 0 10px 20px -12px rgb(19 20 17 / 50%); transition: background .3s ease, color .3s ease, transform .3s var(--ease); }
.media-btn:hover { transform: translateY(-2px); background: var(--surface); }
.media-btn.play { background: var(--fill); color: var(--on-fill); }
.media-btn.play:hover { background: var(--accent); color: var(--dark); }
.play-ic { position: relative; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); }
.play-ic::after { content: ""; position: absolute; left: 9px; top: 7px; border-left: 8px solid var(--dark); border-block: 5px solid transparent; }
.media-btn.play .play-ic { animation: ring 2.4s infinite; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgb(198 243 107 / 70%); } 70%, 100% { box-shadow: 0 0 0 10px rgb(198 243 107 / 0%); } }

/* mock: shop */
.shop-hero { position: relative; height: 70px; margin-bottom: 12px; padding: 14px; border-radius: 8px; background: #1d2a17; overflow: hidden; }
.shop-hero b { display: block; height: 8px; width: 45%; margin-bottom: 7px; border-radius: 4px; background: #c6f36b; }
.shop-hero b + b { width: 30%; background: rgb(255 255 255 / 35%); }
.shop-hero span { position: absolute; right: -14px; top: -14px; width: 90px; height: 90px; border-radius: 50%; border: 12px solid rgb(198 243 107 / 30%); }
.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.shop-grid div { padding: 8px; border-radius: 8px; background: white; border: 1px solid #e3e1d8; }
.shop-grid i { display: block; aspect-ratio: 4/3; margin-bottom: 7px; border-radius: 5px; background: linear-gradient(135deg, #dfe7d3, #c3d4ae); }
.shop-grid div:nth-child(2) i { background: linear-gradient(135deg, #e8ddd0, #d6c2aa); }
.shop-grid div:nth-child(3) i { background: linear-gradient(135deg, #d7dde6, #b9c5d6); }
.shop-grid b { display: block; height: 5px; width: 80%; margin-bottom: 5px; border-radius: 3px; background: #2a2a2a; }
.shop-grid s { display: block; height: 5px; width: 40%; border-radius: 3px; background: #6d8f3a; }
.shop-pay, .book-row, .book-cart { display: flex; justify-content: space-between; align-items: center; height: 34px; padding: 0 14px; border-radius: 99px; background: #1b1b1d; color: white; font-size: 12px; font-weight: 600; }
.shop-pay em, .book-row em, .book-cart em { font-style: normal; font-size: 11px; color: #c6f36b; }
/* mock: travel */
.mock-travel { background: #f6f2e8; }
.steps-mini { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.steps-mini span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #c9b98f; font-size: 11px; font-weight: 700; color: #8a7a52; }
.steps-mini span.on { background: #16233f; border-color: #16233f; color: #e5c06a; }
.steps-mini i { flex: 1; height: 1.5px; background: #d8ccad; }
.dest { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.dest div { padding: 8px; border-radius: 8px; background: white; border: 1.5px solid #ebe3cf; }
.dest div.sel { border-color: #c79a35; transform: translateY(-4px); box-shadow: 0 10px 20px -10px rgb(199 154 53 / 60%); }
.dest b { display: block; aspect-ratio: 4/3; margin-bottom: 7px; border-radius: 5px; background: linear-gradient(160deg, #f2c26b, #c7783e); }
.dest div:nth-child(2) b { background: linear-gradient(160deg, #6fb7c9, #20506a); }
.dest div:nth-child(3) b { background: linear-gradient(160deg, #a7c98f, #4f7a3c); }
.dest s { display: block; height: 5px; width: 70%; border-radius: 3px; background: #16233f; }
.book-row { background: #16233f; }
.book-row em { color: #e5c06a; }
/* mock: education (Ubuntu brand: flame orange + amber) */
.mock-edu { background: #fdf7f1; }
.edu-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; padding: 12px 14px; border-radius: 8px; background: #e8531a; }
.edu-head b { width: 40%; height: 8px; border-radius: 4px; background: rgb(255 255 255 / 75%); }
.edu-head span { padding: 4px 12px; border-radius: 99px; background: #f5a623; color: #3b1408; font-size: 11px; font-weight: 700; }
.edu-row { display: flex; align-items: center; gap: 12px; margin-bottom: 9px; padding: 9px 12px; border-radius: 8px; background: white; border: 1px solid #f1e3d6; }
.edu-row i { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 8px; background: #fde6d8; color: #c2410c; font-size: 11px; font-style: normal; font-weight: 700; }
.edu-row div { flex: 1; }
.edu-row b { display: block; width: 55%; height: 5px; margin-bottom: 7px; border-radius: 3px; background: #2a2a2a; }
.edu-row s { display: block; height: 5px; border-radius: 3px; background-color: #efe7df; background-image: linear-gradient(90deg, #1f5fa8, #1f5fa8); background-repeat: no-repeat; background-size: var(--w) 100%; }
.js .edu-row s { background-size: 0% 100%; transition: background-size 1.6s var(--ease) .3s; }
.js .case.in .edu-row s { background-size: var(--w) 100%; }
/* mock: books (Novella brand: peach + plum) */
.mock-books { background: #fdf3ee; }
.books { display: flex; align-items: flex-end; gap: 12px; height: 110px; margin-bottom: 12px; padding: 0 6px; border-bottom: 6px solid #e2c3b5; }
.books span { flex: 1; height: 100%; border-radius: 4px 4px 0 0; background: var(--c); box-shadow: inset -6px 0 0 rgb(0 0 0 / 12%), inset 0 10px 0 rgb(255 255 255 / 18%); transform-origin: bottom; transition: transform .6s var(--ease); }
.books span:nth-child(2) { height: 86%; }
.books span:nth-child(3) { height: 94%; }
.books span:nth-child(4) { height: 78%; }
.case-visual:hover .books span:nth-child(odd) { transform: translateY(-8px); }
.case-visual:hover .books span:nth-child(even) { transform: rotate(-4deg); }
.book-tags { display: flex; gap: 8px; margin-bottom: 12px; }
.book-tags em { padding: 3px 11px; border-radius: 99px; background: #fbe0d6; color: #8a3b2b; font-size: 11px; font-weight: 700; font-style: normal; }
.book-tags em.pre { background: #efe0ec; color: #5b2a4a; }
.book-cart { background: #5b2a4a; }
.book-cart em { color: #f6c6b2; }

.mock-recruit { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; background: #f3f1f8; }
.mock-recruit .col { display: grid; gap: 7px; align-content: start; padding: 8px; border-radius: 8px; background: #e7e3f2; }
.mock-recruit p { margin-bottom: 2px; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #6b628a; }
.cand { display: flex; align-items: center; gap: 7px; padding: 8px; border-radius: 6px; background: white; }
.cand i { width: 18px; height: 18px; flex: none; border-radius: 50%; background: #c9bfeb; }
.cand b { flex: 1; height: 5px; border-radius: 3px; background: #3a3550; }
.cand.on { background: #2e2348; }
.cand.on i { background: #c6f36b; }
.cand.on b { background: rgb(255 255 255 / 60%); }
.js .mock-recruit .cand { opacity: 0; transform: translateY(10px); transition: .7s var(--ease); }
.js .case.in .mock-recruit .cand { opacity: 1; transform: none; }
.js .case.in .mock-recruit .col:nth-child(2) .cand { transition-delay: .25s; }
.js .case.in .mock-recruit .col:nth-child(3) .cand { transition-delay: .5s; }
.mock-agency { background: #0b0d12; }
.ag-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; padding: 16px; border-radius: 8px; background: radial-gradient(120% 120% at 0% 0%, #12324a, #0b0d12 70%); }
.ag-hero img { width: 54px; height: auto; flex: none; }
.ag-hero div { flex: 1; }
.ag-hero b { display: block; height: 8px; width: 70%; margin-bottom: 7px; border-radius: 4px; background: #5ee0f0; }
.ag-hero b + b { width: 45%; background: rgb(255 255 255 / 45%); }
.ag-hero s { display: inline-block; height: 18px; width: 70px; margin-top: 4px; border-radius: 99px; background: #3b82f6; }
.ag-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ag-grid i { aspect-ratio: 1; border-radius: 6px; background: linear-gradient(150deg, #1b2a3a, #0f1620); border: 1px solid rgb(94 224 240 / 18%); }
.ag-grid i:nth-child(2) { background: linear-gradient(150deg, #1f3c63, #101826); }
.ag-grid i:nth-child(3) { background: linear-gradient(150deg, #134a55, #0d1a1f); }
.case-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.case-meta span { display: inline-grid; place-items: center; min-width: 30px; height: 22px; border-radius: 99px; background: var(--accent); color: var(--dark); font-weight: 700; letter-spacing: 0; }
.case-info h3 { margin-bottom: 12px; font-family: var(--font-display); font-size: clamp(24px, 2.2vw, 30px); font-weight: 500; line-height: 1.15; letter-spacing: -.01em; }
.case-desc { margin-bottom: 24px; color: var(--muted); font-size: 17px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; }
.tags li { padding: 5px 12px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); font-size: 13px; font-weight: 500; }
.case-link { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 99px; background: var(--fill); color: var(--on-fill); font-size: 15px; font-weight: 600; transition: background .3s ease, color .3s ease; }
.case-link i { font-style: normal; transition: transform .4s var(--ease); }
.case-link:hover { background: var(--accent); color: var(--dark); }
.case-link:hover i { transform: translate(3px, -3px); }

/* ---------- More work: interactive index ---------- */
.more { background: var(--band); color: var(--on-dark); position: relative; border-block: 1px solid var(--band-border); }
.more .label { color: var(--on-dark-muted); }
.more .label .num { background: var(--accent); color: var(--dark); }
.more .section-aside { color: var(--on-dark-muted); }
.more .hl { background: none; color: var(--accent); }
.index-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-dark); }
.index-row { position: relative; display: grid; grid-template-columns: 60px 1.6fr 1fr 140px; align-items: center; gap: 24px; padding: 22px 10px; border-bottom: 1px solid var(--line-dark); transition: padding .5s var(--ease), background .4s ease; }
.index-row::before { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--tone) 18%, transparent), transparent 70%); opacity: 0; transition: opacity .4s ease; }
.index-row > * { position: relative; z-index: 1; }
.index-row:hover { padding-left: 26px; }
.index-row:hover::before { opacity: 1; }
.ix-num { font-size: 15px; font-weight: 600; color: var(--on-dark-muted); }
.ix-main h3 { font-family: var(--font-display); font-size: clamp(19px, 1.6vw, 23px); font-weight: 500; letter-spacing: -.005em; line-height: 1.25; margin-bottom: 6px; transition: color .3s ease; }
.index-row:hover .ix-main h3 { color: var(--tone); }
.ix-main p { max-width: 560px; color: var(--on-dark-muted); font-size: 14.5px; }
.ix-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ix-tags li { padding: 4px 11px; border: 1px solid var(--line-dark); border-radius: 99px; font-size: 13px; color: var(--on-dark); }
.ix-status { justify-self: end; padding: 5px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.ix-status.live { background: var(--accent); color: var(--dark); }
.ix-status.dev { border: 1px dashed var(--accent); color: var(--accent); }
.ix-art { display: none; }
.ix-preview { position: fixed; top: 0; left: 0; z-index: 50; width: 300px; height: 200px; margin: -100px 0 0 -150px; pointer-events: none; opacity: 0; transform: scale(.6) rotate(-6deg); transition: opacity .35s ease, transform .5s var(--ease); }
.ix-preview.show { opacity: 1; transform: scale(1) rotate(-4deg); }
.ix-preview-inner { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 22px; border-radius: 22px; background: var(--tone-2, #222); color: var(--tone, #fff); box-shadow: 0 30px 60px -20px rgb(0 0 0 / 60%); overflow: hidden; position: relative; }
.ix-preview-inner b { font-size: 26px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; position: relative; z-index: 1; }
.ix-preview-inner i { position: absolute; border-radius: 50%; border: 18px solid var(--tone); opacity: .35; }
.ix-preview-inner i:nth-of-type(1) { width: 180px; height: 180px; right: -50px; bottom: -70px; }
.ix-preview-inner i:nth-of-type(2) { width: 90px; height: 90px; right: 70px; top: -40px; opacity: .2; }
.ix-preview-inner small { position: relative; z-index: 1; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }

/* ---------- Experience & education ---------- */
.xp-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 16px; align-items: start; }
.role { padding: clamp(28px, 4vw, 44px); border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.role-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.role-when { display: inline-flex; align-items: center; gap: 8px; padding: 5px 13px; border-radius: 99px; background: var(--bg-2); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.role-logo img { width: 100%; height: 100%; object-fit: contain; }
.role-logo { display: grid; place-items: center; width: 112px; height: 100px; padding: 10px; border-radius: 16px; background: var(--bg-2); color: var(--fill-accent); font-size: 15px; font-weight: 800; }
.role h3 { font-family: var(--font-display); font-size: clamp(24px, 2.3vw, 32px); font-weight: 500; letter-spacing: -.01em; line-height: 1.15; }
.role-org { margin: 6px 0 18px; font-size: 17px; font-weight: 500; color: var(--accent-deep); }
.role-desc { margin-bottom: 22px; color: var(--muted); }
.role-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.role-list li { position: relative; padding: 12px 0 12px 30px; border-bottom: 1px solid var(--line); font-size: 15.5px; transition: padding .4s var(--ease); }
.role-list li::before { content: "→"; position: absolute; left: 4px; color: var(--accent-deep); font-weight: 700; }
.role-list li:hover { padding-left: 38px; }
.edu-col { display: grid; gap: 16px; }
.degree { color: var(--dark); position: relative; padding: clamp(28px, 4vw, 40px); border-radius: 28px; background: var(--accent); overflow: hidden; isolation: isolate; }
.degree::after { content: ""; position: absolute; right: -80px; bottom: -80px; z-index: -1; width: 300px; height: 300px; border-radius: 50%; border: 48px solid rgb(19 20 17 / 7%); }
.degree-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.degree-badge { padding: 6px 14px; border-radius: 99px; background: var(--dark); color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.degree-year { font-size: 15px; font-weight: 600; }
.degree-big { font-family: var(--font-display); margin: 16px 0 6px; font-size: clamp(64px, 7vw, 100px); font-weight: 800; line-height: .9; letter-spacing: -.05em; }
.degree h3 { font-family: var(--font-display); font-weight: 500 !important; font-size: clamp(22px, 2.3vw, 30px); font-weight: 700; letter-spacing: -.035em; line-height: 1.1; margin-bottom: 8px; }
.degree-school { font-size: 15.5px; font-weight: 500; opacity: .75; }
.cert { display: flex; align-items: center; gap: 18px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); transition: transform .5s var(--ease); }
.cert:hover { transform: translateY(-3px); }
.cert-logo { display: grid; place-items: center; width: 64px; height: 64px; flex: none; border-radius: 18px; background: var(--fill); color: var(--fill-accent); font-size: 15px; font-weight: 800; letter-spacing: .02em; }
.cert h3 { margin-bottom: 2px; font-size: 18.5px; font-weight: 700; letter-spacing: -.025em; line-height: 1.2; }
.cert p { color: var(--muted); font-size: 14.5px; }

/* ---------- Contact (dark panel) ---------- */
.contact { padding-block: clamp(30px, 4vw, 50px) clamp(80px, 10vw, 120px); }
.contact-panel { position: relative; padding: clamp(32px, 6vw, 80px); border-radius: clamp(28px, 4vw, 44px); background: var(--band); border: 1px solid var(--band-border); color: var(--on-dark); overflow: hidden; isolation: isolate; }
.contact-panel::before { content: ""; position: absolute; right: -200px; bottom: -300px; z-index: -1; width: 800px; height: 700px; border-radius: 50%; background: radial-gradient(circle, rgb(198 243 107 / 16%), transparent 60%); }
.contact-panel .label { color: var(--on-dark-muted); }
.contact-panel .label .num { background: var(--accent); color: var(--dark); }
.contact-title { margin-bottom: clamp(32px, 4vw, 48px); font-family: var(--font-display); font-size: clamp(32px, 4vw, 56px); font-weight: 500; line-height: 1.08; letter-spacing: -.02em; }
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(36px, 6vw, 90px); align-items: start; }
.contact-side > p { max-width: 380px; margin-bottom: 26px; color: var(--on-dark-muted); font-size: 17px; }
.copy-email { position: relative; display: inline-flex; align-items: center; gap: 14px; max-width: 100%; padding: 16px 22px; border: 1px solid var(--line-dark); border-radius: 16px; background: rgb(243 241 234 / 5%); color: var(--on-dark); font-size: 17px; font-weight: 600; cursor: pointer; transition: border-color .3s ease; }
.copy-text { overflow-wrap: anywhere; text-align: left; }
.copy-email:hover { border-color: var(--accent); }
.copy-email i { font-style: normal; color: var(--accent); }
.copy-done { position: absolute; left: 50%; top: -34px; padding: 4px 10px; border-radius: 99px; background: var(--accent); color: var(--dark); font-size: 12px; white-space: nowrap; pointer-events: none; opacity: 0; transform: translateX(-50%) translateY(6px); transition: .35s var(--ease); }
.copy-done.show { opacity: 1; transform: translateX(-50%); }
.contact-details { display: grid; gap: 16px; margin: 30px 0 0; }
.contact-details div { display: grid; gap: 2px; }
.contact-details dt { color: var(--on-dark-muted); font-size: 12.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.contact-details dd { margin: 0; font-size: 18px; font-weight: 600; }
.contact-details a:hover { color: var(--accent); }
.contact-links { margin: 30px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line-dark); }
.contact-links a { display: flex; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--line-dark); font-weight: 600; transition: color .3s ease, padding .4s var(--ease); }
.contact-links a:hover { color: var(--accent); padding-inline: 8px; }
.contact-links i { font-style: normal; }
.contact-form { display: grid; gap: 22px; padding: clamp(24px, 3vw, 36px); border-radius: 26px; background: var(--surface); color: var(--ink); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field > span, .field legend { padding: 0; margin-bottom: 8px; color: var(--muted); font-size: 12.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.field input, .field textarea { width: 100%; padding: 12px 0; border: 0; border-bottom: 1.5px solid var(--line-2); background: transparent; font-size: 18px; resize: vertical; transition: border-color .3s ease; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field .invalid { border-color: #d6452f; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { width: 100%; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label span { display: inline-block; padding: 9px 16px; border: 1px solid var(--line-2); border-radius: 99px; font-size: 15px; font-weight: 500; transition: .3s var(--ease); }
.chips label:hover span { border-color: var(--ink); }
.chips input:checked + span { background: var(--fill); border-color: var(--fill); color: var(--fill-accent); }
.chips input:focus-visible + span { outline: 2px solid var(--accent-deep); outline-offset: 3px; }
.contact-form .btn-accent { background: var(--fill); color: var(--on-fill); }
.contact-form .btn-accent::before { background: var(--accent); }
.contact-form .btn-accent:hover { color: var(--dark); }
.form-note { min-height: 1.4em; color: var(--muted); font-size: 14.5px; }

/* ---------- Footer ---------- */
.site-footer { overflow: hidden; }
.footer-big { text-align: center; font-size: clamp(46px, 9vw, 140px); font-weight: 800; line-height: .78; letter-spacing: -.05em; color: var(--footer-big); user-select: none; padding-bottom: .1em; }
.footer-big span { color: var(--accent); }
.footer-row { min-height: 90px; display: flex; align-items: center; gap: 30px; border-top: 1px solid var(--line-2); }
.footer-row p { color: var(--muted); font-size: 14px; }
.local-time { margin-left: auto; }
.local-time b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.back-top { font-size: 14px; font-weight: 600; }
.back-top:hover { color: var(--accent-deep); }

/* ---------- Lightbox / media player ---------- */
.lightbox { width: min(1100px, 100% - 32px); max-height: calc(100% - 32px); padding: 0; border: 0; border-radius: 26px; background: var(--band); color: var(--on-dark); overflow: hidden; flex-direction: column; box-shadow: 0 50px 120px -30px rgb(0 0 0 / 70%); }
.lightbox::backdrop { background: rgb(19 20 17 / 70%); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lightbox[open] { display: flex; animation: lb-in .5s var(--ease); }
@keyframes lb-in { from { opacity: 0; transform: translateY(30px) scale(.97); } }
.lb-head { display: flex; align-items: center; gap: 20px; padding: 18px 22px; border-bottom: 1px solid var(--line-dark); }
.lb-kicker { color: var(--on-dark-muted); font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.lb-head h2 { font-size: 22px; font-weight: 700; letter-spacing: -.03em; }
.lb-tabs { display: flex; gap: 4px; margin-left: auto; padding: 4px; border-radius: 99px; background: rgb(243 241 234 / 7%); }
.lb-tabs button { padding: 8px 16px; border: 0; border-radius: 99px; background: none; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--on-dark-muted); }
.lb-tabs button[aria-selected="true"] { background: var(--accent); color: var(--dark); }
.lb-close { color: var(--on-dark); width: 42px; height: 42px; flex: none; border: 1px solid var(--line-dark); border-radius: 50%; background: none; font-size: 16px; cursor: pointer; transition: background .3s ease, color .3s ease; }
.lb-close:hover { background: var(--accent); color: var(--dark); }
.lb-stage { position: relative; background: #000; }
.lb-pane { position: relative; height: min(62vh, calc((min(1100px, 100vw - 32px)) * 9 / 16)); overflow: hidden; }
.lb-pane[hidden] { display: none; }
.lb-video, .lb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.lb-video[hidden], .lb-img[hidden], .lb-nav[hidden] { display: none; }
.lb-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--on-dark-muted); font-size: 17px; background: radial-gradient(circle at 50% 40%, #1d1f1a, #0b0b0b); }
.lb-empty[hidden] { display: none; }
.lb-nav { position: absolute; top: 50%; width: 46px; height: 46px; margin-top: -23px; border: 0; border-radius: 50%; background: rgb(243 241 234 / 90%); color: var(--dark); font-size: 18px; cursor: pointer; transition: background .3s ease; }
.lb-nav:hover { background: var(--accent); }
.lb-nav.prev { left: 16px; }
.lb-nav.next { right: 16px; }
.lb-count { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); padding: 4px 12px; border-radius: 99px; background: rgb(0 0 0 / 60%); font-size: 13px; font-weight: 600; }
.lb-foot { display: flex; justify-content: flex-end; padding: 16px 22px; background: var(--band); }
.lb-foot .btn { height: 48px; }

/* =================== Responsive =================== */
@media (max-width: 1120px) {
  .main-nav { gap: 22px; }
  .bento { grid-template-columns: 1fr 1fr; }
  .s-feature { grid-row: auto; grid-column: 1 / -1; }
  .s-feature h3 { margin-top: 40px; }
  .s-wide { grid-template-columns: auto 1fr; }
  .s-wide p { grid-column: 1 / -1; }
  .chip-a { left: -4%; }
  .chip-b { right: -2%; }
  .index-row { grid-template-columns: 50px 1fr 120px; }
  .ix-tags { display: none; }
}
@media (max-width: 980px) {
  .main-nav { position: fixed; inset: 0 0 auto; z-index: -1; height: 100vh; height: 100dvh; flex-direction: column; justify-content: center; gap: 4px; margin: 0; padding: 100px 32px 40px; background: var(--bg); opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility .4s; }
  .main-nav a { font-size: clamp(30px, 8vw, 44px); font-weight: 700; letter-spacing: -.03em; color: var(--ink); opacity: 0; transform: translateY(20px); transition: transform .6s var(--ease), opacity .6s var(--ease), color .3s; }
  .main-nav a::after { display: none; }
  .main-nav a.active { color: var(--accent-deep); }
  .menu-open .site-header { background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; transform: none; }
  .menu-open .main-nav { opacity: 1; visibility: visible; }
  .menu-open .main-nav a { opacity: 1; transform: none; }
  .menu-open .main-nav a:nth-child(2) { transition-delay: .04s; }
  .menu-open .main-nav a:nth-child(3) { transition-delay: .08s; }
  .menu-open .main-nav a:nth-child(4) { transition-delay: .12s; }
  .menu-open .main-nav a:nth-child(5) { transition-delay: .16s; }
  .menu-open .main-nav a:nth-child(6) { transition-delay: .2s; }
  .menu-toggle { display: block; }
  .theme-toggle { margin-left: auto; }
  .hero-grid { grid-template-columns: 1fr; gap: 60px; }
  .hero-visual { justify-self: center; width: min(100%, 460px); }
  .hero-foot { flex-wrap: wrap; row-gap: 20px; }
  .hero-loc { margin-left: 0; width: 100%; }
  .section-head-split { display: block; }
  .section-aside { margin-top: 20px; }
  .about-grid, .xp-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 500px; margin-right: 14px; margin-bottom: 14px; }
  .skill-wide { grid-template-columns: 1fr; }
  .skill-wide ul { grid-column: 1; grid-row: auto; }
  .case, .case-flip { grid-template-columns: 1fr; }
  .case-flip .case-visual { order: 0; }
  .ix-preview { display: none; }
  .ix-art { display: flex; align-items: center; gap: 8px; grid-column: 2 / -1; padding: 10px 14px; border-radius: 12px; background: var(--tone-2); color: var(--tone); font-size: 13px; font-weight: 700; }
  .ix-art i { display: none; }
}
@media (max-width: 640px) {
  .container { width: min(var(--w), 100% - 32px); }
  body { font-size: 16px; }
  .nav-wrap { height: 66px; gap: 10px; }
  .nav-cta { padding: 9px 14px; font-size: 13px; }
  .hero { padding-top: 104px; }
  .hero .label { font-size: 11.5px; letter-spacing: .06em; }
  .hero-title { font-size: clamp(38px, 11vw, 52px); }
  .roles { min-height: 2.6em; align-content: flex-start; }
  .hero-intro { font-size: 16px; }
  .btn { height: 52px; padding: 0 22px; }
  .float-chip { padding: 8px 12px; }
  .float-chip b { font-size: 12.5px; }
  .float-chip span { font-size: 11px; }
  .hero-visual { display: flex; flex-wrap: wrap; gap: 8px; }
  .portrait { width: 100%; }
  .float-chip { position: static; flex: 1 1 140px; animation: none; }
  .badge { width: 92px; height: 92px; right: 2%; }
  .badge span { font-size: 18px; }
  .stat { padding-right: 16px; margin-right: 16px; gap: 10px; }
  .stat b { font-size: 20px; }
  .stat:nth-child(3) { display: none; }
  .stat:nth-child(2) { border-right: 0; margin-right: 0; padding-right: 0; }
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .service-card h3 { margin-top: 28px; }
  .s-wide { display: flex; gap: 0; }
  .s-wide .service-icon { margin-bottom: auto; }
  .s-wide h3 { margin: 28px 0 10px; }
  .skills-grid { grid-template-columns: 1fr; }
  .skill-card { padding: 24px; }
  .case-visual { padding: 6% 6% 22%; border-radius: 20px; }
  .media-actions { left: 12px; bottom: 12px; }
  .media-btn { height: 38px; font-size: 13px; padding: 0 13px 0 10px; }
  .mock-body { min-height: 170px; padding: 12px; }
  .books { height: 80px; }
  .index-row { grid-template-columns: 1fr auto; gap: 12px; padding: 24px 0; }
  .index-row:hover { padding-left: 0; }
  .ix-num { display: none; }
  .ix-art { grid-column: 1 / -1; }
  .ix-status { align-self: start; }
  .field-row { grid-template-columns: 1fr; }
  .copy-email { width: 100%; justify-content: space-between; padding: 14px 16px; font-size: 14px; }
  .contact-form { padding: 22px; }
  .lb-head { flex-wrap: wrap; gap: 12px; padding: 14px 16px; }
  .lb-tabs { order: 3; margin-left: 0; }
  .lb-close { margin-left: auto; }
  .footer-row { flex-wrap: wrap; justify-content: space-between; row-gap: 6px; padding-block: 24px; }
  .footer-row p:first-child { order: 3; width: 100%; }
  .local-time { margin-left: 0; }
}
@media (max-width: 360px) {
  .nav-cta { display: none; }
  .menu-toggle { margin-left: 0; }
}

/* =================== Reduced motion =================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal, .js .split .ln > span { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
  .cursor, .cursor-dot, .ix-preview { display: none !important; }
}

/* =================== Language switcher =================== */
.lang { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); color: var(--ink); font: 600 13px var(--font); letter-spacing: .04em; cursor: pointer; transition: border-color .3s; }
.lang-btn:hover, .lang.open .lang-btn { border-color: var(--accent-deep); }
.lang-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lang-list { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 120; min-width: 190px; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); box-shadow: 0 24px 48px -20px rgb(0 0 0 / 45%); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .25s, transform .3s var(--ease), visibility .25s; }
.lang.open .lang-list { opacity: 1; visibility: visible; transform: none; }
.lang-list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: 500 15px var(--font); text-align: start; cursor: pointer; }
.lang-list button b { min-width: 26px; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.lang-list button:hover { background: var(--bg-2); }
.lang-list button[aria-checked="true"] { background: var(--accent); color: var(--dark); }
.lang-list button[aria-checked="true"] b { color: var(--dark); }
@media (max-width: 980px) { .lang { margin-inline-start: auto; } .theme-toggle { margin-left: 0; } }
@media (max-width: 640px) { .lang-btn { padding: 0 10px; } .lang-btn svg { display: none; } }

/* =================== Social links =================== */
.cl-ic { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-inline-end: 10px; vertical-align: -5px; }
.cl-ic svg { width: 17px; height: 17px; }
.contact-links a { justify-content: flex-start; }
.contact-links a > i { margin-inline-start: auto; }
.footer-social { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.footer-social a { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line-2); border-radius: 50%; color: var(--muted); transition: color .3s, border-color .3s, background .3s, transform .3s var(--ease); }
.footer-social a:hover { color: var(--dark); background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.footer-social svg { width: 15px; height: 15px; }
@media (max-width: 640px) { .footer-social { order: 2; width: 100%; } }

/* =================== Form extras =================== */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form button[disabled] { opacity: .6; cursor: progress; }
.contact-form.sent .form-note { color: var(--accent-deep); font-weight: 600; }
.form-note a { text-decoration: underline; }
.captcha-note { margin-top: 6px; font-size: 12px; color: var(--muted); opacity: .8; }
.captcha-note a { text-decoration: underline; }
.grecaptcha-badge { visibility: hidden !important; }

/* =================== Generic project preview =================== */
.mock-generic { display: grid; gap: 10px; background: #f4f3ee; }
.mock-generic > b { display: block; height: 10px; width: 55%; border-radius: 5px; background: hsl(var(--hue) 45% 30%); }
.mock-generic > b + b { width: 35%; background: #c9c6bb; }
.mock-generic > s { display: block; height: 26px; width: 110px; border-radius: 99px; background: hsl(var(--hue) 60% 45%); }
.g-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 6px; }
.g-grid i { aspect-ratio: 4/3; border-radius: 8px; background: linear-gradient(135deg, hsl(var(--hue) 40% 85%), hsl(var(--hue) 40% 70%)); }

/* =================== Right-to-left (Arabic) =================== */
html[lang="ar"] body { font-family: "Fraunces", "Noto Naskh Arabic", "Amiri", "Segoe UI", Tahoma, serif; }
html[lang="ar"] .section-title, html[lang="ar"] .hero-title .hl, html[lang="ar"] .contact-title, html[lang="ar"] .label, html[lang="ar"] .eyebrow { letter-spacing: 0; }
html[lang="ar"] .label { text-transform: none; }
[dir="rtl"] .btn i, [dir="rtl"] .case-link i, [dir="rtl"] .contact-links i { display: inline-block; transform: scaleX(-1); }
[dir="rtl"] .btn:hover i { transform: scaleX(-1) translateX(3px); }
[dir="rtl"] .role-list li { padding: 12px 30px 12px 0; }
[dir="rtl"] .role-list li::before { left: auto; right: 4px; content: "←"; }
[dir="rtl"] .role-list li:hover { padding-right: 38px; padding-left: 0; }
[dir="rtl"] .marquee-track { animation-direction: reverse; }
[dir="rtl"] .about-photo::before { inset: 16px 16px -14px -14px; }
[dir="rtl"] .about-caption { left: auto; right: 20px; }
[dir="rtl"] .index-row:hover { padding-left: 10px; padding-right: 26px; }
/* Keep Latin names reading left-to-right inside Arabic pages */
[dir="rtl"] .hero-title .ln > span:not([data-i18n]), [dir="rtl"] .brand, [dir="rtl"] .footer-big, [dir="rtl"] .loader-name, [dir="rtl"] .copy-text, [dir="rtl"] .contact-details dd { direction: ltr; unicode-bidi: isolate; }
@media (max-width: 640px) {
  .nav-cta { display: none; }
  .lang-list { position: fixed; top: 72px; left: 16px; right: 16px; min-width: 0; }
}

/* Intro loader is skipped after the first page view of a visit */
html.no-loader .loader { display: none !important; }
