:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --bg-color: #f9fafb;
    --accent-color: #3b82f6;
    --card-bg: #ffffff;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 16px;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

body {
    font-family: 'Poppins', 'Noto Sans JP', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
    overflow-x: hidden;
}

.header {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
    }
}

.header-content {
    text-align: center;
    color: white;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    padding: 0 2rem;
}

.header h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
    animation: fadeInUp 1s ease-out;
    word-wrap: break-word;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 2.5rem;
    animation: fadeInUp 1s ease-out 0.2s;
    animation-fill-mode: both;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav {
    display: flex;
    gap: 1.5rem;
    margin-top: 2.5rem;
    animation: fadeInUp 1s ease-out 0.4s;
    animation-fill-mode: both;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-button {
    padding: 1.2rem 2.4rem;
    font-size: 1.2rem;
    font-weight: 500;
    border: none;
    border-radius: 50px;
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    letter-spacing: 1px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.nav-button:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.section {
    margin-bottom: 8rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

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

.section h2 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 80px;
    height: 5px;
    background-color: var(--accent-color);
    border-radius: 2.5px;
}

.achievement {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: rgba(37, 99, 235, 0.08);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    transition: var(--transition);
}

.achievement + .achievement { margin-top: 1rem; }

.achievement:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.highlight {
    font-weight: 500;
    color: var(--primary-color);
}

.highlight i {
    margin-right: 0.5rem;
    color: #fbbf24;
}

.highlight a {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
    transition: var(--transition);
}

.highlight a:hover {
    color: var(--secondary-color);
}

.works-subheading {
    font-size: 1.6rem;
    color: var(--text-color);
    margin: 2.5rem 0 1.5rem 0;
    font-weight: 600;
}

.works-subheading:first-of-type {
    margin-top: 0;
}

.work-card-hidden {
    display: none !important;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2.5rem;
}

.work-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.work-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.work-image-container {
    position: relative;
    overflow: hidden;
    padding-top: 65%; /* 16:10 Aspect Ratio */
}

.work-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.work-card:hover img {
    transform: scale(1.08);
}

.work-card-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.work-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1.2rem;
    color: var(--text-color);
    position: relative;
    padding-bottom: 0.8rem;
}

.work-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 1.5px;
}

.work-card p {
    color: #4b5563;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    flex-grow: 1;
}

.work-links {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.work-card a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--primary-color);
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    transition: var(--transition);
    font-size: 0.95rem;
    white-space: nowrap;
}

.work-card a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.work-card a i {
    font-size: 0.9rem;
}

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

.skill-category {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.skill-category h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.skill-category h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 1.5px;
}

.profile-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 3rem;
    align-items: start;
}

.profile-photo { position: sticky; top: 2rem; }

.profile-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    border: 4px solid white;
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

.profile-text > p {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-color);
    margin-bottom: 2rem;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.skill-tag {
    background-color: rgba(37, 99, 235, 0.08);
    color: var(--primary-color);
    border: 1.5px solid rgba(37, 99, 235, 0.25);
    border-radius: 50px;
    padding: 0.4rem 1.1rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.skill-tag:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

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

@media (max-width: 992px) {
    .works-grid {
        grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2.8rem;
    }

    .header p {
        font-size: 1rem;
    }

    .works-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .section h2 {
        font-size: 2.5rem;
    }

    .profile-layout { grid-template-columns: 1fr; }
    .profile-photo { order: -1; max-width: 180px; margin: 0 auto; position: static; }
}

@media (max-width: 576px) {
    .header h1 {
        font-size: 2.2rem;
    }
    
    .nav-button {
        padding: 1rem 1.8rem;
        font-size: 1rem;
    }

    .section {
        margin-bottom: 5rem;
    }
    
    .section h2 {
        font-size: 2.2rem;
    }

    .works-grid {
        grid-template-columns: 1fr;
    }

    .work-links {
        flex-direction: column;
        width: 100%;
    }
    
    .work-card a {
        width: 100%;
        justify-content: center;
    }
}

/* Contact Section Styles */
.contact-container {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(37, 99, 235, 0.05);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateX(10px);
    background: rgba(37, 99, 235, 0.1);
}

.contact-item i {
    font-size: 2rem;
    color: var(--primary-color);
}

.contact-item a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .contact-container {
        padding: 2rem;
    }
    
    .contact-item {
        padding: 1.2rem;
    }
    
    .contact-item i {
        font-size: 1.5rem;
    }
    
    .contact-item a {
        font-size: 1.1rem;
    }
}

.and-more {
    text-align: center;
    margin-top: 3rem;
}

.and-more a {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    padding: 1rem 2rem;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    transition: var(--transition);
}

.and-more a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.and-more i {
    transition: transform 0.3s ease;
}

.and-more a:hover i {
    transform: translateX(5px);
}