* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    line-height: 1.6;
    color: #333;
    background: #f4f7fb;
}

.page-content {
    margin-left: 0;
}

/* toggle */
.sidebar-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1100;
    background: #007acc;
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.sidebar-toggle:hover {
    background: #005f99;
}

/* sidebar */
.sidebar {
    position: fixed;
    top: 70px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    padding: 16px 14px;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(8px);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.sidebar a {
    text-decoration: none;
    color: #007acc;
    font-weight: bold;
    transition: color 0.2s ease;
}

.sidebar a:hover {
    color: #005f99;
}

.sidebar.collapsed {
    transform: translateX(-140%);
    opacity: 0;
    pointer-events: none;
}

section {
    padding: 50px 20px;
    scroll-margin-top: 30px;
}

section h2 {
    margin-bottom: 18px;
    text-align: center;
    font-size: 2rem;
}

/* header */
.header {
    position: relative;
    text-align: center;
    padding: 90px 20px;
    color: white;
    background-image: linear-gradient(rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.58)),
        url("assets/images/background_photo.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.header > * {
    position: relative;
    z-index: 1;
}

.header-text {
    max-width: 520px;
    margin: 0 auto;
}

.header p {
    text-align: left;
}

.profile-img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    margin-bottom: 14px;
}

.header h1 {
    margin-top: 8px;
    margin-bottom: 10px;
    font-size: 2.4rem;
}

.subtitle {
    color: #f0f0f0;
    max-width: 780px;
    margin: 0 auto 8px auto;
}

.btn {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 16px;
    background: #007acc;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn:hover {
    background: #005f99;
    transform: translateY(-2px);
}

/* about */
#about {
    background: #ffffff;
    text-align: left;
}

#about p {
    max-width: 850px;
    margin: 0 auto 18px auto;
    text-align: left;
    color: #444;
}

.links-container {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.links-container .btn {
    margin-top: 0;
}

/* projects */
#projects {
    color: rgb(3, 3, 3);
    background-image: linear-gradient(rgba(18, 18, 18, 0.7), rgba(20, 23, 23, 0.7)),
        url("assets/images/h5_games_background.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.project-header {
    color: rgb(242, 239, 239);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.project-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

.project-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin-bottom: 12px;
}

.project-card h4 {
    margin-bottom: 8px;
}

.project-card p {
    color: #444;
}

/* web app grid */
.web-app-grid {
    display: flex;
    justify-content: center;
}

.web-app-grid .project-link {
    width: 60%;
    max-width: 650px;
}

.web-app-grid .project-card {
    text-align: center;
}

.web-app-grid .project-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin-bottom: 12px;
}

/* contact */
#contact {
    background: #ffffff;
    text-align: center;
}

#contact p {
    margin-bottom: 8px;
}

footer {
    text-align: center;
    padding: 14px 0;
    background: #e9edf3;
    margin-top: 40px;
}

@media (max-width: 800px) {
    .sidebar-toggle {
        top: 14px;
        left: 14px;
    }

    .sidebar {
        top: 60px;
        left: 14px;
    }

    .page-content {
        margin-left: 0;
    }

    .sidebar.collapsed {
        transform: translateX(-150%);
    }
}