@import url("https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap");

/* =========================================================
   ROOT
========================================================= */

:root {
    --bg: #04100b;
    --bg-soft: #071810;

    --card: #0a1b12;
    --card-2: #0d2218;

    --green: #00ff9c;
    --green-soft: #62ffc4;
    --green-dark: #087f5b;

    --white: #f3fff9;
    --text: #d8eee4;
    --muted: #8ca79b;

    --border: rgba(0, 255, 156, 0.14);
    --border-strong: rgba(0, 255, 156, 0.30);

    --shadow:
        0 25px 70px rgba(0, 0, 0, 0.35);

    --shadow-green:
        0 20px 55px rgba(0, 255, 156, 0.08);

    --max-width: 1250px;
    --radius: 18px;

    --transition:
        0.3s ease;
}

/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 95px;

    direction: ltr;
}

body {
    min-height: 100vh;

    font-family:
        "Vazirmatn",
        sans-serif;

    color:
        var(--white);

    background:
        radial-gradient(
            circle at 18% 0%,
            rgba(0, 255, 156, 0.07),
            transparent 26%
        ),
        radial-gradient(
            circle at 90% 25%,
            rgba(0, 255, 156, 0.035),
            transparent 24%
        ),
        linear-gradient(
            180deg,
            var(--bg),
            #020806
        );

    line-height: 1.8;

    overflow-x: hidden;

    direction: ltr;
    text-align: left;

    transition:
        background 0.35s ease,
        color 0.35s ease;
}

::selection {
    background:
        var(--green);

    color:
        #00150d;
}

a {
    color:
        inherit;

    text-decoration:
        none;
}

button,
input,
textarea {
    font:
        inherit;
}

button {
    border:
        0;
}

img {
    display:
        block;

    max-width:
        100%;
}

button,
a {
    -webkit-tap-highlight-color:
        transparent;
}

:focus-visible {
    outline:
        2px solid var(--green);

    outline-offset:
        4px;
}

/* =========================================================
   SCROLL PROGRESS
========================================================= */

.scroll-progress {
    position:
        fixed;

    top:
        0;

    left:
        0;

    width:
        0;

    height:
        3px;

    z-index:
        5000;

    background:
        linear-gradient(
            90deg,
            var(--green-dark),
            var(--green)
        );

    box-shadow:
        0 0 14px rgba(0, 255, 156, 0.55);

    transition:
        width 0.08s linear;
}

/* =========================================================
   NAVBAR
========================================================= */

.navbar {
    position:
        fixed;

    top:
        0;

    left:
        0;

    right:
        0;

    height:
        82px;

    padding:
        0 7%;

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        24px;

    z-index:
        4000;

    background:
        rgba(4, 16, 11, 0.72);

    border-bottom:
        1px solid var(--border);

    backdrop-filter:
        blur(18px);

    -webkit-backdrop-filter:
        blur(18px);

    transition:
        box-shadow var(--transition),
        background var(--transition);
}

.navbar.scrolled {
    box-shadow:
        0 14px 42px rgba(0, 0, 0, 0.24);
}

/* Logo */

.logo {
    display:
        flex;

    align-items:
        center;

    gap:
        11px;

    flex-shrink:
        0;
}

.logo-mark {
    width:
        40px;

    height:
        40px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border:
        1px solid var(--green);

    border-radius:
        12px;

    color:
        var(--green);

    font-size:
        16px;

    font-weight:
        800;

    box-shadow:
        0 0 25px rgba(0, 255, 156, 0.12);

    transition:
        transform var(--transition),
        box-shadow var(--transition);
}

.logo:hover .logo-mark {
    transform:
        translateY(-2px);

    box-shadow:
        0 0 30px rgba(0, 255, 156, 0.20);
}

.logo-text {
    font-size:
        16px;

    font-weight:
        800;

    letter-spacing:
        2px;
}

.logo-text span,
.footer-logo span {
    color:
        var(--green);
}

/* Nav Links */

.nav-links {
    display:
        flex;

    align-items:
        center;

    gap:
        23px;
}

.nav-links a {
    position:
        relative;

    padding:
        4px 0;

    color:
        var(--muted);

    font-size:
        13px;

    transition:
        color var(--transition);
}

.nav-links a::after {
    content:
        "";

    position:
        absolute;

    left:
        0;

    right:
        auto;

    bottom:
        -7px;

    width:
        0;

    height:
        2px;

    border-radius:
        999px;

    background:
        var(--green);

    transition:
        width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color:
        var(--green-soft);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width:
        100%;
}

/* Navbar Actions */

.navbar-actions {
    display:
        flex;

    align-items:
        center;

    gap:
        10px;

    flex-shrink:
        0;
}

/* =========================================================
   ALL BUTTONS — SECONDARY STYLE
========================================================= */

.primary-button,
.secondary-button,
.nav-button {
    min-height:
        48px;

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        8px;

    padding:
        12px 21px;

    border:
        1px solid var(--border);

    border-radius:
        11px;

    background:
        rgba(255, 255, 255, 0.015);

    color:
        var(--text);

    font-size:
        13px;

    font-weight:
        600;

    cursor:
        pointer;

    transition:
        transform 0.35s ease,
        color 0.35s ease,
        border-color 0.35s ease,
        background 0.35s ease,
        box-shadow 0.35s ease;
}

.primary-button:hover,
.secondary-button:hover,
.nav-button:hover {
    transform:
        translateY(-3px);

    border-color:
        var(--green);

    background:
        rgba(0, 255, 156, 0.055);

    color:
        var(--green);

    box-shadow:
        0 12px 32px rgba(0, 255, 156, 0.08);
}

.primary-button:active,
.secondary-button:active,
.nav-button:active {
    transform:
        translateY(-1px)
        scale(0.985);
}

/* =========================================================
   THEME BUTTON
========================================================= */

.theme-button {
    width:
        42px;

    height:
        38px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border:
        1px solid var(--border);

    border-radius:
        10px;

    background:
        transparent;

    color:
        var(--green);

    cursor:
        pointer;

    transition:
        transform var(--transition),
        background var(--transition),
        color var(--transition),
        border-color var(--transition);
}

.theme-button:hover {
    transform:
        translateY(-2px);

    background:
        rgba(0, 255, 156, 0.05);

    border-color:
        var(--green);

    color:
        var(--green-soft);
}

.theme-icon {
    width:
        20px;

    height:
        20px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;
}

.theme-icon svg {
    width:
        20px;

    height:
        20px;
}

/* =========================================================
   MOBILE MENU
========================================================= */

.mobile-menu-button {
    display:
        none;

    width:
        42px;

    height:
        42px;

    align-items:
        center;

    justify-content:
        center;

    flex-direction:
        column;

    gap:
        4px;

    border:
        1px solid var(--border);

    border-radius:
        10px;

    background:
        transparent;

    color:
        var(--green);

    cursor:
        pointer;

    transition:
        background var(--transition),
        border-color var(--transition),
        transform var(--transition);
}

.mobile-menu-button:hover {
    background:
        rgba(0, 255, 156, 0.05);

    border-color:
        var(--green);
}

.mobile-menu-button span {
    width:
        17px;

    height:
        2px;

    border-radius:
        999px;

    background:
        currentColor;

    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}

.mobile-menu-button.active {
    background:
        rgba(0, 255, 156, 0.08);
}

.mobile-menu-button.active span:nth-child(1) {
    transform:
        translateY(6px)
        rotate(45deg);
}

.mobile-menu-button.active span:nth-child(2) {
    opacity:
        0;
}

.mobile-menu-button.active span:nth-child(3) {
    transform:
        translateY(-6px)
        rotate(-45deg);
}

/* =========================================================
   HERO
========================================================= */

.hero {
    min-height:
        100vh;

    position:
        relative;

    display:
        flex;

    align-items:
        center;

    padding:
        150px 7% 110px;

    overflow:
        hidden;
}

.hero-glow {
    position:
        absolute;

    width:
        520px;

    height:
        520px;

    left:
        -190px;

    top:
        120px;

    border-radius:
        50%;

    background:
        radial-gradient(
            circle,
            rgba(0, 255, 156, 0.16),
            transparent 68%
        );

    filter:
        blur(10px);

    pointer-events:
        none;
}

.hero-grid {
    position:
        absolute;

    inset:
        0;

    opacity:
        0.23;

    background-image:
        linear-gradient(
            rgba(0, 255, 156, 0.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(0, 255, 156, 0.025) 1px,
            transparent 1px
        );

    background-size:
        40px 40px;

    mask-image:
        linear-gradient(
            to bottom,
            black,
            transparent 85%
        );

    -webkit-mask-image:
        linear-gradient(
            to bottom,
            black,
            transparent 85%
        );

    pointer-events:
        none;
}

.hero-content {
    position:
        relative;

    width:
        100%;

    max-width:
        950px;

    z-index:
        1;
}

.hero-label {
    display:
        inline-flex;

    align-items:
        center;

    gap:
        9px;

    margin-bottom:
        22px;

    color:
        var(--green);

    font-size:
        13px;

    font-weight:
        600;
}

.status-dot {
    width:
        8px;

    height:
        8px;

    flex-shrink:
        0;

    border-radius:
        50%;

    background:
        var(--green);

    box-shadow:
        0 0 15px var(--green);

    animation:
        pulse 1.8s infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity:
            1;

        transform:
            scale(1);
    }

    50% {
        opacity:
            0.45;

        transform:
            scale(0.75);
    }
}

.hero h1 {
    max-width:
        950px;

    font-size:
        clamp(46px, 7vw, 84px);

    line-height:
        1.20;

    font-weight:
        800;

    letter-spacing:
        -2px;
}

.hero h1 > span {
    color:
        var(--green);
}

.hero h1 strong {
    display:
        inline-block;

    margin-top:
        5px;

    color:
        #b9d8ca;

    font-size:
        clamp(31px, 5vw, 60px);
}

.hero-content > p {
    max-width:
        690px;

    margin:
        27px 0 34px;

    color:
        var(--muted);

    font-size:
        15px;

    line-height:
        2;
}

.hero-actions {
    display:
        flex;

    flex-wrap:
        wrap;

    gap:
        12px;
}

.hero-stats {
    display:
        flex;

    flex-wrap:
        wrap;

    gap:
        48px;

    margin-top:
        68px;
}

.stat {
    display:
        flex;

    flex-direction:
        column;

    text-align:
        center;
}

.stat strong {
    color:
        var(--green);

    font-size:
        18px;
}

.stat span {
    color:
        var(--muted);

    font-size:
        11px;
}

/* =========================================================
   SECTIONS
========================================================= */

.section {
    width:
        100%;

    max-width:
        var(--max-width);

    margin:
        0 auto;

    padding:
        110px 7%;
}

.section-intro {
    margin-bottom:
        45px;
}

.section-label {
    display:
        inline-block;

    margin-bottom:
        12px;

    color:
        var(--green);

    font-size:
        12px;

    font-weight:
        700;

    letter-spacing:
        0.2px;
}

.section-intro h2 {
    max-width:
        800px;

    font-size:
        clamp(34px, 5vw, 54px);

    line-height:
        1.30;
}

.section-intro h2 span,
.contact-content h2 span,
.skills-note h3 span,
.contact-box-title h3 span {
    color:
        var(--green);
}

.section-description {
    max-width:
        650px;

    margin-top:
        15px;

    color:
        var(--muted);

    font-size:
        13px;

    line-height:
        2;
}

/* =========================================================
   ABOUT
========================================================= */

.about-grid {
    display:
        grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap:
        18px;
}

.about-card {
    position:
        relative;

    overflow:
        hidden;

    padding:
        30px;

    background:
        linear-gradient(
            145deg,
            rgba(10, 27, 18, 0.96),
            rgba(6, 20, 13, 0.82)
        );

    border:
        1px solid var(--border);

    border-radius:
        var(--radius);

    transition:
        transform 0.4s ease,
        border-color 0.4s ease,
        box-shadow 0.4s ease,
        background 0.4s ease;
}

.about-card::before {
    content:
        "";

    position:
        absolute;

    inset:
        0;

    background:
        linear-gradient(
            135deg,
            rgba(0, 255, 156, 0.07),
            transparent 45%
        );

    opacity:
        0;

    transition:
        opacity 0.4s ease;

    pointer-events:
        none;
}

.about-card:hover {
    transform:
        translateY(-7px);

    border-color:
        var(--border-strong);

    box-shadow:
        var(--shadow);
}

.about-card:hover::before {
    opacity:
        1;
}

.about-icon {
    position:
        relative;

    z-index:
        1;

    width:
        52px;

    height:
        52px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    margin-bottom:
        20px;

    border-radius:
        15px;

    background:
        rgba(0, 255, 156, 0.08);

    color:
        var(--green);

    font-weight:
        800;

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

.about-card:hover .about-icon {
    transform:
        translateY(-3px);

    box-shadow:
        0 0 25px rgba(0, 255, 156, 0.08);
}

.about-card h3,
.about-card p {
    position:
        relative;

    z-index:
        1;
}

.about-card h3 {
    margin-bottom:
        9px;

    font-size:
        18px;
}

.about-card p {
    color:
        var(--muted);

    font-size:
        12px;

    line-height:
        1.95;
}

/* =========================================================
   SKILLS
========================================================= */

.skills-layout {
    display:
        grid;

    grid-template-columns:
        1.3fr 0.7fr;

    gap:
        40px;

    align-items:
        start;
}

.skills-list {
    display:
        grid;

    gap:
        22px;
}

.skill {
    min-width:
        0;
}

.skill-head {
    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        20px;

    margin-bottom:
        8px;

    color:
        var(--text);

    font-size:
        12px;
}

.skill-head span:last-child {
    color:
        var(--green);

    font-weight:
        700;
}

.skill-bar {
    height:
        9px;

    overflow:
        hidden;

    border-radius:
        999px;

    background:
        rgba(255, 255, 255, 0.06);
}

.skill-bar span {
    display:
        block;

    width:
        var(--skill-width);

    height:
        100%;

    border-radius:
        inherit;

    background:
        linear-gradient(
            90deg,
            var(--green-dark),
            var(--green)
        );

    transform-origin:
        left center;

    animation:
        skillGrow 1.1s ease both;
}

@keyframes skillGrow {
    from {
        transform:
            scaleX(0);
    }

    to {
        transform:
            scaleX(1);
    }
}

.skills-note {
    padding:
        28px;

    border:
        1px solid var(--border);

    border-radius:
        var(--radius);

    background:
        rgba(255,255,255,0.015);

    transition:
        transform 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

.skills-note:hover {
    transform:
        translateY(-5px);

    border-color:
        var(--border-strong);

    box-shadow:
        var(--shadow-green);
}

.skills-note h3 {
    margin:
        4px 0 14px;

    font-size:
        23px;

    line-height:
        1.45;
}

.skills-note p {
    color:
        var(--muted);

    font-size:
        12px;

    line-height:
        2;
}

/* =========================================================
   PROJECTS
========================================================= */

.project-grid {
    display:
        grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap:
        20px;
}

.project-card {
    overflow:
        hidden;

    display:
        flex;

    flex-direction:
        column;

    min-width:
        0;

    background:
        var(--card);

    border:
        1px solid var(--border);

    border-radius:
        var(--radius);

    transition:
        transform 0.4s ease,
        border-color 0.4s ease,
        box-shadow 0.4s ease;
}

.project-card:hover {
    transform:
        translateY(-8px);

    border-color:
        var(--border-strong);

    box-shadow:
        var(--shadow);
}

.project-image {
    position:
        relative;

    width:
        100%;

    aspect-ratio:
        16 / 9;

    overflow:
        hidden;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    background:
        radial-gradient(
            circle at center,
            rgba(0, 255, 156, 0.12),
            transparent 65%
        ),
        #06130d;
}

.project-image img {
    width:
        100%;

    height:
        100%;

    object-fit:
        cover;

    transition:
        transform 0.55s ease;
}

.project-card:hover .project-image img {
    transform:
        scale(1.045);
}

.project-overlay {
    position:
        absolute;

    top:
        14px;

    right:
        14px;

    padding:
        7px 11px;

    border:
        1px solid rgba(255,255,255,0.1);

    border-radius:
        9px;

    background:
        rgba(4,16,11,0.78);

    backdrop-filter:
        blur(8px);

    -webkit-backdrop-filter:
        blur(8px);

    color:
        var(--green);

    font-size:
        9px;

    z-index:
        2;
}

.project-content {
    flex:
        1;

    display:
        flex;

    flex-direction:
        column;

    padding:
        24px;
}

.project-type {
    color:
        var(--green);

    font-size:
        10px;

    font-weight:
        700;
}

.project-content h3 {
    margin:
        7px 0;

    font-size:
        21px;
}

.project-content h3 small {
    margin-left:
        6px;

    color:
        var(--muted);

    font-size:
        9px;
}

.project-content > p {
    color:
        var(--muted);

    font-size:
        12px;

    line-height:
        1.95;
}

.project-tech {
    display:
        flex;

    flex-wrap:
        wrap;

    gap:
        7px;

    margin:
        17px 0;
}

.project-tech span {
    padding:
        5px 9px;

    border:
        1px solid var(--border);

    border-radius:
        8px;

    color:
        var(--muted);

    font-size:
        9px;

    transition:
        border-color 0.3s ease,
        color 0.3s ease,
        background 0.3s ease;
}

.project-card:hover .project-tech span {
    border-color:
        rgba(0,255,156,0.20);
}

.project-actions {
    display:
        flex;

    flex-wrap:
        wrap;

    gap:
        10px;

    margin-top:
        auto;

    padding-top:
        8px;
}

.project-link {
    min-height:
        44px;

    padding:
        10px 15px;

    border:
        1px solid var(--border);

    border-radius:
        10px;

    background:
        rgba(255,255,255,0.015);

    color:
        var(--text);

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        7px;

    font-size:
        11px;

    font-weight:
        600;

    cursor:
        pointer;

    transition:
        transform 0.35s ease,
        border-color 0.35s ease,
        color 0.35s ease,
        background 0.35s ease,
        box-shadow 0.35s ease;
}

.project-link:hover {
    transform:
        translateY(-3px);

    border-color:
        var(--green);

    color:
        var(--green);

    background:
        rgba(0,255,156,0.05);

    box-shadow:
        0 10px 28px rgba(0,255,156,0.07);
}

.project-link span,
.project-link svg {
    transition:
        transform 0.35s ease;
}

.project-link:hover span,
.project-link:hover svg {
    transform:
        translateX(3px);
}

.project-warning,
.project-note {
    margin-top:
        14px;

    color:
        var(--muted);

    font-size:
        10px;
}

/* =========================================================
   YOUR PROJECT CARD
========================================================= */

.project-empty {
    position:
        relative;

    overflow:
        hidden;
}

.project-empty .project-image {
    position:
        relative;

    width:
        100%;

    aspect-ratio:
        16 / 9;

    min-height:
        0;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    overflow:
        hidden;

    isolation:
        isolate;

    background:
        radial-gradient(
            circle at center,
            rgba(0,255,156,0.11),
            transparent 62%
        ),
        linear-gradient(
            145deg,
            #081a12,
            #04100b
        );
}

.project-empty .project-image::before {
    content:
        "";

    position:
        absolute;

    inset:
        0;

    background:
        radial-gradient(
            circle at center,
            rgba(0,255,156,0.055),
            transparent 60%
        );

    opacity:
        0.8;

    transition:
        transform 0.5s ease,
        opacity 0.5s ease;

    pointer-events:
        none;
}

.project-empty .project-image::after {
    content:
        "";

    position:
        absolute;

    width:
        260px;

    height:
        260px;

    right:
        -130px;

    top:
        -130px;

    border:
        1px solid rgba(0,255,156,0.08);

    border-radius:
        50%;

    box-shadow:
        0 0 0 55px rgba(0,255,156,0.02),
        0 0 0 110px rgba(0,255,156,0.01);

    pointer-events:
        none;
}

.project-empty .project-placeholder {
    position:
        relative;

    z-index:
        2;

    width:
        175px;

    min-height:
        120px;

    padding:
        22px;

    display:
        flex;

    flex-direction:
        column;

    align-items:
        center;

    justify-content:
        center;

    text-align:
        center;

    border:
        1px dashed rgba(0,255,156,0.30);

    border-radius:
        20px;

    background:
        rgba(0,255,156,0.035);

    color:
        var(--green);

    font-size:
        23px;

    font-weight:
        800;

    line-height:
        1.15;

    letter-spacing:
        3px;

    box-shadow:
        inset 0 0 30px rgba(0,255,156,0.025);

    transition:
        transform 0.45s ease,
        border-color 0.45s ease,
        background 0.45s ease,
        box-shadow 0.45s ease;
}

.project-empty:hover .project-placeholder {
    transform:
        translateY(-5px)
        scale(1.025);

    border-color:
        rgba(0,255,156,0.56);

    background:
        rgba(0,255,156,0.065);

    box-shadow:
        0 0 35px rgba(0,255,156,0.08),
        inset 0 0 30px rgba(0,255,156,0.04);
}

.project-empty:hover .project-image::before {
    opacity:
        1;

    transform:
        scale(1.08);
}

.project-empty .project-content h3 {
    color:
        var(--white);
}

.project-empty .project-content > p {
    max-width:
        430px;
}

.project-empty .project-actions {
    margin-top:
        auto;

    padding-top:
        18px;
}

.project-empty .project-link {
    min-height:
        46px;

    padding:
        11px 18px;
}

.project-empty .project-link svg {
    width:
        16px;

    height:
        16px;
}

/* =========================================================
   JOURNEY
========================================================= */

.timeline {
    position:
        relative;

    display:
        grid;

    gap:
        20px;

    padding-left:
        28px;

    padding-right:
        0;
}

.timeline::before {
    content:
        "";

    position:
        absolute;

    top:
        0;

    left:
        5px;

    right:
        auto;

    width:
        2px;

    height:
        100%;

    background:
        linear-gradient(
            to bottom,
            var(--green),
            rgba(0,255,156,0.08)
        );
}

.timeline-item {
    position:
        relative;

    display:
        grid;

    grid-template-columns:
        90px 1fr;

    gap:
        20px;
}

.timeline-year {
    color:
        var(--green);

    font-size:
        12px;

    font-weight:
        800;

    padding-top:
        5px;
}

.timeline-content {
    position:
        relative;

    padding:
        22px;

    border:
        1px solid var(--border);

    border-radius:
        16px;

    background:
        rgba(255,255,255,0.015);

    transition:
        transform 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

.timeline-content:hover {
    transform:
        translateX(4px);

    border-color:
        var(--border-strong);

    box-shadow:
        var(--shadow-green);
}

.timeline-dot {
    position:
        absolute;

    left:
        -33px;

    right:
        auto;

    top:
        12px;

    width:
        12px;

    height:
        12px;

    border-radius:
        50%;

    background:
        var(--green);

    box-shadow:
        0 0 18px rgba(0,255,156,0.45);
}

.timeline-content h3 {
    margin-bottom:
        7px;

    font-size:
        17px;
}

.timeline-content p {
    color:
        var(--muted);

    font-size:
        12px;
}

/* =========================================================
   SERVICES
========================================================= */

.service-grid {
    display:
        grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap:
        16px;
}

.service-card {
    position:
        relative;

    overflow:
        hidden;

    padding:
        25px;

    border:
        1px solid var(--border);

    border-radius:
        16px;

    background:
        rgba(255,255,255,0.015);

    transition:
        transform 0.4s ease,
        border-color 0.4s ease,
        box-shadow 0.4s ease,
        background 0.4s ease;
}

.service-card::before {
    content:
        "";

    position:
        absolute;

    width:
        220px;

    height:
        220px;

    right:
        -110px;

    top:
        -110px;

    border-radius:
        50%;

    background:
        radial-gradient(
            circle,
            rgba(0,255,156,0.15),
            transparent 68%
        );

    opacity:
        0;

    transform:
        scale(0.7);

    transition:
        opacity 0.45s ease,
        transform 0.45s ease;
}

.service-card:hover {
    transform:
        translateY(-8px);

    border-color:
        rgba(0,255,156,0.35);

    background:
        linear-gradient(
            145deg,
            rgba(13,34,24,0.9),
            rgba(255,255,255,0.02)
        );

    box-shadow:
        0 22px 55px rgba(0,255,156,0.08);
}

.service-card:hover::before {
    opacity:
        1;

    transform:
        scale(1);
}

.service-number,
.service-icon,
.service-card h3,
.service-card p {
    position:
        relative;

    z-index:
        1;
}

.service-number {
    color:
        var(--green);

    font-size:
        12px;

    font-weight:
        800;
}

.service-icon {
    width:
        52px;

    height:
        52px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    margin-top:
        18px;

    border-radius:
        15px;

    background:
        rgba(0,255,156,0.08);

    color:
        var(--green);

    border:
        1px solid var(--border);

    transition:
        transform 0.4s ease,
        border-color 0.4s ease,
        box-shadow 0.4s ease;
}

.service-icon svg {
    width:
        24px;

    height:
        24px;
}

.service-card:hover .service-icon {
    transform:
        translateY(-3px)
        scale(1.06);

    border-color:
        var(--green);

    box-shadow:
        0 0 28px rgba(0,255,156,0.12);
}

.service-card h3 {
    margin:
        18px 0 10px;

    font-size:
        18px;
}

.service-card p {
    color:
        var(--muted);

    font-size:
        11px;

    line-height:
        1.95;
}

/* =========================================================
   CONTACT
========================================================= */

.contact {
    display:
        grid;

    grid-template-columns:
        1.2fr 0.8fr;

    gap:
        60px;

    align-items:
        center;
}

.contact-content h2 {
    max-width:
        680px;

    font-size:
        clamp(38px, 5vw, 60px);

    line-height:
        1.25;
}

.contact-content > p {
    max-width:
        560px;

    margin:
        20px 0 30px;

    color:
        var(--muted);

    font-size:
        13px;
}

.contact-buttons {
    display:
        grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap:
        12px;
}

.contact-buttons > * {
    width:
        100%;

    min-width:
        0;
}

.telegram-button {
    padding-left:
        10px;

    padding-right:
        10px;
}

.telegram-button .t1 {
    width:
        24px;

    height:
        24px;

    object-fit:
        contain;
}

.contact-mini-note {
    display:
        flex;

    align-items:
        center;

    gap:
        8px;

    margin-top:
        17px;

    color:
        var(--muted);

    font-size:
        10px;
}

.mini-dot {
    width:
        7px;

    height:
        7px;

    flex-shrink:
        0;

    border-radius:
        50%;

    background:
        var(--green);

    box-shadow:
        0 0 10px var(--green);
}

.contact-box {
    padding:
        24px;

    border:
        1px solid var(--border);

    border-radius:
        var(--radius);

    background:
        linear-gradient(
            145deg,
            var(--card),
            rgba(8,24,16,0.78)
        );

    box-shadow:
        0 20px 70px rgba(0,0,0,0.18);

    transition:
        transform 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

.contact-box:hover {
    transform:
        translateY(-5px);

    border-color:
        var(--border-strong);

    box-shadow:
        var(--shadow-green);
}

.contact-box-title h3 {
    margin:
        2px 0 18px;

    font-size:
        24px;

    line-height:
        1.35;
}

.contact-row {
    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        20px;

    padding:
        18px 0;

    border-bottom:
        1px solid rgba(255,255,255,0.06);
}

.contact-row:last-of-type {
    border-bottom:
        0;
}

.contact-row span {
    display:
        inline-flex;

    align-items:
        center;

    gap:
        5px;

    color:
        var(--muted);

    font-size:
        11px;
}

.contact-row strong {
    max-width:
        73%;

    color:
        var(--text);

    font-size:
        12px;

    text-align:
        right;

    overflow-wrap:
        anywhere;
}

.contact-card-footer {
    display:
        flex;

    justify-content:
        space-between;

    gap:
        15px;

    margin-top:
        10px;

    padding-top:
        15px;

    border-top:
        1px solid rgba(255,255,255,0.06);

    color:
        var(--muted);

    font-size:
        9px;
}

/* =========================================================
   FOOTER
========================================================= */

.footer {
    padding:
        52px 7%;

    border-top:
        1px solid var(--border);

    background:
        #020a06;

    text-align:
        center;
}

.footer-logo {
    margin-bottom:
        8px;

    font-size:
        22px;

    font-weight:
        800;

    letter-spacing:
        3px;
}

.footer p {
    margin-bottom:
        18px;

    color:
        var(--muted);

    font-size:
        11px;
}

.footer-socials {
    display:
        flex;

    justify-content:
        center;

    flex-wrap:
        wrap;

    gap:
        18px;

    margin-bottom:
        22px;
}

.footer-socials a {
    color:
        var(--muted);

    font-size:
        11px;

    transition:
        color 0.3s ease,
        transform 0.3s ease;
}

.footer-socials a:hover {
    color:
        var(--green);

    transform:
        translateY(-2px);
}

.footer-bottom {
    padding-top:
        20px;

    border-top:
        1px solid rgba(255,255,255,0.06);

    color:
        #567067;

    font-size:
        10px;
}

/* =========================================================
   MODAL
========================================================= */

.project-modal {
    position:
        fixed;

    inset:
        0;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    padding:
        20px;

    z-index:
        6000;

    opacity:
        0;

    visibility:
        hidden;

    pointer-events:
        none;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.project-modal.active {
    opacity:
        1;

    visibility:
        visible;

    pointer-events:
        auto;
}

.modal-overlay {
    position:
        absolute;

    inset:
        0;

    background:
        rgba(0,0,0,0.78);

    backdrop-filter:
        blur(8px);

    -webkit-backdrop-filter:
        blur(8px);
}

.modal-box {
    position:
        relative;

    width:
        min(680px, 100%);

    max-height:
        min(760px, 90vh);

    overflow-y:
        auto;

    padding:
        34px;

    border:
        1px solid var(--border);

    border-radius:
        22px;

    background:
        linear-gradient(
            145deg,
            #0a1b12,
            #06130d
        );

    box-shadow:
        0 30px 100px rgba(0,0,0,0.5);

    transform:
        translateY(25px)
        scale(0.97);

    transition:
        transform 0.3s ease;
}

.project-modal.active .modal-box {
    transform:
        translateY(0)
        scale(1);
}

.modal-close {
    position:
        absolute;

    top:
        15px;

    right:
        15px;

    left:
        auto;

    width:
        38px;

    height:
        38px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border:
        1px solid var(--border);

    border-radius:
        10px;

    background:
        transparent;

    color:
        var(--muted);

    font-size:
        24px;

    cursor:
        pointer;

    transition:
        color var(--transition),
        border-color var(--transition),
        background var(--transition);
}

.modal-close:hover {
    color:
        var(--green);

    border-color:
        var(--green);

    background:
        rgba(0,255,156,0.04);
}

.modal-box h2 {
    margin:
        5px 0 12px;

    font-size:
        32px;
}

.modal-box > p {
    color:
        var(--muted);

    font-size:
        13px;

    line-height:
        2;
}

.modal-section {
    margin-top:
        24px;
}

.modal-section h3 {
    margin-bottom:
        7px;

    color:
        var(--green);

    font-size:
        14px;
}

.modal-section p {
    color:
        var(--text);

    font-size:
        12px;

    line-height:
        2;
}

.modal-tech {
    display:
        flex;

    flex-wrap:
        wrap;

    gap:
        8px;

    margin-top:
        22px;
}

.modal-tech span {
    padding:
        6px 10px;

    border:
        1px solid var(--border);

    border-radius:
        8px;

    color:
        var(--green);

    font-size:
        10px;
}

.modal-actions {
    display:
        flex;

    gap:
        10px;

    margin-top:
        28px;
}

/* =========================================================
   TOAST
========================================================= */

.toast {
    position:
        fixed;

    left:
        50%;

    right:
        auto;

    bottom:
        26px;

    transform:
        translateX(-50%)
        translateY(20px);

    min-width:
        220px;

    max-width:
        calc(100% - 32px);

    padding:
        12px 18px;

    border:
        1px solid var(--border-strong);

    border-radius:
        12px;

    background:
        rgba(4,16,11,0.95);

    color:
        var(--green);

    text-align:
        center;

    font-size:
        12px;

    font-weight:
        600;

    opacity:
        0;

    visibility:
        hidden;

    z-index:
        7000;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;
}

.toast.show {
    opacity:
        1;

    visibility:
        visible;

    transform:
        translateX(-50%)
        translateY(0);
}

/* =========================================================
   BACK TO TOP
========================================================= */

.back-to-top {
    position:
        fixed;

    right:
        24px;

    left:
        auto;

    bottom:
        24px;

    width:
        45px;

    height:
        45px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border:
        1px solid var(--border);

    border-radius:
        50%;

    background:
        rgba(4,16,11,0.90);

    color:
        var(--green);

    cursor:
        pointer;

    opacity:
        0;

    visibility:
        hidden;

    pointer-events:
        none;

    transform:
        translateY(10px);

    z-index:
        3000;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease,
        transform 0.3s ease,
        background 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease;
}

.back-to-top.visible {
    opacity:
        1;

    visibility:
        visible;

    pointer-events:
        auto;

    transform:
        translateY(0);
}

.back-to-top:hover {
    color:
        var(--green);

    background:
        rgba(0,255,156,0.06);

    border-color:
        var(--green);

    transform:
        translateY(-3px);
}

/* =========================================================
   LIGHT MODE
========================================================= */

body.light-mode {
    --bg:
        #f4faf7;

    --bg-soft:
        #e8f3ed;

    --card:
        #ffffff;

    --card-2:
        #f8fcfa;

    --white:
        #102018;

    --text:
        #24382d;

    --muted:
        #62766b;

    --border:
        rgba(8,127,91,0.18);

    --border-strong:
        rgba(8,127,91,0.34);

    background:
        radial-gradient(
            circle at 20% 0%,
            rgba(0,168,107,0.08),
            transparent 28%
        ),
        var(--bg);
}

body.light-mode .navbar {
    background:
        rgba(244,250,247,0.86);
}

body.light-mode .hero-grid {
    opacity:
        0.12;
}

body.light-mode .hero h1 strong {
    color:
        #244238;
}

body.light-mode .about-card,
body.light-mode .contact-box {
    background:
        linear-gradient(
            145deg,
            #ffffff,
            #eff8f3
        );
}

body.light-mode .project-card {
    background:
        #ffffff;
}

body.light-mode .service-card {
    background:
        rgba(255,255,255,0.75);
}

body.light-mode .modal-box {
    background:
        linear-gradient(
            145deg,
            #ffffff,
            #edf7f1
        );
}

body.light-mode .toast {
    background:
        rgba(255,255,255,0.96);

    color:
        var(--green-dark);
}

body.light-mode .back-to-top {
    background:
        rgba(255,255,255,0.92);
}

body.light-mode .footer {
    background:
        #edf6f1;
}

body.light-mode .project-empty .project-image {
    background:
        radial-gradient(
            circle at center,
            rgba(0,168,107,0.08),
            transparent 62%
        ),
        linear-gradient(
            145deg,
            #f4fbf7,
            #eaf5ef
        );
}

body.light-mode .project-empty .project-placeholder {
    background:
        rgba(0,168,107,0.035);

    border-color:
        rgba(8,127,91,0.25);

    color:
        var(--green-dark);
}

/* =========================================================
   1100px
========================================================= */

@media (max-width: 1100px) {

    .navbar {
        padding:
            0 5%;
    }

    .nav-links {
        gap:
            16px;
    }

    .nav-links a {
        font-size:
            12px;
    }

    .project-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .service-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .contact {
        gap:
            40px;
    }
}

/* =========================================================
   850px
========================================================= */

@media (max-width: 850px) {

    .navbar {
        height:
            72px;
    }

    .nav-links {
        position:
            absolute;

        top:
            82px;

        left:
            5%;

        right:
            5%;

        display:
            flex;

        flex-direction:
            column;

        align-items:
            stretch;

        gap:
            0;

        padding:
            10px;

        background:
            rgba(4,16,11,0.97);

        border:
            1px solid var(--border);

        border-radius:
            17px;

        backdrop-filter:
            blur(18px);

        -webkit-backdrop-filter:
            blur(18px);

        opacity:
            0;

        visibility:
            hidden;

        pointer-events:
            none;

        transform:
            translateY(-10px);

        transition:
            opacity 0.25s ease,
            transform 0.25s ease,
            visibility 0.25s ease;
    }

    .nav-links.mobile-open {
        opacity:
            1;

        visibility:
            visible;

        pointer-events:
            auto;

        transform:
            translateY(0);
    }

    .nav-links a {
        width:
            100%;

        padding:
            14px 15px;

        border-bottom:
            1px solid rgba(255,255,255,0.06);
    }

    .nav-links a:last-child {
        border-bottom:
            0;
    }

    .nav-links a::after {
        display:
            none;
    }

    .nav-button {
        display:
            none;
    }

    .mobile-menu-button {
        display:
            flex;
    }

    .hero {
        padding:
            125px 6% 80px;
    }

    .hero-stats {
        gap:
            28px;

        margin-top:
            52px;
    }

    .about-grid {
        grid-template-columns:
            1fr;
    }

    .skills-layout {
        grid-template-columns:
            1fr;
    }

    .contact {
        grid-template-columns:
            1fr;
    }

    .section {
        padding:
            85px 6%;
    }
}

/* =========================================================
   600px
========================================================= */

@media (max-width: 600px) {

    .navbar {
        height:
            68px;

        padding:
            0 5%;
    }

    .logo {
        gap:
            8px;
    }

    .logo-mark {
        width:
            36px;

        height:
            36px;
    }

    .logo-text {
        font-size:
            13px;

        letter-spacing:
            1.5px;
    }

    .theme-button {
        width:
            38px;

        height:
            38px;
    }

    .mobile-menu-button {
        width:
            40px;

        height:
            40px;
    }

    .hero {
        min-height:
            auto;

        padding:
            115px 6% 75px;
    }

    .hero-label {
        font-size:
            11px;
    }

    .hero h1 {
        font-size:
            clamp(36px, 11vw, 46px);

        letter-spacing:
            -1px;

        line-height:
            1.3;
    }

    .hero h1 strong {
        font-size:
            clamp(25px, 8vw, 31px);
    }

    .hero-content > p {
        font-size:
            12px;

        line-height:
            1.95;
    }

    .hero-actions {
        flex-direction:
            column;

        align-items:
            stretch;
    }

    .hero-actions .primary-button,
    .hero-actions .secondary-button {
        width:
            100%;
    }

    .hero-stats {
        display:
            grid;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap:
            20px;

        margin-top:
            48px;
    }

    .stat strong {
        font-size:
            15px;
    }

    .stat span {
        font-size:
            9px;
    }

    .section {
        padding:
            75px 6%;
    }

    .section-intro {
        margin-bottom:
            35px;
    }

    .section-label {
        font-size:
            11px;
    }

    .section-intro h2 {
        font-size:
            clamp(31px, 10vw, 42px);

        line-height:
            1.35;
    }

    .section-description {
        font-size:
            12px;
    }

    .about-card {
        padding:
            23px;
    }

    .skills-note {
        padding:
            23px;
    }

    .skills-note h3 {
        font-size:
            20px;
    }

    .project-grid,
    .service-grid {
        grid-template-columns:
            1fr;
    }

    .project-image,
    .project-empty .project-image {
        aspect-ratio:
            16 / 9;
    }

    .project-content {
        padding:
            21px;
    }

    .project-actions {
        flex-direction:
            column;

        align-items:
            stretch;
    }

    .project-link {
        width:
            100%;
    }

    .project-empty .project-placeholder {
        width:
            145px;

        min-height:
            105px;

        padding:
            18px;

        font-size:
            19px;

        letter-spacing:
            2.5px;
    }

    .timeline {
        padding-left:
            22px;

        padding-right:
            0;
    }

    .timeline-item {
        grid-template-columns:
            1fr;

        gap:
            7px;
    }

    .timeline-year {
        font-size:
            11px;
    }

    .timeline-content {
        padding:
            18px;
    }

    .timeline-content h3 {
        font-size:
            16px;
    }

    .timeline-content p {
        font-size:
            11px;
    }

    .timeline-dot {
        left:
            -27px;

        right:
            auto;

        top:
            11px;
    }

    .contact-buttons {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .contact-box {
        padding:
            21px;
    }

    .contact-row {
        align-items:
            flex-start;

        flex-direction:
            column;

        gap:
            7px;
    }

    .contact-row strong {
        max-width:
            100%;

        text-align:
            left;
    }

    .contact-card-footer {
        flex-direction:
            column;

        gap:
            5px;
    }

    .modal-box {
        padding:
            28px 20px;

        border-radius:
            18px;
    }

    .modal-box h2 {
        font-size:
            27px;
    }

    .modal-box > p {
        font-size:
            12px;
    }
}

/* =========================================================
   420px
========================================================= */

@media (max-width: 420px) {

    .navbar {
        padding:
            0 4%;
    }

    .logo-text {
        font-size:
            12px;
    }

    .hero {
        padding:
            108px 5% 65px;
    }

    .section {
        padding:
            68px 5%;
    }

    .hero h1 {
        font-size:
            35px;
    }

    .hero h1 strong {
        font-size:
            25px;
    }

    .hero-stats {
        gap:
            16px;
    }

    .contact-buttons {
        grid-template-columns:
            1fr;
    }

    .project-content {
        padding:
            19px;
    }

    .project-content h3 {
        font-size:
            19px;
    }

    .project-empty .project-placeholder {
        width:
            130px;

        min-height:
            98px;

        font-size:
            17px;

        letter-spacing:
            2px;
    }

    .skills-note {
        padding:
            20px;
    }

    .modal-box {
        padding:
            26px 17px;
    }
}

/* =========================================================
   340px
========================================================= */

@media (max-width: 340px) {

    .logo-text {
        display:
            none;
    }

    .navbar-actions {
        gap:
            6px;
    }

    .hero h1 {
        font-size:
            32px;
    }

    .hero h1 strong {
        font-size:
            22px;
    }

    .section-intro h2 {
        font-size:
            29px;
    }

    .contact-box {
        padding:
            18px;
    }

    .project-empty .project-placeholder {
        width:
            118px;

        min-height:
            90px;

        font-size:
            15px;

        letter-spacing:
            1.5px;
    }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@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;
    }
}