:root {
    --color-bg: #ffffff;
    --color-text: #1a1a1a;
    --color-gray: #f5f5f5;
    --color-gray-dark: #888888;
    --color-black: #000000;
    --font-en: 'Jost', sans-serif;
    --font-jp: 'Noto Sans JP', sans-serif;
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-en);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none; /* Hide default cursor for custom cursor */
}

/* Custom Cursor */
.cursor {
    width: 8px;
    height: 8px;
    background-color: var(--color-black);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-black);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s, height 0.3s, background-color 0.3s;
}

.cursor-follower.hover {
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.05);
}

/* Typography for Japanese text */
p, .modal-desc-text, .section-desc, .work-desc {
    font-family: var(--font-jp);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.section {
    padding: 120px 0;
}

.bg-light {
    background-color: var(--color-gray);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px 40px;
    z-index: 1000;
    transition: var(--transition-fast);
}

header.scrolled {
    padding: 15px 40px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.nav-list {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-text);
    transition: var(--transition-fast);
}

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

/* Hamburger */
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
    width: 30px;
    height: 20px;
    position: relative;
}

.hamburger span {
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--color-text);
    transition: var(--transition-fast);
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 9px; }
.hamburger span:nth-child(3) { top: 18px; }

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 9px;
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 9px;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-bg);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-slow);
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-list {
    text-align: center;
}

.mobile-nav-list li {
    margin: 30px 0;
}

.mobile-nav-link {
    font-size: 2rem;
    font-weight: 300;
}

/* Hero */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

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

.hero-title {
    font-size: 4rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--color-gray-dark);
    font-weight: 300;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.scroll-text {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background-color: var(--color-gray-dark);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background-color: var(--color-text);
    animation: scrollAnim 2s infinite ease-in-out;
}

@keyframes scrollAnim {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 15px;
}

/* Works Filter */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--color-gray-dark);
    cursor: pointer;
    position: relative;
    padding-bottom: 5px;
    transition: var(--transition-fast);
}

.filter-btn.active, .filter-btn:hover {
    color: var(--color-text);
}

.filter-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background-color: var(--color-text);
    transition: var(--transition-fast);
}

.filter-btn.active::after {
    width: 100%;
}

/* Works Grid */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.work-item {
    cursor: pointer;
    transition: var(--transition-slow);
}

.work-item.hidden {
    display: none;
}

.work-image {
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/3;
    background-color: #f5f5f5;
    margin-bottom: 20px;
}

[data-category="flyer"] .img-placeholder {
    padding: 15px; /* 上下の余白を追加 */
}

[data-category="flyer"] .img-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gray-dark);
    transition: var(--transition-slow);
}

.work-item:hover .img-placeholder {
    transform: scale(1.05);
}

.work-item::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0);
    transition: var(--transition-fast);
    pointer-events: none;
}

.work-info h3 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.work-category {
    font-size: 0.8rem;
    color: var(--color-gray-dark);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-fast);
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    background: var(--color-bg);
    padding: 60px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    transform: translateY(30px);
    transition: var(--transition-slow);
    max-height: 90vh;
    overflow-y: auto;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-text);
}

.modal-img-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: var(--color-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gray-dark);
    margin-bottom: 30px;
}

.modal-title {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 10px;
}

.modal-category {
    font-size: 0.9rem;
    color: var(--color-gray-dark);
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-desc h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 500;
}

/* About */
.about-content {
    display: flex;
    gap: 60px;
    align-items: center;
}

.about-image {
    flex: 1;
}

.profile-img-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gray-dark);
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 20px;
}

.about-text p {
    color: var(--color-gray-dark);
    margin-bottom: 40px;
}

.skill-item {
    margin-bottom: 20px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.skill-bar {
    width: 100%;
    height: 1px;
    background-color: #ddd;
    position: relative;
}

.skill-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: var(--color-text);
    width: 0; /* Animated via JS */
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Contact */
.contact-form-container {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 30px;
}

input, textarea {
    width: 100%;
    padding: 15px 0;
    border: none;
    border-bottom: 1px solid #ddd;
    background: transparent;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: var(--transition-fast);
}

input:focus, textarea:focus {
    border-bottom-color: var(--color-text);
}

.submit-btn {
    background-color: var(--color-text);
    color: var(--color-bg);
    border: none;
    padding: 15px 40px;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: block;
    margin: 0 auto;
    width: fit-content;
}

.submit-btn:hover {
    background-color: var(--color-gray-dark);
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 0;
    font-size: 0.8rem;
    color: var(--color-gray-dark);
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    .nav-list {
        display: none;
    }
    .hamburger {
        display: block;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .about-content {
        flex-direction: column;
    }
    .works-grid {
        grid-template-columns: 1fr;
    }
    .modal-content {
        padding: 40px 20px;
    }
    .cursor, .cursor-follower {
        display: none; /* Disable custom cursor on mobile */
    }
    body {
        cursor: auto;
    }
}
