
/* =========================================
   1. ROOT & GLOBAL SETTINGS
========================================= */

/* ================================
   PINAR FONT FAMILY
================================ */

@font-face {
    font-family: 'Pinar';
    src: url('../assets/fonts/Pinar-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pinar';
    src: url('../assets/fonts/Pinar-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pinar';
    src: url('../assets/fonts/Pinar-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pinar';
    src: url('../assets/fonts/Pinar-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pinar';
    src: url('../assets/fonts/Pinar-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pinar';
    src: url('../assets/fonts/Pinar-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Pinar';
    src: url('../assets/fonts/Pinar-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --color-bg: #0B090A;
    --color-surface: #161A1D;
    --color-surface-light: #222629;

    --color-red-dark: #660708;
    --color-red-deep: #A4161A;
    --color-red: #BA181B;
    --color-red-light: #E5383B;

    --color-muted: #B1A7A6;
    --color-gray: #D3D3D3;
    --color-light: #F5F3F4;
    --color-white: #FFFFFF;

    --font-fa: "Vazirmatn", sans-serif;
    --font-en: "DM Sans", sans-serif;

    --container-width: 1240px;
    --header-height: 88px;

    --transition: all 0.35s ease;
    --radius: 14px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    background: var(--color-bg);
    color: var(--color-light);
    font-family: var(--font-fa);
    line-height: 1.8;
    overflow-x: hidden;
}

body[dir="ltr"] {
    font-family: var(--font-en);
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.container {
    width: min(90%, var(--container-width));
    margin-inline: auto;
}

::selection {
    background: var(--color-red);
    color: var(--color-white);
}


/* =========================================
   2. HEADER & GLASSMORPHISM NAVBAR
========================================= */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
}

.navbar {
    width: min(92%, 1380px);
    min-height: 62px;
    margin: auto;
    padding: 10px 22px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    background: rgba(22, 26, 29, 0.68);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);

    border: 1px solid rgba(211, 211, 211, 0.12);
    border-radius: 16px;

    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.25);
}

.logo {
    font-family: var(--font-en);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -1px;
    white-space: nowrap;
}

.logo span {
    color: var(--color-red-light);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    color: var(--color-muted);
    font-size: 13px;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: -7px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--color-red-light);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--color-white);
}

.nav-links a:hover::after {
    width: 100%;
}

 {
    display: flex;
    align-it.header-actionsems: center;
    gap: 12px;
}

.language-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--color-light);
    padding: 7px 13px;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-en);
    font-size: 12px;
    transition: var(--transition);
}

.language-toggle:hover {
    background: var(--color-red-dark);
    border-color: var(--color-red);
}

.header-cta {
    padding: 9px 17px;
    background: var(--color-red-deep);
    border-radius: 8px;
    color: var(--color-white);
    font-size: 12px;
    transition: var(--transition);
}

.header-cta:hover {
    background: var(--color-red-light);
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 38px;
    height: 38px;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--color-white);
    transition: var(--transition);
}


/* =========================================
   3. HERO SECTION
========================================= */

.hero-section {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    padding: 150px 0 100px;
    overflow: hidden;
    isolation: isolate;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: -3;

    background:
        radial-gradient(
            ellipse at 78% 48%,
            rgba(164, 22, 26, 0.25),
            transparent 40%
        ),
        radial-gradient(
            ellipse at 12% 80%,
            rgba(102, 7, 8, 0.18),
            transparent 40%
        ),
        var(--color-bg);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: -2;

    background: linear-gradient(
        90deg,
        rgba(11, 9, 10, 0.98) 0%,
        rgba(11, 9, 10, 0.82) 45%,
        rgba(11, 9, 10, 0.35) 100%
    );
}

.hero-noise {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.035;
    pointer-events: none;

    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

.hero-container {
    position: relative;
    z-index: 2;

    display: grid;
    grid-template-columns: 1fr 0.9fr;
    align-items: center;
    gap: 70px;
}

.hero-content {
    max-width: 650px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--color-red-light);
    font-size: 13px;
    letter-spacing: 1px;
    margin-bottom: 22px;
}

.hero-eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--color-red-light);
}

.hero-title {
    font-size: clamp(38px, 5.5vw, 76px);
    line-height: 1.35;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 25px;
}

.hero-title-accent {
    color: var(--color-red-light);
}

.hero-description {
    max-width: 530px;
    color: var(--color-muted);
    font-size: 15px;
    line-height: 2.2;
    margin-bottom: 35px;
}

.hero-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    padding: 13px 25px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;

    transition: var(--transition);
}

.btn-primary {
    background: var(--color-red-deep);
    color: var(--color-white);
    border: 1px solid var(--color-red-deep);
}

.btn-primary:hover {
    background: var(--color-red-light);
    border-color: var(--color-red-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(186, 24, 27, 0.25);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--color-light);
}

.btn-secondary:hover {
    border-color: var(--color-red-light);
    background: rgba(164, 22, 26, 0.12);
}

.hero-meta {
    display: flex;
    gap: 35px;
    margin-top: 55px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-meta-item strong {
    display: block;
    font-family: var(--font-en);
    font-size: 24px;
    color: var(--color-white);
}

.hero-meta-item span {
    color: var(--color-muted);
    font-size: 11px;
}


/* =========================================
   4. HERO IMAGE & GLASS CARD
========================================= */

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-wrapper {
    width: 100%;
    max-width: 470px;
    position: relative;
}

.hero-image-wrapper::before {
    content: "";
    position: absolute;
    inset: -20px;
    border: 1px solid rgba(229, 56, 59, 0.22);
    border-radius: 20px;
    transform: rotate(3deg);
}

.hero-image {
    width: 100%;
    height: 570px;
    object-fit: cover;
    object-position: center;
    border-radius: 16px;
    position: relative;
    z-index: 1;

    filter: contrast(1.05) saturate(0.85);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.hero-image-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: 16px;
    pointer-events: none;

    background: linear-gradient(
        0deg,
        rgba(11, 9, 10, 0.7),
        transparent 55%
    );
}

.hero-glass-card {
    position: absolute;
    z-index: 3;
    bottom: 30px;
    left: -45px;

    width: 230px;
    padding: 20px;

    background: rgba(22, 26, 29, 0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    border: 1px solid rgba(211, 211, 211, 0.18);
    border-radius: 14px;

    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.3);
}

.hero-glass-card strong {
    display: block;
    color: var(--color-white);
    font-size: 14px;
    margin-bottom: 5px;
}

.hero-glass-card span {
    color: var(--color-muted);
    font-size: 11px;
}

.hero-index {
    position: absolute;
    top: 25px;
    right: -25px;
    z-index: 4;

    font-family: var(--font-en);
    font-size: 12px;
    color: var(--color-white);

    background: var(--color-red-deep);
    padding: 9px 14px;
    border-radius: 6px;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);

    color: var(--color-muted);
    font-family: var(--font-en);
    font-size: 10px;
    letter-spacing: 3px;
}


/* =========================================
   5. GENERAL SECTION SETTINGS
========================================= */

.section-padding {
    padding: 120px 0;
}

.section-heading {
    max-width: 700px;
    margin-bottom: 55px;
}

.section-eyebrow {
    display: inline-block;
    color: var(--color-red-light);
    font-family: var(--font-en);
    font-size: 11px;
    letter-spacing: 3px;
    margin-bottom: 14px;
}

.section-heading h2 {
    color: var(--color-white);
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.4;
    margin-bottom: 15px;
}

.section-heading p {
    color: var(--color-muted);
    font-size: 14px;
    line-height: 2;
}


/* =========================================
   6. PORTFOLIO FILTERS
========================================= */

.portfolio-section {
    background: var(--color-bg);
}

.project-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 35px;
}

.filter-btn {
    padding: 9px 20px;

    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 7px;

    color: var(--color-muted);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-red-deep);
    border-color: var(--color-red-deep);
    color: var(--color-white);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.project-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--color-surface);
    transition: var(--transition);
}

.project-card.is-hidden {
    display: none;
}

.project-large {
    grid-row: span 1;
}

.project-wide {
    grid-column: span 2;
}

.project-link {
    display: block;
    height: 100%;
}

.project-image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.project-card:hover .project-image {
    transform: scale(1.07);
}

.project-image-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        0deg,
        rgba(11, 9, 10, 0.85),
        transparent 65%
    );
    pointer-events: none;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.project-info {
    position: absolute;
    z-index: 2;
    bottom: 22px;
    right: 25px;
    left: 25px;
}

.project-category {
    color: var(--color-red-light);
    font-family: var(--font-en);
    font-size: 10px;
    letter-spacing: 2px;
    margin-bottom: 7px;
}

.project-title {
    color: var(--color-white);
    font-size: 19px;
    font-weight: 700;
}

.project-play {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 3;

    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(22, 26, 29, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;

    color: var(--color-white);
    transition: var(--transition);
}

.project-card:hover .project-play {
    background: var(--color-red);
    transform: scale(1.1);
}


/* =========================================
   7. ABOUT SECTION
========================================= */

.about-section {
    background: var(--color-surface);
    position: relative;
    overflow: hidden;
}

.about-container {
    display: grid;
    grid-template-columns: 0.85fr 1fr;
    align-items: center;
    gap: 80px;
}

.about-image-wrapper {
    position: relative;
}

.about-image {
    width: 100%;
    height: 530px;
    object-fit: cover;
    border-radius: var(--radius);
    filter: saturate(0.8);
}

.about-image-wrapper::after {
    content: "";
    position: absolute;
    inset: 15px -15px -15px 15px;
    border: 1px solid rgba(229, 56, 59, 0.35);
    border-radius: var(--radius);
    z-index: 0;
    pointer-events: none;
}

.about-content {
    position: relative;
    z-index: 1;
}

.about-content h2 {
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.5;
    margin-bottom: 25px;
    color: var(--color-white);
}

.about-content p {
    color: var(--color-muted);
    font-size: 14px;
    line-height: 2.2;
    margin-bottom: 18px;
}

.about-highlight {
    color: var(--color-red-light);
}


/* =========================================
   8. EXPERTISE SECTION
========================================= */

.expertise-section {
    background: var(--color-bg);
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.expertise-card {
    padding: 30px 24px;

    background: linear-gradient(
        145deg,
        rgba(22, 26, 29, 0.95),
        rgba(11, 9, 10, 0.95)
    );

    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius);

    transition: var(--transition);
}

.expertise-card:hover {
    border-color: rgba(229, 56, 59, 0.5);
    transform: translateY(-7px);
    background: linear-gradient(
        145deg,
        rgba(102, 7, 8, 0.2),
        rgba(22, 26, 29, 0.95)
    );
}

.expertise-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(164, 22, 26, 0.16);
    color: var(--color-red-light);
    border-radius: 12px;
    margin-bottom: 22px;
}

.expertise-card h3 {
    color: var(--color-white);
    font-size: 17px;
    margin-bottom: 12px;
}

.expertise-card p {
    color: var(--color-muted);
    font-size: 12px;
    line-height: 2;
}


/* =========================================
   9. SOFTWARE SECTION
========================================= */

.software-section {
    padding: 70px 0;
    background: var(--color-surface);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.software-heading {
    text-align: center;
    color: var(--color-muted);
    font-size: 12px;
    letter-spacing: 2px;
    margin-bottom: 35px;
}

.software-list {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 55px;
}

.software-item {
    color: var(--color-gray);
    font-family: var(--font-en);
    font-size: 16px;
    font-weight: 600;
    opacity: 0.7;
    transition: var(--transition);
}

.software-item:hover {
    color: var(--color-red-light);
    opacity: 1;
}


/* =========================================
   10. CONTACT SECTION
========================================= */

.contact-section {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(
            ellipse at 80% 50%,
            rgba(102, 7, 8, 0.22),
            transparent 45%
        ),
        var(--color-bg);
}

.contact-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.contact-content {
    max-width: 650px;
}

.contact-content h2 {
    color: var(--color-white);
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.4;
    margin-bottom: 20px;
}

.contact-content p {
    color: var(--color-muted);
    font-size: 14px;
    line-height: 2;
    margin-bottom: 30px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-item {
    color: var(--color-gray);
    font-size: 13px;
    transition: var(--transition);
}

.contact-item:hover {
    color: var(--color-red-light);
}


/* =========================================
   11. FOOTER
========================================= */

.site-footer {
    background: #080708;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 65px 0 25px;
}

.footer-container {
    width: min(90%, var(--container-width));
    margin: auto;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    padding-bottom: 45px;
}

.footer-logo {
    font-family: var(--font-en);
    font-size: 23px;
    font-weight: 800;
}

.footer-logo span {
    color: var(--color-red-light);
}

.footer-message {
    color: var(--color-muted);
    font-size: 13px;
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.footer-socials a {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
    color: var(--color-gray);

    transition: var(--transition);
}

.footer-socials a:hover {
    background: var(--color-red-deep);
    border-color: var(--color-red-deep);
    color: var(--color-white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 22px;

    display: flex;
    justify-content: space-between;
    gap: 20px;

    color: var(--color-muted);
    font-size: 11px;
}

.back-to-top {
    color: var(--color-red-light);
    transition: var(--transition);
}

.back-to-top:hover {
    color: var(--color-white);
}


/* =========================================
   12. VIDEO MODAL
========================================= */

.video-modal {
    width: min(90%, 1000px);
    max-width: none;
    max-height: 90vh;

    margin: auto;
    padding: 0;

    background: var(--color-surface);
    color: var(--color-white);

    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;

    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.7);
}

.video-modal::backdrop {
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
}

.video-modal[open] {
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.video-modal-content {
    position: relative;
    padding: 15px;
}

.close-video-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;

    width: 38px;
    height: 38px;

    border: none;
    border-radius: 50%;

    background: var(--color-red-deep);
    color: var(--color-white);

    cursor: pointer;
}

.video-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.video-container iframe,
.video-container video {
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain;
}


/* =========================================
   13. LTR / ENGLISH ADJUSTMENTS
========================================= */

body[dir="ltr"] .hero-title,
body[dir="ltr"] .section-heading,
body[dir="ltr"] .about-content,
body[dir="ltr"] .contact-content {
    text-align: left;
}

body[dir="ltr"] .hero-eyebrow::before {
    order: 2;
}

body[dir="ltr"] .hero-glass-card {
    left: auto;
    right: -45px;
}

body[dir="ltr"] .hero-index {
    right: auto;
    left: -25px;
}

body[dir="ltr"] .project-info {
    right: 25px;
    left: 25px;
}

body[dir="ltr"] .about-image-wrapper::after {
    inset: 15px 15px -15px -15px;
}


/* =========================================
   14. TABLET RESPONSIVE
========================================= */

@media (max-width: 1050px) {

    .nav-links {
        gap: 18px;
    }

    .hero-container {
        gap: 40px;
    }

    .hero-image {
        height: 480px;
    }

    .about-container {
        gap: 45px;
    }

    .expertise-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* =========================================
   15. MOBILE NAVIGATION
========================================= */

@media (max-width: 850px) {

    .site-header {
        padding: 10px 0;
    }

    .navbar {
        width: 94%;
        padding: 10px 16px;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 10px);
        right: 3%;
        left: 3%;

        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;

        padding: 12px;

        background: rgba(22, 26, 29, 0.97);
        backdrop-filter: blur(20px);

        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 14px;

        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: var(--transition);
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-links a {
        padding: 12px 14px;
        border-radius: 7px;
    }

    .nav-links a:hover {
        background: rgba(164, 22, 26, 0.15);
    }

    .nav-links a::after {
        display: none;
    }

    .header-cta {
        display: none;
    }

    body[dir="ltr"] .nav-links {
        right: 3%;
        left: 3%;
    }

    .hero-section {
        padding-top: 140px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-visual {
        max-width: 500px;
        margin: auto;
        width: 100%;
    }

    .hero-image {
        height: 520px;
    }

    .hero-meta {
        margin-top: 35px;
    }

    .about-container {
        grid-template-columns: 1fr;
        gap: 45px;
    }

    .about-image-wrapper {
        max-width: 550px;
    }

    .contact-container {
        flex-direction: column;
        align-items: flex-start;
    }
}
.navbar {
    width: 94%;
    padding: 10px 16px;
}
.header-actions {
    margin-left: auto;
    margin-right: 0;
}
/* =========================================
   16. SMALL TABLET / MOBILE
========================================= */

@media (max-width: 700px) {

    .section-padding {
        padding: 85px 0;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-wide {
        grid-column: span 1;
    }

    .project-image-wrapper {
        aspect-ratio: 16 / 11;
    }

    .footer-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-bottom {
        flex-direction: column;
    }

    .software-list {
        gap: 25px;
    }
}


/* =========================================
   17. SMALL MOBILE
========================================= */

@media (max-width: 480px) {

    .logo {
        font-size: 17px;
    }

    .language-toggle {
        padding: 6px 10px;
    }

    .hero-title {
        font-size: 36px;
        letter-spacing: -1px;
    }

    .hero-description {
        font-size: 13px;
    }

    .hero-buttons {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .hero-image {
        height: 420px;
    }

    .hero-glass-card {
        left: -5px;
        bottom: 15px;
        width: 195px;
        padding: 15px;
    }

    body[dir="ltr"] .hero-glass-card {
        left: auto;
        right: -5px;
    }

    .hero-index {
        right: -5px;
    }

    body[dir="ltr"] .hero-index {
        right: auto;
        left: -5px;
    }

    .hero-meta {
        gap: 20px;
    }

    .hero-meta-item strong {
        font-size: 20px;
    }

    .about-image {
        height: 390px;
    }

    .expertise-grid {
        grid-template-columns: 1fr;
    }

    .project-title {
        font-size: 16px;
    }

    .section-heading h2 {
        font-size: 29px;
    }
}


/* =========================================
   18. ACCESSIBILITY & REDUCED MOTION
========================================= */

:focus-visible {
    outline: 2px solid var(--color-red-light);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ================================
   LANGUAGE BASED TYPOGRAPHY
================================ */

/* Persian Typography */
body[dir="rtl"],
body[dir="rtl"] button,
body[dir="rtl"] input,
body[dir="rtl"] textarea,
body[dir="rtl"] select {
    font-family: 'Pinar', sans-serif;
}

/* English Typography */
body[dir="ltr"],
body[dir="ltr"] button,
body[dir="ltr"] input,
body[dir="ltr"] textarea,
body[dir="ltr"] select {
    font-family: 'DM Sans', sans-serif;
}

/* ================================
   PINAR FONT WEIGHT REFINEMENT
================================ */

body[dir="rtl"] {
    font-weight: 400;
}

body[dir="rtl"] h1 {
    font-weight: 500;
}

body[dir="rtl"] h2,
body[dir="rtl"] h3 {
    font-weight: 600;
}

body[dir="rtl"] p {
    font-weight: 400;
}

body[dir="rtl"] button,
body[dir="rtl"] .nav-links a {
    font-weight: 500;
}

/* =========================================
   CINEMATIC FULLSCREEN HERO — OS MAHYAR
========================================= */

.hero-section {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 100px);
    min-height: calc(100svh - 100px);
    overflow: hidden;
    isolation: isolate;
    background: #0B090A;
    padding: 0;
    display: block;
}

/* Background */

.hero-section .hero-background {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            ellipse at 50% 65%,
            rgba(102, 7, 8, 0.16),
            transparent 55%
        );
    z-index: -3;
}

.hero-section .hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(
            to bottom,
            rgba(11, 9, 10, 0.12) 0%,
            rgba(11, 9, 10, 0.05) 35%,
            rgba(11, 9, 10, 0.25) 60%,
            #0B090A 100%
        );
}

.hero-section .hero-noise {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0.08;
}

/* Main Stage */

.hero-stage {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 100px);
    min-height: calc(100svh - 100px);
    overflow: hidden;
}

/* Central Portrait */

.hero-portrait {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(58vw, 790px);
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-portrait .hero-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
    filter: brightness(0.72) contrast(1.08);
}

.hero-portrait .hero-image-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            to bottom,
            rgba(11, 9, 10, 0.05) 0%,
            transparent 35%,
            rgba(11, 9, 10, 0.15) 65%,
            #0B090A 100%
        );
}

/* Eyebrow */

.hero-section .hero-eyebrow {
    position: absolute;
    top: 8%;
    left: 8%;
    z-index: 4;
    color: #E5383B;
    font-family: "DM Sans", sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Side Information */

.hero-side-info {
    position: absolute;
    right: 8%;
    top: 42%;
    width: 190px;
    z-index: 4;
}

.hero-side-info p {
    color: #D3D3D3;
    font-family: "DM Sans", sans-serif;
    font-size: 12px;
    line-height: 2;
    font-weight: 400;
    margin-bottom: 25px;
}

.hero-explore {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.hero-explore:hover {
    color: #E5383B;
}

/* Main Name */

.hero-section .hero-name {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 5%;
    z-index: 5;
    width: 100%;
    padding: 0 5%;
    pointer-events: none;
}

.hero-section .hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0;
    padding: 0;
    color: #F5F3F4;
    text-align: center;
    line-height: 0.78;
    font-family: Impact, "Arial Narrow", sans-serif;
    font-weight: 900;
    text-transform: uppercase;
}

.hero-section .hero-name-first {
    display: block;
    font-size: clamp(55px, 8vw, 115px);
    color: #F5F3F4;
}

.hero-section .hero-name-last {
    display: block;
    font-size: clamp(85px, 16vw, 230px);
    color: #F5F3F4;
    letter-spacing: -5px;
    white-space: nowrap;
}

/* Persian Name */

body[dir="rtl"] .hero-section .hero-title {
    font-family: "Pinar", sans-serif;
    font-weight: 600;
    line-height: 1.05;
    text-transform: none;
}

body[dir="rtl"] .hero-section .hero-name-first {
    font-size: clamp(55px, 8vw, 105px);
    font-weight: 500;
}

body[dir="rtl"] .hero-section .hero-name-last {
    font-size: clamp(85px, 14vw, 190px);
    font-weight: 600;
    letter-spacing: 0;
}

/* Portfolio Label */

.hero-section .hero-index {
    position: absolute;
    top: 8%;
    right: 8%;
    z-index: 4;
    color: #D3D3D3;
    font-family: "DM Sans", sans-serif;
    font-size: 10px;
    letter-spacing: 1px;
}

/* Scroll Indicator */

.hero-section .scroll-indicator {
    position: absolute;
    bottom: 3%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #B1A7A6;
    text-decoration: none;
    font-size: 10px;
    letter-spacing: 1px;
}

.hero-section .scroll-line {
    width: 1px;
    height: 35px;
    background: #E5383B;
    transform-origin: top;
    animation: heroScrollLine 1.8s ease-in-out infinite;
}

@keyframes heroScrollLine {
    0%, 100% {
        transform: scaleY(0.4);
        opacity: 0.4;
    }

    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

/* Entrance Animation */

.hero-portrait {
    animation: heroImageReveal 1.2s ease both;
}

.hero-name {
    animation: heroNameReveal 1s 0.25s ease both;
}

.hero-side-info {
    animation: heroInfoReveal 1s 0.45s ease both;
}

@keyframes heroImageReveal {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes heroNameReveal {
    from {
        opacity: 0;
        transform: translateY(45px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroInfoReveal {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 1050px) {

    .hero-portrait {
        width: 68vw;
    }

    .hero-side-info {
        right: 4%;
        width: 155px;
    }

    .hero-section .hero-name {
        padding: 0 3%;
    }

    .hero-section .hero-name-last {
        font-size: clamp(75px, 15vw, 170px);
    }

    body[dir="rtl"] .hero-section .hero-name-last {
        font-size: clamp(75px, 13vw, 160px);
    }
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {

    .hero-section,
    .hero-stage {
        min-height: 780px;
        min-height: max(780px, 100svh);
    }

    .hero-portrait {
        width: 100%;
        height: 75%;
        top: 5%;
    }

    .hero-portrait .hero-image {
        object-position: center 20%;
        filter: brightness(0.65) contrast(1.08);
    }

    .hero-section .hero-overlay {
        background:
            linear-gradient(
                to bottom,
                rgba(11, 9, 10, 0.15),
                transparent 30%,
                rgba(11, 9, 10, 0.35) 55%,
                #0B090A 85%
            );
    }

    .hero-section .hero-eyebrow {
        top: 4%;
        left: 5%;
        font-size: 9px;
        letter-spacing: 1px;
    }

    .hero-section .hero-index {
        top: 4%;
        right: 5%;
        font-size: 8px;
    }

    .hero-side-info {
        top: auto;
        bottom: 31%;
        right: 5%;
        width: 145px;
    }

    .hero-side-info p {
        font-size: 10px;
        line-height: 1.8;
        margin-bottom: 10px;
    }

    .hero-explore {
        font-size: 9px;
    }

    .hero-section .hero-name {
        bottom: 11%;
        padding: 0 3%;
    }

    .hero-section .hero-title {
        line-height: 0.85;
    }

    .hero-section .hero-name-first {
        font-size: clamp(45px, 13vw, 70px);
    }

    .hero-section .hero-name-last {
        font-size: clamp(65px, 17vw, 115px);
        letter-spacing: -2px;
    }

    body[dir="rtl"] .hero-section .hero-name-first {
        font-size: 55px;
    }

    body[dir="rtl"] .hero-section .hero-name-last {
        font-size: clamp(65px, 16vw, 105px);
    }

    .hero-section .scroll-indicator {
        bottom: 2%;
        font-size: 8px;
        gap: 7px;
    }

    .hero-section .scroll-line {
        height: 22px;
    }
}

/* Small Mobile */

@media (max-width: 420px) {

    .hero-section,
    .hero-stage {
        min-height: 760px;
        min-height: max(760px, 100svh);
    }

    .hero-portrait {
        width: 110%;
    }

    .hero-side-info {
        width: 125px;
        bottom: 33%;
    }

    .hero-section .hero-name {
        bottom: 12%;
    }

    .hero-section .hero-name-last {
        font-size: 16vw;
    }

    body[dir="rtl"] .hero-section .hero-name-last {
        font-size: 15vw;
    }
}

/* Reduced Motion */

@media (prefers-reduced-motion: reduce) {

    .hero-portrait,
    .hero-name,
    .hero-side-info {
        animation: none;
    }

    .hero-section .scroll-line {
        animation: none;
    }
}

/* =========================================
   HERO REDESIGN — FULL SCREEN
========================================= */

/* Full viewport hero */
.hero-section,
.hero-stage {
    width: 100%;
    height: 100svh;
    min-height: 650px;
    max-height: none;
}

.hero-section {
    position: relative;
    overflow: hidden;
    padding: 0;
    background: #0B090A;
}

/* Full-screen image */
.hero-portrait {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: none;
    z-index: 0;
    animation: none;
}

.hero-portrait .hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    filter: brightness(0.75) contrast(1.05);
}

.hero-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(11, 9, 10, 0.12) 0%,
        rgba(11, 9, 10, 0.02) 35%,
        rgba(11, 9, 10, 0.15) 65%,
        rgba(11, 9, 10, 0.85) 100%
    );
}

/* Remove unnecessary information */
.hero-eyebrow,
.hero-side-info,
.hero-index,
.scroll-indicator {
    display: none !important;
}

/* Main name */
.hero-section .hero-name {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 5%;
    width: 100%;
    padding: 0 4%;
    z-index: 5;
    pointer-events: none;
    animation: none;
}

.hero-section .hero-title {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: center;
    gap: 0.18em;
    margin: 0;
    padding: 0;
    color: #FFFFFF;
    line-height: 1;
    white-space: nowrap;
    font-family: Impact, "Arial Narrow", sans-serif;
    font-weight: 900;
}

.hero-section .hero-name-first {
    font-size: clamp(35px, 4vw, 65px);
}

.hero-section .hero-name-last {
    font-size: clamp(65px, 9vw, 145px);
    letter-spacing: -3px;
}

/* Persian typography */
body[dir="rtl"] .hero-section .hero-title {
    font-family: "Pinar", sans-serif;
    font-weight: 600;
    gap: 0.2em;
}

body[dir="rtl"] .hero-section .hero-name-first {
    font-size: clamp(45px, 5vw, 75px);
}

body[dir="rtl"] .hero-section .hero-name-last {
    font-size: clamp(65px, 9vw, 135px);
    letter-spacing: 0;
}

/* Mobile */
@media (max-width: 768px) {

    .hero-section,
    .hero-stage {
        height: 100svh;
        min-height: 650px;
    }

    .hero-portrait .hero-image {
        object-position: center 25%;
    }

    .hero-section .hero-name {
        bottom: 8%;
        padding: 0 3%;
    }

    .hero-section .hero-name-first {
        font-size: 30px;
    }

    .hero-section .hero-name-last {
        font-size: clamp(48px, 11vw, 85px);
        letter-spacing: -1px;
    }

    body[dir="rtl"] .hero-section .hero-name-first {
        font-size: 38px;
    }

    body[dir="rtl"] .hero-section .hero-name-last {
        font-size: clamp(48px, 10vw, 85px);
    }
}
/* =========================================
   HERO — CLEAN FULLSCREEN REVISION
========================================= */

/* Fullscreen image */

.hero-section,
.hero-stage {
    width: 100%;
    height: 100svh;
    min-height: 700px;
}

.hero-portrait {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: none;
    animation: none;
}

.hero-portrait .hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}

/* Remove unnecessary text */

.hero-eyebrow,
.hero-side-info,
.hero-index,
.scroll-indicator {
    display: none !important;
}

/* Name typography */

.hero-section .hero-name {
    bottom: 5%;
    padding: 0 3%;
    animation: none;
}

.hero-section .hero-title {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: center;
    gap: 0.16em;
    white-space: nowrap;
    line-height: 1;
}

.hero-section .hero-name-first,
.hero-section .hero-name-last {
    font-family: Impact, "Arial Narrow", sans-serif;
    font-size: clamp(55px, 11vw, 175px);
    font-weight: 900;
    letter-spacing: -0.035em;
    line-height: 1;
}

/* Persian */

body[dir="rtl"] .hero-section .hero-title {
    font-family: "Pinar", sans-serif;
    flex-direction: row;
    line-height: 1.2;
}

body[dir="rtl"] .hero-section .hero-name-first,
body[dir="rtl"] .hero-section .hero-name-last {
    font-family: "Pinar", sans-serif;
    font-size: clamp(55px, 11vw, 165px);
    font-weight: 600;
    letter-spacing: 0;
}

/* Mobile */

@media (max-width: 768px) {

    .hero-section,
    .hero-stage {
        height: 100svh;
        min-height: 650px;
    }

    .hero-portrait {
        width: 100%;
        height: 100%;
    }

    .hero-section .hero-name {
        bottom: 8%;
    }

    .hero-section .hero-name-first,
    .hero-section .hero-name-last {
        font-size: 10vw;
    }

    body[dir="rtl"] .hero-section .hero-name-first,
    body[dir="rtl"] .hero-section .hero-name-last {
        font-size: 10vw;
    }
}
/* =========================================
   HERO — TYPOGRAPHY FINAL ADJUSTMENTS
========================================= */

/* English Name */

body[dir="ltr"] .hero-section .hero-name-first,
body[dir="ltr"] .hero-section .hero-name-last {
    font-family: "DM Sans", sans-serif;
    font-weight: 700;
    letter-spacing: 0.025em;
}

/* Space between OS and MAHYAR */

body[dir="ltr"] .hero-section .hero-title {
    gap: 0.22em;
}

/* Persian Name — Smaller */

body[dir="rtl"] .hero-section .hero-name-first,
body[dir="rtl"] .hero-section .hero-name-last {
    font-size: clamp(48px, 8vw, 125px);
}

/* Mobile */

@media (max-width: 768px) {

    body[dir="ltr"] .hero-section .hero-name-first,
    body[dir="ltr"] .hero-section .hero-name-last {
        font-size: 9vw;
    }

    body[dir="rtl"] .hero-section .hero-name-first,
    body[dir="rtl"] .hero-section .hero-name-last {
        font-size: 8vw;
    }
}
/* HERO — MINIMAL ENGLISH TYPOGRAPHY */

body[dir="ltr"] .hero-section .hero-title {
    gap: 0.35em;
}

body[dir="ltr"] .hero-section .hero-name-first,
body[dir="ltr"] .hero-section .hero-name-last {
    font-family: "DM Sans", sans-serif;
    font-size: clamp(48px, 7vw, 105px);
    font-weight: 400;
    letter-spacing: 0.12em;
    line-height: 1.1;
}

/* Mobile */

@media (max-width: 768px) {
    body[dir="ltr"] .hero-section .hero-name-first,
    body[dir="ltr"] .hero-section .hero-name-last {
        font-size: 7vw;
        letter-spacing: 0.09em;
    }
} 
/* Cinematic Text Glow */

body[dir="ltr"] .hero-section .hero-name-first,
body[dir="ltr"] .hero-section .hero-name-last {
    color: #FFFFFF;

    text-shadow:
        0 0 8px rgba(255, 255, 255, 0.18),
        0 0 22px rgba(255, 255, 255, 0.12),
        0 0 45px rgba(165, 22, 26, 0.22);
}

/* =========================================
   CINEMATIC GLASS VIDEO MODAL
   APARAT PLAYER
========================================= */

.video-modal {
    width: min(92vw, 1120px);
    max-width: none;
    max-height: 92vh;
    overflow: visible;
    padding: 0;

    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 26px;

    box-shadow:
        0 35px 110px rgba(0, 0, 0, 0.78),
        0 0 55px rgba(164, 22, 26, 0.13);

    color: var(--color-white);
}

.video-modal::backdrop {
    background: rgba(3, 3, 5, 0.84);

    backdrop-filter: blur(13px);
    -webkit-backdrop-filter: blur(13px);
}

.video-modal-content {
    position: relative;
    padding: clamp(14px, 2vw, 24px);

    overflow: hidden;
    isolation: isolate;

    border-radius: 26px;

    background:
        radial-gradient(
            ellipse at 10% 0%,
            rgba(229, 56, 59, 0.13),
            transparent 42%
        ),
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.105),
            rgba(255, 255, 255, 0.025)
        ),
        rgba(18, 19, 23, 0.78);

    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
}

/* Subtle cinematic grain */

.video-modal-content::before {
    content: "";

    position: absolute;
    inset: 0;
    z-index: -1;

    pointer-events: none;
    opacity: 0.075;

    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain)' opacity='.65'/%3E%3C/svg%3E");
}

/* Video frame */

.video-container {
    position: relative;

    width: 100%;
    aspect-ratio: 16 / 9;

    overflow: hidden;

    border-radius: 16px;
    background: #000;

    box-shadow:
        0 18px 55px rgba(0, 0, 0, 0.45);
}

.video-container iframe,
.video-container video {
    display: block;

    width: 100%;
    height: 100%;

    border: 0;
    object-fit: contain;
}

/* Close button */

.modal-close {
    position: absolute;

    top: 8px;
    right: 8px;

    z-index: 5;

    display: grid;
    place-items: center;

    width: 42px;
    height: 42px;

    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;

    background: rgba(12, 12, 15, 0.72);

    color: #fff;
    font-size: 27px;
    line-height: 1;

    cursor: pointer;

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    transition:
        transform 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease;
}

.modal-close:hover {
    transform: rotate(90deg);

    background: rgba(164, 22, 26, 0.92);

    border-color: rgba(229, 56, 59, 0.8);
}

/* Project play icon */

.project-play-icon {
    position: absolute;

    top: 20px;
    left: 20px;

    z-index: 3;

    width: 48px;
    height: 48px;

    display: grid;
    place-items: center;

    padding-left: 3px;

    color: #fff;
    font-size: 15px;

    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;

    background: rgba(15, 16, 20, 0.58);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    transition:
        transform 0.3s ease,
        background 0.3s ease;
}

.project-card:hover .project-play-icon {
    transform: scale(1.1);
    background: rgba(164, 22, 26, 0.9);
}

/* Mobile adjustments */

@media (max-width: 600px) {

    .video-modal {
        width: 95vw;
        max-height: 88vh;
        border-radius: 18px;
    }

    .video-modal-content {
        padding: 12px;
        border-radius: 18px;
    }

    .video-container {
        border-radius: 11px;
    }

    .modal-close {
        top: 5px;
        right: 5px;

        width: 36px;
        height: 36px;

        font-size: 23px;
    }

}

/* =========================================
   VIDEO MODAL — SIZE REFINEMENT
========================================= */

.video-modal {
    width: min(88vw, 900px);
    max-width: 900px;
    max-height: 90vh;

    margin: auto;
    padding: 0;

    overflow: hidden;
}

.video-modal-content {
    width: 100%;
    padding: clamp(12px, 1.5vw, 20px);
}

.video-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

/* Mobile */
@media (max-width: 600px) {
    .video-modal {
        width: 94vw;
        max-height: 85vh;
    }

    .video-modal-content {
        padding: 10px;
    }
}

/* =========================================
   FINE CINEMATIC GRAIN REFINEMENT
========================================= */

.video-modal-content::before {
    content: "";

    position: absolute;
    inset: 0;
    z-index: -1;

    pointer-events: none;

    opacity: 0.045;

    background-image: url("data:image/svg+xml,%3Csvg width='256' height='256' viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='fineGrain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23fineGrain)' opacity='.5'/%3E%3C/svg%3E");

    background-size: 256px 256px;
    background-repeat: repeat;
}

/* =================================
   SOFTWARE SECTION ALIGNMENT
================================= */

.software-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 28px;
    width: 100%;
    padding: 55px 30px;
}

.software-heading {
    display: inline-block;
    width: fit-content;
    padding: 8px 18px;
    background: #BA181B;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-align: center;
    margin: 0 auto;
}

.software-list {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 28px 48px;
    width: 100%;
}

.software-item {
    text-align: center;
}

@media (max-width: 600px) {
    .software-section {
        padding: 40px 20px;
        gap: 24px;
    }

    .software-list {
        gap: 22px;
    }
}

/* SOFTWARE SECTION - FINAL REFINEMENT */

.software-section {
    margin-top: 24px;
    border-radius: 18px;
    overflow: hidden;
}

.software-heading {
    background: transparent;
    color: #E5383B;
    padding: 0;
    border-radius: 0;
}

/* Contact Section - Centered Layout */
#contact {
    text-align: center;
}

#contact .contact-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-top: 20px;
}

#contact .contact-item {
    justify-content: center;
    text-align: center;
}

#contact .btn {
    display: inline-flex;
    margin-left: auto;
    margin-right: auto;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
}

.contact-link img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    opacity: 0.9;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.contact-link:hover img {
    transform: scale(1.12);
    opacity: 1;
}

/* Contact Icons - Cinematic Glow */

.contact-link img {
    width: 22px;
    height: 22px;
    object-fit: contain;

    opacity: 0.95;

    filter:
        drop-shadow(0 0 3px rgba(255, 255, 255, 0.25))
        drop-shadow(0 0 6px rgba(229, 56, 59, 0.25));

    transition:
        transform 0.3s ease,
        filter 0.3s ease,
        opacity 0.3s ease;
}

.contact-link:hover img {
    transform: scale(1.15);

    filter:
        drop-shadow(0 0 5px rgba(255, 255, 255, 0.5))
        drop-shadow(0 0 12px rgba(229, 56, 59, 0.65))
        drop-shadow(0 0 22px rgba(229, 56, 59, 0.35));

    opacity: 1;
}

/* =========================================
   PORTFOLIO CATEGORY LANDING
========================================= */

.portfolio-categories {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-bottom: 35px;
}

.category-card {
    position: relative;
    display: block;
    width: 100%;
    min-height: 290px;
    padding: 0;
    overflow: hidden;
    isolation: isolate;
    aspect-ratio: 16 / 9;
    background: var(--color-surface);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius);

    text-align: inherit;
    cursor: pointer;
    color: var(--color-white);

    transition: transform 0.4s ease, border-color 0.4s ease;
}

.category-card img {
    position: absolute;
    inset: 0;
    z-index: -2;

    width: 100%;
    height: 100%;
    object-fit: cover;

    filter: saturate(0.75);
    transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.category-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;

    background: linear-gradient(
        0deg,
        rgba(5, 5, 7, 0.96) 0%,
        rgba(5, 5, 7, 0.45) 48%,
        rgba(5, 5, 7, 0.12) 100%
    );

    transition: background 0.4s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(229, 56, 59, 0.55);
}

.category-card:hover img {
    transform: scale(1.07);
}

.category-number {
    position: absolute;
    top: 22px;
    left: 24px;

    font-family: var(--font-en);
    font-size: 12px;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.75);
}

.category-content {
    position: absolute;
    right: 28px;
    bottom: 30px;
    left: 28px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
}

.category-title {
    color: var(--color-white);
    font-size: clamp(20px, 2.2vw, 29px);
    font-weight: 700;
    line-height: 1.5;
}

.category-count {
    color: var(--color-red-light);
    font-family: var(--font-en);
    font-size: 10px;
    letter-spacing: 2px;
}

.category-arrow {
    position: absolute;
    right: 25px;
    top: 22px;

    font-size: 22px;
    color: var(--color-white);
    opacity: 0.8;

    transition: transform 0.35s ease, color 0.35s ease;
}

.category-card:hover .category-arrow {
    color: var(--color-red-light);
    transform: translate(4px, -4px);
}

/* Keep hidden portfolio elements hidden */
.projects-grid[hidden],
.portfolio-footer[hidden] {
    display: none !important;
}


/* =========================================
   PORTFOLIO CATEGORY RESPONSIVE
========================================= */

@media (max-width: 768px) {

    .portfolio-categories {
        gap: 15px;
    }

    .category-card {
        min-height: 230px;
    }

    .category-content {
        right: 18px;
        left: 18px;
        bottom: 20px;
    }

    .category-number {
        top: 17px;
        left: 18px;
    }

    .category-arrow {
        top: 17px;
        right: 18px;
    }
}

@media (max-width: 520px) {

   .portfolio-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

    .category-card {
        min-height: 220px;
    }

}

/* =========================================
   PORTFOLIO CATEGORY NAVIGATION
========================================= */

.category-back-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 30px;
    padding: 11px 20px;

    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;

    color: var(--color-gray);
    font-family: inherit;
    font-size: 12px;
    letter-spacing: 0.5px;

    cursor: pointer;
    transition: all 0.3s ease;
}

.category-back-button::before {
    content: "←";
    color: var(--color-red-light);
    font-size: 17px;
    transition: transform 0.3s ease;
}

.category-back-button:hover {
    background: rgba(164, 22, 26, 0.14);
    border-color: var(--color-red);
    color: var(--color-white);
    transform: translateY(-2px);
}

.category-back-button:hover::before {
    transform: translateX(-4px);
}

.category-empty-state {
    padding: 70px 20px;
    margin-bottom: 35px;

    background:
        radial-gradient(
            ellipse at center,
            rgba(164, 22, 26, 0.12),
            transparent 70%
        ),
        var(--color-surface);

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);

    color: var(--color-muted);
    font-size: 14px;
    text-align: center;
    line-height: 2;
}

.category-back-button[hidden],
.category-empty-state[hidden] {
    display: none !important;
}

@media (max-width: 520px) {
    .category-back-button {
        margin-bottom: 22px;
        padding: 10px 16px;
        font-size: 11px;
    }

    .category-empty-state {
        padding: 50px 18px;
        font-size: 12px;
    }
}
@media (max-width: 520px) {

    .category-card {
        min-height: 0;
        aspect-ratio: 16 / 9;
    }

}