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

:root {
    --bg: #07080b;
    --bg-elevated: rgba(15, 17, 22, 0.88);
    --bg-card: rgba(12, 14, 19, 0.96);
    --bg-soft: rgba(255, 255, 255, 0.03);
    --text: #edf0f6;
    --text-muted: #97a0b0;
    --accent: #a6afbf;
    --accent-2: #7f8796;
    --accent-warm: #c2c7d1;
    --border: rgba(129, 137, 154, 0.22);
    --shadow: 0 20px 80px rgba(0, 0, 0, 0.45);
    --radius-md: 16px;
    --radius-lg: 24px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

h1,
h2,
h3,
.section-label,
.btn {
    font-family: 'Space Grotesk', 'Manrope', sans-serif;
    letter-spacing: -0.02em;
}

.logo,
.nav-links a,
.menu-btn,
.btn,
.hero-image,
.skill-card,
.emoji-box,
.contact-link-big,
img {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.bg-gradient,
.grain {
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
}

.bg-gradient {
    background:
        radial-gradient(circle at 14% 12%, rgba(148, 156, 168, 0.12), transparent 36%),
        radial-gradient(circle at 82% 17%, rgba(108, 116, 128, 0.1), transparent 40%),
        radial-gradient(circle at 50% 86%, rgba(86, 92, 103, 0.1), transparent 35%),
        linear-gradient(160deg, #07080b 0%, #0a0c11 45%, #07080b 100%);
    animation: ambientShift 18s ease-in-out infinite alternate;
}

.bg-gradient::before,
.bg-gradient::after {
    content: '';
    position: absolute;
    width: 42vw;
    aspect-ratio: 1;
    border-radius: 50%;
    filter: blur(76px);
    opacity: 0.45;
    animation: orbFloat 20s ease-in-out infinite;
}

.bg-gradient::before {
    top: -10vh;
    left: -7vw;
    background: radial-gradient(circle, rgba(140, 148, 160, 0.24), transparent 68%);
}

.bg-gradient::after {
    right: -8vw;
    bottom: -12vh;
    background: radial-gradient(circle, rgba(108, 116, 128, 0.24), transparent 68%);
    animation-delay: -8s;
}

.grain {
    z-index: -2;
    opacity: 0.09;
    background-image: radial-gradient(rgba(255, 255, 255, 0.3) 0.5px, transparent 0.5px);
    background-size: 3px 3px;
    mix-blend-mode: soft-light;
}

.cursor-glow {
    position: fixed;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    pointer-events: none;
    top: 0;
    left: 0;
    transform: translate3d(-50%, -50%, 0);
    background: radial-gradient(circle, rgba(188, 196, 210, 0.09), transparent 65%);
    filter: blur(24px);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.35s ease;
}

body.pointer-ready .cursor-glow {
    opacity: 1;
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #c5ccd8, #9aa2b0, #757d8d);
    box-shadow: 0 0 16px rgba(178, 186, 200, 0.38);
    z-index: 220;
    transition: width 0.18s linear;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    padding: 1rem 0;
    transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, transform 0.35s ease;
    background: rgba(9, 12, 20, 0.62);
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(16px);
}

nav.scrolled {
    background: rgba(10, 13, 23, 0.88);
    border-color: rgba(124, 148, 206, 0.32);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), filter 0.35s ease;
}

.logo img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(160, 170, 186, 0.14);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

.logo:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.logo:hover img {
    transform: rotate(-4deg) scale(1.07);
    box-shadow: 0 14px 34px rgba(160, 170, 186, 0.22);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: color 0.35s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 2px;
    border-radius: 20px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-links a:hover {
    color: var(--text);
}

.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.6rem;
    cursor: pointer;
    transition: transform 0.28s ease;
}

.menu-btn:active {
    transform: scale(0.92);
}

section {
    padding: 8rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: var(--accent);
    background: rgba(188, 195, 207, 0.08);
    border: 1px solid rgba(188, 195, 207, 0.2);
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(1.8rem, 3.2vw, 2.4rem);
    font-weight: 700;
    line-height: 1.15;
}

.hero {
    min-height: 100vh;
    display: grid;
    align-items: center;
    padding-top: 110px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 460px);
    gap: 3.5rem;
    align-items: center;
}

.hero-text h1 {
    font-size: clamp(2.3rem, 5.2vw, 4rem);
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 1.1rem;
}

.hero-text h1 span {
    display: block;
    font-size: clamp(1rem, 2.3vw, 1.35rem);
    margin-top: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
}

.hero-desc {
    font-size: clamp(1rem, 2.1vw, 1.16rem);
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 50ch;
}

.hero-buttons {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.7rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease, background-color 0.35s ease;
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(120deg, transparent 10%, rgba(255, 255, 255, 0.35) 45%, transparent 80%);
    transform: translateX(-140%);
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: -1;
}

.btn:hover::before {
    transform: translateX(135%);
}

.btn-primary {
    color: #0d1118;
    background: linear-gradient(120deg, #d4d9e2, #a7afbc);
    box-shadow: 0 12px 34px rgba(145, 154, 170, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 45px rgba(145, 154, 170, 0.42);
}

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

.btn-secondary:hover {
    transform: translateY(-3px);
    border-color: rgba(166, 175, 191, 0.54);
    box-shadow: 0 14px 34px rgba(130, 138, 152, 0.2);
}

.hero-image {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateZ(0);
    animation: heroLevitate 10s ease-in-out infinite;
}

.hero-image::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: conic-gradient(from 170deg, rgba(173, 181, 194, 0), rgba(173, 181, 194, 0.58), rgba(123, 132, 146, 0), rgba(211, 216, 226, 0.38), rgba(173, 181, 194, 0));
    filter: blur(10px);
    opacity: 0.18;
    z-index: 0;
}

.hero-image img {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    z-index: 1;
    transform: scale(0.98);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
}

.hero-image:hover img {
    transform: scale(1.03);
    filter: saturate(1.03);
}

.about-content {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(1.4rem, 2.4vw, 2rem);
    box-shadow: var(--shadow);
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.about-links {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 1.6rem;
    flex-wrap: wrap;
}

.about-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(166, 175, 191, 0.24);
    background: rgba(166, 175, 191, 0.08);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.about-link:hover {
    transform: translateY(-2px);
    border-color: rgba(200, 206, 218, 0.45);
    box-shadow: 0 10px 24px rgba(122, 131, 145, 0.22);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
}

.skill-card {
    position: relative;
    padding: 1.8rem;
    border-radius: 18px;
    background: linear-gradient(170deg, rgba(19, 24, 36, 0.9), rgba(12, 16, 24, 0.94));
    border: 1px solid var(--border);
    text-align: center;
    transform-style: preserve-3d;
    transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.skill-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(182, 190, 204, 0.18), transparent 46%);
    opacity: 0;
    transition: opacity 0.28s ease;
    pointer-events: none;
}

.skill-card:hover {
    border-color: rgba(200, 206, 218, 0.45);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.32);
}

.skill-card:hover::after {
    opacity: 1;
}

.skill-img {
    width: 54px;
    height: 54px;
    margin: 0 auto 1.2rem;
    display: block;
    object-fit: contain;
    background: #fff;
    border-radius: 14px;
    padding: 0.35rem;
    transform: translateZ(30px);
}

.skill-card h3 {
    font-size: 1.12rem;
    margin-bottom: 0.45rem;
    transform: translateZ(16px);
}

.skill-card p {
    font-size: 0.93rem;
    color: var(--text-muted);
    transform: translateZ(10px);
}

.emoji-section {
    background: linear-gradient(180deg, rgba(12, 17, 29, 0.62), rgba(9, 12, 20, 0.82));
    border-block: 1px solid var(--border);
    overflow: clip;
}

.emoji-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
}

.emoji-text h2 {
    font-size: clamp(1.7rem, 3.1vw, 2.4rem);
    margin-bottom: 0.9rem;
}

.emoji-text p {
    color: var(--text-muted);
    margin-bottom: 0.95rem;
}

.emoji-text a {
    color: var(--accent);
    text-decoration: none;
}

.emoji-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.2rem;
}

.emoji-tag {
    font-size: 0.79rem;
    border-radius: 999px;
    border: 1px solid rgba(166, 175, 191, 0.24);
    background: rgba(166, 175, 191, 0.08);
    padding: 0.4rem 0.86rem;
    color: #c8ced9;
}

.emoji-showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.9rem;
    perspective: 1100px;
}

.emoji-box {
    position: relative;
    border-radius: 18px;
    min-height: 130px;
    display: grid;
    place-items: center;
    font-size: clamp(2.1rem, 4.3vw, 2.6rem);
    font-weight: 800;
    background: linear-gradient(155deg, rgba(21, 27, 40, 0.95), rgba(16, 20, 33, 0.95));
    border: 1px solid var(--border);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
    transform-style: preserve-3d;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), color 0.35s ease, border-color 0.35s ease;
    animation: emojiPulse 11s ease-in-out infinite;
}

.emoji-box::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: conic-gradient(from 0deg, rgba(166, 175, 191, 0), rgba(166, 175, 191, 0.45), rgba(120, 128, 140, 0), rgba(206, 212, 222, 0.38), rgba(166, 175, 191, 0));
    opacity: 0;
    filter: blur(6px);
    transition: opacity 0.35s ease;
    z-index: -1;
}

.emoji-box:nth-child(2) {
    animation-delay: -1.8s;
}

.emoji-box:nth-child(3) {
    animation-delay: -3.1s;
}

.emoji-box:hover {
    color: var(--accent);
    border-color: rgba(166, 175, 191, 0.46);
}

.emoji-box:hover::before {
    opacity: 1;
}

.contact-content {
    display: flex;
    justify-content: center;
}

.contact-info {
    width: min(100%, 490px);
}

.contact-info > p {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 1.5rem;
}

.contact-link-big {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    border-radius: 18px;
    margin-bottom: 0.85rem;
    padding: 0;
    background: linear-gradient(160deg, rgba(17, 22, 34, 0.9), rgba(11, 15, 24, 0.95));
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.34s ease, border-color 0.34s ease;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.contact-link-big:hover {
    transform: translateY(-2px);
    border-color: rgba(166, 175, 191, 0.46);
    box-shadow: 0 20px 40px rgba(118, 126, 140, 0.22);
}

.contact-link-big img {
    width: 66px;
    height: 66px;
    margin: 7px;
    border-radius: 14px;
    background: #fff;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.contact-link-big:hover img {
    transform: scale(1.06);
}

.contact-link-big .contact-text {
    padding: 1rem 1rem 1rem 0.4rem;
}

.contact-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.contact-label {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.contact-value {
    font-size: 1rem;
    font-weight: 600;
}

footer {
    padding: 2.2rem 0 2.8rem;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.footer-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
}

.footer-role,
.footer-link {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-decoration: none;
}

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

.reveal {
    opacity: 0;
    transform: translateY(18px) scale(0.995);
    filter: blur(5px);
}

.reveal.in-view {
    opacity: 1;
    transform: none;
    filter: blur(0);
    transition: transform 0.95s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.9s ease, filter 0.9s ease;
    transition-delay: var(--delay, 0ms);
}

@keyframes ambientShift {
    0% {
        filter: hue-rotate(0deg) saturate(1);
    }
    100% {
        filter: hue-rotate(2deg) saturate(1.02);
    }
}

@keyframes orbFloat {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(6vw, -3vh) scale(1.06);
    }
}

@keyframes heroLevitate {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

@keyframes emojiPulse {
    0%,
    100% {
        transform: translateY(0) rotateX(0) rotateY(0);
    }
    50% {
        transform: translateY(-3px) rotateX(0.8deg) rotateY(-0.8deg);
    }
}

@media (max-width: 940px) {
    .hero-content,
    .emoji-content {
        grid-template-columns: 1fr;
    }

    .hero-image {
        max-width: 420px;
        margin-inline: auto;
        order: -1;
    }

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

@media (max-width: 768px) {
    nav {
        padding: 0.85rem 0;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(8, 10, 16, 0.97);
        border-bottom: 1px solid var(--border);
        backdrop-filter: blur(16px);
        display: flex;
        flex-direction: column;
        gap: 0;
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        overflow: hidden;
        padding: 0 1.5rem;
        transition: max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
    }

    .nav-links.active {
        max-height: 360px;
        opacity: 1;
        visibility: visible;
        padding: 0.9rem 1.5rem 1.2rem;
    }

    .nav-links li {
        opacity: 0;
        transform: translateY(-8px);
        transition: transform 0.35s ease, opacity 0.35s ease;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
    }

    .menu-btn {
        display: block;
    }

    .hero {
        padding-top: 92px;
    }

    section {
        padding: 6rem 0;
    }

    .hero-text h1 {
        font-size: clamp(2rem, 9vw, 3rem);
    }

    .hero-buttons {
        width: 100%;
    }

    .btn {
        flex: 1 1 100%;
    }

    .skills-grid,
    .emoji-showcase {
        grid-template-columns: 1fr;
    }

    .emoji-showcase {
        order: -1;
    }

    .emoji-box {
        min-height: 110px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
        filter: none;
    }

    .cursor-glow,
    .scroll-progress {
        display: none;
    }
}


