
/* ===== GENERAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

:root {
    --purple: #8064D9;
    --purple-dark: #6246B5;
    --coral: #FF8B78;
    --lavender: #F0EBFF;
    --background: #F8F6FF;
    --white: #FFFFFF;
    --text: #29243A;
    --muted: #716C80;
    --border: #E8E1F5;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font: inherit;
}

section {
    scroll-margin-top: 85px;
}

/* ===== NAVIGATION ===== */
header {
    background: rgba(248, 246, 255, 0.94);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.navbar {
    max-width: 1150px;
    margin: auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
}

.logo span {
    color: var(--coral);
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-links a {
    font-size: 0.92rem;
    font-weight: 600;
    transition: color 0.25s;
}

.nav-links a:hover {
    color: var(--purple);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    background: var(--purple);
    color: white;
    padding: 13px 25px;
    border: 2px solid var(--purple);
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.25s, background 0.25s,
                box-shadow 0.25s;
}

.btn:hover {
    background: var(--purple-dark);
    border-color: var(--purple-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(128, 100, 217, 0.2);
}

/* ===== HERO SECTION ===== */
.hero {
    max-width: 1150px;
    min-height: 590px;
    margin: auto;
    padding: 80px 24px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 55px;
}

.eyebrow {
    color: var(--purple);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.hero h1 {
    font-size: clamp(2.8rem, 6vw, 4.7rem);
    line-height: 1.15;
    letter-spacing: -2px;
    margin-bottom: 14px;
}

.hero h1 span {
    color: var(--purple);
}

.hero h2 {
    font-size: 1.45rem;
    margin-bottom: 16px;
}

.hero-text > p:not(.eyebrow) {
    color: var(--muted);
    max-width: 510px;
    margin-bottom: 28px;
}

.hero-art {
    min-height: 370px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle {
    width: 290px;
    height: 290px;
    border-radius: 48% 52% 57% 43%;
    background: linear-gradient(135deg, #E6D9FF, #FFDCD5);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: float 4s ease-in-out infinite;
}

.emoji {
    font-size: 8rem;
    filter: drop-shadow(0 10px 8px rgba(41, 36, 58, 0.1));
}

.floating {
    position: absolute;
    font-size: 3rem;
    color: var(--purple);
    animation: float 3s ease-in-out infinite;
}

.star {
    top: 28px;
    left: 20%;
}

.heart {
    top: 65px;
    right: 8%;
    color: var(--coral);
}

.sparkle {
    bottom: 45px;
    left: 12%;
    animation-delay: 0.5s;
}

.hello-tag {
    position: absolute;
    right: 0;
    bottom: 55px;
    background: white;
    padding: 12px 20px;
    border-radius: 14px;
    box-shadow: 0 8px 25px rgba(41, 36, 58, 0.08);
    font-weight: 700;
    transform: rotate(-5deg);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

/* ===== COMMON SECTION STYLES ===== */
.section {
    padding: 90px 24px;
    text-align: center;
}

.section h2,
.fun-section h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.25;
    margin-bottom: 16px;
}

.section-description {
    max-width: 650px;
    margin: 0 auto 40px;
    color: var(--muted);
}

/* ===== ABOUT ===== */
.about {
    background: white;
}

.about-cards {
    max-width: 1000px;
    margin: 45px auto 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.mini-card {
    padding: 30px 22px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--background);
    transition: transform 0.25s, box-shadow 0.25s;
}

.mini-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 12px 25px rgba(41, 36, 58, 0.08);
}

.mini-card span {
    font-size: 2.5rem;
}

.mini-card h3 {
    margin: 12px 0 8px;
}

.mini-card p {
    color: var(--muted);
    font-size: 0.95rem;
}

/* ===== SKILLS ===== */
.skills-container {
    max-width: 680px;
    margin: 40px auto 20px;
    text-align: left;
}

.skill {
    margin-bottom: 27px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    font-weight: 700;
    margin-bottom: 9px;
}

.skill-info span:last-child {
    color: var(--purple);
}

.skill-track {
    height: 12px;
    background: #E9E4F4;
    border-radius: 20px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    width: 0;
    border-radius: 20px;
    animation: fillBar 1.5s ease-out forwards;
}

.html {
    --level: 80%;
    background: var(--purple);
}

.css {
    --level: 70%;
    background: var(--coral);
    animation-delay: 0.15s;
}

.javascript {
    --level: 45%;
    background: #E6B94F;
    animation-delay: 0.3s;
}

.communication {
    --level: 85%;
    background: #6CBF9B;
    animation-delay: 0.45s;
}

@keyframes fillBar {
    from {
        width: 0;
    }
    to {
        width: var(--level);
    }
}

.note {
    color: var(--muted);
    font-size: 0.82rem;
    margin-top: 25px;
}

/* ===== PROJECT CARDS ===== */
.projects-section {
    background: white;
}

.project-grid {
    max-width: 1050px;
    margin: 40px auto 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    text-align: left;
}

.project-card {
    min-width: 0;
    min-height: 315px;
    padding: 27px;
    border: 1px solid transparent;
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    color: var(--text);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover,
.project-card:focus-visible {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(41, 36, 58, 0.1);
}

.project-card:focus-visible,
.btn:focus-visible,
.close-btn:focus-visible {
    outline: 3px solid var(--purple);
    outline-offset: 4px;
}

.project-one {
    background: #FFF0EC;
}

.project-two {
    background: #F0EBFF;
}

.project-three {
    background: #E9F7F0;
}

.project-icon {
    font-size: 3.3rem;
    margin-bottom: 20px;
}

.project-icon svg {
    display: block;
    width: 1em;
    height: 1em;
}

.project-category {
    color: var(--purple-dark);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.3px;
}

.project-title {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 7px 0;
}

.project-description {
    font-size: 0.93rem;
    color: var(--muted);
    margin-bottom: 18px;
}

.project-link {
    margin-top: auto;
    color: var(--purple-dark);
    font-weight: 800;
}

/* ===== PROJECT DETAILS ===== */
.project-details {
    position: relative;
    max-width: 800px;
    margin: 35px auto 0;
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--background);
    text-align: left;
    animation: appear 0.3s ease-out;
}

.project-details[hidden] {
    display: none;
}

.project-details h3 {
    font-size: 1.4rem;
    padding-right: 35px;
    margin-bottom: 12px;
}

.project-details p {
    color: var(--muted);
    margin-bottom: 10px;
}

.project-details .detail-tech {
    color: var(--purple-dark);
    font-weight: 700;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    background: #E9E2FA;
    color: var(--text);
    cursor: pointer;
}

@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== FUN FACTS ===== */
.fun-section {
    padding: 85px 24px;
    text-align: center;
    background: linear-gradient(135deg, #EEE7FF, #FFECE6);
}

.fun-content {
    max-width: 700px;
    margin: auto;
}

.fun-section > div > p:not(.eyebrow) {
    color: var(--muted);
    margin: 15px 0 25px;
}

.fun-fact {
    max-width: 550px;
    min-height: 65px;
    margin: 28px auto 0;
    padding: 18px;
    border-radius: 14px;
    background: white;
    color: var(--text);
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(41, 36, 58, 0.05);
}

/* ===== CONTACT ===== */
.contact-section {
    background: var(--background);
}

.contact-section .btn {
    margin-top: 5px;
}

/* ===== FOOTER ===== */
footer {
    background: #29243A;
    color: #F8F6FF;
    padding: 25px 20px;
    text-align: center;
    font-size: 0.9rem;
}

footer p + p {
    color: #C5BED7;
    font-size: 0.8rem;
    margin-top: 5px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 800px) {
    .navbar {
        flex-direction: column;
        gap: 10px;
    }

    .nav-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px 20px;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
        padding-top: 65px;
    }

    .hero-text > p:not(.eyebrow) {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-art {
        min-height: 330px;
    }

    .circle {
        width: 245px;
        height: 245px;
    }

    .emoji {
        font-size: 6.5rem;
    }

    .about-cards {
        grid-template-columns: 1fr;
        max-width: 450px;
    }

    .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .navbar {
        padding: 15px;
    }

    .nav-links {
        gap: 8px 14px;
    }

    .nav-links a {
        font-size: 0.82rem;
    }

    .hero {
        padding: 55px 20px;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero h2 {
        font-size: 1.2rem;
    }

    .hero-art {
        min-height: 290px;
    }

    .circle {
        width: 215px;
        height: 215px;
    }

    .emoji {
        font-size: 5.5rem;
    }

    .hello-tag {
        right: 0;
        bottom: 25px;
    }

    .section {
        padding: 65px 20px;
    }

    .project-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .project-card {
        min-height: 275px;
    }

    .project-details {
        padding: 25px 20px;
    }

    .fun-section {
        padding: 65px 20px;
    }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}