/* ================= RESET ================= */
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins',sans-serif;
}
html{
    font-size:62.5%;
    scroll-behavior:smooth;
}

/* ================= THEME ================= */
:root{
    --bg:#000;
    --text:#fff;
    --subtext:#aaa;
    --card:#161616;
    --main:#b74b4b;
    --header-bg:rgba(0,0,0,0.9);
}

body.light{
    --bg:#ffffff;
    --text:#111111;
    --subtext:#555;
    --card:#f2f2f2;
    --header-bg:#ffffff;
}

/* ================= BODY ================= */
body{
    background:var(--bg);
    color:var(--text);
    transition:0.3s;
}

/* ================= HEADER ================= */
header{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    padding:2rem 9%;
    display:flex;
    align-items:center;
    justify-content:space-between;
    background:var(--header-bg);
    z-index:100;
    transition:0.3s;
}

.logo{
    font-size:3rem;
    font-weight:700;
    color:var(--main);
    cursor:pointer;
}

/* NAV */
nav a{
    font-size:1.6rem;
    margin-left:3rem;
    color:var(--text);
    text-decoration:none;      /* ❌ không gạch chân */
    font-weight:500;
    transition:0.3s;
}

nav a:hover{
    color:var(--main);
}

/* THEME ICON */
#theme-toggle{
    font-size:2rem;
    color:var(--text);
    cursor:pointer;
}

/* ================= SECTION ================= */
section{
    min-height:100vh;
    padding:9rem 9% 5rem;
}

.title{
    text-align:center;
    font-size:4rem;
    margin-bottom:4rem;
}

span{
    color:var(--main);
}

/* ================= HOME ================= */
.home{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:6rem;
}

.home h1{
    font-size:5.2rem;
}

.home h3{
    font-size:3rem;
    margin:1rem 0;
}

.home p{
    font-size:1.6rem;
    color:var(--subtext);
    max-width:500px;
    line-height:1.8;
}

.home img{
    width:30vw;
    border-radius:50%;
    box-shadow:0 0 15px rgba(183,75,75,0.6);
}

/* SOCIAL */
.social a{
    display:inline-flex;
    width:4rem;
    height:4rem;
    border:2px solid var(--main);
    border-radius:50%;
    align-items:center;
    justify-content:center;
    color:var(--main);
    margin:2rem 1rem 2rem 0;
    text-decoration:none;
    transition:0.3s;
}

.social a:hover{
    background:var(--main);
    color:#fff;
}

/* BUTTON */
.btn{
    display:inline-block;
    padding:1rem 3rem;
    border:2px solid var(--main);
    border-radius:3rem;
    color:var(--main);
    text-decoration:none;
    font-size:1.6rem;
    transition:0.3s;
}

.btn:hover{
    background:var(--main);
    color:#fff;
}

/* ================= SERVICES ================= */
.services-box{
    display:flex;
    justify-content:center;
    gap:3rem;
    flex-wrap:wrap;
}

.service{
    width:28rem;
    padding:3rem;
    background:var(--card);
    border-radius:2rem;
    text-align:center;
    transition:0.3s;
}

.service i{
    font-size:4rem;
    color:var(--main);
    margin-bottom:1rem;
}

.service h3{
    font-size:2.2rem;
    margin-bottom:1rem;
}

.service p{
    font-size:1.4rem;
    color:var(--subtext);
}

.service:hover{
    transform:translateY(-10px);
    box-shadow:0 0 20px rgba(183,75,75,0.5);
}

/* ================= SKILLS ================= */
.skill{
    max-width:600px;
    margin:auto;
}

.skill p{
    font-size:1.6rem;
}

.bar{
    width:100%;
    height:10px;
    background:#333;
    border-radius:5px;
    margin:1rem 0 2rem;
}

.bar span{
    display:block;
    height:100%;
    background:var(--main);
    border-radius:5px;
}

/* ================= BOX ================= */
.box{
    max-width:700px;
    margin:auto;
    background:var(--card);
    padding:3rem;
    border-radius:2rem;
}

.box h3{
    font-size:2.2rem;
    margin-bottom:1rem;
}

.box p{
    font-size:1.5rem;
    color:var(--subtext);
}

/* ================= CONTACT ================= */
form{
    max-width:600px;
    margin:auto;
    display:flex;
    flex-direction:column;
    gap:2rem;
}

input,
textarea{
    padding:1.5rem;
    font-size:1.5rem;
    background:var(--card);
    color:var(--text);
    border:none;
    border-radius:1rem;
    outline:none;
}

/* ================= SCROLL ANIMATION ================= */
.reveal{
    opacity:0;
    transform:translateY(50px);
    transition:1s;
}

.reveal.active{
    opacity:1;
    transform:translateY(0);
}

/* ================= RESPONSIVE ================= */
@media(max-width:900px){
    .home{
        flex-direction:column;
        text-align:center;
    }

    .home img{
        width:70vw;
    }

    nav a{
        margin-left:1.5rem;
    }
}
