﻿:root {
    --bg: #f6f8f4;
    --paper: rgba(255, 255, 255, 0.9);
    --text-main: #161c16;
    --text-soft: #4d574d;
    --stroke: rgba(31, 46, 31, 0.1);
    --brand: #e66a2f;
    --brand-deep: #b24a1d;
    --accent: #1f6b5b;
    --glow: rgba(230, 106, 47, 0.22);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Sora", "Segoe UI", sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at 15% 15%, rgba(255, 198, 145, 0.38) 0%, rgba(255, 198, 145, 0) 45%),
        radial-gradient(circle at 85% 5%, rgba(117, 199, 178, 0.34) 0%, rgba(117, 199, 178, 0) 42%),
        linear-gradient(165deg, #f6f8f4 0%, #ecefe7 100%);
    min-height: 100vh;
    padding: 32px 20px;
    line-height: 1.6;
    overflow-x: hidden;
}

.bg-shape {
    position: fixed;
    z-index: -1;
    pointer-events: none;
    filter: blur(34px);
}

.bg-shape-left {
    width: 220px;
    height: 220px;
    left: -68px;
    top: 160px;
    background: rgba(230, 106, 47, 0.32);
    border-radius: 42% 58% 65% 35% / 43% 42% 58% 57%;
    animation: drift-left 16s ease-in-out infinite alternate;
}

.bg-shape-right {
    width: 280px;
    height: 280px;
    right: -88px;
    top: 58%;
    background: rgba(31, 107, 91, 0.28);
    border-radius: 56% 44% 31% 69% / 52% 58% 42% 48%;
    animation: drift-right 18s ease-in-out infinite alternate;
}

.site {
    width: min(1120px, 100%);
    margin: 0 auto;
    background: var(--paper);
    border: 1px solid var(--stroke);
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(22, 28, 22, 0.11);
    padding: 26px;
    animation: fade-in-up 0.8s ease;
}

.topbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.brand,
.menu,
.top-actions {
    opacity: 0;
    animation: fade-in-down 0.7s ease forwards;
}

.brand {
    animation-delay: 0.15s;
}

.menu {
    animation-delay: 0.26s;
}

.top-actions {
    animation-delay: 0.36s;
}

.brand {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.menu {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.menu a {
    color: var(--text-soft);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.menu a:hover {
    background: rgba(31, 107, 91, 0.1);
    color: var(--accent);
}

.top-link {
    font-size: 0.92rem;
    text-decoration: none;
    color: var(--accent);
    font-weight: 700;
    border-bottom: 2px solid transparent;
    transition: border-color 0.22s ease;
}

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

.top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-toggle {
    min-height: 40px;
    min-width: 58px;
    padding: 8px 12px;
}

.hero {
    display: grid;
    grid-template-columns: 290px 1fr;
    align-items: center;
    gap: 24px;
    padding: 12px;
}

.hero-content {
    opacity: 0;
    animation: fade-in-up 0.75s ease forwards;
    animation-delay: 0.45s;
}

.avatar-wrap {
    position: relative;
    overflow: hidden;
    width: 100%;
    border-radius: 24px;
    background: linear-gradient(140deg, #f2cab2 0%, #f7f5ed 48%, #d7eee8 100%);
    border: 1px solid rgba(31, 46, 31, 0.12);
    padding: 16px;
    box-shadow: 0 16px 36px rgba(43, 52, 43, 0.14);
    opacity: 0;
    animation: fade-in-up 0.75s ease forwards, avatar-float 6.5s ease-in-out infinite;
    animation-delay: 0.35s, 1.1s;
}

.avatar-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, 0.38) 50%, rgba(255, 255, 255, 0) 65%);
    transform: translateX(-120%);
    animation: sheen 4.4s ease-in-out infinite;
    animation-delay: 1.3s;
    pointer-events: none;
}

.avatar-wrap img {
    width: 100%;
    border-radius: 14px;
    display: block;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.hero-content h1 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    line-height: 1.15;
    margin-bottom: 14px;
    max-width: 16ch;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(31, 107, 91, 0.1);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.lead {
    color: var(--text-soft);
    font-size: clamp(0.97rem, 1.9vw, 1.08rem);
    max-width: 58ch;
    margin-bottom: 18px;
}

.quick-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.quick-tags li {
    border: 1px solid rgba(31, 46, 31, 0.15);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.84rem;
    color: #2e3730;
    background: #f9faf6;
    opacity: 0;
    animation: fade-in-up 0.5s ease forwards;
}

.quick-tags li:nth-child(1) {
    animation-delay: 0.6s;
}

.quick-tags li:nth-child(2) {
    animation-delay: 0.7s;
}

.quick-tags li:nth-child(3) {
    animation-delay: 0.8s;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    border: 0;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, #f18b4a 0%, var(--brand) 100%);
    color: #fff;
    box-shadow: 0 12px 24px var(--glow);
}

.btn-primary:hover {
    box-shadow: 0 16px 28px var(--glow);
}

.btn-ghost {
    color: var(--brand-deep);
    border: 1px solid rgba(178, 74, 29, 0.35);
    background: rgba(255, 255, 255, 0.64);
}

.btn-ghost:hover {
    background: rgba(230, 106, 47, 0.08);
}

.stats {
    margin-top: 18px;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats article {
    background: #ffffff;
    border: 1px solid rgba(31, 46, 31, 0.1);
    border-radius: 14px;
    padding: 16px;
}

.stats h2 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.6rem;
    line-height: 1;
    margin-bottom: 5px;
}

.stats p {
    font-size: 0.88rem;
    color: var(--text-soft);
}

.focus,
.skills,
.projects,
.contact {
    margin-top: 24px;
}

.focus {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.focus-card,
.project-card,
.skill-card,
.contact-form,
.contact-panel {
    background: #ffffff;
    border: 1px solid rgba(31, 46, 31, 0.1);
    border-radius: 18px;
    padding: 20px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.focus-card:hover,
.project-card:hover,
.skill-card:hover,
.contact-panel:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px rgba(22, 28, 22, 0.09);
}

.focus-card h2,
.section-head h2,
.project-card h3,
.skill-card h3,
.contact-panel h3 {
    font-family: "Space Grotesk", sans-serif;
}

.focus-card h2 {
    font-size: 1.12rem;
    margin-bottom: 8px;
}

.focus-card p,
.project-card p,
.contact-panel p {
    color: var(--text-soft);
    font-size: 0.94rem;
}

.section-head h2 {
    font-size: clamp(1.3rem, 3vw, 2rem);
    line-height: 1.2;
    margin-bottom: 10px;
}

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

.skill-card h3 {
    font-size: 1.06rem;
    margin-bottom: 10px;
}

.skill-card ul {
    list-style: none;
    display: grid;
    gap: 9px;
}

.skill-card li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-soft);
}

.skill-card span {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    color: var(--accent);
    background: rgba(31, 107, 91, 0.12);
}

.project-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-tag {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(31, 107, 91, 0.1);
    padding: 4px 8px;
    border-radius: 999px;
}

.project-card h3 {
    font-size: 1.04rem;
    margin-bottom: 8px;
}

.project-stack {
    list-style: none;
    margin-top: 12px;
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.project-stack li {
    font-size: 0.77rem;
    color: #2f3932;
    background: #f4f6ef;
    border: 1px solid rgba(31, 46, 31, 0.15);
    border-radius: 999px;
    padding: 4px 8px;
}

.project-links {
    margin-top: 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.project-links a {
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--brand-deep);
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(230, 106, 47, 0.1);
}


.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 14px;
}

.contact-form {
    display: grid;
    gap: 8px;
}

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

.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1px solid rgba(31, 46, 31, 0.18);
    border-radius: 10px;
    padding: 11px 12px;
    font: inherit;
    color: var(--text-main);
    background: #fdfdfb;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: 2px solid rgba(230, 106, 47, 0.3);
    border-color: rgba(230, 106, 47, 0.5);
}

.contact-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-panel a {
    text-decoration: none;
    color: var(--brand-deep);
    font-weight: 700;
}

.contact-note {
    font-size: 0.86rem;
    margin-top: 8px;
}

.footer {
    margin-top: 24px;
    padding: 16px 6px 2px;
    border-top: 1px dashed rgba(31, 46, 31, 0.18);
    display: flex;
    justify-content: center;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--text-soft);
}

.reveal {
    opacity: 0;
    transform: translateY(20px) scale(0.985);
    transition: opacity 700ms cubic-bezier(0.18, 0.89, 0.32, 1.02), transform 700ms cubic-bezier(0.18, 0.89, 0.32, 1.02);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

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

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in-down {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes drift-left {
    0% {
        transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
    }
    100% {
        transform: translate3d(44px, -24px, 0) rotate(8deg) scale(1.08);
    }
}

@keyframes drift-right {
    0% {
        transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
    }
    100% {
        transform: translate3d(-52px, 20px, 0) rotate(-9deg) scale(1.09);
    }
}

@keyframes avatar-float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-7px);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes sheen {
    0%,
    20% {
        transform: translateX(-120%);
    }
    55% {
        transform: translateX(120%);
    }
    100% {
        transform: translateX(120%);
    }
}

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

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

@media (max-width: 980px) {
    .topbar {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 10px;
    }

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

    .avatar-wrap {
        width: min(360px, 100%);
        margin: 0 auto;
    }

    .hero-content {
        text-align: center;
    }

    .hero-content h1 {
        margin-inline: auto;
    }

    .lead {
        margin-left: auto;
        margin-right: auto;
    }

    .quick-tags,
    .cta-row,
    .menu,
    .top-actions {
        justify-content: center;
    }

    .stats,
    .focus,
    .skills-grid,
    .project-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 520px) {
    body {
        padding: 18px 12px;
    }

    .site {
        border-radius: 22px;
        padding: 16px;
    }

    .menu {
        flex-wrap: wrap;
    }

    .top-actions {
        width: 100%;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
