@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

@font-face {
    font-family: 'Billbreak';
    src: url('/fonts/Billbreak.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ─── Variables ─────────────────────────────────────────── */
:root {
    --accent:      #1e9de0;
    --accent-dark: #1680bb;
    --dark:        #080d1a;
    --dark-2:      #0d1528;
    --dark-3:      #111927;
    --light:       #f7f9fc;
    --light-2:     #eef1f6;
    --text-dark:   #1a1e2e;
    --text-muted:  #6b7280;
    --white:       #ffffff;
    --card-border: #e2e8f0;
    --line-color:  #1e9de0;
    --radius:      12px;
    --radius-sm:   8px;
    --transition:  0.3s ease;
}

/* ─── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ─── Nav ───────────────────────────────────────────────── */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 20px 0;
    transition: background var(--transition), backdrop-filter var(--transition), padding var(--transition);
}
.nav.scrolled {
    background: rgba(8, 13, 26, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav__logo {
    display: flex;
    flex-direction: column;
    line-height: 1;
}
.nav__logo-main {
    font-family: 'Billbreak', sans-serif;
    font-size: 24px;
    color: var(--white);
    letter-spacing: 0.02em;
}
.nav__logo-sub {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: var(--accent);
    text-transform: uppercase;
    margin-top: 1px;
    position: relative;
}
.nav__links {
    display: flex;
    align-items: center;
    gap: 36px;
}
.nav__links a {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.75);
    letter-spacing: 0.04em;
    transition: color var(--transition);
    border-radius: 40px;
}
.nav__links a:hover { color: var(--white); }
.nav__cta {
    background: var(--accent) !important;
    color: var(--white) !important;
    padding: 9px 22px;
    border-radius: 6px;
    font-weight: 600 !important;
    font-size: 13px !important;
    letter-spacing: 0.02em !important;
    transition: background var(--transition), transform var(--transition) !important;
}
.nav__cta:hover {
    background: var(--accent-dark) !important;
    transform: translateY(-1px);
}

/* ─── Language switcher ─────────────────────────────────── */
.nav__lang {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    border-radius: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
}
.nav__lang-item {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.55);
    padding: 4px 10px;
    border-radius: 14px;
    transition: color var(--transition), background var(--transition);
}
.nav__lang-item:hover { color: var(--white); }
.nav__lang-item.active {
    color: var(--white);
    background: var(--accent);
}
.nav__mobile-lang {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav__mobile-lang-item {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.55);
    padding: 8px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,0.04);
    transition: color var(--transition), background var(--transition);
}
.nav__mobile-lang-item.active {
    color: var(--white);
    background: var(--accent);
}

/* ─── Hero ──────────────────────────────────────────────── */
.hero {
    position: relative;
    height: 100vh;
    min-height: 640px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 2;
    background-color: #0d1528;

    /* ОДНА маска на весь блок. Черный цвет = всё видно (и видео, и оверлей) */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 1000' preserveAspectRatio='none'%3E%3Cpath fill='black' d='M0,0 L1440,0 L1440,950 C1080,1050 360,850 0,950 Z'%3E%3C/path%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 1000' preserveAspectRatio='none'%3E%3Cpath fill='black' d='M0,0 L1440,0 L1440,950 C1080,1050 360,850 0,950 Z'%3E%3C/path%3E%3C/svg%3E");

    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: top;
    mask-position: top;
}
.hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}
.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(8, 13, 26, 0.72) 0%,
        rgba(8, 13, 26, 0.55) 50%,
        rgba(8, 13, 26, 0.78) 100%
    );
    z-index: 1;
}
.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
}
.hero__title {
    line-height: 1;
    margin-bottom: 28px;
    position: relative;
    left: -50px;
}
.hero__title-main {
    display: block;
    font-family: 'Billbreak', sans-serif;
    font-size: clamp(80px, 12vw, 150px);
    color: var(--white);
    letter-spacing: -0.01em;
    font-weight: 500;
}
.hero__title-sub {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: clamp(28px, 4.5vw, 60px);
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.12em;
    position: relative;
    left: 130px;
    top: -0.44em;
    opacity: 0.92;
}
.hero__subtitle {
    font-size: clamp(15px, 2vw, 18px);
    color: rgba(255,255,255,0.68);
    font-weight: 300;
    letter-spacing: 0.06em;
    margin-bottom: 44px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.hero__subtitle span {
    display: block;
}
.hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent);
    color: var(--white);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    padding: 16px 40px;
    border-radius: 30px;
    letter-spacing: 0.02em;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 8px 32px rgba(30,157,224,0.3);
}
.hero__cta:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(30,157,224,0.4);
}
.hero__scroll {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.55);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: scrollBounce 2s infinite;
    cursor: pointer;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    outline: 0;
    padding: 6px 12px;
    font-family: inherit;
    transition: color 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    box-shadow: none;
}
.hero__scroll:hover,
.hero__scroll:focus,
.hero__scroll:active { color: #fff; background-color: transparent !important; }
.hero__scroll-icon {
    width: 22px;
    height: 22px;
    stroke-width: 1.5;
    color: rgba(255,255,255,0.7);
}
.hero__scroll:hover .hero__scroll-icon { color: #fff; }
.hero__scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent);
}
@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(6px); }
}

/* ─── Section Commons ───────────────────────────────────── */
.section { padding: 100px 0; }
.section--dark {
    background: var(--dark-2);
    color: var(--white);
}
.section--alt { background: var(--light); }

.section__header {
    margin-bottom: 64px;
}
.section__tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}
.section__title {
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.section__title--light { color: var(--white); }
.section__desc {
    margin-top: 16px;
    font-size: 17px;
    color: var(--text-muted);
    max-width: 560px;
    font-weight: 400;
}
.section__desc--light { color: rgba(255,255,255,0.55); }

/* ─── Services ──────────────────────────────────────────── */
.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.service-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius);
    padding: 36px 28px;
    transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.service-card:hover {
    background: rgba(30,157,224,0.08);
    border-color: rgba(30,157,224,0.3);
    transform: translateY(-4px);
}
.service-card__icon {
    width: 48px;
    height: 48px;
    background: rgba(30,157,224,0.12);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--accent);
}
.service-card__icon svg { width: 22px; height: 22px; }
.service-card__title {
    font-size: 17px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 10px;
}
.service-card__desc {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    line-height: 1.7;
}
.service-card--highlight {
    background: linear-gradient(135deg, rgba(30,157,224,0.15), rgba(30,157,224,0.05));
    border-color: rgba(30,157,224,0.35);
}
.service-card--highlight .service-card__desc {
    color: rgba(255,255,255,0.65);
}

/* ─── Portfolio ─────────────────────────────────────────── */
.portfolio__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.project-card {
    background: var(--white);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}
.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}
.project-card__cover {
    height: 200px;
    background: linear-gradient(135deg, var(--dark-2) 0%, #1a2a4a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.project-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.project-card:hover .project-card__cover img { transform: scale(1.04); }
.project-card__cover-placeholder {
    font-family: 'Billbreak', sans-serif;
    font-size: 32px;
    color: rgba(255,255,255,0.15);
    letter-spacing: 0.05em;
    text-align: center;
    padding: 20px;
}
.project-card__body { padding: 24px 24px 20px; }
.project-card__subtitle {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
}
.project-card__title {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}
.project-card__desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.project-card__tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}
.tech-tag {
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 4px;
    background: var(--light-2);
    color: var(--text-muted);
    letter-spacing: 0.02em;
}
.project-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    transition: gap var(--transition);
}
.project-card__link:hover { gap: 10px; }
.project-card__link svg { width: 16px; height: 16px; }

/* ─── About ─────────────────────────────────────────────── */
#about {
    margin-top: -145px;
    padding-top: 220px;
    padding-bottom: 150px;
    position: relative;
    z-index: 1;
}
.about__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}
.about__text p {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 16px;
}
.about__text p:last-child { margin-bottom: 0; }
.about__stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.about__stack-group { }
.about__stack-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}
.about__stack-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.stack-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 6px;
    background: var(--light-2);
    color: var(--text-dark);
    border: 1px solid var(--card-border);
}
.stack-tag img {
    width: 16px;
    height: 16px;
    display: block;
    flex-shrink: 0;
}
.section--dark .stack-tag {
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.85);
    border-color: rgba(255,255,255,0.1);
}
.section--dark .about__text p {
    color: rgba(255,255,255,0.68);
}

/* ─── Contact ───────────────────────────────────────────── */
.contact__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}
.contact__info { }
.contact__info-item {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    font-size: 16px;
    color: rgba(255,255,255,0.7);
}
.contact__info-item svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
    flex-shrink: 0;
}
.contact__info-item a {
    color: var(--white);
    font-weight: 500;
    transition: color var(--transition);
}
.contact__info-item a:hover { color: var(--accent); }
.contact__free {
    margin-top: 32px;
    padding: 20px 24px;
    background: rgba(30,157,224,0.1);
    border: 1px solid rgba(30,157,224,0.25);
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
}
.contact__free strong { color: var(--accent); }

.contact__form { }
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.6);
    margin-bottom: 7px;
    letter-spacing: 0.03em;
}
.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    padding: 13px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--white);
    outline: none;
    transition: border-color var(--transition), background var(--transition);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,0.25); }
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    background: rgba(30,157,224,0.06);
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form__submit {
    width: 100%;
    background: var(--accent);
    color: var(--white);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    padding: 15px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background var(--transition), transform var(--transition);
    margin-top: 4px;
}
.form__submit:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}
.form__success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
}

/* ─── Footer ────────────────────────────────────────────── */
.footer {
    background: var(--dark);
    padding: 40px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.footer__copy {
    font-size: 14px;
    color: rgba(255,255,255,0.35);
}
.footer__links {
    display: flex;
    gap: 24px;
}
.footer__links a {
    font-size: 14px;
    color: rgba(255,255,255,0.35);
    transition: color var(--transition);
}
.footer__links a:hover { color: var(--accent); }

/* ─── Project Show — Timeline ───────────────────────────── */
.project-show { background: var(--white); }

.project-hero {
    background: var(--dark-2);
    padding: 140px 0 80px;
    position: relative;
    overflow: hidden;
}
.project-hero::before {
    content: '';
    position: absolute;
    top: -200px; right: -200px;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(30,157,224,0.12) 0%, transparent 70%);
    pointer-events: none;
}
.project-hero__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 32px;
    transition: color var(--transition);
}
.project-hero__back:hover { color: var(--accent); }
.project-hero__back svg { width: 16px; height: 16px; }
.project-hero__tag {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}
.project-hero__title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.03em;
    margin-bottom: 18px;
    line-height: 1.1;
}
.project-hero__desc {
    font-size: 18px;
    color: rgba(255,255,255,0.55);
    max-width: 620px;
    line-height: 1.7;
    margin-bottom: 36px;
}
.project-hero__meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.project-hero__url {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    border: 1px solid rgba(30,157,224,0.4);
    padding: 8px 18px;
    border-radius: 6px;
    transition: background var(--transition), border-color var(--transition);
}
.project-hero__url:hover {
    background: rgba(30,157,224,0.1);
    border-color: var(--accent);
}
.project-hero__url svg { width: 14px; height: 14px; }

/* ─── Timeline ──────────────────────────────────────────── */
.timeline {
    padding: 100px 0 120px;
    position: relative;
}
.timeline__line {
    position: absolute;
    left: 50%;
    top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--line-color) 8%,
        var(--line-color) 92%,
        transparent 100%
    );
    transform: translateX(-50%);
    opacity: 0.25;
}
.timeline__block {
    display: grid;
    grid-template-columns: 1fr 60px 1fr;
    align-items: center;
    margin-bottom: 100px;
    position: relative;
}
.timeline__block:last-child { margin-bottom: 0; }

.timeline__node {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}
.timeline__dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--white);
    box-shadow: 0 0 0 3px var(--accent), 0 0 20px rgba(30,157,224,0.4);
}

/* odd: image left, text right */
.timeline__block:nth-child(odd) .timeline__image { order: 1; }
.timeline__block:nth-child(odd) .timeline__node  { order: 2; }
.timeline__block:nth-child(odd) .timeline__text  { order: 3; }

/* even: text left, image right */
.timeline__block:nth-child(even) .timeline__text  { order: 1; }
.timeline__block:nth-child(even) .timeline__node  { order: 2; }
.timeline__block:nth-child(even) .timeline__image { order: 3; }

.timeline__image {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}
.timeline__image img {
    width: 100%;
    object-fit: contain;
    display: block;
}
.timeline__image-clickable {
    cursor: zoom-in;
    transition: transform 0.3s ease;
}
.timeline__image-clickable:hover { transform: scale(1.02); }
.timeline__image-clickable:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ─── Lightbox ──────────────────────────────────────────── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    padding: 40px;
    animation: lightboxFadeIn 0.2s ease;
}
.lightbox.is-open { display: flex; }
@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.lightbox__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
    animation: lightboxZoomIn 0.25s ease;
}
@keyframes lightboxZoomIn {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
}
.lightbox__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    backdrop-filter: blur(8px);
}
.lightbox__close:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(1.05);
}
.lightbox__close svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
}
@media (max-width: 640px) {
    .lightbox { padding: 16px; }
    .lightbox__close { top: 12px; right: 12px; width: 40px; height: 40px; }
}

/* MacBook frame mockup */
.macbook-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 626 / 400;
}
.macbook-frame__screen {
    position: absolute;
    left: 8.5%;
    top: 3.5%;
    width: 83%;
    height: 74%;
    object-fit: cover;
    object-position: top;
    border-radius: 2px;
    z-index: 1;
}
.macbook-frame__placeholder {
    position: absolute;
    left: 8.5%; top: 3.5%;
    width: 83%; height: 74%;
    background: linear-gradient(135deg, #0d1526 0%, #1a3056 100%);
    border-radius: 2px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: rgba(255,255,255,0.2);
}
.macbook-frame__overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2;
    pointer-events: none;
}

.timeline__image-placeholder {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, var(--dark-2) 0%, #1a3056 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: rgba(255,255,255,0.2);
    font-weight: 500;
    letter-spacing: 0.06em;
}
.timeline__image-placeholder {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, var(--dark-2) 0%, #1a3056 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: rgba(255,255,255,0.2);
    font-weight: 500;
    letter-spacing: 0.06em;
}

.timeline__text { padding: 0 20px; }
.timeline__block:nth-child(odd)  .timeline__text { padding-left: 32px; padding-right: 0; }
.timeline__block:nth-child(even) .timeline__text { padding-right: 32px; padding-left: 0; }

.timeline__num {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}
.timeline__title {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 500;
    letter-spacing: -0.02em;
    color: #114665;
    margin-bottom: 14px;
    line-height: 1.2;
    font-family: system-ui;
}
.timeline__desc {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 20px;
}
.timeline__features {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.timeline__feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #2178aa;
    font-weight: 500;
}
.timeline__feature svg {
    width: 16px; height: 16px;
    color: var(--accent);
    flex-shrink: 0;
}

/* ─── Project tech footer ───────────────────────────────── */
.project-tech {
    background: var(--light);
    padding: 60px 0;
    border-top: 1px solid var(--card-border);
}
.project-tech__label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}
.project-tech__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.project-tech__tag {
    font-size: 14px;
    font-weight: 500;
    padding: 8px 18px;
    border-radius: 6px;
    background: var(--white);
    border: 1px solid var(--card-border);
    color: var(--text-dark);
}

/* ─── Fade-in on scroll ─────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ─── Services Mosaic ───────────────────────────────────── */
.services-mosaic { width: 100%; }

.mosaic-grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 260px) 180px;
    gap: 0;
}

/* ── Cell base ── */
.mc {
    overflow: hidden;
    position: relative;
}

/* ── Image cells ── */
.mc--img {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.6s ease;
    z-index: -1;
}
.mc--img:hover { transform: scale(1.02); }

/* ── Text cells ── */
.mc--text {
    padding: 44px 44px 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0;
}
.mc--dark  { background: #0d1525; }
.mc--blue  { background: #1a3d7c; }
.mc--navy  { background: #0e2240; }

.mc--text:hover .mc__desc {
    opacity: 1;
    transform: translateY(0);
}
.mc--text:hover .mc__icon {
    opacity: 1;
    transform: translateY(-3px);
}

.mc__icon {
    color: rgba(255,255,255,0.5);
    margin-bottom: 24px;
    opacity: 0.5;
    transition: opacity 0.3s, transform 0.3s;
}
.mc--blue .mc__icon { color: rgba(255,255,255,0.7); }
.mc__icon svg { width: 30px; height: 30px; }

.mc__title {
    font-size: clamp(18px, 1.6vw, 22px);
    font-weight: 700;
    color: var(--white);
    line-height: 1.25;
    margin-bottom: 12px;
}

.mc__desc {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255,255,255,0.55);
    max-width: 340px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.mc__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 10px 22px;
    border-radius: 30px;
    width: fit-content;
    transition: background 0.3s, border-color 0.3s;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease 0.05s, transform 0.35s ease 0.05s,
                background 0.3s, border-color 0.3s;
}
.mc__cta svg { width: 14px; height: 14px; }
.mc--text:hover .mc__cta { opacity: 1; transform: translateY(0); }
.mc__cta:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.6); }

.mc--wide { grid-column: 1 / 3; }
.mc--full { grid-column: 1 / 4; }

.mc--banner {
    flex-direction: row !important;
    align-items: center;
    justify-content: flex-start;
    gap: 48px;
    padding: 0 60px;
}
.mc-banner__left { flex-shrink: 0; }
.mc-banner__left svg { width: 36px; height: 36px; color: rgba(255,255,255,0.8); }
.mc-banner__body { flex: 1; }
.mc--banner .mc__title { font-size: 24px; margin-bottom: 6px; }
.mc--banner .mc__cta { margin-top: 0; flex-shrink: 0; }

/* ─── Portfolio Slider ──────────────────────────────────── */
.portfolio-slider-section {
    position: relative;
    background: var(--dark);
    padding: 0;
    overflow: hidden;
    width: 100%;
}

.pslider__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.pslider__bg-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
}
.pslider__bg-item.active { opacity: 1; }

/* Unique gradient per project slide */
.pslider__bg-item:nth-child(1) {
    background: url('https://images.unsplash.com/photo-1758745791998-11ea5eb5df40?auto=format&w=1600&q=80') center/cover no-repeat;
}
.pslider__bg-item:nth-child(2) { background: url('/images/f2.jpg') center/cover no-repeat; }
.pslider__bg-item:nth-child(3) { background: url('/images/zb1.jpg') center/cover no-repeat; }
.pslider__bg-item:nth-child(4) { background: url('/images/14.jpg') center/cover no-repeat; }
.pslider__bg-item:nth-child(5) { background: url('/images/social.avif') center/cover no-repeat; }

.pslider__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(8,13,26,0.3) 0%, rgba(8,13,26,0.6) 100%);
    z-index: 1;
}

.pslider__header {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 3;
    margin-bottom: 0;
}

.pslider-swiper {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-bottom: 0;
}

.pslider-slide {
    width: max(360px, calc(100vw / var(--slide-count, 5))) !important;
    height: 700px;
    border-left: 1px solid rgba(255,255,255,0.1);
    transition: border-color 0.3s ease;
}
.pslider-slide:hover { border-left-color: rgba(255,255,255,0.35); }

.pslider-slide__inner {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding: 36px 32px;
    transition: background 0.3s ease;
}
.pslider-slide__inner:hover {
    background: rgba(255,255,255,0.04);
}

.pslider-slide__title {
    font-size: 26px;
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 0;
    transition: margin-bottom 0.3s ease;
}
.pslider-slide:hover .pslider-slide__title { margin-bottom: 16px; }

.pslider-slide__hidden {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.pslider-slide:hover .pslider-slide__hidden { max-height: 200px; }

.pslider-slide__desc {
    font-size: 14px;
    color: rgba(255,255,255,0.55);
    line-height: 1.7;
    margin-bottom: 20px;
}

.pslider-slide__link {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
}
.pslider-slide__link svg { width: 20px; height: 20px; flex-shrink: 0; }

/* Nav buttons */
.pslider-next,
.pslider-prev {
    width: 52px !important;
    height: 52px !important;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    top: auto !important;
    bottom: 12px;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pslider-next::after,
.pslider-prev::after { display: none; }
.pslider-next svg,
.pslider-prev svg { width: 18px; height: 18px; }
.pslider-prev svg { transform: rotate(180deg); }
.pslider-next:hover,
.pslider-prev:hover { background: rgba(255,255,255,0.16); }
.pslider-next { right: 32px !important; left: auto !important; }
.pslider-prev { right: 96px !important; left: auto !important; }

/* ─── Layout Toggle Button ──────────────────────────────── */
.layout-toggle {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 25, 50, 0.92);
    border: 1px solid rgba(255,255,255,0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--white);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 40px;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s, transform 0.2s;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.layout-toggle:hover {
    background: rgba(30, 157, 224, 0.25);
    border-color: var(--accent);
    transform: translateY(-2px);
}
.layout-toggle__label { letter-spacing: 0.02em; }
.layout-toggle__icon svg { width: 16px; height: 16px; color: var(--accent); }

/* ─── Burger ─────────────────────────────────────────────── */
.nav__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 200;
}
.nav__burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: rgba(8,13,26,0.97);
    backdrop-filter: blur(16px);
    padding: 24px 20px 32px;
    z-index: 99;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    gap: 4px;
}
.nav__mobile.open { display: flex; }
.nav__mobile-link {
    font-size: 16px;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: color 0.2s;
}
.nav__mobile-link:last-child { border-bottom: none; }
.nav__mobile-link:hover { color: var(--white); }
.nav__mobile-cta {
    margin-top: 12px;
    background: var(--accent);
    color: var(--white) !important;
    padding: 14px 20px;
    border-radius: 8px;
    text-align: center;
    border-bottom: none !important;
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 1024px) {
    .mosaic-grid {
        grid-template-columns: 1fr 1fr !important;
        grid-template-rows: auto !important;
    }
    .mc { min-height: 260px; }
    .mc--wide { grid-column: 1 / 3 !important; }
    .mc--full { grid-column: 1 / 3 !important; }
    .mc--img:nth-child(3)  { display: none; }
    .mc--img:nth-child(5)  { display: none; }
    .mc--img:nth-child(9)  { display: none; }
    .mc:nth-child(8) { grid-column: 1 / 3 !important; }
    .about__inner,
    .contact__inner { grid-template-columns: 1fr; gap: 48px; }
    .timeline__block { grid-template-columns: 1fr 40px 1fr; }
}

@media (max-width: 768px) {
    .section { padding: 64px 0; }
    .container { padding: 0 16px; }

    /* Nav */
    .nav__links { display: none; }
    .nav__burger { display: flex; }

    /* Hero */
    .hero__title { left: 0; text-align: center; }
    .hero__title-main { font-size: clamp(52px, 15vw, 80px); }
    .hero__title-sub {
        font-size: clamp(18px, 5.5vw, 32px);
        left: 69px;
        top: -0.3em;
    }
    .hero__subtitle { font-size: 14px; }
    .hero__cta { font-size: 15px; padding: 14px 28px; }
    #about { margin-top: -145px; padding-top: 145px; padding-bottom: 80px; }

    /* Section headers */
    .section__title { font-size: clamp(26px, 7vw, 40px); }

    /* Services mosaic */
    .mosaic-grid {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
    }
    .mc { grid-column: 1 / 2 !important; }
    .mc--img { height: 220px; }
    .mc--text { height: auto; min-height: 160px; padding: 28px 20px; }
    .mc--full { flex-direction: column; align-items: flex-start; gap: 12px; }
    .mc--img:nth-child(3),
    .mc--img:nth-child(5),
    .mc--img:nth-child(9) { display: block; }
    .mc__desc { opacity: 1; transform: none; }
    .mc__cta  { opacity: 1; transform: none; }
    .mc-banner__left { display: none; }
    .mc--banner { padding: 28px 20px; }

    /* Portfolio slider */
    .portfolio-slider-section { padding: 0 0 80px; }
    .pslider__header { position: relative; top: auto; padding: 48px 16px 24px; }
    .pslider-slide { width: 100vw !important; height: 360px; }
    .pslider-slide .pslider-slide__hidden { max-height: 180px; }
    .pslider-slide .pslider-slide__title { margin-bottom: 12px; font-size: 20px; }
    .pslider-slide__desc { font-size: 13px; }
    .pslider-next { right: 16px !important; bottom: 16px; }
    .pslider-prev { right: 80px !important; bottom: 16px; }

    /* About */
    .about__inner { gap: 36px; }
    .about__stack-tags { gap: 8px; }
    .stack-tag { font-size: 12px; padding: 6px 10px; }

    /* Contact */
    .contact__inner { gap: 36px; }
    .contact__form { padding: 28px 20px; }
    .form-row { grid-template-columns: 1fr; }

    /* Timeline (project page) */
    .timeline__line { display: none; }
    .timeline__block {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .timeline__block:nth-child(odd) .timeline__image,
    .timeline__block:nth-child(even) .timeline__image { order: 1; }
    .timeline__block:nth-child(odd) .timeline__node,
    .timeline__block:nth-child(even) .timeline__node  { display: none; }
    .timeline__block:nth-child(odd) .timeline__text,
    .timeline__block:nth-child(even) .timeline__text  { order: 2; padding: 0; }

    /* Project hero */
    .project-hero { padding: 100px 0 48px; }
    .project-hero__title { font-size: clamp(32px, 8vw, 52px); }
    .project-tech { padding: 24px 0; }
    .project-tech__tags { gap: 8px; }
    .project-tech__tag { font-size: 12px; padding: 6px 12px; }

    /* Footer */
    .footer__inner { flex-direction: column; gap: 16px; text-align: center; }
    .footer__links { gap: 16px; flex-wrap: wrap; justify-content: center; }

    .layout-toggle { bottom: 16px; right: 16px; }
}

@media (max-width: 500px) {
    .hero__title-sub { left: 57px; }
}
@media (max-width: 480px) {
    .hero__title-main { font-size: clamp(44px, 17vw, 68px); }
    .hero__title-sub  { font-size: clamp(16px, 6vw, 26px); }
    .hero__cta { width: 100%; justify-content: center; }
    .pslider-slide { width: 100vw !important; height: 320px; }
    .mc--text { min-height: 160px; padding: 24px 20px; }
    .timeline__num { font-size: 36px; }
}
