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

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --accent-color: #ec4899;
    --bg-dark: #0a0a0f;
    --bg-secondary: #1a1a24;
    --text-light: #f8f9fa;
    --text-gray: #a0a0b0;
    --gradient: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

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

.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header__logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-light);
    text-decoration: none;
}

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

.nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.nav__list {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav__list a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav__list a:hover {
    color: var(--accent-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

.hero {
    min-height: calc(100vh - 48px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 112px 0 64px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 60%;
    height: 100%;
    background: var(--gradient);
    opacity: 0.1;
    border-radius: 50%;
    animation: pulse 8s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: -10%;
    width: 50%;
    height: 60%;
    background: var(--gradient);
    opacity: 0.05;
    border-radius: 50%;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.1; }
    50% { transform: scale(1.1); opacity: 0.15; }
}

.hero__content {
    text-align: center;
    z-index: 1;
}

.hero__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 20px;
    font-weight: 700;
}

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

.hero__subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-gray);
    margin-bottom: 40px;
    font-weight: 300;
}

.hero-profile .container {
    max-width: 1280px;
}

.profile-card {
    display: grid;
    grid-template-columns: minmax(220px, 0.78fr) minmax(0, 1.35fr);
    grid-template-areas:
        "photo summary"
        "photo skills";
    align-items: center;
    gap: 32px 56px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.profile-card > * {
    min-width: 0;
}

.profile-photo {
    grid-area: photo;
    margin: 0;
    text-align: center;
    position: relative;
}

.profile-photo::after {
    content: '';
    position: absolute;
    inset: 12% -10% -8% 16%;
    background: var(--gradient);
    opacity: 0.2;
    filter: blur(34px);
    border-radius: 42% 58% 52% 48%;
    z-index: -1;
}

.profile-photo img {
    width: min(100%, 330px);
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 36px;
    padding: 7px;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
}

.profile-summary {
    grid-area: summary;
    max-width: 720px;
}

.profile-summary h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(3rem, 7vw, 6rem);
    line-height: 0.95;
    margin-bottom: 24px;
    color: var(--text-light);
}

.profile-skills {
    grid-area: skills;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.profile-skills h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.25rem, 1.8vw, 1.65rem);
    color: var(--text-light);
}

.profile-kicker {
    color: var(--accent-color);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0;
    margin-bottom: 18px;
    text-transform: uppercase;
}

.profile-summary p {
    color: var(--text-gray);
    font-size: clamp(1.08rem, 1.45vw, 1.28rem);
    line-height: 1.7;
}

.profile-skill-list {
    display: grid;
    gap: 10px;
}

.profile-skill {
    display: grid;
    grid-template-columns: 86px 1fr;
    align-items: baseline;
    gap: 18px;
    padding: 0 0 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.profile-skill h3 {
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 700;
}

.profile-skill p {
    color: var(--text-gray);
    font-size: clamp(0.98rem, 1.16vw, 1.08rem);
    line-height: 1.5;
}

.btn {
    display: inline-block;
    padding: 14px 36px;
    background: var(--gradient);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.7rem, 2.6vw, 2.6rem);
    text-align: center;
    margin-bottom: 42px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gradient);
    margin: 15px auto 0;
    border-radius: 2px;
}

.about {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.about__content {
    display: grid;
    gap: 40px;
}

.about__text p {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--text-gray);
    margin-bottom: 20px;
    line-height: 1.8;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.skill-tag {
    padding: 10px 24px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50px;
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(236, 72, 153, 0.2);
    transition: all 0.3s;
}

.skill-tag:hover {
    background: rgba(236, 72, 153, 0.2);
    transform: translateY(-2px);
}

.projects-section {
    padding: 72px 0;
}

.projects-section--featured {
    padding-top: 88px;
    background:
        radial-gradient(circle at 15% 10%, rgba(236, 72, 153, 0.12), transparent 32%),
        radial-gradient(circle at 82% 0%, rgba(99, 102, 241, 0.12), transparent 34%);
}

.section-lead {
    max-width: 760px;
    margin: -22px auto 30px;
    color: var(--text-gray);
    font-size: clamp(0.98rem, 1.35vw, 1.12rem);
    line-height: 1.7;
    text-align: center;
}

.metrics-panel {
    max-width: 980px;
    margin: 0 auto 32px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.09);
    overflow: hidden;
}

.metrics-panel summary {
    display: flex;
    position: relative;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    cursor: pointer;
    color: var(--text-light);
    font-weight: 700;
    list-style: none;
}

.metrics-panel summary::-webkit-details-marker {
    display: none;
}

.metrics-panel summary::after {
    content: '+';
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-color);
    font-size: 1.25rem;
    line-height: 1;
    transition: transform 0.25s ease;
}

.metrics-panel[open] summary::after {
    transform: rotate(45deg);
}

.metrics-panel summary small {
    color: var(--text-gray);
    font-size: 0.84rem;
    font-weight: 500;
    margin-left: auto;
}

.metrics-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr);
    gap: 16px;
    padding: 0 18px 18px;
}

.metrics-card {
    margin: 0;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(10, 10, 15, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.metrics-card img {
    width: 100%;
    display: block;
    background: #f5f5f5;
}

.metrics-card figcaption {
    padding: 12px 14px 14px;
    color: var(--text-gray);
    font-size: 0.82rem;
    line-height: 1.45;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.project-card {
    background: var(--bg-secondary);
    border-radius: 14px;
    transition: all 0.4s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(99, 102, 241, 0.18);
    border-color: var(--primary-color);
}

.project-image {
    width: 100%;
    height: 230px;
    object-fit: cover;
    background: linear-gradient(135deg, #2a2a3e 0%, #1a1a24 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    position: relative;
    flex-shrink: 0;
    border-radius: 14px 14px 0 0;
}

.project-image::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    opacity: 0.15;
    border-radius: 14px 14px 0 0;
}

.project-image video, .project-image model-viewer {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 14px;
}

.project-content {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.snapcode-container {
    position: absolute;
    bottom: 8px;
    left: 8px;
    transform: none;
    width: 84px;
    height: 84px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

.snapcode-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.snapcode-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.project-content h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
    color: var(--text-light);
    line-height: 1.25;
}

.project-content p {
    color: var(--text-gray);
    font-size: 0.86rem;
    margin-bottom: 0;
    line-height: 1.45;
}

.project-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.project-tag {
    padding: 4px 12px;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--accent-color);
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-top: 10px;
}

.project-link:hover {
    gap: 12px;
    transition: all 0.3s;
}

.footer {
    background: var(--bg-secondary);
    padding: 60px 0 20px;
}

.footer__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-light);
}

.footer-section p {
    color: var(--text-gray);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 30px;
    max-width: 700px;
    width: 100%;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-content img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 20px;
}

.modal-3d-container {
    width: 100%;
    height: 300px;
    border-radius: 15px;
    margin-bottom: 20px;
    overflow: hidden;
    background: #1a1a24;
    position: relative;
}

.modal-3d-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.modal-3d-container model-viewer {
    width: 100%;
    height: 100%;
    display: block;
    background: transparent;
}

.close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: var(--accent-color);
}

.modal-body h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--text-light);
}

.modal-body p {
    color: var(--text-gray);
    margin-bottom: 20px;
    line-height: 1.8;
}

.modal-body ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.modal-body li {
    color: var(--text-gray);
    margin-bottom: 8px;
}

.modal-3d-container {
    width: 100%;
    height: 400px;
    background: #0a0a0f;
    border-radius: 12px;
    margin-bottom: 20px;
}

.modal-3d-container model-viewer {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

@media (max-width: 1024px) {
    .profile-card {
        grid-template-columns: 1fr;
        grid-template-areas:
            "photo"
            "summary"
            "skills";
        gap: 28px;
    }

    .profile-summary {
        max-width: none;
        text-align: center;
    }

    .profile-skills {
        max-width: 680px;
        width: 100%;
        margin: 0 auto;
    }

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

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

@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding: 104px 0 48px;
    }

    .profile-card {
        gap: 24px;
    }

    .profile-photo img {
        width: min(100%, 240px);
        border-radius: 26px;
    }

    .profile-summary h1 {
        font-size: clamp(2.7rem, 14vw, 4.2rem);
    }

    .profile-skill {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .profile-skill h3 {
        color: var(--accent-color);
    }

    .nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-dark);
        flex-direction: column;
        padding: 30px;
        transition: left 0.3s;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav.active {
        left: 0;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .nav__list {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    .footer__content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .projects-section {
        padding: 56px 0;
    }

    .projects-section--featured {
        padding-top: 64px;
    }

    .section-lead {
        margin: -18px auto 24px;
        text-align: left;
    }

    .metrics-panel {
        border-radius: 18px;
        margin-bottom: 24px;
    }

    .metrics-panel summary {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
    }

    .metrics-panel summary::after {
        position: absolute;
        right: 16px;
        top: 16px;
    }

    .metrics-panel summary small {
        margin-left: 0;
        padding-right: 40px;
    }

    .metrics-grid {
        padding: 0 12px 12px;
    }

    .project-image {
        height: 180px;
    }

    .project-content {
        padding: 12px;
    }

    .project-content h3 {
        font-size: 0.96rem;
    }

    .project-content p {
        font-size: 0.8rem;
    }

    .snapcode-container {
        width: 66px;
        height: 66px;
        border-radius: 12px;
    }

    .modal-3d-container {
        height: 300px;
    }
}
