
/* =========================
   RESET & GLOBAL
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6c63ff;
    --primary-dark: #5148e5;
    --dark: #171725;
    --text: #5f6072;
    --light: #f7f7fc;
    --white: #ffffff;
    --border: #e9e9f2;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--white);
    color: var(--dark);
    line-height: 1.7;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.container {
    width: min(1120px, 90%);
    margin-inline: auto;
}

.section {
    padding-top: 100px;
    padding-bottom: 100px;
}

/* =========================
   NAVBAR
========================= */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.navbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* =========================
   HERO
========================= */
.hero {
    min-height: 650px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 70px;
    padding-top: 75px;
    padding-bottom: 90px;
}

.greeting,
.section-label {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
}

.hero h1 {
    margin-top: 18px;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.15;
    letter-spacing: -2px;
}

.hero h1 span {
    color: var(--primary);
}

.hero h2 {
    margin-top: 12px;
    font-size: clamp(20px, 2.5vw, 28px);
    font-weight: 600;
}

.description {
    max-width: 520px;
    margin-top: 22px;
    color: var(--text);
    font-size: 16px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 12px 24px;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

.btn-outline {
    border-color: var(--border);
    color: var(--dark);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.hero-image {
    position: relative;
    max-width: 390px;
    width: 100%;
    margin: auto;
}

.image-frame {
    padding: 12px;
    background: #ecebff;
    border-radius: 32px;
    transform: rotate(3deg);
}

.image-frame img {
    width: 100%;
    height: 430px;
    object-fit: cover;
    object-position: center;
    border-radius: 24px;
}

.floating-card {
    position: absolute;
    bottom: 28px;
    left: -45px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(30, 30, 70, 0.12);
}

.floating-card > span {
    font-size: 28px;
}

.floating-card strong {
    font-size: 13px;
}

.floating-card p {
    color: var(--text);
    font-size: 11px;
}

/* =========================
   ABOUT
========================= */
.about {
    background: var(--light);
    text-align: center;
}

.section-title {
    margin-top: 8px;
    font-size: clamp(30px, 4vw, 42px);
    letter-spacing: -1px;
    line-height: 1.3;
}

.about-content {
    max-width: 760px;
    margin: 28px auto 0;
    color: var(--text);
}

.about-content p + p {
    margin-top: 16px;
}

.about-content strong {
    color: var(--dark);
}

/* =========================
   SKILLS
========================= */
#skills {
    text-align: center;
}

.section-description {
    margin-top: 12px;
    color: var(--text);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 45px;
    text-align: left;
}

.skill-card {
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--white);
    transition: transform 0.3s, box-shadow 0.3s;
}

.skill-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 35px rgba(35, 35, 80, 0.08);
}

.skill-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
    border-radius: 14px;
    font-size: 25px;
    font-weight: 800;
}

.html-icon {
    background: #fff0e8;
    color: #e76528;
}

.css-icon {
    background: #e8f0ff;
    color: #2867d8;
}

.js-icon {
    background: #fff7d9;
    color: #9b7a00;
    font-size: 18px;
}

.skill-card h3 {
    font-size: 20px;
}

.skill-card p {
    margin-top: 8px;
    color: var(--text);
    font-size: 14px;
}

/* =========================
   PROJECTS
========================= */
.projects {
    background: var(--light);
    text-align: center;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 45px;
    text-align: left;
}

.project-card {
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 35px rgba(35, 35, 80, 0.08);
}

.project-image {
    height: 190px;
    display: grid;
    place-items: center;
}

.project-image span {
    font-size: 65px;
    transition: transform 0.3s;
}

.project-card:hover .project-image span {
    transform: scale(1.12);
}

.project-one {
    background: linear-gradient(135deg, #dcd9ff, #f1efff);
}

.project-two {
    background: linear-gradient(135deg, #ffe3d5, #fff0e8);
}

.project-three {
    background: linear-gradient(135deg, #d6f4ed, #e9fbf7);
}

.project-info {
    padding: 24px;
}

.project-category {
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.project-info h3 {
    margin-top: 8px;
    font-size: 20px;
}

.project-info > p:not(.project-category) {
    margin-top: 10px;
    color: var(--text);
    font-size: 14px;
}

.project-link {
    display: inline-block;
    margin-top: 18px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

.project-link:hover {
    color: var(--primary-dark);
}

/* =========================
   CONTACT
========================= */
.contact-box {
    padding: 60px 24px;
    border-radius: 24px;
    background: #f0efff;
    text-align: center;
}

.contact-box h2 {
    margin-top: 12px;
    font-size: clamp(27px, 4vw, 40px);
    line-height: 1.3;
}

.contact-box > p:not(.section-label) {
    max-width: 530px;
    margin: 16px auto 26px;
    color: var(--text);
}

/* =========================
   FOOTER
========================= */
.footer {
    border-top: 1px solid var(--border);
}

.footer-content {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 20px;
    padding-bottom: 20px;
}

.footer .logo {
    font-size: 23px;
}

.footer p,
.back-to-top {
    color: var(--text);
    font-size: 12px;
}

.back-to-top:hover {
    color: var(--primary);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 850px) {
    .nav-links {
        gap: 16px;
    }

    .hero {
        gap: 35px;
    }

    .image-frame img {
        height: 350px;
    }

    .floating-card {
        left: -15px;
    }

    .skills-grid,
    .projects-grid {
        gap: 16px;
    }

    .skill-card,
    .project-info {
        padding: 20px;
    }
}

@media (max-width: 650px) {
    .section {
        padding-top: 70px;
        padding-bottom: 70px;
    }

    .navbar {
        min-height: auto;
        padding-top: 18px;
        padding-bottom: 18px;
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .nav-links {
        width: 100%;
        flex-wrap: wrap;
        gap: 10px 18px;
    }

    .nav-links a {
        font-size: 12px;
    }

    .hero {
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 55px;
        padding-top: 65px;
        padding-bottom: 70px;
    }

    .hero h1 {
        font-size: 43px;
    }

    .hero-image {
        width: 85%;
        max-width: 330px;
    }

    .image-frame img {
        height: 350px;
    }

    .floating-card {
        left: -20px;
        bottom: 20px;
        padding: 12px 14px;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .skill-card {
        padding: 26px;
    }

    .project-image {
        height: 210px;
    }

    .footer-content {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 8px;
    }

    .contact-box {
        padding: 45px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}
