:root {
    --bg: #07080f;
    --bg-soft: #0e1019;
    --surface: #151823;
    --surface-light: #1c2030;
    --text: #f7f8fb;
    --muted: #b7bdca;
    --line: rgba(255, 255, 255, 0.12);
    --accent: #7c5cff;
    --accent-dark: #6043e8;
    --accent-2: #38d5ff;
    --accent-3: #f6b44b;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    --radius: 8px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", Arial, sans-serif;
    line-height: 1.7;
}

body.menu-open {
    overflow: hidden;
}

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

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

.container {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    border-bottom: 1px solid transparent;
    background: rgba(7, 8, 15, 0.76);
    backdrop-filter: blur(18px);
    transition: border-color 0.25s ease, background 0.25s ease;
}

.site-header.scrolled {
    border-color: var(--line);
    background: rgba(7, 8, 15, 0.92);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 40px));
    min-height: 76px;
    margin: 0 auto;
}

.brand,
.nav-menu,
.hero-actions,
.contact-links,
.footer-inner,
.focus-list,
.tech-list {
    display: flex;
    align-items: center;
}

.brand {
    gap: 12px;
    font-weight: 800;
    letter-spacing: 0;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(124, 92, 255, 0.52);
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(124, 92, 255, 0.22), rgba(56, 213, 255, 0.08));
    color: var(--accent);
    font-size: 0.9rem;
}

.nav-menu {
    gap: 28px;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 600;
}

.nav-menu a {
    transition: color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--accent);
}

.nav-cv {
    padding: 10px 16px;
    border: 1px solid rgba(124, 92, 255, 0.5);
    border-radius: var(--radius);
    color: var(--text);
}

.nav-cv:hover {
    background: rgba(124, 92, 255, 0.12);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 99px;
    background: var(--text);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.section {
    padding: 112px 0;
    overflow: hidden;
}

.hero {
    position: relative;
    min-height: 100vh;
    padding-top: 150px;
    display: flex;
    align-items: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 18%, rgba(124, 92, 255, 0.22), transparent 28%),
        radial-gradient(circle at 22% 70%, rgba(56, 213, 255, 0.13), transparent 26%),
        linear-gradient(135deg, #07080f 0%, #10121e 46%, #11172a 100%);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 130px;
    background: linear-gradient(180deg, transparent, var(--bg));
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 64px;
    align-items: start;
}

.hero-content {
    padding-top: 138px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--accent);
}

h1,
h2,
h3 {
    line-height: 1.08;
    letter-spacing: 0;
}

.hero h1 {
    max-width: 760px;
    font-size: clamp(3.25rem, 7vw, 6.8rem);
    font-weight: 800;
}

.hero h2 {
    margin-top: 16px;
    color: var(--muted);
    font-size: clamp(1.25rem, 2.2vw, 2rem);
    font-weight: 600;
}

.hero p {
    max-width: 650px;
    margin-top: 24px;
    color: var(--muted);
    font-size: 1.12rem;
}

.hero-actions {
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 13px 22px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #050612;
    box-shadow: 0 14px 32px rgba(124, 92, 255, 0.28);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #9278ff, #62ddff);
}

.btn-secondary {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.btn-secondary:hover {
    border-color: rgba(56, 213, 255, 0.48);
    background: rgba(56, 213, 255, 0.08);
}

.hero-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(124, 92, 255, 0.06));
    box-shadow: var(--shadow);
    padding: 26px;
    animation: cardFloat 6s ease-in-out infinite;
}

.profile-frame {
    position: relative;
    min-height: 390px;
    overflow: hidden;
    border: 1px solid rgba(124, 92, 255, 0.3);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 50% 24%, rgba(56, 213, 255, 0.16), transparent 28%),
        linear-gradient(145deg, #111523, #1b1f31);
}

.profile-frame img {
    width: 100%;
    height: 100%;
    min-height: 390px;
    object-fit: contain;
    object-position: center bottom;
    transition: transform 0.5s ease;
    filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.32));
}

.profile-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 68%, rgba(7, 8, 15, 0.42));
    pointer-events: none;
}

.hero-card:hover .profile-frame img {
    transform: scale(1.04);
}

.availability {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    color: var(--muted);
    font-size: 0.95rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 18px var(--accent-2);
}

.focus-slider {
    position: relative;
    min-height: 116px;
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(124, 92, 255, 0.16), rgba(56, 213, 255, 0.08));
}

.focus-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 18px;
    opacity: 0;
    transform: translateX(28px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.focus-slide.active {
    opacity: 1;
    transform: translateX(0);
}

.focus-slide strong {
    color: var(--text);
    font-size: 1rem;
}

.focus-slide p {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.focus-list,
.tech-list {
    flex-wrap: wrap;
    gap: 10px;
}

.focus-list {
    margin-top: 18px;
}

.focus-list span,
.tech-list span,
.skill-chip {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--muted);
}

.focus-list span {
    padding: 8px 12px;
    font-size: 0.84rem;
}

.two-column,
.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 72px;
}

.section-heading h2 {
    max-width: 620px;
    font-size: clamp(2rem, 4vw, 3.4rem);
}

.section-heading.centered {
    max-width: 760px;
    margin: 0 auto 42px;
    text-align: center;
}

.section-heading.centered .eyebrow {
    justify-content: center;
}

.about-copy p,
.contact-info p,
.timeline-item p,
.project-card p {
    color: var(--muted);
}

.about-copy p + p {
    margin-top: 18px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 32px;
}

.stats-row div {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.stats-row strong,
.stats-row span {
    display: block;
}

.stats-row strong {
    color: var(--accent);
    font-size: 2rem;
    line-height: 1;
}

.stats-row span {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.86rem;
}

.skills,
.experience {
    background: var(--bg-soft);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.skill-chip {
    padding: 18px 20px;
    border-radius: var(--radius);
    color: var(--text);
    font-weight: 700;
    text-align: center;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.skill-chip:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 213, 255, 0.5);
    background: rgba(56, 213, 255, 0.08);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 42px;
}

.project-card {
    position: relative;
    min-height: 390px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--surface-light), var(--surface));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(124, 92, 255, 0.56);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.32);
}

.project-media {
    position: relative;
    aspect-ratio: 16 / 9;
    margin: -12px -12px 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    background: #f4f7fb;
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
}

.project-media.dragging {
    cursor: grabbing;
}

.project-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 62%, rgba(7, 8, 15, 0.34));
    pointer-events: none;
}

.project-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left top;
    opacity: 0;
    transform: translateX(24px) scale(1.01);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.project-media img.active {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.project-card:hover .project-media img.active {
    transform: scale(1.045);
}

.project-media figcaption {
    position: absolute;
    left: 50%;
    bottom: 14px;
    z-index: 1;
    display: flex;
    gap: 7px;
    align-items: center;
    justify-content: center;
    padding: 7px 9px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(7, 8, 15, 0.72);
    backdrop-filter: blur(10px);
    transform: translateX(-50%);
}

.project-media figcaption span {
    display: block;
    width: 18px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.project-media figcaption span.active {
    width: 34px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 18px rgba(56, 213, 255, 0.32);
}

.project-number {
    color: rgba(56, 213, 255, 0.78);
    font-size: 0.88rem;
    font-weight: 800;
}

.project-card h3 {
    margin-top: 26px;
    font-size: 1.45rem;
}

.project-card p {
    margin: 18px 0 24px;
}

.tech-list {
    margin-top: auto;
}

.tech-list span {
    padding: 8px 11px;
    font-size: 0.8rem;
}

.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: var(--line);
}

.timeline-item {
    position: relative;
    padding: 0 0 34px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -31px;
    top: 5px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 7px rgba(124, 92, 255, 0.13);
}

.timeline-period {
    display: inline-flex;
    margin-bottom: 10px;
    color: var(--accent-3);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.timeline-item h3 {
    font-size: 1.35rem;
}

.timeline-item h4 {
    margin: 8px 0 12px;
    color: var(--accent-2);
    font-size: 0.98rem;
}

.contact-grid {
    align-items: start;
}

.contact-info h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
}

.contact-info p {
    margin-top: 20px;
}

.contact-links {
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.contact-links a {
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.contact-links a:hover {
    border-color: rgba(124, 92, 255, 0.5);
    background: rgba(124, 92, 255, 0.1);
    color: var(--text);
}

.contact-form {
    display: grid;
    gap: 12px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.hidden-field {
    display: none !important;
}

.contact-form label {
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 700;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #0b0d15;
    color: var(--text);
    font: inherit;
    outline: none;
    padding: 14px 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: rgba(56, 213, 255, 0.56);
    box-shadow: 0 0 0 4px rgba(56, 213, 255, 0.1);
}

.contact-form button {
    margin-top: 8px;
    cursor: pointer;
}

.footer {
    border-top: 1px solid var(--line);
    background: #05060b;
    color: var(--muted);
}

.footer-inner {
    justify-content: space-between;
    gap: 16px;
    min-height: 86px;
    font-size: 0.92rem;
}

.footer a {
    color: var(--accent);
    font-weight: 700;
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes cardFloat {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@media (max-width: 980px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 76px;
        left: 20px;
        right: 20px;
        display: grid;
        gap: 8px;
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: rgba(12, 16, 14, 0.98);
        box-shadow: var(--shadow);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-14px);
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .nav-menu.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-menu a {
        padding: 12px;
        border-radius: var(--radius);
    }

    .nav-menu a:hover {
        background: rgba(255, 255, 255, 0.04);
    }

    .hero-grid,
    .two-column,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 44px;
    }

    .hero-content {
        padding-top: 0;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        min-height: auto;
    }

    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 680px) {
    .container,
    .navbar {
        width: min(100% - 28px, 1120px);
    }

    .section {
        padding: 84px 0;
    }

    .hero {
        min-height: auto;
        padding-top: 130px;
    }

    .hero h1 {
        font-size: 3.35rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-card,
    .contact-form,
    .project-card {
        padding: 22px;
    }

    .profile-frame {
        min-height: 240px;
    }

    .hero-actions,
    .btn {
        width: 100%;
    }

    .skills-grid,
    .stats-row {
        grid-template-columns: 1fr;
    }

    .section-heading.centered {
        text-align: left;
    }

    .section-heading.centered .eyebrow {
        justify-content: flex-start;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
    }
}
