/* =========================================================
   WEBPLEX SOLUTION — OUR WORK
   Project showcase: filter tabs, tech stack panel,
   detailed project cards and project detail modal
   ========================================================= */

:root {
    --bg: #f7f9fc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;

    --primary: #8b2cf0;
    --primary-soft: #f3e9fd;
    --blue: #1f63ea;
    --pink: #f0209e;
    --cyan: #0fb4f7;
    /* Logo colours: pink -> violet -> blue (-> cyan) */
    --brand-gradient: linear-gradient(135deg, var(--pink) 0%, var(--primary) 52%, var(--blue) 100%);
    --text-gradient: linear-gradient(110deg, var(--pink) 0%, var(--primary) 38%, var(--blue) 72%, var(--cyan) 100%);
    --soft-glow:
        radial-gradient(circle at 50% 35%, rgba(139, 44, 240, 0.16), transparent 62%),
        linear-gradient(180deg, #f9f5fe 0%, #eef3fd 100%);
    --green: #17b26a;

    --text-dark: #111827;
    --text: #263143;
    --muted: #667085;

    --border: #e5e9f2;
    --border-dark: #d0d5dd;

    --shadow-sm: 0 8px 25px rgba(40, 50, 80, 0.06);
    --shadow-md: 0 18px 45px rgba(44, 51, 90, 0.10);
    --shadow-lg: 0 30px 80px rgba(16, 24, 40, 0.12);

    --radius: 22px;
    --container: 1180px;
}

/* =========================================================
   RESET
   ========================================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body.no-scroll {
    overflow: hidden; /* Prevents scrolling when the mobile menu or project modal is open */
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: radial-gradient(rgba(139, 44, 240, 0.30) 1.2px, transparent 1.2px);
    background-size: 28px 28px;
    opacity: 0.75;
    mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.92) 75%, transparent 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

.container {
    width: min(var(--container), calc(100% - 48px));
    margin-inline: auto;
}

/* =========================================================
   HEADER
   ========================================================= */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 76px;
    padding: 12px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(229, 233, 242, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.logo {
    flex-shrink: 0;
}

.logo a {
    display: inline-flex;
    align-items: center;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.nav-button,
.contact-us-btn {
    min-height: 42px;
    padding: 9px 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s ease;
}

.nav-button {
    color: #535d70;
}

.nav-button:hover {
    color: var(--primary);
    background: #f5ecfe;
}

.nav-button.active {
    color: var(--primary);
    background: #f3e9fd;
}

.contact-us-btn {
    margin-left: 7px;
    padding-inline: 19px;
    color: #ffffff;
    background: var(--brand-gradient);
    box-shadow: 0 8px 20px rgba(139, 44, 240, 0.20);
}

.contact-us-btn:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(139, 44, 240, 0.28);
}

/* Animated Menu Icon */
.menu-icon {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    z-index: 1001; /* Keep above full screen menu */
    transition: all 0.3s ease;
}

.menu-icon .bar {
    width: 21px;
    height: 2px;
    border-radius: 10px;
    background: var(--text-dark);
    transition: all 0.3s ease;
}

/* Hamburger to X Animation */
.menu-icon.open .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-icon.open .bar:nth-child(2) {
    opacity: 0;
}

.menu-icon.open .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =========================================================
   SHARED TYPOGRAPHY + BUTTONS
   ========================================================= */

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.15em;
}

.section-kicker::before,
.section-kicker::after {
    content: "";
    width: 22px;
    height: 1px;
    background: rgba(139, 44, 240, 0.45);
}

.text-gradient {
    background: var(--text-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.button {
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 25px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.25s ease;
}

.button:hover {
    transform: translateY(-3px);
}

.button-primary {
    color: #ffffff;
    background: var(--brand-gradient);
    box-shadow: 0 14px 32px rgba(139, 44, 240, 0.22);
}

.button-primary:hover {
    box-shadow: 0 18px 38px rgba(139, 44, 240, 0.30);
}

.button-outline {
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border-dark);
}

.button-outline:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: #ffffff;
}

.button-light {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.20);
}

.button-light:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* Small uppercase label used for tags and card sections */
.work-tag {
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* =========================================================
   HERO
   ========================================================= */

.work-hero {
    padding: 105px 0 70px;
    text-align: center;
}

.hero-inner {
    max-width: 900px;
}

.work-hero h1 {
    color: var(--text-dark);
    font-size: clamp(40px, 5vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.045em;
    font-weight: 800;
}

.work-hero p {
    max-width: 700px;
    margin: 22px auto 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.75;
}

/* =========================================================
   FILTER TABS
   ========================================================= */

.work-section {
    padding: 0 0 100px;
}

.work-filters {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 30px;
    padding: 6px;
    display: flex;
    gap: 4px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.filter-btn {
    min-height: 46px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 11px;
    color: #535d70;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.filter-btn:hover {
    color: var(--primary);
    background: #f5ecfe;
}

.filter-count {
    min-width: 24px;
    height: 22px;
    padding: 0 7px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
}

.filter-btn.active {
    color: #ffffff;
    background: var(--brand-gradient);
    box-shadow: 0 8px 20px rgba(139, 44, 240, 0.22);
}

.filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.filter-btn:focus-visible,
.work-open:focus-visible,
.work-live:focus-visible,
.work-modal__close:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

/* =========================================================
   TECH ICONS (chips on cards, tiles in panel + modal)
   ========================================================= */

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
}

.tech-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px 5px 6px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #ffffff;
    color: var(--text-dark);
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(16, 24, 40, 0.04);
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.tech-chip img {
    width: 20px;
    height: 20px;
    padding: 1px;
}

.tech-chip:hover {
    border-color: #e1c8fb;
    transform: translateY(-2px);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    list-style: none;
}

.tech-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.tech-tile:hover {
    border-color: #e1c8fb;
    box-shadow: var(--shadow-sm);
    transform: translateY(-3px);
}

.tech-tile__icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--soft-glow);
    border: 1px solid #efe4fd;
}

.tech-tile__icon img {
    width: 24px;
    height: 24px;
    transform: perspective(400px) rotateY(0deg);
    transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tech-tile:hover .tech-tile__icon img {
    transform: perspective(400px) rotateY(360deg);
}

.tech-tile strong {
    display: block;
    color: var(--text-dark);
    font-size: 13px;
    line-height: 1.3;
}

.tech-tile small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.4;
}

/* =========================================================
   STACK PANEL (changes with the active tab)
   ========================================================= */

.stack-panel {
    position: relative;
    overflow: hidden;
    margin-bottom: 34px;
    padding: 30px 32px 30px 36px;
    display: grid;
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.6fr);
    gap: 34px;
    align-items: center;
    background:
        radial-gradient(circle at 0% 0%, rgba(240, 32, 158, 0.07), transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(31, 99, 234, 0.08), transparent 45%),
        #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.stack-panel::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--brand-gradient);
}

.stack-panel h2 {
    margin-top: 8px;
    color: var(--text-dark);
    font-size: clamp(20px, 2.2vw, 25px);
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.stack-panel p {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.7;
}

/* auto-fill keeps tile widths the same whether a tab has 5, 3 or 2 technologies */
.stack-panel .tech-grid {
    grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
}

.stack-panel .tech-tile {
    flex-direction: column;
    gap: 10px;
    padding: 18px 10px 16px;
    text-align: center;
}

.stack-panel .tech-tile__icon {
    width: 52px;
    height: 52px;
    border-radius: 15px;
}

.stack-panel .tech-tile__icon img {
    width: 30px;
    height: 30px;
}

/* =========================================================
   PROJECT GRID + CARDS
   ========================================================= */

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

.work-grid[data-view="app"],
.work-grid[data-view="tool"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.work-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.work-card[hidden] {
    display: none;
}

.work-card:hover {
    transform: translateY(-6px);
    border-color: #e1c8fb;
    box-shadow: var(--shadow-md);
}

/* --- Media --- */

.work-media {
    position: relative;
    overflow: hidden;
    background: var(--surface-soft);
    border-bottom: 1px solid var(--border);
}

.work-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.work-card:hover .work-media img {
    transform: scale(1.04);
}

/* Website screenshots sit inside a faux browser window */
.browser-window {
    overflow: hidden;
    background: #ffffff;
}

.browser-bar {
    height: 36px;
    padding: 0 12px 0 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
}

.browser-bar i {
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    border-radius: 50%;
}

.browser-bar i:nth-child(1) { background: #f97066; }
.browser-bar i:nth-child(2) { background: #fdb022; }
.browser-bar i:nth-child(3) { background: #32d583; }

.browser-bar span {
    flex: 1;
    min-width: 0;
    max-width: 260px;
    margin-left: 10px;
    padding: 3px 12px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.work-shot {
    aspect-ratio: 21 / 10;
    overflow: hidden;
}

/* Status pill: "Live", "On Google Play", "Delivered" */
.work-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px 3px 8px;
    border-radius: 999px;
    background: #ecfdf3;
    color: #067647;
    font-size: 10.5px;
    font-style: normal;
    font-weight: 700;
    white-space: nowrap;
}

.work-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    animation: statusPulse 2.2s ease-out infinite;
}

.browser-bar .work-status {
    margin-left: auto;
}

.work-status--float {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 1;
    background: #ffffff;
    color: var(--text-dark);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.work-status--delivered::before {
    background: var(--primary);
    animation-name: statusPulsePurple;
}

@keyframes statusPulse {
    0% { box-shadow: 0 0 0 0 rgba(23, 178, 106, 0.45); }
    100% { box-shadow: 0 0 0 7px rgba(23, 178, 106, 0); }
}

@keyframes statusPulsePurple {
    0% { box-shadow: 0 0 0 0 rgba(139, 44, 240, 0.40); }
    100% { box-shadow: 0 0 0 7px rgba(139, 44, 240, 0); }
}

/* Mobile apps: framed phone screenshots peek up from a soft brand glow */
.work-card[data-category="app"] .work-media {
    height: 360px;
    padding-top: 52px;
    display: flex;
    justify-content: center;
    background: var(--soft-glow);
}

.work-card[data-category="app"] .work-media img {
    width: min(210px, 70%);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 18px 30px rgba(44, 51, 90, 0.18));
}

.work-card[data-category="app"]:hover .work-media img {
    transform: translateY(-10px);
}

/* Excel tools: show the top-left of the workbook */
.work-card[data-category="tool"] .work-media {
    aspect-ratio: 16 / 10;
}

.work-card[data-category="tool"] .work-media img {
    object-position: top left;
}

/* --- Body --- */

.work-body {
    flex: 1;
    padding: 24px 26px 22px;
    display: flex;
    flex-direction: column;
}

.work-title {
    margin-top: 8px;
    color: var(--text-dark);
    font-size: 20px;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.work-meta {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
}

.work-meta svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--primary);
}

.work-desc {
    margin-top: 12px;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.7;
}

.work-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 11px;
    color: var(--text-dark);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.work-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Feature checklist (cards + modal) */
.work-features {
    display: grid;
    gap: 9px 18px;
    list-style: none;
}

.work-card .work-features {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.work-features li {
    position: relative;
    padding-left: 28px;
    color: var(--text);
    font-size: 13px;
    line-height: 1.55;
}

.work-features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1px;
    width: 19px;
    height: 19px;
    border-radius: 6px;
    background: var(--primary-soft);
}

.work-features li::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 4.5px;
    width: 5px;
    height: 9px;
    border: solid var(--primary);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* --- Footer actions --- */

.work-actions {
    margin-top: auto;
    padding-top: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.work-open {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

.work-open span {
    transition: transform 0.25s ease;
}

.work-card:hover .work-open span {
    transform: translateX(4px);
}

/* The button stretches over the whole card so the card is one click target */
.work-open::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
}

/* Live link sits above the stretched button */
.work-live {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #ffffff;
    color: var(--text-dark);
    font-size: 12px;
    font-weight: 700;
    transition: all 0.25s ease;
}

.work-live svg {
    width: 13px;
    height: 13px;
    transition: transform 0.25s ease;
}

.work-live:hover {
    color: #ffffff;
    border-color: transparent;
    background: var(--brand-gradient);
    box-shadow: 0 8px 20px rgba(139, 44, 240, 0.22);
}

.work-live:hover svg {
    transform: translate(2px, -2px);
}

/* --- Featured card (first website): floating browser + details side by side --- */

.work-card--featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.35fr 1fr;
}

.work-card--featured .work-media {
    padding: 36px;
    display: flex;
    align-items: center;
    background: var(--soft-glow);
    border-bottom: 0;
    border-right: 1px solid var(--border);
}

.work-card--featured .browser-window {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
}

.work-card--featured .work-body {
    padding: 34px 34px 28px;
}

.work-card--featured .work-title {
    font-size: clamp(24px, 2.6vw, 30px);
}

.work-card--featured .work-features {
    grid-template-columns: 1fr 1fr;
}

/* Rating badge on cards with linked client reviews */
.work-rating {
    margin-top: 10px;
    width: fit-content;
    padding: 5px 11px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #efe4fd;
    border-radius: 999px;
    background: #fbf8ff;
    color: var(--muted);
    font-size: 12px;
}

.work-rating b {
    color: var(--text-dark);
    font-size: 13px;
}

/* =========================================================
   PROJECT MODAL
   ========================================================= */

.work-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    padding: 24px;
    display: grid;
    place-items: center;
}

.work-modal[hidden] {
    display: none;
}

.work-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 18, 32, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: modalFade 0.3s ease both;
}

.work-modal__panel {
    position: relative;
    width: min(1120px, 100%);
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    grid-template-rows: minmax(0, 1fr); /* clamp the row to max-height so each column scrolls */
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 26px;
    box-shadow: var(--shadow-lg);
    animation: modalRise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.work-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-dark);
    transition: all 0.25s ease;
}

.work-modal__close:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: rotate(90deg);
}

.work-modal__close svg {
    width: 18px;
    height: 18px;
}

.work-modal__media {
    position: relative;
    min-height: 0;
    padding: 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: auto;
    background: var(--soft-glow);
    border-right: 1px solid var(--border);
}

/* Auto margins centre the screenshot but never clip its top when it is taller than the column */
.work-modal__media > * {
    flex-shrink: 0;
    margin-block: auto;
}

.work-modal__media > img,
.work-modal__media .browser-window {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
}

/* Override the img height attributes so screenshots keep their proportions */
.work-modal__media > img {
    height: auto;
}

.work-modal__media .browser-window img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.work-modal__media .work-status--float {
    display: none;
}

.work-modal[data-category="app"] .work-modal__media > img {
    width: auto;
    max-height: calc(100vh - 140px);
    max-height: calc(100dvh - 140px);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    filter: drop-shadow(0 22px 36px rgba(44, 51, 90, 0.22));
}

.work-modal__body {
    min-height: 0;
    padding: 40px 36px 34px;
    overflow-y: auto;
}

.work-modal__intro > .work-tag {
    display: block;
    padding-right: 48px;
}

.work-modal__title {
    margin-top: 10px;
    padding-right: 30px;
    color: var(--text-dark);
    font-size: clamp(24px, 2.4vw, 30px);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.work-modal__body .work-meta {
    margin-top: 10px;
}

.work-modal__desc {
    margin-top: 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.75;
}

/* Quick facts: Category / Location or Platform / Status */
.work-facts {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.work-facts div {
    padding: 12px 14px;
    background: #fbf8ff;
    border: 1px solid #efe4fd;
    border-radius: 14px;
}

.work-facts dt {
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.work-facts dd {
    margin-top: 4px;
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.work-modal__body .work-label {
    margin-top: 26px;
}

.work-modal__body .work-features li {
    font-size: 14px;
}

.work-modal__actions {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.work-modal__actions .button {
    min-height: 50px;
    padding: 0 20px;
    font-size: 13px;
}

.work-modal__actions .button[hidden] {
    display: none;
}

/* --- Client reviews linked to the project --- */

.work-review[hidden] {
    display: none;
}

.work-review .work-label {
    margin-top: 26px;
}

.work-review__item {
    margin: 0 0 10px;
    padding: 16px 18px;
    background:
        radial-gradient(circle at 100% 0%, rgba(139, 44, 240, 0.07), transparent 50%),
        #ffffff;
    border: 1px solid #efe4fd;
    border-radius: 14px;
}

.work-review__head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
}

.work-review__title {
    color: var(--text-dark);
    font-size: 14px;
}

.work-review__text {
    margin-top: 8px;
    color: var(--text);
    font-size: 13.5px;
    line-height: 1.7;
    white-space: pre-line;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.work-review__by {
    margin-top: 8px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 600;
}

.work-review__more {
    display: inline-block;
    margin-top: 4px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

/* --- Wide layout (websites + Excel tools): big screenshot on top,
       overview on the left and tech + features on the right --- */

.work-modal--wide .work-modal__panel {
    width: min(1080px, 100%);
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    overflow-y: auto;
}

.work-modal--wide .work-modal__media {
    padding: 44px 48px 36px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--border);
}

.work-modal--wide .work-modal__media .browser-window {
    width: min(100%, 860px);
}

.work-modal--wide .work-modal__media > img {
    width: auto;
    max-width: 100%;
    max-height: 440px;
}

.work-modal--wide .work-modal__body {
    overflow: visible;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0 44px;
    padding: 36px 44px 40px;
}

.work-modal--wide .work-modal__specs > .work-label:first-child {
    margin-top: 6px;
}

@keyframes modalFade {
    from { opacity: 0; }
}

@keyframes modalRise {
    from {
        opacity: 0;
        transform: perspective(1200px) translateY(40px) rotateX(-10deg) scale(0.97);
    }
}

/* =========================================================
   CTA
   ========================================================= */

.cta-section {
    padding-bottom: 110px;
}

.cta-box {
    position: relative;
    overflow: hidden;
    padding: 78px 45px;
    border-radius: 28px;
    color: #ffffff;
    background: linear-gradient(125deg, #161c2b, #381261);
    box-shadow: var(--shadow-lg);
}

.cta-box::before {
    content: "";
    position: absolute;
    width: 350px;
    height: 350px;
    right: -120px;
    top: -160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(158, 78, 242, 0.45), transparent 68%);
}

.cta-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.20) 0.7px, transparent 0.7px);
    background-size: 24px 24px;
    opacity: 0.14;
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: auto;
    text-align: center;
}

.cta-content .section-kicker {
    color: #d0aaf9;
}

.cta-content .section-kicker::before,
.cta-content .section-kicker::after {
    background: rgba(208, 170, 249, 0.5);
}

.cta-content h2 {
    font-size: clamp(32px, 4vw, 51px);
    line-height: 1.07;
    letter-spacing: -0.05em;
}

.cta-content p {
    max-width: 590px;
    margin: 17px auto 0;
    color: #c7cede;
    font-size: 14px;
    line-height: 1.8;
}

.cta-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 11px;
    margin-top: 28px;
}

/* =========================================================
   DEFAULT DESKTOP FOOTER
   ========================================================= */

.site-footer {
    padding: 65px 0 22px;
    background: #ffffff;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1fr;
    gap: 70px;
    align-items: start;
}

.footer-brand-column {
    max-width: 330px;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
}

.footer-brand-column p {
    max-width: 300px;
    margin-top: 16px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.75;
}

.footer-label {
    display: block;
    margin-bottom: 17px;
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.footer-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 11px;
}

.footer-column > a {
    color: #667085;
    font-size: 12px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-column > a:hover {
    color: var(--primary);
    transform: translateX(3px);
}

/* -------------------------
   CONTACT DETAILS (ICON LAYOUT)
   ------------------------- */

.footer-contact {
    gap: 16px;
}

.footer-contact .contact-link {
    display: flex;
    flex-direction: row; /* Align icon and text horizontally */
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.footer-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--primary);
    transition: transform 0.25s ease, color 0.25s ease;
}

.footer-contact .contact-link span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-contact .contact-link:hover .footer-icon {
    transform: scale(1.15);
}

.footer-contact .contact-link:hover span {
    color: var(--primary);
}

.footer-bottom {
    margin-top: 50px;
    padding-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 10px;
}

.footer-bottom-brand {
    color: var(--text-dark);
    font-weight: 700;
    transition: color 0.2s ease;
}

.footer-bottom-brand:hover {
    color: var(--primary);
}

/* =========================================================
   MEDIA QUERIES (FULLY RESPONSIVE CASCADE)
   ========================================================= */

/* Small laptops (Max Width: 1100px) */
@media (max-width: 1100px) {
    .work-grid[data-view="app"],
    .work-grid[data-view="tool"] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stack-panel {
        grid-template-columns: 1fr;
        gap: 22px;
    }
}

/* Tablets & Small Laptops (Max Width: 992px) */
@media (max-width: 992px) {
    .menu-icon {
        display: flex;
    }

    /* Animated Full Screen Menu */
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 15px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        z-index: 1000;
        overflow-y: auto;

        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-links.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        display: flex;
    }

    .nav-button, .contact-us-btn {
        width: 100%;
        max-width: 250px;
        font-size: 18px;
        padding: 15px;
        justify-content: center;
    }

    .nav-button {
        background: transparent;
    }

    .work-card--featured {
        grid-template-columns: 1fr;
    }

    .work-card--featured .work-media {
        padding: 26px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .work-card--featured .work-body {
        padding: 26px 26px 22px;
    }

    /* Modal stacks: screenshot on top, details below, whole panel scrolls */
    .work-modal__panel {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        overflow-y: auto;
    }

    .work-modal__media {
        overflow: visible;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .work-modal[data-category="app"] .work-modal__media > img {
        max-height: 460px;
    }

    .work-modal__body {
        overflow: visible;
    }

    .work-modal--wide .work-modal__body {
        grid-template-columns: 1fr;
        padding: 30px 32px 34px;
    }

    .work-modal--wide .work-modal__specs > .work-label:first-child {
        margin-top: 26px;
    }

    /* Transition footer to 2 columns before mobile */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 45px;
    }

    .footer-brand-column {
        grid-column: 1 / -1;
        max-width: 500px;
    }
}

/* Tablets Landscape & Large Phones (Max Width: 768px) */
@media (max-width: 768px) {
    .work-hero {
        padding: 80px 0 50px;
    }

    .work-hero h1 {
        font-size: clamp(34px, 8vw, 48px);
    }

    .work-hero p {
        font-size: 15px;
    }

    .work-grid,
    .work-grid[data-view="tool"] {
        grid-template-columns: 1fr;
    }

    .work-card--featured .work-features {
        grid-template-columns: 1fr;
    }

    .stack-panel {
        padding: 26px 22px 24px 26px;
    }

    .stack-panel .tech-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .work-modal {
        padding: 12px;
    }

    .work-modal__panel {
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        border-radius: 20px;
    }

    .work-modal__media,
    .work-modal--wide .work-modal__media {
        padding: 60px 18px 22px;
    }

    .work-modal--wide .work-modal__media > img {
        max-height: 320px;
    }

    .work-modal__body,
    .work-modal--wide .work-modal__body {
        padding: 26px 22px 28px;
    }

    /* --- CENTERED FOOTER FOR MOBILE --- */
    .site-footer {
        text-align: center;
        padding: 50px 0 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .footer-brand-column,
    .footer-column {
        align-items: center;
        margin: 0 auto;
    }

    .footer-brand-column p {
        margin-inline: auto;
    }

    .footer-column > a:hover {
        transform: translateY(-2px);
    }

    .footer-contact > a {
        align-items: center;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 12px;
        margin-top: 40px;
    }
}

/* Mobile Phones (Max Width: 560px) */
@media (max-width: 560px) {
    .container {
        width: calc(100% - 30px);
    }

    /* Tabs share the width evenly; counts drop to save room */
    .work-filters {
        width: 100%;
    }

    .filter-btn {
        flex: 1;
        min-width: 0;
        justify-content: center;
        padding: 6px 8px;
        font-size: 13px;
        line-height: 1.25;
        text-align: center;
        white-space: normal;
    }

    .filter-count {
        display: none;
    }

    .work-grid[data-view="app"] {
        grid-template-columns: 1fr;
    }

    .work-card[data-category="app"] .work-media {
        height: 340px;
    }

    .work-body {
        padding: 20px 20px 20px;
    }

    .work-card--featured .work-media {
        padding: 16px;
    }

    .work-card--featured .work-body {
        padding: 22px 20px 20px;
    }

    .browser-bar span {
        max-width: none;
    }

    .tech-grid,
    .work-facts {
        grid-template-columns: 1fr;
    }

    /* Compact icon + text rows so the panel doesn't push the projects far down */
    .stack-panel .tech-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .stack-panel .tech-tile {
        flex-direction: row;
        gap: 12px;
        padding: 10px 12px;
        text-align: left;
    }

    .stack-panel .tech-tile__icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .stack-panel .tech-tile__icon img {
        width: 24px;
        height: 24px;
    }

    .work-facts div {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 12px;
    }

    .work-facts dd {
        margin-top: 0;
        text-align: right;
    }

    .work-modal__actions {
        flex-direction: column;
    }

    .work-modal__actions .button {
        width: 100%;
    }

    .cta-box {
        padding: 50px 22px;
    }

    .cta-actions {
        flex-direction: column;
    }

    .cta-actions .button {
        width: 100%;
    }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
