:root {
    --font-display: "Space Grotesk", sans-serif;
    --font-body: "Manrope", sans-serif;
    --bg: #070912;
    --bg-elevated: #0d1020;
    --surface: rgba(17, 21, 39, 0.74);
    --surface-strong: #12172a;
    --surface-soft: rgba(255, 255, 255, 0.04);
    --text: #f7f7fb;
    --muted: #a4aac0;
    --line: rgba(255, 255, 255, 0.1);
    --primary: #8b5cf6;
    --primary-2: #22d3ee;
    --primary-3: #ec4899;
    --success: #44e3a2;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --header-height: 82px;
    --container: 1180px;
    /* Surfaces that sit behind screenshots and over images */
    --header-bg: rgba(7, 9, 18, .52);
    --media-bg: #04060f;
    --media-fade: rgba(7, 9, 18, .52);
    --gallery-bg: #05060b;
    --backdrop: rgba(2, 3, 8, .8);
    color-scheme: dark;
}

/* Light theme: set on <html data-theme="light"> by the inline head script and the theme toggle. */
:root[data-theme="light"] {
    --bg: #f6f7fb;
    --bg-elevated: #ffffff;
    --surface: rgba(255, 255, 255, 0.86);
    --surface-strong: #ffffff;
    --surface-soft: rgba(15, 23, 42, 0.045);
    --text: #0f1222;
    --muted: #535a70;
    --line: rgba(15, 23, 42, 0.1);
    --primary: #7c3aed;
    --primary-2: #0e7490;
    --primary-3: #db2777;
    --success: #047857;
    --shadow: 0 30px 80px rgba(15, 23, 42, 0.12);
    --header-bg: rgba(246, 247, 251, .78);
    --media-bg: #eceef4;
    --media-fade: rgba(15, 23, 42, .05);
    --gallery-bg: #eceef4;
    --backdrop: rgba(15, 23, 42, .45);
    color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 22px); }
body {
    margin: 0;
    min-width: 320px;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background .35s ease, color .35s ease;
}
body.modal-open { overflow: hidden; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: rgba(139, 92, 246, .4); color: #fff; }

.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; }
.skip-link { position: fixed; z-index: 9999; top: 12px; left: 12px; padding: 10px 16px; background: var(--text); color: var(--bg); border-radius: 12px; transform: translateY(-150%); transition: transform .2s ease; }
.skip-link:focus { transform: translateY(0); }
.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.section { position: relative; padding: clamp(60px, 5.5vw, 80px) 0; }
.section-soft { background: linear-gradient(180deg, transparent, var(--surface-soft) 15%, var(--surface-soft) 85%, transparent); }

.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1001; }
.scroll-progress span { display: block; width: 100%; height: 100%; transform: scaleX(0); transform-origin: left center; background: linear-gradient(90deg, var(--primary), var(--primary-2), var(--primary-3)); box-shadow: 0 0 18px var(--primary); }
.ambient { position: fixed; z-index: -2; width: 520px; height: 520px; border-radius: 50%; filter: blur(110px); opacity: .16; pointer-events: none; }
.ambient-one { top: -200px; right: -160px; background: var(--primary); }
.ambient-two { bottom: -220px; left: -180px; background: var(--primary-2); }
.cursor-glow { position: fixed; z-index: -1; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(139, 92, 246, .1), transparent 68%); transform: translate(-50%, -50%); pointer-events: none; opacity: 0; transition: opacity .3s ease; }

.site-header { position: fixed; z-index: 1000; top: 0; left: 0; right: 0; height: var(--header-height); display: flex; align-items: center; background: var(--header-bg); border-bottom: 1px solid transparent; backdrop-filter: blur(20px); transition: .3s ease; }
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 12px 40px rgba(0,0,0,.08); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--font-display); font-weight: 700; letter-spacing: -.03em; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; color: white; background: linear-gradient(135deg, var(--primary), var(--primary-3)); box-shadow: 0 12px 28px rgba(139,92,246,.32); overflow: hidden; }.brand-mark img { display: block; width: 100%; height: 100%; }
.brand-copy { font-size: 1.02rem; }.brand-copy span { color: var(--primary-2); }
.desktop-nav { display: flex; align-items: center; gap: 4px; padding: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; }
.nav-link { position: relative; padding: 9px 15px; color: var(--muted); text-decoration: none; font-size: .84rem; font-weight: 700; border-radius: 999px; transition: .2s ease; }
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--surface-soft); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-button { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: var(--surface); cursor: pointer; transition: .2s ease; }
.icon-button:hover { transform: translateY(-2px); border-color: rgba(139,92,246,.5); }
.menu-toggle { display: none; padding: 12px; }
.menu-toggle span { display: block; width: 20px; height: 2px; margin: 2.4px 0; background: currentColor; transition: .25s ease; }
.menu-toggle.open span:nth-child(1) { transform: translateY(4.8px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-4.8px) rotate(-45deg); }
.mobile-nav { display: none; }

.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-top: 150px; overflow: hidden; }
.hero::before { content: ""; position: absolute; width: 760px; height: 760px; top: 50%; right: -250px; transform: translateY(-52%); background: radial-gradient(circle, rgba(139,92,246,.19), transparent 62%); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 70px; }
.eyebrow, .section-kicker { display: inline-flex; align-items: center; gap: 9px; color: var(--primary-2); font-size: .77rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 7px rgba(68,227,162,.1), 0 0 20px rgba(68,227,162,.7); animation: pulse 2.2s infinite; }
.hero h1 { max-width: 720px; margin: 22px 0 24px; font-family: var(--font-display); font-size: clamp(3.5rem, 5.9vw, 5.2rem); line-height: .95; letter-spacing: -.065em; text-wrap: balance; }
.gradient-text { background: linear-gradient(100deg, var(--primary), var(--primary-2) 52%, var(--primary-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { max-width: 690px; margin: 0; color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.25rem); }
.hero-lead strong { color: var(--text); }
.rotating-role { min-height: 42px; display: flex; align-items: center; gap: 10px; margin-top: 26px; color: var(--muted); }
.rotating-role strong { color: var(--primary-2); font-family: var(--font-display); font-size: 1.08rem; transition: opacity .2s, transform .2s; }
.rotating-role strong.swap { opacity: 0; transform: translateY(8px); }
.hero-actions, .contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 22px; border: 1px solid transparent; border-radius: 16px; text-decoration: none; font-weight: 800; cursor: pointer; transition: .25s ease; }
.button:hover { transform: translateY(-3px); }
.button-primary { color: white; background: linear-gradient(135deg, var(--primary), #6d4aff); box-shadow: 0 16px 38px rgba(139,92,246,.3); }
.button-primary:hover { box-shadow: 0 20px 48px rgba(139,92,246,.4); }
.button-secondary { color: var(--text); background: var(--surface); border-color: var(--line); }
.hero-social { display: flex; gap: 10px; margin-top: 28px; }
.hero-social a { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 13px; color: var(--muted); text-decoration: none; transition: .2s ease; }
.hero-social a:hover { color: white; border-color: transparent; background: var(--primary); transform: translateY(-3px); }
.hero-visual { min-width: 0; }
.portrait-orbit { position: relative; width: min(100%, 490px); margin-inline: auto; aspect-ratio: .88; display: grid; place-items: center; }
.orbit { position: absolute; border: 1px solid rgba(139,92,246,.25); border-radius: 50%; }
.orbit-one { inset: 2%; animation: spin 22s linear infinite; }.orbit-two { inset: 13%; border-style: dashed; border-color: rgba(34,211,238,.22); animation: spin 16s linear reverse infinite; }
.orbit::before, .orbit::after { content: ""; position: absolute; width: 11px; height: 11px; border-radius: 50%; background: var(--primary-2); box-shadow: 0 0 18px var(--primary-2); }
.orbit::before { top: 7%; left: 28%; }.orbit::after { bottom: 13%; right: 19%; background: var(--primary-3); box-shadow: 0 0 18px var(--primary-3); }
.portrait-card { position: relative; width: 72%; height: 79%; overflow: hidden; border: 1px solid rgba(255,255,255,.16); border-radius: 42px; background: linear-gradient(160deg, rgba(139,92,246,.19), rgba(34,211,238,.07)); box-shadow: var(--shadow); transform: rotate(2deg); }
.portrait-card::after { content: ""; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(transparent, rgba(3,4,10,.9)); }
.portrait-card img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.portrait-shine { position: absolute; z-index: 1; inset: -40% auto -40% -25%; width: 34%; transform: rotate(20deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,.14), transparent); animation: shine 5.5s ease-in-out infinite; }
.portrait-label { position: absolute; z-index: 2; left: 22px; right: 22px; bottom: 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; color: white; }
.portrait-label span { color: rgba(255,255,255,.66); font-size: .78rem; }.portrait-label strong { font-family: var(--font-display); }
.floating-chip { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid rgba(255,255,255,.13); border-radius: 999px; background: rgba(11,14,28,.82); color: white; backdrop-filter: blur(14px); box-shadow: 0 16px 38px rgba(0,0,0,.24); font-size: .8rem; font-weight: 800; animation: float 4s ease-in-out infinite; }
.chip-swift { top: 14%; left: -2%; }.chip-ui { top: 38%; right: -2%; animation-delay: .7s; }.chip-architecture { left: 5%; bottom: 9%; animation-delay: 1.4s; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 68px; }
.hero-stats article { padding: 22px 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); backdrop-filter: blur(16px); }
.hero-stats strong { display: block; font-family: var(--font-display); font-size: 1.42rem; }.hero-stats span { color: var(--muted); font-size: .82rem; }

.section-heading { max-width: 760px; margin-bottom: 50px; }
.section-heading.centered { margin-inline: auto; text-align: center; }
.section-heading h2 { margin: 12px 0 0; font-family: var(--font-display); font-size: clamp(2.25rem, 4.4vw, 4.4rem); line-height: 1.05; letter-spacing: -.05em; }
.section-heading p { color: var(--muted); }
.split-heading { max-width: none; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(260px, .65fr); align-items: end; gap: 60px; }
.split-heading p { margin: 0; }
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 90px; align-items: start; }
.about-copy { max-width: 760px; }
.about-copy > p { color: var(--muted); }.about-copy .large-copy { margin-top: 0; color: var(--text); font-size: clamp(1.45rem, 2.4vw, 2.25rem); line-height: 1.45; letter-spacing: -.025em; }
.about-points { display: grid; gap: 12px; margin-top: 36px; }
.about-points > div { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.about-points i { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; color: var(--primary-2); background: rgba(34,211,238,.09); }
.about-points span { color: var(--muted); font-size: .9rem; }.about-points strong { display: block; color: var(--text); font-size: 1rem; }

.education-grid { display: grid; grid-template-columns: repeat(2, minmax(280px, 520px)); justify-content: center; align-items: start; gap: 22px; }
.education-card { position: relative; width: 100%; max-width: 520px; margin-inline: auto; overflow: hidden; display: block; border-radius: var(--radius-xl); background: transparent; box-shadow: none; }
.education-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 42%; pointer-events: none; background: linear-gradient(180deg, rgba(5,7,14,0) 0%, rgba(5,7,14,.2) 36%, rgba(5,7,14,.88) 100%); }
.education-image { position: relative; display: block; width: 100%; height: auto; padding: 0; opacity: 1; transition: transform .7s ease, opacity .4s ease; border-radius: var(--radius-xl); }
.education-card:hover .education-image { transform: scale(1.01); opacity: 1; }
.education-icon { position: absolute; z-index: 2; top: 22px; left: 22px; width: 48px; height: 48px; display: grid; place-items: center; color: white; border: 1px solid rgba(255,255,255,.24); border-radius: 16px; background: rgba(7,9,18,.4); backdrop-filter: blur(10px); }
.education-copy { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 28px 32px 32px; color: white; }
.education-copy h3 { max-width: 450px; margin: 8px 0 10px; font-family: var(--font-display); font-size: 1.75rem; line-height: 1.2; }.education-copy p { max-width: 540px; color: rgba(255,255,255,.78); }
.education-index { color: var(--primary-2); font-size: .75rem; font-weight: 800; letter-spacing: .15em; }
.text-button { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; color: white; background: transparent; font-weight: 800; cursor: pointer; }

.skills-layout { display: grid; grid-template-columns: 360px 1fr; gap: 34px; align-items: start; }
.skills-highlight { position: sticky; top: calc(var(--header-height) + 24px); display: grid; gap: 14px; }
.skills-highlight article { padding: 26px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); transition: .25s ease; }
.skills-highlight article:hover { transform: translateX(5px); border-color: rgba(139,92,246,.42); }
.skills-highlight i { color: var(--primary-2); font-size: 1.35rem; }.skills-highlight h3 { margin: 12px 0 6px; font-family: var(--font-display); }.skills-highlight p { margin: 0; color: var(--muted); font-size: .88rem; }
.skills-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.skill-card { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.skill-card header { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 13px; }.skill-card h3 { margin: 0; font-size: .9rem; line-height: 1.35; }.skill-card span { color: var(--primary-2); font-size: .77rem; font-weight: 800; }

.project-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.project-search { flex: 1; min-width: 260px; height: 54px; display: flex; align-items: center; gap: 12px; padding: 0 18px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.project-search i { color: var(--muted); }.project-search input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; }.project-search input::placeholder { color: var(--muted); }
.filter-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.filter-button, .sort-button { min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); font-size: .78rem; font-weight: 800; cursor: pointer; transition: .2s ease; }
.filter-button:hover, .filter-button.active, .sort-button:hover { color: white; border-color: transparent; background: var(--primary); }
.project-meta { display: flex; align-items: center; justify-content: space-between; margin: 20px 0; color: var(--muted); font-size: .84rem; }.sort-button { min-height: 38px; }
.projects-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.project-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease; }
.project-card:hover { transform: translateY(-8px); border-color: rgba(139,92,246,.43); box-shadow: var(--shadow); }
.project-cover { position: relative; aspect-ratio: 2.05; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 16px 18px 0; background: var(--media-bg); }
.project-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 62%, var(--media-fade)); }
.project-cover img { width: 100%; height: 100%; object-fit: contain; object-position: center center; transition: transform .7s ease; }.project-card:hover .project-cover img { transform: scale(1.02); }
.project-cover-fallback { width: 100%; height: 100%; display: grid; place-items: center; font-size: 4rem; }
.project-badges { position: absolute; z-index: 2; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; gap: 10px; }
.project-category, .image-count { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; color: white; background: rgba(7,9,18,.66); backdrop-filter: blur(10px); font-size: .7rem; font-weight: 800; }
.project-body { padding: 22px; }.project-body h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: 1.28rem; line-height: 1.25; }.project-body p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; min-height: 76px; margin: 0; color: var(--muted); font-size: .86rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }.project-tags span { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface-soft); font-size: .66rem; font-weight: 700; }
.project-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }.project-open { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; color: var(--text); background: transparent; font-weight: 800; cursor: pointer; }.project-open i { color: var(--primary-2); transition: transform .2s ease; }.project-open:hover i { transform: translateX(4px); }.project-tech { color: var(--muted); font-size: .72rem; }
.load-more-wrap { display: flex; justify-content: center; margin-top: 34px; }.load-more-wrap [hidden] { display: none; }
.empty-state { padding: 70px 20px; text-align: center; color: var(--muted); }.empty-state i { font-size: 2rem; color: var(--primary); }.empty-state h3 { color: var(--text); }



/* Professional experience */
.experience-section { position: relative; overflow: hidden; }
.experience-section::before { content: ""; position: absolute; width: 440px; height: 440px; left: -250px; top: 25%; border-radius: 50%; background: var(--primary); filter: blur(150px); opacity: .07; pointer-events: none; }
.experience-timeline { position: relative; display: grid; gap: 22px; }
.experience-timeline::before { content: ""; position: absolute; top: 42px; bottom: 42px; left: 31px; width: 1px; background: linear-gradient(180deg, transparent, rgba(34,211,238,.55) 12%, rgba(139,92,246,.55) 88%, transparent); }
.experience-card { position: relative; display: grid; grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr); gap: clamp(28px, 5vw, 68px); padding: clamp(26px, 4vw, 48px); padding-left: clamp(82px, 8vw, 112px); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-xl); background: linear-gradient(145deg, var(--surface), rgba(139,92,246,.035)); box-shadow: 0 24px 70px rgba(0,0,0,.16); }
.experience-card::before { content: ""; position: absolute; left: 25px; top: 54px; width: 13px; height: 13px; border: 4px solid var(--bg); border-radius: 50%; background: var(--primary-2); box-shadow: 0 0 0 1px rgba(34,211,238,.5), 0 0 28px rgba(34,211,238,.55); }
.experience-card:nth-child(2)::before { background: var(--primary); box-shadow: 0 0 0 1px rgba(139,92,246,.5), 0 0 28px rgba(139,92,246,.55); }
.experience-summary { display: flex; align-items: flex-start; gap: 18px; }
.experience-brand { flex: 0 0 auto; width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.14); border-radius: 18px; color: white; font-size: 1.25rem; box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
.experience-brand-travel { background: linear-gradient(145deg, #0487b7, #103f75); }
.experience-brand-health { background: linear-gradient(145deg, #16a6b6, #176f91); }
.experience-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.experience-title-row h3 { margin: 0; font-family: var(--font-display); font-size: clamp(1.65rem, 2.8vw, 2.35rem); letter-spacing: -.035em; }
.current-badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid rgba(68,227,162,.22); border-radius: 999px; color: var(--success); background: rgba(68,227,162,.08); font-size: .67rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.current-badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 14px currentColor; }
.experience-company { margin: 8px 0 16px; color: var(--text); font-weight: 800; }
.experience-company span { color: var(--muted); font-weight: 600; }
.experience-meta { display: grid; gap: 9px; color: var(--muted); font-size: .78rem; }
.experience-meta span { display: flex; align-items: center; gap: 9px; }
.experience-meta i { width: 15px; color: var(--primary-2); text-align: center; }
.experience-details { position: relative; }
.experience-number { position: absolute; top: -20px; right: 0; color: var(--surface-soft); font-family: var(--font-display); font-size: clamp(4.5rem, 9vw, 7.5rem); font-weight: 800; line-height: 1; pointer-events: none; }
.experience-list { position: relative; z-index: 1; display: grid; gap: 15px; margin: 0; padding: 0; list-style: none; }
.experience-list li { position: relative; padding-left: 27px; color: var(--muted); line-height: 1.75; }
.experience-list li::before { content: ""; position: absolute; left: 0; top: .7em; width: 9px; height: 9px; border: 2px solid var(--primary-2); border-radius: 50%; box-shadow: 0 0 0 4px rgba(34,211,238,.06); }
.experience-list strong { color: var(--text); }
.experience-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.experience-tags span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface-soft); font-size: .68rem; font-weight: 800; }

/* Impact and achievements */
.impact-section { position: relative; overflow: hidden; }
.impact-section::after { content: ""; position: absolute; width: 420px; height: 420px; right: -260px; bottom: 0; border-radius: 50%; background: var(--primary-2); filter: blur(150px); opacity: .06; pointer-events: none; }
.impact-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.impact-card { position: relative; min-height: 270px; overflow: hidden; padding: 28px; border: 1px solid var(--line); border-radius: 26px; background: linear-gradient(145deg, var(--surface), var(--surface-soft)); transition: transform .25s ease, border-color .25s ease; }
.impact-card::after { content: ""; position: absolute; width: 150px; height: 150px; right: -75px; bottom: -85px; border-radius: 50%; background: var(--primary); filter: blur(50px); opacity: .11; }
.impact-card:hover { transform: translateY(-7px); border-color: rgba(34,211,238,.32); }
.impact-icon { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 15px; color: var(--primary-2); background: var(--surface-soft); font-size: 1.08rem; }
.impact-value { display: flex; align-items: flex-start; gap: 3px; margin: 28px 0 4px; font-family: var(--font-display); font-size: clamp(2.8rem, 5vw, 4.6rem); font-weight: 800; line-height: .9; letter-spacing: -.06em; }
.impact-value small { margin-top: 5px; color: var(--primary-2); font-size: .36em; letter-spacing: 0; }
.impact-card h3 { margin: 17px 0 7px; font-family: var(--font-display); font-size: 1.12rem; }
.impact-card p { margin: 0; color: var(--muted); font-size: .79rem; line-height: 1.65; }
.achievement-strip { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.achievement-strip span { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 10px; color: var(--muted); text-align: center; font-size: .72rem; font-weight: 800; }
.achievement-strip i { color: var(--primary-2); }

/* Testimonials */
.testimonials-section { overflow: hidden; }
.testimonials-section::before { content: ""; position: absolute; width: 520px; height: 520px; top: 26%; right: -350px; border-radius: 50%; background: var(--primary); filter: blur(170px); opacity: .08; pointer-events: none; }
.testimonial-heading { align-items: end; }
.testimonial-heading-actions { display: grid; justify-items: end; gap: 20px; }
.testimonial-heading-actions > p { max-width: 510px; margin: 0; color: var(--muted); text-align: right; }
.testimonial-controls { display: flex; gap: 10px; }
.testimonial-controls button { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: var(--surface); cursor: pointer; transition: .2s ease; }
.testimonial-controls button:hover:not(:disabled) { transform: translateY(-2px); color: white; border-color: transparent; background: var(--primary); }
.testimonial-controls button:disabled { opacity: .35; cursor: not-allowed; }
.testimonial-carousel { position: relative; }
.testimonial-track { display: grid; align-items: start; grid-auto-flow: column; grid-auto-columns: calc((100% - 22px) / 2); gap: 22px; overflow-x: auto; padding: 8px 2px 20px; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-inline: contain; }
.testimonial-track::-webkit-scrollbar { display: none; }
.testimonial-card { position: relative; height: 500px; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 24px; overflow: hidden; padding: clamp(26px, 4vw, 38px); border: 1px solid var(--line); border-radius: var(--radius-xl); background: linear-gradient(145deg, var(--surface), rgba(34,211,238,.035)); box-shadow: 0 24px 70px rgba(0,0,0,.13); scroll-snap-align: start; scroll-snap-stop: always; }
.testimonial-card::before { content: ""; position: absolute; width: 220px; height: 220px; right: -130px; top: -130px; border-radius: 50%; background: var(--primary); filter: blur(65px); opacity: .14; pointer-events: none; }
.testimonial-card:nth-child(even)::before { background: var(--primary-2); }
.testimonial-topline { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.testimonial-source { display: inline-flex; align-items: center; gap: 8px; color: var(--primary-2); font-size: .69rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
.testimonial-source i { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; color: white; background: #0a66c2; }
.testimonial-quote-icon { color: var(--surface-soft); font-size: 3rem; }
.testimonial-card blockquote { position: relative; z-index: 1; min-height: 0; margin: 0; padding-right: 12px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; color: var(--text); font-family: var(--font-display); font-size: clamp(1.02rem, 1.55vw, 1.24rem); line-height: 1.72; letter-spacing: -.015em; }
.testimonial-card blockquote::-webkit-scrollbar { width: 7px; }
.testimonial-card blockquote::-webkit-scrollbar-track { border-radius: 999px; background: rgba(148,163,184,.10); }
.testimonial-card blockquote::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(34,211,238,.45); }
.testimonial-card blockquote::-webkit-scrollbar-thumb:hover { background: var(--primary-2); }
.testimonial-card blockquote { scrollbar-width: thin; scrollbar-color: rgba(34,211,238,.45) rgba(148,163,184,.10); }
.testimonial-author { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; padding-top: 22px; border-top: 1px solid var(--line); }
.testimonial-author img { flex: 0 0 auto; width: 60px; height: 60px; object-fit: cover; border: 2px solid rgba(34,211,238,.35); border-radius: 50%; background: var(--surface-soft); box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.testimonial-author div { min-width: 0; display: grid; gap: 2px; }
.testimonial-author strong { font-family: var(--font-display); font-size: 1rem; }
.testimonial-author span { overflow: hidden; color: var(--muted); font-size: .76rem; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.testimonial-author small { color: var(--primary-2); font-size: .66rem; font-weight: 700; }
.testimonial-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 24px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface-soft); }
.testimonial-proof { display: flex; align-items: center; gap: 16px; }
.testimonial-proof span { min-width: 54px; color: var(--primary-2); font-family: var(--font-display); font-size: 2.3rem; font-weight: 800; line-height: 1; }
.testimonial-proof p { max-width: 430px; margin: 0; color: var(--muted); font-size: .8rem; }

/* Development Process */
.process-section { position: relative; overflow: hidden; }
.process-section::before { content: ""; position: absolute; width: 460px; height: 460px; left: -300px; top: 20%; border-radius: 50%; background: var(--primary-2); filter: blur(160px); opacity: .07; pointer-events: none; }
.process-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.process-card { position: relative; min-height: 310px; overflow: hidden; padding: 26px 22px 24px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(150deg, var(--surface), rgba(139,92,246,.035)); transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.process-card::after { content: ""; position: absolute; left: 100%; top: 47px; width: 14px; height: 1px; background: var(--line); }
.process-card:last-child::after { display: none; }
.process-card:hover { transform: translateY(-7px); border-color: rgba(34,211,238,.34); box-shadow: 0 24px 60px rgba(0,0,0,.13); }
.process-number { position: absolute; right: 18px; top: 14px; color: var(--surface-soft); font-family: var(--font-display); font-size: 3.3rem; font-weight: 800; line-height: 1; letter-spacing: -.08em; }
.process-icon { position: relative; z-index: 1; width: 50px; height: 50px; display: grid; place-items: center; margin-bottom: 54px; border: 1px solid rgba(34,211,238,.23); border-radius: 16px; color: var(--primary-2); background: var(--surface-soft); font-size: 1.05rem; }
.process-card h3 { position: relative; z-index: 1; margin: 0 0 10px; font-family: var(--font-display); font-size: 1.12rem; }
.process-card p { position: relative; z-index: 1; margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.7; }

/* Availability */

/* FAQ */
.faq-section { position: relative; overflow: hidden; }
.faq-layout { display: grid; grid-template-columns: .72fr 1.28fr; gap: clamp(42px, 7vw, 96px); align-items: start; }
.faq-intro { position: sticky; top: calc(var(--header-height) + 36px); }
.faq-intro h2 { margin: 12px 0 18px; font-family: var(--font-display); font-size: clamp(2.2rem, 3.8vw, 3.9rem); line-height: 1.03; letter-spacing: -.052em; }
.faq-intro p { margin-bottom: 26px; color: var(--muted); }
.faq-list { display: grid; gap: 12px; }
.faq-item { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); transition: border-color .2s ease, background .2s ease; }
.faq-item[open] { border-color: rgba(34,211,238,.28); background: linear-gradient(145deg, var(--surface), rgba(34,211,238,.035)); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px; cursor: pointer; list-style: none; font-family: var(--font-display); font-size: .98rem; font-weight: 700; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; color: var(--primary-2); background: var(--surface-soft); transition: transform .25s ease, color .2s ease, background .2s ease; }
.faq-item[open] summary i { transform: rotate(45deg); color: white; border-color: transparent; background: var(--primary); }
.faq-answer { padding: 0 24px 22px; }
.faq-answer p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.75; }

/* Final CTA enhancements */
.final-cta { align-items: center; }
.cta-topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.cta-topics span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface-soft); font-size: .7rem; font-weight: 800; }
.contact-panel { padding: 18px; border: 1px solid var(--line); border-radius: 24px; background: rgba(7,9,18,.22); backdrop-filter: blur(12px); }
.contact-panel-heading { padding: 7px 4px 14px; }
.contact-panel-heading span { display: block; margin-bottom: 6px; color: var(--primary-2); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.contact-panel-heading strong { display: block; color: var(--text); font-family: var(--font-display); font-size: 1.08rem; line-height: 1.35; }


.contact-section { padding-bottom: 100px; }.contact-card { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; padding: clamp(30px, 5vw, 66px); border: 1px solid rgba(139,92,246,.26); border-radius: var(--radius-xl); background: linear-gradient(135deg, rgba(139,92,246,.14), var(--surface) 42%, rgba(34,211,238,.07)); box-shadow: var(--shadow); }
.contact-card::before { content: ""; position: absolute; width: 360px; height: 360px; top: -200px; right: -100px; border-radius: 50%; background: var(--primary); filter: blur(110px); opacity: .2; }
.contact-copy { position: relative; z-index: 1; }.contact-copy h2 { margin: 12px 0 18px; font-family: var(--font-display); font-size: clamp(2.25rem, 4vw, 4.2rem); line-height: 1.02; letter-spacing: -.055em; }.contact-copy p { color: var(--muted); }
.contact-links { position: relative; z-index: 1; display: grid; gap: 10px; }.contact-links a { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); text-decoration: none; transition: .2s ease; }.contact-links a:hover { transform: translateX(5px); border-color: rgba(34,211,238,.4); }.contact-links span { display: flex; align-items: center; gap: 10px; color: var(--muted); }.contact-links i { color: var(--primary-2); }.contact-links strong { text-align: right; font-size: .84rem; }
.site-footer { padding: 26px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }.footer-inner p { margin: 0; }.footer-inner strong { color: var(--text); }
.back-to-top { position: fixed; z-index: 800; right: 22px; bottom: 22px; width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 15px; color: white; background: var(--primary); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(12px); transition: .25s ease; }.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }

.modal { position: fixed; z-index: 2000; inset: 0; display: grid; place-items: center; padding: 24px; opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease; }.modal.open { opacity: 1; visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: var(--backdrop); backdrop-filter: blur(14px); }
.modal-panel { position: relative; z-index: 1; width: min(1100px, 100%); max-height: calc(100vh - 48px); overflow: auto; border: 1px solid rgba(255,255,255,.13); border-radius: 28px; background: var(--bg-elevated); box-shadow: 0 50px 120px rgba(0,0,0,.55); transform: translateY(18px) scale(.985); transition: transform .3s ease; }.modal.open .modal-panel { transform: translateY(0) scale(1); }
.project-modal-panel { display: grid; grid-template-columns: 1.08fr .92fr; overflow: hidden; }
.modal-close { position: absolute; z-index: 10; top: 16px; right: 16px; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 14px; color: white; background: rgba(7,9,18,.72); backdrop-filter: blur(12px); cursor: pointer; }
.modal-gallery { position: relative; min-height: 610px; display: grid; place-items: center; overflow: hidden; background: var(--gallery-bg); }.modal-gallery img { width: 100%; height: 100%; object-fit: contain; }
.gallery-arrow { position: absolute; z-index: 4; top: 50%; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 14px; color: white; background: rgba(7,9,18,.7); cursor: pointer; transform: translateY(-50%); }.gallery-prev { left: 14px; }.gallery-next { right: 14px; }.gallery-arrow[hidden] { display: none; }
.gallery-counter { position: absolute; z-index: 4; left: 16px; bottom: 16px; padding: 7px 10px; border-radius: 999px; color: white; background: rgba(7,9,18,.7); font-size: .72rem; }
.modal-content { padding: 42px 34px 30px; overflow-y: auto; }.modal-heading h3 { margin: 14px 0 16px; font-family: var(--font-display); font-size: clamp(2rem, 3.3vw, 3.2rem); line-height: 1.05; letter-spacing: -.04em; }.modal-content > p { color: var(--muted); }.modal-tags { margin: 24px 0; }.modal-links { display: flex; flex-wrap: wrap; gap: 10px; }.modal-links a { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 15px; border: 1px solid var(--line); border-radius: 13px; color: var(--text); text-decoration: none; font-size: .78rem; font-weight: 800; }.modal-links a:first-child { color: white; border-color: transparent; background: var(--primary); }
.gallery-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 28px; }.gallery-thumbs button { aspect-ratio: 1.2; overflow: hidden; padding: 0; border: 2px solid transparent; border-radius: 10px; background: var(--surface-soft); cursor: pointer; opacity: .6; }.gallery-thumbs button.active { border-color: var(--primary); opacity: 1; }.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.image-modal-panel { position: relative; z-index: 1; max-width: min(1100px, 95vw); max-height: 92vh; }.image-modal-panel img { max-width: 100%; max-height: 90vh; border-radius: 20px; box-shadow: var(--shadow); }
.noscript { position: fixed; z-index: 3000; left: 20px; right: 20px; bottom: 20px; padding: 14px; color: white; text-align: center; border-radius: 14px; background: #b91c1c; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .72s ease, transform .72s ease; }.reveal.visible { opacity: 1; transform: translateY(0); }.delay-1 { transition-delay: .1s; }.delay-2 { transition-delay: .2s; }
@keyframes pulse { 50% { box-shadow: 0 0 0 11px rgba(68,227,162,0), 0 0 22px rgba(68,227,162,.65); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-10px); } }
/* Moves with transform (no layout per frame): the same path as left -40% → 120% of the card,
   measured in the shine's own width (34% of the card) from where it rests (left -25%). */
@keyframes shine { 0%, 20% { transform: translateX(-44%) rotate(20deg); } 55%, 100% { transform: translateX(426%) rotate(20deg); } }

@media (max-width: 1050px) {
    .desktop-nav { display: none; }.menu-toggle { display: grid; }
    .mobile-nav { position: absolute; top: calc(100% + 8px); left: 20px; right: 20px; display: grid; padding: 10px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg-elevated); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-10px); transition: .25s ease; }
    .mobile-nav.open { opacity: 1; visibility: visible; transform: translateY(0); }.mobile-nav a { padding: 12px 14px; border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 700; }.mobile-nav a:hover { color: var(--text); background: var(--surface-soft); }
    .hero-grid { gap: 30px; }.projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.project-toolbar { align-items: stretch; flex-direction: column; }.filter-row { justify-content: flex-start; }
    .skills-layout { grid-template-columns: 310px 1fr; }.experience-card { grid-template-columns: 1fr; gap: 32px; }.impact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.testimonial-track { grid-auto-columns: min(76vw, 590px); }.process-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }.process-card::after { display: none; }.project-modal-panel { grid-template-columns: 1fr; }.modal-gallery { min-height: 460px; max-height: 60vh; } }

@media (max-width: 780px) {
    :root { --header-height: 72px; }.container { width: min(calc(100% - 28px), var(--container)); }.section { padding: 64px 0; }
    .hero { min-height: auto; padding-top: 110px; }.hero-grid, .about-grid, .split-heading, .skills-layout, .contact-card { grid-template-columns: 1fr; }.hero-grid { display: flex; flex-direction: column; }.hero-copy { order: 1; text-align: center; }.hero-visual { order: 2; margin: 44px 0 0; }.hero-lead { margin-inline: auto; }.rotating-role, .hero-actions, .hero-social { justify-content: center; }.portrait-orbit { width: min(100%, 380px); }.hero-stats { grid-template-columns: repeat(2, 1fr); margin-top: 46px; }
    .about-grid, .split-heading { gap: 30px; }.section-heading { margin-bottom: 38px; }.education-grid { grid-template-columns: 1fr; }.education-card { max-width: 560px; }.skills-highlight { position: static; grid-template-columns: 1fr; }.skills-grid { grid-template-columns: 1fr; }.projects-grid { grid-template-columns: 1fr; }.project-card { max-width: 650px; margin-inline: auto; width: 100%; }.experience-timeline::before { left: 23px; }.experience-card { padding-left: 70px; }.experience-card::before { left: 17px; }.impact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.achievement-strip { grid-template-columns: repeat(2, 1fr); }.testimonial-heading-actions { justify-items: start; }.testimonial-heading-actions > p { text-align: left; }.testimonial-track { grid-auto-columns: 88%; }.testimonial-footer { align-items: flex-start; flex-direction: column; }.process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.faq-layout { grid-template-columns: 1fr; }.faq-intro { position: static; }.contact-card { gap: 30px; }.footer-inner { align-items: flex-start; flex-direction: column; gap: 4px; }
    .project-modal-panel { display: block; }.modal-gallery { min-height: 330px; height: 42vh; }.modal-content { padding: 32px 22px 24px; } }

@media (max-width: 520px) {
    .container { width: min(calc(100% - 22px), var(--container)); }.site-header { height: 68px; }.brand-copy { display: none; }.hero h1 { font-size: clamp(3rem, 17vw, 4.4rem); }.hero-actions .button, .contact-actions .button { width: 100%; }.portrait-card { width: 78%; height: 76%; border-radius: 28px; }.floating-chip { font-size: .68rem; padding: 8px 10px; }.chip-swift { left: 0; }.chip-ui { right: 0; }.chip-architecture { left: 2%; }.hero-stats { gap: 8px; }.hero-stats article { padding: 18px 15px; }.education-card { max-width: 100%; }.education-copy { padding: 22px; }.project-search { min-width: 0; }.filter-row { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 7px; }.filter-button { flex: 0 0 auto; }.experience-timeline::before { display: none; }.experience-card { padding: 24px; }.experience-card::before { display: none; }.experience-summary { flex-direction: column; }.experience-number { top: -4px; }.experience-list li { padding-left: 22px; }.impact-grid { grid-template-columns: 1fr; }.impact-card { min-height: 240px; }.achievement-strip { grid-template-columns: 1fr; }.testimonial-track { grid-auto-columns: 94%; gap: 14px; }.testimonial-card { height: 520px; min-height: 0; padding: 24px; }.testimonial-author span { white-space: normal; }.testimonial-footer .button { width: 100%; }.testimonial-controls button { width: 42px; height: 42px; }.process-grid { grid-template-columns: 1fr; }.process-card { min-height: 250px; }.process-icon { margin-bottom: 40px; }.faq-item summary { padding: 19px 18px; font-size: .9rem; }.faq-answer { padding: 0 18px 19px; }.contact-links a { align-items: flex-start; flex-direction: column; gap: 6px; }.contact-links strong { text-align: left; }.modal { padding: 10px; }.modal-panel { max-height: calc(100vh - 20px); border-radius: 20px; }.modal-gallery { min-height: 260px; height: 36vh; }.gallery-thumbs { grid-template-columns: repeat(3, 1fr); } }

@media (hover: none) { .cursor-glow { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }.reveal { opacity: 1; transform: none; } }


/* Articles */
.articles-section { position: relative; overflow: hidden; }
.articles-section::before { content: ""; position: absolute; width: 460px; height: 460px; top: 20%; left: -320px; border-radius: 50%; background: var(--primary); filter: blur(160px); opacity: .07; pointer-events: none; }
.articles-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.article-card { min-width: 0; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: 0 24px 64px rgba(0,0,0,.12); transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.article-card:hover { transform: translateY(-8px); border-color: rgba(34,211,238,.3); box-shadow: 0 30px 78px rgba(0,0,0,.19); }
.article-cover { position: relative; min-height: 230px; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; padding: 24px; color: #fff; text-decoration: none; isolation: isolate; }
.article-cover::before { content: ""; position: absolute; z-index: -2; inset: 0; background: linear-gradient(135deg, #14192d, #0b0d18); }
.article-cover::after { content: ""; position: absolute; z-index: -1; width: 260px; height: 260px; right: -90px; top: -100px; border-radius: 50%; background: rgba(255,255,255,.17); filter: blur(1px); box-shadow: -130px 190px 0 rgba(255,255,255,.06); }
.cover-architecture::before { background: linear-gradient(145deg, #352264, #11182f 58%, #0c1222); }
.cover-swiftui::before { background: linear-gradient(145deg, #086b89, #163b73 52%, #16192d); }
.cover-payments::before { background: linear-gradient(145deg, #1b6a54, #132c37 55%, #121629); }
.cover-multitenant::before { background: linear-gradient(145deg, #8a3d6e, #3b245f 55%, #16182c); }
.cover-travel::before { background: linear-gradient(145deg, #166b83, #183c62 55%, #15182c); }
.cover-ai::before { background: linear-gradient(145deg, #6c3fc5, #2f2b6c 55%, #17182b); }
.cover-concurrency::before { background: linear-gradient(145deg, #c55a22, #55365f 54%, #17182b); }
.cover-modular::before { background: linear-gradient(145deg, #266c66, #22405f 54%, #15182b); }
.cover-testing::before { background: linear-gradient(145deg, #28714f, #244858 54%, #14182b); }
.cover-security::before { background: linear-gradient(145deg, #7a3346, #3a2f60 54%, #15172a); }
.cover-delivery::before { background: linear-gradient(145deg, #89631b, #4b3b58 54%, #17182a); }
.cover-reliability::before { background: linear-gradient(145deg, #215f93, #2e3769 54%, #141729); }
.article-cover-icon { width: 64px; height: 64px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 20px; background: rgba(5,7,16,.3); backdrop-filter: blur(12px); font-size: 1.55rem; }
.article-cover-code { color: rgba(255,255,255,.72); font-family: var(--font-display); font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.article-card-body { flex: 1; display: flex; flex-direction: column; padding: 26px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 13px; color: var(--muted); font-size: .68rem; font-weight: 700; }
.article-meta span:first-child { color: var(--primary-2); text-transform: uppercase; letter-spacing: .08em; }
.article-card h3 { margin: 17px 0 12px; font-family: var(--font-display); font-size: 1.28rem; line-height: 1.25; letter-spacing: -.025em; }
.article-card h3 a { text-decoration: none; }
.article-card h3 a:hover { color: var(--primary-2); }
.article-card p { margin: 0; color: var(--muted); font-size: .79rem; line-height: 1.7; }
.article-read { display: inline-flex; align-items: center; gap: 9px; margin-top: auto; padding-top: 24px; color: var(--text); text-decoration: none; font-size: .79rem; font-weight: 800; }
.article-read i { color: var(--primary-2); transition: transform .2s ease; }
.article-read:hover i { transform: translateX(4px); }
.articles-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 28px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface-soft); }
.articles-cta p { margin: 0; color: var(--muted); font-size: .82rem; }

@media (max-width: 980px) {
    .articles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .articles-section .articles-grid .article-card:last-child { grid-column: 1 / -1; max-width: 580px; justify-self: center; width: 100%; }
}
@media (max-width: 640px) {
    .articles-grid { grid-template-columns: 1fr; }
    .articles-section .articles-grid .article-card:last-child { grid-column: auto; max-width: none; }
    .article-cover { min-height: 205px; }
    .articles-cta { align-items: stretch; flex-direction: column; }
    .articles-cta .button { width: 100%; }
}


/* SEO article imagery: real crawlable images replace CSS-only covers. */
.article-cover.has-cover-image { padding: 0; background: #111827; }
.article-cover.has-cover-image::before { z-index: 1; background: linear-gradient(180deg, rgba(5,7,16,.02), rgba(5,7,16,.22)); pointer-events: none; }
.article-cover.has-cover-image::after { display: none; }
.article-cover.has-cover-image .article-cover-icon,
.article-cover.has-cover-image .article-cover-code { display: none; }
.article-card-image { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: cover; }


/* Light theme overrides for pieces that sit over images or use fixed dark tints. */
:root[data-theme="light"] ::selection { background: rgba(124, 58, 237, .22); color: var(--text); }
:root[data-theme="light"] .ambient { opacity: .12; }
:root[data-theme="light"] .hero::before { background: radial-gradient(circle, rgba(124, 58, 237, .12), transparent 62%); }
:root[data-theme="light"] .site-header.scrolled { box-shadow: 0 10px 30px rgba(15, 23, 42, .06); }
:root[data-theme="light"] .portrait-card { border-color: rgba(15, 23, 42, .08); background: linear-gradient(160deg, rgba(124, 58, 237, .16), rgba(14, 116, 144, .08)); }
:root[data-theme="light"] .floating-chip { border-color: var(--line); color: var(--text); background: rgba(255, 255, 255, .92); box-shadow: 0 14px 34px rgba(15, 23, 42, .12); }
:root[data-theme="light"] .text-button { color: var(--text); }
:root[data-theme="light"] .education-copy .text-button { color: var(--text); }
:root[data-theme="light"] .project-card { box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px rgba(15, 23, 42, .05); }
:root[data-theme="light"] .project-card:hover { box-shadow: var(--shadow); }
:root[data-theme="light"] .project-category,
:root[data-theme="light"] .image-count,
:root[data-theme="light"] .modal-close,
:root[data-theme="light"] .gallery-arrow,
:root[data-theme="light"] .gallery-counter { border-color: var(--line); color: var(--text); background: rgba(255, 255, 255, .9); }
:root[data-theme="light"] .current-badge { border-color: rgba(4, 120, 87, .25); background: rgba(4, 120, 87, .08); }
:root[data-theme="light"] .contact-panel { background: rgba(255, 255, 255, .55); }
:root[data-theme="light"] .modal-panel { border-color: var(--line); box-shadow: 0 40px 100px rgba(15, 23, 42, .22); }

/* Star next to the App Store rating in the hero stats (decorative). */
.hero-stats .stat-star { margin-left: 3px; color: #f59e0b; font-size: .78em; vertical-align: .12em; }

/* Case study inside the project modal */
.case-study { margin-top: 6px; }
.case-study:empty { display: none; }
.case-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0 4px; }
.case-facts div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.case-facts dt { color: var(--muted); font-size: .64rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.case-facts dd { margin: 3px 0 0; font-size: .8rem; font-weight: 700; line-height: 1.45; }
.case-study h4 { margin: 20px 0 8px; color: var(--primary-2); font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.case-study p { margin: 0; color: var(--muted); font-size: .86rem; }
.case-study ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.case-study li { position: relative; padding-left: 18px; color: var(--muted); font-size: .84rem; line-height: 1.6; }
.case-study li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--primary-2); }
@media (max-width: 520px) { .case-facts { grid-template-columns: 1fr; } }

/* Project modal: fixed height on desktop with a scrolling text column; whole panel scrolls on smaller screens. */
@media (min-width: 1051px) {
    .project-modal-panel { height: min(780px, calc(100vh - 48px)); grid-template-rows: minmax(0, 1fr); }
    .project-modal-panel .modal-gallery { min-height: 0; height: 100%; }
    .project-modal-panel .modal-content { min-height: 0; overflow-y: auto; }
}
@media (max-width: 1050px) {
    .project-modal-panel { overflow-y: auto; }
}

/* SVG icons from the sprite embedded in each page (replaces Font Awesome). Size follows font-size, colour follows currentColor. */
.icon { display: inline-block; flex: 0 0 auto; font-style: normal; line-height: 1; vertical-align: -.2em; }
.icon svg { display: block; width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }

/* Grouped tech stack inside a case study */
.case-stack { display: grid; gap: 10px; margin: 0; }
.case-stack div { display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: start; }
.case-stack dt { padding-top: 5px; color: var(--muted); font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.case-stack dd { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.case-stack dd span { padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); background: var(--surface-soft); font-size: .7rem; font-weight: 700; }
@media (max-width: 520px) { .case-stack div { grid-template-columns: 1fr; gap: 6px; } .case-stack dt { padding-top: 0; } }

/* Skills grouped into category cards (masonry columns so uneven cards pack neatly) */
.skills-grid { display: block; columns: 2 300px; column-gap: 14px; }
.skill-group { break-inside: avoid; margin: 0 0 14px; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.skill-group > header { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-bottom: 16px; }
.skill-group-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--primary-2); background: var(--surface-soft); font-size: 1.05rem; }
.skill-group h3 { margin: 0; font-family: var(--font-display); font-size: 1.02rem; line-height: 1.3; }
.skill-group small { color: var(--muted); font-size: .7rem; font-weight: 700; white-space: nowrap; }
@media (max-width: 780px) { .skills-grid { columns: 1; } }

/* Hero card holding the cartoon avatar: keep the whole illustration visible and fade only the strip under the sill. */
.portrait-card.is-illustration img { object-fit: contain; object-position: center bottom; }
.portrait-card.is-illustration::after { height: 20%; background: linear-gradient(transparent, rgba(3, 4, 10, .55)); }
:root[data-theme="light"] .portrait-card.is-illustration::after { background: linear-gradient(transparent, rgba(15, 23, 42, .28)); }
@media (max-width: 780px) { .hero-visual { align-self: stretch; width: 100%; } }

/* Language switch in the header: "ع" on the English page, "EN" on the Arabic one. */
.lang-switch { font-family: var(--font-display); font-size: .8rem; font-weight: 700; text-decoration: none; }
.lang-switch[lang="ar"] { font-size: 1.15rem; font-weight: 600; line-height: 1; }

/* ---------- Arabic version (ar/index.html, <html lang="ar" dir="rtl">) ---------- */
/* Latin text keeps Space Grotesk / Manrope; Arabic letters fall through to the Arabic fonts the page loads. */
:root[lang="ar"] {
    --font-display: "Space Grotesk", "Readex Pro", sans-serif;
    --font-body: "Manrope", "IBM Plex Sans Arabic", sans-serif;
}
/* Arabic letters join: any letter spacing breaks them, and the taller glyphs need more line height. */
:root[lang="ar"] body * { letter-spacing: 0 !important; }
:root[lang="ar"] body { line-height: 1.8; }
:root[lang="ar"] :is(h1, h2, h3) { line-height: 1.35; }
:root[lang="ar"] .hero h1 { font-size: clamp(2.7rem, 5.4vw, 4.9rem); line-height: 1.22; }
:root[lang="ar"] .section-heading h2, :root[lang="ar"] .faq-intro h2, :root[lang="ar"] .contact-copy h2 { font-size: clamp(2rem, 3.6vw, 3.5rem); }
:root[lang="ar"] .section-kicker, :root[lang="ar"] .eyebrow, :root[lang="ar"] .current-badge { text-transform: none; }

/* Mirror the parts of the layout that have a side. */
[dir="rtl"] .skip-link { left: auto; right: 12px; }
[dir="rtl"] .education-icon { left: auto; right: 22px; }
[dir="rtl"] .skills-highlight article:hover { transform: translateX(-5px); }
[dir="rtl"] .project-open:hover i, [dir="rtl"] .article-read:hover i { transform: translateX(-4px); }
[dir="rtl"] .scroll-progress span { transform-origin: right center; }
[dir="rtl"] .experience-timeline::before { left: auto; right: 31px; }
[dir="rtl"] .experience-card { padding-left: clamp(26px, 4vw, 48px); padding-right: clamp(82px, 8vw, 112px); }
[dir="rtl"] .experience-card::before { left: auto; right: 25px; }
[dir="rtl"] .experience-number { right: auto; left: 0; }
[dir="rtl"] .experience-list li { padding-left: 0; padding-right: 27px; }
[dir="rtl"] .experience-list li::before { left: auto; right: 0; }
[dir="rtl"] .case-study li { padding-left: 0; padding-right: 18px; }
[dir="rtl"] .case-study li::before { left: auto; right: 0; }
[dir="rtl"] .impact-value { justify-content: flex-end; }
[dir="rtl"] .testimonial-heading-actions > p { text-align: left; }
[dir="rtl"] .process-number { right: auto; left: 18px; }
[dir="rtl"] .contact-links a:hover { transform: translateX(-5px); }
[dir="rtl"] .contact-links strong { text-align: left; }
[dir="rtl"] .back-to-top { right: auto; left: 22px; }
[dir="rtl"] .modal-close { right: auto; left: 16px; }
[dir="rtl"] .gallery-prev { left: auto; right: 14px; }
[dir="rtl"] .gallery-next { right: auto; left: 14px; }
[dir="rtl"] .gallery-counter { left: auto; right: 16px; }
/* Recommendations are shown in their original English inside the Arabic page. */
[dir="rtl"] .testimonial-card[dir="ltr"] { text-align: left; }
@media (max-width: 780px) {
    [dir="rtl"] .experience-timeline::before { right: 23px; }
    [dir="rtl"] .experience-card { padding-right: 70px; }
    [dir="rtl"] .experience-card::before { right: 17px; }
    [dir="rtl"] .testimonial-heading-actions > p { text-align: right; }
}
@media (max-width: 520px) {
    [dir="rtl"] .experience-card { padding: 24px; }
    [dir="rtl"] .experience-list li { padding-right: 22px; }
    [dir="rtl"] .contact-links strong { text-align: right; }
}

/* Earlier experience: compact cards under the main experience timeline. */
.earlier-experience { margin-top: 40px; }
.earlier-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 16px; }
.earlier-item { padding: 26px 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.earlier-date { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .76rem; font-weight: 700; }
.earlier-item h3 { margin: 12px 0 2px; font-family: var(--font-display); font-size: 1.2rem; line-height: 1.3; }
.earlier-item .earlier-meta { margin: 0 0 12px; color: var(--primary-2); font-size: .8rem; font-weight: 700; }
.earlier-item .earlier-desc { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.75; }
.earlier-item .experience-tags { margin-top: 16px; }
@media (max-width: 780px) { .earlier-grid { grid-template-columns: 1fr; } .earlier-item { padding: 22px; } }

/* Skills as tags (no self-rated percentages); core strengths are highlighted. */
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.skill-tag { padding: 7px 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--surface-soft); font-size: .76rem; font-weight: 700; line-height: 1.45; }
.skill-tag.is-core { border-color: rgba(139,92,246,.42); color: var(--text); background: rgba(139,92,246,.12); }
.skill-tag.is-core::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-inline-end: 7px; border-radius: 50%; background: var(--primary-2); vertical-align: .12em; }
:root[data-theme="light"] .skill-tag.is-core { border-color: rgba(124,58,237,.32); background: rgba(124,58,237,.08); }

/* Featured case studies: the live App Store apps, above the searchable grid of other projects. */
.featured-projects { display: grid; gap: 22px; margin-bottom: 72px; }
.feature-card { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); transition: border-color .3s ease, box-shadow .3s ease; }
.feature-card:hover { border-color: rgba(139,92,246,.43); box-shadow: var(--shadow); }
.feature-card:nth-child(even) .feature-media { order: 2; }
.feature-media { display: flex; align-items: center; justify-content: center; min-height: 340px; padding: 28px; background: var(--media-bg); }
.feature-media img { width: 100%; max-height: 380px; object-fit: contain; transition: transform .7s ease; }
.feature-card:hover .feature-media img { transform: scale(1.03); }
.feature-body { display: flex; flex-direction: column; padding: clamp(24px, 3vw, 40px); }
.feature-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.feature-category, .feature-live { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface-soft); font-size: .7rem; font-weight: 800; }
.feature-live { border-color: rgba(68,227,162,.28); color: var(--success); background: rgba(68,227,162,.08); }
.feature-live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.feature-body h3 { margin: 16px 0 10px; font-family: var(--font-display); font-size: clamp(1.55rem, 2.4vw, 2.1rem); line-height: 1.2; }
.feature-body > p { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.7; }
.feature-facts { display: grid; gap: 10px; margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.feature-facts div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; font-size: .8rem; line-height: 1.55; }
.feature-facts dt { color: var(--muted); font-weight: 700; }
.feature-facts dd { margin: 0; font-weight: 700; }
.feature-body .project-tags { margin-top: 18px; }
.feature-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 26px; }
.feature-actions .button { min-height: 46px; padding: 0 18px; font-size: .86rem; }
.more-projects-heading { margin-bottom: 24px; }
.more-projects-heading h3 { margin: 12px 0 6px; font-family: var(--font-display); font-size: clamp(1.45rem, 2.4vw, 2rem); line-height: 1.25; }
.more-projects-heading p { max-width: 640px; margin: 0; color: var(--muted); }
@media (max-width: 900px) {
    .feature-card { grid-template-columns: 1fr; }
    .feature-card:nth-child(even) .feature-media { order: 0; }
    .feature-media { min-height: 0; aspect-ratio: 1.9; padding: 18px; }
}
@media (max-width: 520px) {
    .feature-facts div { grid-template-columns: 1fr; gap: 2px; }
    .feature-actions .button { flex: 1 1 100%; }
}

/* Light mode: a soft shadow under cards and controls so they lift off the pale background. */
:root[data-theme="light"] {
    --shadow-card: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 28px rgba(15, 23, 42, .06);
    --shadow-control: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 12px rgba(15, 23, 42, .05);
}
:root[data-theme="light"] :where(.hero-stats article, .about-points > div, .skills-highlight article, .skill-group, .education-card,
    .feature-card, .article-card, .articles-cta, .experience-card, .earlier-item, .impact-card, .achievement-strip,
    .testimonial-card, .testimonial-footer, .process-card, .faq-item, .contact-panel) { box-shadow: var(--shadow-card); }
:root[data-theme="light"] :where(.desktop-nav, .icon-button, .hero-social a, .button-secondary, .project-search,
    .filter-button, .sort-button, .testimonial-controls button, .contact-links a, .modal-links a) { box-shadow: var(--shadow-control); }
:root[data-theme="light"] :where(.feature-card, .article-card, .process-card):hover { box-shadow: var(--shadow); }

/* Light mode certificates: the whole certificate stays visible, with a white fade (not a dark one) behind dark text. */
:root[data-theme="light"] .education-card::after { height: 46%; background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .72) 30%, rgba(255, 255, 255, .95) 58%, rgba(255, 255, 255, .98) 100%); }
:root[data-theme="light"] .education-copy { color: var(--text); }
:root[data-theme="light"] .education-copy p { color: var(--muted); }
:root[data-theme="light"] .education-icon { border-color: var(--line); color: var(--primary); background: rgba(255, 255, 255, .92); box-shadow: var(--shadow-control); }

/* Case-study pages: work/<slug>.html and ar/work/<slug>.html, generated by tools/build_case_studies.py. */
.case-hero { position: relative; padding: 128px 0 56px; overflow: hidden; }
.case-hero::before { content: ""; position: absolute; width: 620px; height: 620px; inset-inline-end: -300px; top: -280px; border-radius: 50%; background: var(--primary); filter: blur(170px); opacity: .1; pointer-events: none; }
.case-breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .76rem; }
.case-breadcrumbs a { color: inherit; text-decoration: none; }
.case-breadcrumbs a:hover { color: var(--primary-2); }
.case-hero .feature-badges { margin: 26px 0 18px; }
.case-hero h1 { max-width: 920px; margin: 12px 0 18px; font-family: var(--font-display); font-size: clamp(2.6rem, 5.6vw, 5rem); line-height: 1.02; letter-spacing: -.05em; text-wrap: balance; }
.case-deck { max-width: 780px; margin: 0; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.18rem); line-height: 1.75; }
.case-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.case-hero .case-facts { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-top: 38px; }
.case-gallery { display: grid; gap: 22px; }
.case-shot { margin: 0; padding: clamp(12px, 3vw, 34px); border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--media-bg); }
.case-shot img { display: block; width: 100%; height: auto; }
.case-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(32px, 5vw, 72px); align-items: start; }
.case-content section + section { margin-top: 46px; }
.case-content h2, .case-aside h2, .case-cta h2 { margin: 0 0 16px; font-family: var(--font-display); font-size: clamp(1.4rem, 2.2vw, 1.85rem); line-height: 1.25; }
.case-content p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.8; }
.case-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.case-list li { position: relative; padding-inline-start: 24px; color: var(--muted); line-height: 1.75; }
.case-list li::before { content: ""; position: absolute; inset-inline-start: 0; top: .7em; width: 8px; height: 8px; border-radius: 50%; background: var(--primary-2); }
.case-aside { position: sticky; top: 110px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.case-aside h2 { font-size: 1.25rem; }
.case-aside .case-stack div { grid-template-columns: 1fr; gap: 8px; }
.case-aside .case-stack dt { padding-top: 0; }
.case-aside .project-tags { margin-top: 0; }
.case-next-section { padding-bottom: 110px; }
.case-next { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); color: inherit; text-decoration: none; transition: border-color .3s ease, box-shadow .3s ease; }
.case-next:hover { border-color: rgba(139,92,246,.43); box-shadow: var(--shadow); }
.case-next-media { display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--media-bg); }
.case-next-media img { width: 100%; height: auto; }
.case-next-copy { display: flex; flex-direction: column; gap: 10px; justify-content: center; padding: clamp(24px, 3vw, 40px); }
.case-next-copy strong { font-family: var(--font-display); font-size: clamp(1.4rem, 2.3vw, 2rem); line-height: 1.2; }
.case-next-copy > span:not(.section-kicker):not(.case-next-link) { color: var(--muted); line-height: 1.7; }
.case-next-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-weight: 800; }
.case-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin-top: 22px; padding: clamp(24px, 3.4vw, 42px); border: 1px solid var(--line); border-radius: var(--radius-xl); background: linear-gradient(135deg, rgba(139,92,246,.14), rgba(34,211,238,.06)); }
.case-cta h2 { margin-bottom: 8px; }
.case-cta p { max-width: 620px; margin: 0; color: var(--muted); }
.case-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
:root[data-theme="light"] :where(.case-shot, .case-aside, .case-next, .case-cta) { box-shadow: var(--shadow-card); }
:root[data-theme="light"] .case-next:hover { box-shadow: var(--shadow); }
@media (max-width: 960px) {
    .case-layout { grid-template-columns: 1fr; }
    .case-aside { position: static; }
    .case-next { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .case-hero { padding-top: 104px; }
    .case-hero-actions .button, .case-cta-actions .button { flex: 1 1 100%; }
}

/* Header contact button, on every page with the site header; the mobile menu already has Contact. */
.nav-cta { min-height: 44px; padding: 0 18px; border-radius: 14px; font-size: .84rem; box-shadow: 0 10px 24px rgba(139,92,246,.24); white-space: nowrap; }
.nav-cta:hover { transform: translateY(-1px); }
@media (max-width: 640px) { .nav-cta { display: none; } }

/* Recommendations: three short excerpts first, the full ten behind "Read all". */
.testimonial-highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.testimonial-highlight { display: flex; flex-direction: column; margin: 0; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); text-align: left; }
.testimonial-highlight > .icon { color: var(--primary-2); font-size: 1.4rem; }
.testimonial-highlight blockquote { flex: 1; margin: 14px 0 22px; color: var(--text); font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; line-height: 1.55; }
.testimonial-highlight figcaption { display: flex; align-items: center; gap: 12px; }
.testimonial-highlight img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.testimonial-highlight strong { display: block; font-size: .9rem; }
.testimonial-highlight small { display: block; color: var(--muted); font-size: .74rem; }
.testimonials-all { margin-top: 26px; }
.testimonials-all > summary { display: flex; width: fit-content; margin: 0 auto; list-style: none; }
.testimonials-all > summary::-webkit-details-marker { display: none; }
.testimonials-all > summary .icon { transition: transform .25s ease; }
.testimonials-all[open] > summary { margin-bottom: 24px; }
.testimonials-all[open] > summary .icon { transform: rotate(45deg); }
.testimonials-all .when-open, .testimonials-all[open] .when-closed { display: none; }
.testimonials-all[open] .when-open { display: inline; }
.testimonials-all .testimonial-controls { justify-content: flex-end; margin-bottom: 14px; }
:root[data-theme="light"] .testimonial-highlight { box-shadow: var(--shadow-card); }
@media (max-width: 900px) { .testimonial-highlights { grid-template-columns: 1fr; } }

/* Accessibility: a clear focus ring for keyboard users, and contrast fixes from the audit. */
:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid var(--primary-2); outline-offset: 3px; }
.project-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(139, 92, 246, .22); }
.filter-button.active, .sort-button:hover { background: #7c3aed; }
:root[data-theme="light"] .stat-star { color: #b45309; }

/* Company logo in an experience card (white tile, like an app icon) and the company link. */
.experience-brand-logo { overflow: hidden; padding: 0; border-color: var(--line); background: #fff; }
.experience-brand-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.experience-company a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; transition: color .2s ease, border-color .2s ease; }
.experience-company a:hover { color: var(--primary-2); border-bottom-color: currentColor; }

/* ---------- Phones: tighter spacing, two-column tiles and swipeable rows ---------- */
.experience-more { display: none; }
@media (max-width: 640px) {
    .section { padding: 60px 0; }
    .section-heading { margin-bottom: 26px; }
    .case-next-section { padding-bottom: 64px; }

    /* Featured case studies stay full width but lose the tag row; the other projects stay one per row,
       four at a time (see pageSize in script.js). */
    .featured-projects { gap: 16px; margin-bottom: 48px; }
    .feature-body { padding: 22px; }
    .feature-body .project-tags { display: none; }
    .projects-grid { gap: 16px; }
    .project-meta { margin: 14px 0; }
    .load-more-wrap { margin-top: 22px; }

    /* Articles: the latest one only, with "View all articles" right under it. */
    .articles-section .articles-grid > :nth-child(n+2) { display: none; }
    .articles-section .articles-cta { margin-top: 18px; }

    /* Long stacks become swipeable rows; the next card peeks in so the swipe is obvious. */
    .testimonial-highlights, .skills-highlight {
        grid-auto-flow: column; grid-auto-columns: 84%; grid-template-columns: none;
        overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 6px;
    }
    .testimonial-highlights > *, .skills-highlight > * { scroll-snap-align: start; }
    .testimonial-highlights::-webkit-scrollbar, .skills-highlight::-webkit-scrollbar { display: none; }

    /* Experience: the first four achievements, then a "Show all" button (script.js). */
    .experience-list:not(.is-expanded) > li:nth-child(n+5) { display: none; }
    .experience-more { display: inline-flex; margin-top: 14px; color: var(--primary-2); }
}
@media (max-width: 520px) {
    /* Short cards sit two side by side. */
    .impact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .impact-card { min-height: 0; padding: 18px 16px; border-radius: 20px; }
    .impact-value { margin: 14px 0 2px; font-size: 2.3rem; }
    .impact-card h3 { margin: 10px 0 4px; font-size: .95rem; }
    .impact-card p { font-size: .76rem; line-height: 1.5; }
    .achievement-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .process-card { min-height: 0; padding: 18px 16px; border-radius: 20px; }
    .process-card:last-child { grid-column: 1 / -1; }
    .process-icon { width: 42px; height: 42px; margin-bottom: 18px; }
    .process-number { font-size: 2.4rem; }
    .process-card h3 { margin: 0 0 6px; font-size: 1rem; }
    .process-card p { font-size: .78rem; line-height: 1.55; }
}

/* Above the fold: the hero (and the first case-study screenshot) show at once when the page paints, instead of
   staying hidden until the script that reveals the rest on scroll has loaded. */
.hero .reveal, .case-gallery .case-shot:first-child { opacity: 1; transform: none; transition: none; }

/* Tap feedback: buttons and cards dip slightly while pressed, so a tap registers at once on phones
   (iOS Safari only applies :active when the page has a touchstart listener; script.js and blog.js add one). */
html { -webkit-tap-highlight-color: rgba(139, 92, 246, .14); }
.button:active, .icon-button:active, .filter-button:active, .sort-button:active, .lang-switch:active,
.project-open:active, .text-button:active, .article-read:active, .case-next:active, .feature-actions .button:active,
.contact-links a:active, .testimonial-controls button:active, .hero-social a:active, .mobile-nav a:active { transform: scale(.97); opacity: .88; }
.project-card:active, .feature-card:active, .article-card:active { transform: scale(.99); }

/* Touch screens and narrow windows: the same soft glows, drawn the cheap way. Large blur() filters and backdrop
   blur on many small badges make iPhone Safari repaint big areas while a page opens and while it scrolls, which
   feels like the page freezes. Radial gradients look the same and paint once. */
@media (hover: none), (max-width: 780px) {
    .ambient-one { inset: 0; width: auto; height: auto; border-radius: 0; filter: none; background:
        radial-gradient(circle 480px at right 100px top 60px, var(--primary), transparent),
        radial-gradient(circle 480px at left 80px bottom 40px, var(--primary-2), transparent); }
    .ambient-two { display: none; }
    html :is(.experience-section, .testimonials-section, .articles-section, .case-hero, .blog-hero, .article-hero)::before,
    .testimonial-card::before, .contact-card::before, .impact-card::after {
        filter: none; background: radial-gradient(closest-side, var(--primary), transparent); transform: scale(2); }
    .process-section::before, .impact-section::after {
        filter: none; background: radial-gradient(closest-side, var(--primary-2), transparent); transform: scale(2); }
    .floating-chip, .hero-stats article, .education-icon, .project-category, .image-count, .contact-panel,
    .modal-close, .article-cover-icon { -webkit-backdrop-filter: none; backdrop-filter: none; }
    .project-category, .image-count { background: rgba(7,9,18,.8); }
    .education-icon { background: rgba(7,9,18,.62); }
    .article-cover-icon { background: rgba(5,7,16,.42); }
}
