@import '/css/var.css';
@import '/css/theme-toggle.css';
@import '/css/header-animation.css';
@import '/css/buttons.css';

.header {
    position: relative;
    color: white;
    padding: 60px 30px;
    text-align: center;
}

.top-controls {
    position: absolute;
    top: 2rem;
    right: 2.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-switch {
    gap: 5px;
    font-size: 1rem;
    align-items: center;
    display: flex;
    justify-content: center;
}

.lang-active {
    font-weight: bold;
    cursor: default;
}

.lang-link {
    color: #fdfdfd;
    opacity: 0.7;
}

.lang-link:hover {
    opacity: 1;
}

.profile-container {
    max-width: 650px;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.profile-pic {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    object-position: 0px 0px;
}

.subtitle {
    font-size: 1.1rem;
    font-weight: 700;
}

.tagline {
    font-size: 0.95rem;
    max-width: 520px;
    line-height: 1.5;
    opacity: 0.9;
}

.nav-container {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

.nav-link {
    color: #fdfdfd;
    text-decoration: none;
    font-size: 0.95rem;
    opacity: 0.85;
    transition: opacity 0.15s;
}

.nav-link:hover {
    opacity: 1;
    text-decoration: underline;
}

section {
    padding: 3rem 0;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

section h2 {
    color: #1a73e8;
    margin-bottom: 18px;
    font-size: 1.9rem;
}

section p {
    line-height: 1.6;
    margin-bottom: 0.9rem;
}

.section-divider {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.08);

    width: 80%;
    margin: 0 auto;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}

.skill {
    padding: 10px 18px;
    background: #ddd;
    border-radius: 6px;
    font-weight: 700;
    color: #333;
    transition: background 0.15s, transform 0.12s, box-shadow 0.12s;
}

.skill:hover {
    background: #cfcfcf;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

div.skill:hover {
    background: #ddd;
    transform: translateY(0px);
    box-shadow: 0px 0px 0px;
}

.skill-container {
    margin-top: 22px;
}

.skill-level {
    width: 100%;
    max-width: 500px;
    margin: 8px auto;
    text-align: left;
    font-size: 0.95rem;
}

.skill-level span {
    display: inline-block;
    margin-bottom: 4px;
    font-weight: 700;
}

.skill-bar {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #ddd;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    border-radius: 999px;
    background: #1a73e8;
}

.skill-fill.c {
    width: 15.9%;
}

.skill-fill.cpp {
    width: 11.2%;
}

.skill-fill.java {
    width: 1.3%;
}

.skill-fill.web {
    width: 71.6%;
}

.learning-container ul {
    list-style: none;
    padding: 0rem 2rem;
    margin: 1.5rem auto;
    display: grid;
    gap: 1rem;
    max-width: 600px;
}

.learning-container li {
    padding: 1rem 0.6rem;
    border-radius: 0.6rem;
    background: white;
    border-left: 5px solid #1a73e8;
    line-height: 1.5;
}

.project-section {
    margin-top: 2rem;
}

.project-section h3 {
    color: #0077cc;
    font-size: 2rem;
    margin-bottom: 30px;
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    justify-items: stretch;
    align-items: stretch;
}

.project-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    transform-origin: center center;
    align-items: center;
}

.project-card:hover {
    transform: scale(1.04);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

.project-card h4 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.project-title-link {
    color: #0077cc;
}

.project-card p {
    color: #444;
    font-size: 0.98rem;
    margin-bottom: 6px;
}

.project-tech-list {
    margin: auto;
    text-align: left;
    padding: 1rem;
    font-size: 0.95rem;
}

.contact p {
    font-size: 1rem;
    margin-bottom: 8px;
}

.contact a {
    color: #1a73e8;
}

.contact-form {
    margin-top: 18px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.form-row {
    margin-bottom: 10px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-family: inherit;
    font-size: 0.95rem;
}

.form-btn {
    margin-top: 4px;
    width: 100%;
}

.contact-feedback {
    margin-top: 10px;
    font-size: 0.9rem;
}

/* ---------- Tablet (<= 1024px) ---------- */
@media (max-width: 1024px) {
    .header {
        padding: 70px 20px;
    }

    .top-controls {
        top: 1.5rem;
        right: 1.5rem;
    }

    section {
        padding: 2.5rem 1.5rem;
    }

    .project-grid {
        justify-content: center;
        grid-template-columns: 80%;
        gap: 2rem;
    }
}

/* ---------- Mobile (<= 768px) ---------- */
@media (max-width: 768px) {
    .skill-level {
        max-width: 80%;
        font-size: 0.9rem;
    }

    .back-to-top {
        width: 3.2rem;
        height: 3.2rem;
        bottom: 2rem;
        right: 1.5rem;
    }

    /* extra */
    .container-buttons {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* ---------- Small Mobile (<= 480px) ---------- */
@media (max-width: 480px) {
    .project-grid {
        justify-content: center;
        grid-template-columns: 90%;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .tagline {
        font-size: 0.85rem;
    }

    section {
        padding: 2rem 0.8rem;
    }

    .nav-link {
        padding: 0.4rem 0;
        font-size: 1rem;
    }
}
