/* Modern Color Palette & Variables */
:root {
    /* Default Dark Theme Variables */
    --bg-color: #0f172a;
    --second-bg-color: #1e293b;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --main-color: #38bdf8;
    /* Sky blue */
    --accent-color: #0ea5e9;
    --glass-bg: rgba(15, 23, 42, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

@media (prefers-color-scheme: light) {
    :root {
        /* Light Theme Overrides */
        --bg-color: #f8fafc;
        --second-bg-color: #ffffff;
        --text-color: #0f172a;
        --text-muted: #64748b;
        --main-color: #0284c7;
        /* Darker blue for contrast on white */
        --accent-color: #0369a1;
        --glass-bg: rgba(255, 255, 255, 0.8);
        --border-color: rgba(0, 0, 0, 0.1);
        --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    }
}

/* Reset & Base Styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
}

html {
    font-size: 62.5%;
    /* 1rem = 10px */
    overflow-x: hidden;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-color);
}

p {
    color: var(--text-muted);
    font-size: 1.6rem;
}

span.highlight {
    color: var(--main-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 1.2rem 2.8rem;
    background: var(--main-color);
    border-radius: 0.8rem;
    font-size: 1.6rem;
    color: #fff;
    /* Always white text on colored button */
    font-weight: 600;
    letter-spacing: 0.05rem;
    transition: all 0.3s ease;
    gap: 1rem;
    box-shadow: 0 4px 14px 0 rgba(14, 165, 233, 0.39);
}

.btn:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.23);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--main-color);
    color: var(--main-color);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--main-color);
    color: #fff;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    transition: padding 0.3s ease;
}

.header.sticky {
    padding: 1.2rem 9%;
    background: var(--second-bg-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 2.4rem;
    color: var(--text-color);
    font-weight: 700;
    letter-spacing: -0.05rem;
}

.navbar a {
    font-size: 1.6rem;
    color: var(--text-color);
    margin-left: 3.5rem;
    font-weight: 500;
    transition: 0.3s;
    position: relative;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    margin-left: 3.5rem;
    gap: 0.5rem;
    border-left: 1px solid var(--text-muted);
    padding-left: 1.5rem;
}

.lang-btn {
    background: transparent;
    color: var(--text-muted);
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    font-family: var(--font-body);
    padding: 0;
}

.lang-btn.active,
.lang-btn:hover {
    color: var(--main-color);
}

.lang-switch span {
    color: var(--text-muted);
    font-size: 1.4rem;
}

/* Hamburger */
.hamburger {
    display: none;
    font-size: 2.5rem;
    color: var(--text-color);
    cursor: pointer;
}

/* Common Section Layout */
section {
    min-height: 100vh;
    padding: 10rem 9% 6rem;
    display: flex;
    /* Ensures vertical centering for small sections */
    flex-direction: column;
    justify-content: center;
}

.section-title {
    text-align: center;
    font-size: 4rem;
    margin-bottom: 5rem;
    margin-top: 2rem;
}

.section-subtitle {
    display: block;
    text-align: center;
    font-size: 1.6rem;
    color: var(--main-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    margin-bottom: 1rem;
}

/* Home Section */
.home {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 5rem;
    padding-top: 14rem;
}

.home-content {
    max-width: 60rem;
}

.home-content h3 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.home-content h1 {
    font-size: 6rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--main-color), #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    /* Fix lint */
    -webkit-text-fill-color: transparent;
}

.home-content p {
    font-size: 1.8rem;
    margin-bottom: 3.5rem;
    line-height: 1.7;
}

.home-buttons {
    display: flex;
    gap: 2rem;
}

.home-img {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-img img {
    width: 90%;
    border-radius: 50%;
    z-index: 2;
    border: 4px solid var(--second-bg-color);
    box-shadow: var(--card-shadow);
}

/* Decorative circle background */
.home-img::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--main-color);
    opacity: 0.1;
    z-index: 1;
    filter: blur(40px);
}

/* About / CV Section */
.about {
    background: var(--second-bg-color);
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.cv-block {
    margin-bottom: 3rem;
}

.cv-block h3 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--main-color);
    padding-left: 1.5rem;
}

.cv-item {
    margin-bottom: 2rem;
    padding-left: 2rem;
    position: relative;
}

.cv-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1rem;
    width: 6px;
    height: 6px;
    background: var(--main-color);
    border-radius: 50%;
}

.cv-item h4 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.cv-item .date {
    font-size: 1.4rem;
    color: var(--main-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-tag {
    padding: 0.8rem 1.5rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--text-color);
    transition: 0.3s;
}

.skill-tag:hover {
    border-color: var(--main-color);
    color: var(--main-color);
}


/* Portfolio Section */
.portfolio {
    background: var(--bg-color);
}

.portfolio-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--second-bg-color);
    padding: 2.5rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border-color);
    transition: 0.4s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
    border-color: var(--main-color);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.folder-icon {
    font-size: 3rem;
    color: var(--main-color);
}

.project-links a {
    font-size: 2rem;
    color: var(--text-muted);
    margin-left: 1.5rem;
    transition: 0.3s;
}

.project-links a:hover {
    color: var(--main-color);
}

.project-card h3 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.project-card p {
    font-size: 1.6rem;
    margin-bottom: 2rem;
    flex-grow: 1;
    /* Pushes content down so footer aligns */
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: auto;
    font-size: 1.4rem;
    color: var(--text-muted);
    font-family: var(--font-heading);
}

/* Hobbies Section */
.hobbies {
    background: var(--second-bg-color);
}

.hobbies-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
}

.hobby-card {
    background: var(--second-bg-color);
    padding: 3rem 2rem;
    border-radius: 1.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: 0.3s;
}

.hobby-card:hover {
    transform: translateY(-5px);
    border-color: var(--main-color);
    box-shadow: var(--card-shadow);
}

.hobby-card i {
    font-size: 4rem;
    color: var(--main-color);
    margin-bottom: 2rem;
}

.hobby-card h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.hobby-card p {
    font-size: 1.5rem;
}

/* Contact Section */
.contact {
    background: var(--bg-color);
    text-align: center;
}

.contact-content {
    max-width: 700px;
    margin: 0 auto;
}

.contact-box {
    background: var(--second-bg-color);
    padding: 4rem;
    border-radius: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

.social-links {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-links a {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: var(--main-color);
    border: 1px solid var(--border-color);
    transition: 0.3s;
}

.social-links a:hover {
    background: var(--main-color);
    color: white;
    border-color: var(--main-color);
}

/* Footer */
.footer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    background: var(--second-bg-color);
    padding: 2rem 9%;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-text p {
    font-size: 1.4rem;
}

.footer-iconTop {
    display: none;
    /* Hidden by default */
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

.footer-iconTop a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    background: var(--main-color);
    border-radius: 0.8rem;
    transition: 0.5s ease;
    width: 4.5rem;
    height: 4.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.footer-iconTop a:hover {
    box-shadow: 0 4px 15px var(--main-color);
    transform: translateY(-5px);
    background: var(--accent-color);
}

.footer-iconTop a i {
    font-size: 2rem;
    color: #fff;
}

/* Responsive */
@media (max-width: 991px) {
    .header {
        padding: 2rem 4%;
    }

    section {
        padding: 10rem 4% 6rem;
    }

    .home {
        padding-top: 12rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: auto;
        background: var(--second-bg-color);
        padding: 1rem 4%;
        border-top: 1px solid var(--border-color);
        display: none;
        flex-direction: column;
    }

    .navbar.active {
        display: flex;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    }

    .navbar a {
        display: block;
        margin: 1.5rem 0;
        font-size: 2rem;
    }

    .lang-switch {
        margin: 1.5rem 0;
        border: none;
        padding: 0;
        justify-content: center;
    }

    .lang-btn {
        font-size: 2rem;
    }

    .home {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }

    .home-content h1 {
        font-size: 4.5rem;
    }

    .home-buttons {
        justify-content: center;
    }

    .home-img {
        width: 70vw;
        height: 70vw;
        max-width: 300px;
        max-height: 300px;
        margin-top: 2rem;
    }

    .about-container {
        grid-template-columns: 1fr;
    }
}