/* --- Base Styles & Variables --- */
:root {
    --primary-color: #1a1a1a;
    --secondary-color: #2c2c2c;
    --accent-color: #00aaff;
    --text-color: #e0e0e0;
    --light-gray: #888;
    --font-family: 'Lato', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--primary-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease;
}

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

h1, h2 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

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

a:hover {
    color: #fff;
}

ul {
    list-style: none;
}

main {
    padding: 2rem 0;
}

/* --- Header --- */
.header {
    background-color: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 100;
    border-bottom: 1px solid var(--secondary-color);
}

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

.header-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.nav-list {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-color);
    font-weight: 400;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: #fff;
}

/* --- Burger Menu --- */
.burger-menu {
    display: none; /* Hidden on desktop */
    cursor: pointer;
    background: transparent;
    border: none;
    z-index: 101;
    flex-direction: column;
    padding: 0.5rem;
}

.burger-menu-line {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 3px 0;
    transition: all 0.3s ease;
    display: block;
}

/* --- Hero Section (Home Page) --- */
.hero {
    min-height: calc(100vh - 80px); /* Adjust based on header height */
    display: flex;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 50%, #1a1a1a 100%);
    animation: fadeIn 1.5s ease-in-out;
}

.hero-content {
    animation: slideInUp 1s ease-out 0.5s forwards;
    opacity: 0;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--light-gray);
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    background: var(--accent-color);
    color: #fff;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    font-weight: 700;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn:hover {
    transform: translateY(-3px);
    background-color: #0088cc;
}

/* --- Page Header (for About, SNS, Contact) --- */
.page-header {
    background-color: var(--secondary-color);
    padding: 3rem 0;
    text-align: center;
    animation: fadeIn 1s ease-in;
}

.page-header h2 {
    font-size: 2.5rem;
    color: #fff;
}

/* --- Content Sections --- */
.about-content, .sns-content, .contact-content {
    padding: 4rem 0;
    animation: fadeIn 1s ease-in 0.5s forwards;
    opacity: 0;
}

.about-text p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 1rem;
    text-align: center;
    line-height: 1.8;
}

.sns-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.sns-link {
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    border: 1px solid var(--secondary-color);
    border-radius: 5px;
    width: 250px;
    justify-content: center;
    transition: all 0.3s ease;
}

.sns-link:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
    color: #fff;
}

.contact-content {
    text-align: center;
}

.contact-content p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.contact-email {
    font-size: 1.5rem;
    font-weight: 700;
}

/* --- Work Section (About Page) --- */
.work-section {
    padding: 4rem 0;
    animation: fadeIn 1s ease-in 0.8s forwards;
    opacity: 0;
}

.work-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: #fff;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.work-card {
    background: var(--secondary-color);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #333;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.work-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.work-card p {
    flex-grow: 1;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.work-card .btn {
    align-self: flex-start;
}

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--secondary-color);
    color: var(--light-gray);
}

/* --- Animations --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    /* Hide desktop nav, show burger */
    .header-nav {
        display: none; /* Hide the nav links by default */
        position: fixed;
        top: 0;
        right: 0;
        width: 70%;
        height: 100vh;
        background-color: rgba(26, 26, 26, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 100;
        animation: slideInFromRight 0.3s ease-out;
    }

    /* When active, the mobile nav is shown */
    .header-nav.active {
        display: flex;
    }

    .nav-list {
        flex-direction: column;
        gap: 2rem;
    }

    .burger-menu {
        display: flex !important; /* Show the burger on mobile with !important to ensure visibility */
    }

    /* Burger animation */
    .burger-menu.active .burger-menu-line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .burger-menu.active .burger-menu-line:nth-child(2) {
        opacity: 0;
    }
    .burger-menu.active .burger-menu-line:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

    /* Adjust content for smaller screens */
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }
}
