/* Reset & Basic Styles */
:root {
    --primary-color: #0a0a1a; /* Deep dark blue/purple */
    --secondary-color: #1a1a2e; /* Slightly lighter dark blue */
    --accent-color: #00ffcc; /* Neon cyan/teal */
    --text-color: #e0e0e0; /* Light gray for text */
    --heading-font: 'Orbitron', sans-serif;
    --body-font: 'Roboto Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    background-color: var(--primary-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px; /* Base font size */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #fff;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block; /* Prevent extra space below images */
}

h1, h2, h3 {
    font-family: var(--heading-font);
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem; /* Slightly larger */
    text-align: center;
    margin-bottom: 3rem;
    text-transform: uppercase; /* Make titles uppercase */
    letter-spacing: 2px;
}

.section-title-en {
    display: block;
    font-size: 1rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-family: var(--body-font); /* Use body font for subtitle */
    font-weight: normal;
    letter-spacing: 1px;
}

.section {
    padding: 80px 0;
}

.bg-dark {
    background-color: var(--secondary-color);
}

/* Header */
header {
    background-color: rgba(10, 10, 26, 0.8); /* Semi-transparent */
    backdrop-filter: blur(10px); /* Frosted glass effect */
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 255, 204, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-family: var(--heading-font);
    font-size: 1.8rem;
    font-weight: bold;
    color: #fff;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    color: var(--text-color);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding: 5px 0;
    position: relative; /* For hover effect */
}

nav ul li a::after { /* Underline hover effect */
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

nav ul li a:hover {
    color: #fff; /* Change text color on hover too */
}


/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;

    --grid-line-color: rgba(0, 255, 204, 0.08);
    --bg-gradient-start: rgba(10, 10, 26, 0.9);
    --bg-gradient-end: rgba(26, 26, 46, 0.95);
    --fallback-bg-color: #0a0a1a;

    background-color: var(--fallback-bg-color);

    background-image:
        linear-gradient(to bottom, var(--grid-line-color) 1px, transparent 1px),
        linear-gradient(to right, var(--grid-line-color) 1px, transparent 1px),
        linear-gradient(to bottom, var(--bg-gradient-start), var(--bg-gradient-end));

    background-size:
        100% 50px,
        50px 100%,
        auto;

    background-position: center center;
}

#hero h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: #fff;
    text-shadow: 0 0 15px rgba(0, 255, 204, 0.5);
    position: relative;
    z-index: 1;
}

#hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

/* About Section */
#about .about-grid {
    display: grid;
    grid-template-columns: auto 1fr; /* Label and content */
    gap: 15px 20px;
    background-color: var(--secondary-color);
    padding: 30px;
    border-radius: 8px;
    border-left: 5px solid var(--accent-color); /* Accent border */
}

#about .about-grid strong {
    color: #fff;
    font-weight: bold;
}

#about .about-grid ul {
    list-style: disc;
    padding-left: 20px;
}
#about .about-grid ul li {
    margin-bottom: 8px;
}

.highlight {
    color: var(--accent-color);
    font-weight: bold;
}

/* Works Section */
.works-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.work-item {
    background-color: var(--primary-color);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 204, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.work-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 255, 204, 0.15);
}

.work-item h3 {
    color: var(--accent-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.work-item p {
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.tech-tag {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--accent-color);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 5px;
    margin-bottom: 5px;
    font-family: var(--body-font); /* Use body font */
}

/* Mini Game Section */
.game-area {
    background-color: var(--secondary-color);
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(0, 255, 204, 0.2);
    display: flex; /* Use flexbox */
    flex-direction: column; /* Stack items vertically */
    align-items: center; /* Center items horizontally */
    justify-content: center; /* Center items vertically */
    min-height: 300px; /* Give it some height */
    position: relative; /* Needed for positioning the target */
    overflow: hidden; /* Keep target inside */
}

#game-target {
    width: 80px;
    height: 80px;
    background-color: var(--accent-color);
    color: var(--primary-color);
    border-radius: 50%; /* Make it circular */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    position: absolute; /* Allow JS to position it */
    transition: transform 0.2s ease, background-color 0.2s ease, top 0.5s ease, left 0.5s ease; /* Smooth transitions */
    user-select: none; /* Prevent text selection */
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.6);
}

#game-target:active { /* Style when clicked */
    transform: scale(0.9);
    background-color: #fff;
}

.game-area p {
    margin-top: 20px; /* Space above score */
    font-size: 1.2rem;
    position: absolute; /* Position score */
    bottom: 60px; /* Positioned above the reset button */
    left: 50%;
    transform: translateX(-50%);
}

#reset-button {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: var(--accent-color);
    color: var(--primary-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: var(--heading-font);
    font-weight: bold;
    transition: background-color 0.3s ease;
    position: absolute; /* Position reset button */
    bottom: 20px; /* At the bottom */
    left: 50%;
    transform: translateX(-50%);
}

#reset-button:hover {
    background-color: #fff;
}

/* Contact Section */
#contact p {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}
.contact-info {
    font-size: 1.3rem; /* Larger email */
    font-weight: bold;
}

/* Footer */
footer {
    background-color: #05050d; /* Even darker */
    text-align: center;
    padding: 25px 0;
    margin-top: 0; /* Remove default margin */
    font-size: 0.9rem;
    color: rgba(224, 224, 224, 0.6); /* Lighter text */
    border-top: 1px solid rgba(0, 255, 204, 0.1);
}


/* Responsive Design */
@media (max-width: 768px) {
    h2 {
        font-size: 2rem;
    }

    #hero h2 {
        font-size: 2.5rem;
    }
    #hero p {
        font-size: 1rem;
    }

    header .container {
        flex-direction: column;
        align-items: center;
    }

    .logo a {
        margin-bottom: 10px;
    }

    nav ul {
        margin-top: 10px;
    }

    nav ul li {
        margin: 0 10px; /* Adjust spacing for smaller screens */
    }

    .section {
        padding: 60px 0;
    }

    #about .about-grid {
        grid-template-columns: 1fr; /* Stack label and content */
        gap: 10px;
    }
    #about .about-grid div:nth-child(odd) { /* Style labels */
        font-weight: bold;
        color: var(--accent-color);
    }

    .game-area {
        padding: 30px;
    }
    #game-target {
        width: 60px;
        height: 60px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px; /* Adjust base font size */
    }
    h2 {
        font-size: 1.8rem;
    }
     #hero h2 {
        font-size: 2rem;
    }
     .cta-button {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
    nav ul li a {
        font-size: 0.8rem;
    }
    nav ul li {
        margin: 0 5px;
    }
    .work-item {
        padding: 20px;
    }
    .work-item h3 {
        font-size: 1.2rem;
    }
    .contact-info {
        font-size: 1.1rem;
    }
}