:root {
    --bg-color: #d8d8d8;
    --accent: #d33c27; /* reddish-orange */
    --text-primary: #777; 
    --line-color: #d33c27;
    --modal-bg: rgba(0, 0, 0, 0.85); 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans JP', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.en-header {
    font-family: 'Jost', 'Futura', sans-serif;
}

.jp-header {
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 500;
}

.highlight-text {
    color: var(--accent);
}

.clickable {
    cursor: pointer;
}

/* --- Initial Burst Animations --- */
.burst-element {
    opacity: 0;
    /* initial hidden state */
}

/* Added via JS */
.burst-animate {
    animation: burstPop 1s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
}

@keyframes burstPop {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(15px);
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

.marquee-burst-element {
    opacity: 0;
}

.marquee-animate {
    animation: marqueeRushIn 1.2s cubic-bezier(0.1, 1, 0.3, 1) forwards;
    /* Delay the marquee slightly so background snaps first */
    animation-delay: 0.2s;
}

@keyframes marqueeRushIn {
    0% {
        opacity: 0;
        transform: translateX(10vw) scaleY(0.6);
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scaleY(1);
        filter: blur(0);
    }
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    width: 100%;
    margin-top: 0;
    margin-bottom: 2rem;
}

.bg-slider {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    margin: 0;
    background-color: transparent;
    overflow: hidden;
}

.bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center top; 
    transition: opacity 1s ease-in-out;
}

/* Scrolling Title Logo Overlay */
.marquee-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
}

.marquee {
    display: inline-flex;
    height: 100%;
    align-items: center;
    animation: marqueeLoop 60s linear infinite;
}

.marquee-img {
    height: 100%;
    width: auto;
    object-fit: contain;
    padding-right: 3vw;
}

@keyframes marqueeLoop {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}

/* --- Main Structure --- */
.container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 20;
    padding: 20px 20px 100px;
}

/* --- Header Section --- */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 60px;
    padding-bottom: 20px;
    
    /* Make the navigation stick nicely to the top for easy scrolling */
    position: sticky;
    top: 20px;
    z-index: 50;
    background-color: rgba(216, 216, 216, 0.8); /* match var(--bg-color) */
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 10px 20px;
}

.brand {
    display: flex;
    flex-direction: column;
}

.brand h1 {
    font-size: 3rem; /* slightly smaller to fit sticky */
    line-height: 1;
    font-weight: 600;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.brand-sub {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1rem;
}

.icon-link {
    text-decoration: none;
    font-family: 'Jost', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s;
}

.icon-link:hover {
    transform: scale(1.1);
}

.nav-right {
    display: flex;
    gap: 30px;
    padding-bottom: 5px; 
    align-items: flex-start;
}

.tab-link {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 500;
    transition: color 0.3s, transform 0.3s, font-size 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tab-link:hover {
    color: var(--accent);
}

.tab-sub {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
    margin-top: 5px;
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateY(-5px);
}

/* Active State for Tabs via Scroll Spy */
.tab-link.active {
    color: var(--accent);
    font-size: 1.5rem; 
    transform: translateY(-4px);
}

.tab-link.active .tab-sub {
    opacity: 1;
    height: auto;
    transform: translateY(0);
}

/* --- Content Spacer --- */
.section-spacer {
    height: 120px;
}

/* --- Common Section Titles --- */
.section {
    margin-bottom: 20px;
    scroll-margin-top: 150px; /* Offset for sticky header */
}

.title-wrap {
    margin-bottom: 20px;
}

.title-line {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    gap: 15px;
    margin-bottom: -5px;
}

.title-line::before {
    content: '';
    display: inline-block;
    width: 60px;
    height: 1px;
    background-color: var(--accent);
}

.en-title {
    font-size: 3.5rem;
    font-weight: 500;
    color: #a3a3a3;
    margin-left: 75px; 
    line-height: 1.1;
}

/* --- Info Section Layout --- */
.info-section {
    display: flex;
    gap: 30px;
    align-items: stretch;
    margin-bottom: 60px;
}

.section-left {
    flex: 0 0 30%;
}

.section-right {
    flex: 1;
    display: flex;
    gap: 40px;
    align-items: center;
}

.vertical-divider {
    width: 2px;
    background-color: var(--accent);
    height: 120px;
}

.scroll-area {
    flex: 1;
    height: 150px;
    overflow-y: auto;
    padding-right: 15px;
}

.scroll-area::-webkit-scrollbar {
    width: 3px;
}
.scroll-area::-webkit-scrollbar-thumb {
    background-color: var(--accent);
}
.scroll-area::-webkit-scrollbar-track {
    background-color: transparent;
}

.info-list {
    list-style: none;
}

.info-list li {
    display: flex;
    gap: 20px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    transition: opacity 0.3s;
}
.info-list li:hover {
    opacity: 0.7;
}

.info-list .date {
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    min-width: 60px;
    letter-spacing: 0.5px;
}

/* --- Works Section --- */
.works-grid {
    column-count: 2;
    column-gap: 20px;
    margin-top: 30px;
    margin-left: 75px; 
}

.workz-grid {
    /* Different sizing for workz perhaps */
    column-gap: 30px;
}

.work-item {
    break-inside: avoid;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
    background: #ccc;
    cursor: pointer;
    border-radius: 4px;
}

.work-item img {
    width: 100%;
    display: block;
    transition: transform 0.4s ease;
}

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

/* --- Contact Section --- */
.contact-section {
    margin-top: 40px;
}

.contact-container {
    margin-left: 75px; 
    max-width: 500px;
}

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

.form-group input, 
.form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid #ccc;
    color: #333;
    font-size: 1.2rem;
    font-family: 'Noto Sans JP', sans-serif;
    padding: 10px 0;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input::placeholder, 
.form-group textarea::placeholder {
    color: #999;
}

.form-group input:focus, 
.form-group textarea:focus {
    border-bottom-color: var(--accent);
}

.submit-btn {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    padding: 15px 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: var(--accent);
    color: var(--bg-color);
}


/* --- Modal Lightbox --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.open {
    opacity: 1;
    visibility: visible;
}

.modal-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-bg);
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    z-index: 1001;
    display: flex;
    flex-direction: column;
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh; 
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.modal-close {
    align-self: flex-end;
    color: white;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 2px;
    cursor: pointer;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--accent);
}

.modal-close span {
    font-size: 0.9rem;
    margin-right: 5px;
}

.modal-credit {
    color: white;
    margin-top: 15px;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* --- Responsive Layout --- */
@media (max-width: 768px) {
    .bg-slider { width: 100%; height: 50vh; }
    .giant-text { font-size: 30vw; }
    
    .top-nav { flex-direction: column; align-items: flex-start; gap: 10px; position: relative; top: 0; background: transparent; backdrop-filter: none; padding: 0;}
    .nav-right { padding-bottom: 0; }
    
    .info-section { flex-direction: column; }
    .section-right { flex-direction: column; align-items: flex-start; gap: 20px; }
    .vertical-divider { display: none; }
    
    .en-title { margin-left: 20px; }
    .works-grid { margin-left: 0; column-count: 1; }
    .contact-container { margin-left: 20px; }
}
