/* --- Basic Settings --- */
:root {
    --bg-color: #FEFBF6; /* A warm, light off-white */
    --primary-color: #FFFFFF;
    --secondary-color: #FFF3E0; /* Light orange cream */
    --text-color: #5D4037; /* Warm brown */
    --heading-color: #BF360C; /* Deep, rich orange */
    --accent-color: #FF7043; /* Vibrant coral/orange */
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Noto Sans JP', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-secondary);
    margin: 0;
    padding-top: 60px; /* Space for the fixed header */
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* For page load fade-in */
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

h1, h2, h3 {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--heading-color);
}

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

a:hover {
    color: var(--heading-color);
}

/* --- Header --- */
header {
    background-color: rgba(255, 243, 224, 0.8); /* Semi-transparent warm color */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Scrolled header style */
header.scrolled {
    background-color: rgba(255, 243, 224, 0.95);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

header.scrolled nav {
    height: 50px;
}

nav {
    display: flex;
    justify-content: space-between; /* Changed back to space-between */
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
    transition: height 0.3s ease;
}

.nav-logo {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--heading-color);
}
.nav-logo i {
    margin-right: 8px;
    color: var(--accent-color);
    animation: rotateSun 8s linear infinite;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
    /* margin-left: 50px; Removed margin */
}
nav ul a {
    color: var(--text-color);
    font-weight: 500;
}
nav ul a:hover {
    color: var(--heading-color);
}

/* --- Hero Section --- */
#hero {
    height: calc(100vh - 60px);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(rgba(255, 112, 67, 0.2), rgba(254, 251, 246, 0.5)), url('hero-background.jpg') no-repeat center center/cover;
    position: relative;
    overflow: hidden;
}

.hero-content h1 {
    font-size: 4rem;
    margin: 0;
    color: #fff;
    text-shadow: 0 2px 15px rgba(0,0,0,0.3);
    animation: fadeInDown 1s ease-out, textGlow 5s ease-in-out infinite 1s;
}

.hero-content .subtitle {
    font-size: 1.5rem;
    color: #fff;
    margin-top: 10px;
    font-weight: 400;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease-out;
}

/* --- General Content Section Style --- */
.content-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 100px 20px;
    text-align: center;
    opacity: 0; /* Controlled by JS for fade-in effect */
    transform: translateY(30px); /* Controlled by JS */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.content-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.content-section h2 {
    font-size: 2.5rem;
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
}

.content-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

#about p {
    max-width: 700px;
    margin: 0 auto;
}

/* --- Skills Section --- */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.skill-item {
    background-color: var(--primary-color);
    padding: 20px;
    border-radius: 10px;
    width: 120px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.skill-item i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.skill-item:hover i {
    transform: scale(1.1) rotate(5deg);
}

.skill-item span {
    display: block;
    font-weight: 500;
    color: var(--text-color);
}

/* --- Hobbies Section --- */
.hobbies-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.hobby-card {
    background-color: var(--primary-color);
    padding: 30px;
    border-radius: 15px;
    width: 300px;
    border: 1px solid var(--secondary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hobby-card:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(255, 112, 67, 0.1);
}

.hobby-card i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.hobby-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* --- Contact Section --- */
.social-links a {
    font-size: 2.2rem;
    margin: 0 15px;
    display: inline-block;
    transition: transform 0.3s ease, color 0.3s ease;
}
.social-links a:hover {
    transform: translateY(-5px);
    color: var(--heading-color);
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 25px;
    background-color: var(--secondary-color);
    font-size: 0.9rem;
    color: var(--text-color);
    border-top: 1px solid #E0E0E0;
}

/* --- Visitor Counter --- */
.visitor-counter {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.5);
    padding: 10px 20px;
    border-radius: 50px;
    max-width: 250px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.visitor-counter i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.visitor-counter span {
    color: var(--text-color);
    font-size: 0.9rem;
}

#visitor-count {
    font-weight: 700;
    font-family: var(--font-primary);
    font-size: 1.2rem;
    color: var(--heading-color);
    min-width: 20px; /* Prevents layout shift during animation */
    text-align: center;
}


/* --- Keyframe Animations --- */
@keyframes rotateSun {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 2px 15px rgba(0,0,0,0.3);
    }
    50% {
        text-shadow: 0 2px 25px rgba(255, 112, 67, 0.4), 0 0 10px rgba(255, 255, 255, 0.1);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    body {
        padding-top: 50px;
    }
    header, nav, header.scrolled nav {
        height: 50px;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content .subtitle {
        font-size: 1.2rem;
    }
    nav ul {
        display: none; /* Simplifies the header on mobile */
    }
    .content-section {
        padding: 60px 20px;
    }
    .content-section h2 {
        font-size: 2rem;
    }
    .hobbies-container {
        flex-direction: column;
        align-items: center;
    }
}

