:root {
    --color-bg: #0a0a0a;
    --color-text: #f0f0f0;
    --color-accent: #ac3030;
    --color-accent-dim: #5c1a1a;
    --color-surface: #1a1a1a;

    --font-heading: 'Zen Old Mincho', serif;
    --font-body: 'Montserrat', sans-serif;

    --easing-standard: cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s var(--easing-standard);
}

a:hover {
    color: var(--color-accent);
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-accent);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(172, 48, 48, 0.5);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* Background Winding Effect */
.bg-winding {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, var(--color-accent-dim), transparent 70%);
    opacity: 0.3;
    animation: pulseBg 10s infinite alternate ease-in-out;
    filter: blur(80px);
}

@keyframes pulseBg {
    0% {
        transform: scale(1) translate(0, 0);
    }

    50% {
        transform: scale(1.2) translate(-20px, 20px);
    }

    100% {
        transform: scale(1.1) translate(20px, -20px);
    }
}

/* Header */
/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: rgba(10, 10, 10, 0.5);
    /* Semi-transparent background */
    backdrop-filter: blur(10px);
    /* Frosted glass effect */
    -webkit-backdrop-filter: blur(10px);
    /* Safari support */
}

.logo {
    font-family: var(--font-body);
    font-weight: 400;
    /* Regular weight */
    font-size: 1.2rem;
    letter-spacing: 0.05em;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Sections */
.section {
    padding: 8rem 5%;
    min-height: 100vh;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 4rem;
    color: var(--color-accent);
    opacity: 0.9;
}

/* Hero */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}


.hero-main {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.hero-sub {
    font-family: var(--font-body);
    font-size: 1.0rem;
    /* Fixed to 1.0rem as previously requested */
    font-weight: 400;
    line-height: 1.8;
    letter-spacing: 0.1em;
    color: #ccc;
}

.hero-main .line,
.hero-sub .line {
    display: block;
    animation: fadeInUp 1s var(--easing-standard) forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-main .line:nth-child(1) {
    animation-delay: 0s;
}

.hero-main .line:nth-child(2) {
    animation-delay: 0.2s;
}

.hero-sub .line:nth-child(1) {
    animation-delay: 0.4s;
}

.hero-sub .line:nth-child(2) {
    animation-delay: 0.6s;
}



.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0.7;
}

.scroll-indicator .line {
    width: 1px;
    height: 60px;
    background-color: var(--color-text);
    animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
    }

    51% {
        transform: scaleY(1);
        transform-origin: bottom;
    }

    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Belief */
.belief {
    min-height: 60vh;
    /* Allow it to be shorter than full screen but substantial */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.belief-container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

.belief-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.8;
    margin-bottom: 4rem;
    color: var(--color-text);
}

.belief-title .divider {
    color: var(--color-accent);
    margin: 0 0.5rem;
    font-weight: 300;
}

.belief-desc {
    font-size: 0.95rem;
    line-height: 2.2;
    color: #ddd;
    font-weight: 300;
    letter-spacing: 0.05em;
}

.sp-break {
    display: none;
}

.pc-break {
    display: block;
}

@media (max-width: 768px) {
    .belief {
        min-height: auto;
        padding: 6rem 5%;
    }

    .belief-title {
        font-size: 1.2rem;
        margin-bottom: 2.5rem;
        line-height: 1.8;
    }

    /* Mobile About */
    .about-container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .about-text {
        text-align: center;
    }

    .profile-image-container {
        justify-content: center;
        margin-bottom: 1rem;
    }

    .sp-break {
        display: block;
    }

    .pc-break {
        display: none;
    }
}

/* Works */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 3rem;
}

.work-item {
    background: var(--color-surface);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s var(--easing-standard);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s var(--easing-standard) forwards;
}

.work-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    background: #000;
    overflow: hidden;
    /* Ensure cropped content doesn't show */
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Video Thumbnail for non-embed links */
.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #1a1a1a, #2a2a2a);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s var(--easing-standard);
    cursor: pointer;
    text-decoration: none;
    overflow: hidden;
    /* Update: Ensure image text doesn't overflow */
}

.thumbnail-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: transform 0.5s var(--easing-standard), opacity 0.3s;
    z-index: 0;
}

.video-thumbnail:hover .thumbnail-img {
    transform: scale(1.05);
    /* Gentle zoom */
    opacity: 0.4;
    /* Darken slightly more on hover to emphasize icon */
}

.video-thumbnail:hover {
    background: linear-gradient(45deg, #2a2a2a, #3a3a3a);
}

.play-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    position: relative;
    /* Ensure above image */
    z-index: 1;
}

.video-thumbnail:hover .play-icon {
    transform: scale(1.1);
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.play-icon .triangle {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent #fff;
    margin-left: 4px;
    /* Optical centering */
}

.thumbnail-text {
    font-size: 0.9rem;
    color: #fff;
    /* Make it white by default since getting dark bg from image+overlay */
    letter-spacing: 0.05em;
    transition: color 0.3s;
    position: relative;
    /* Ensure above image */
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    /* Better readability */
}

.video-thumbnail:hover .thumbnail-text {
    color: #fff;
}

.work-info {
    padding: 1.5rem;
}

.work-info h3 {
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.work-meta {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.work-meta span {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.work-comment {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #ccc;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.8rem;
}

/* About Section */
.about-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.profile-image-container {
    flex-shrink: 0;
    width: 220px;
    height: 220px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--color-accent);
    transition: transform 0.5s var(--easing-standard);
}

.profile-img:hover {
    transform: scale(1.05) rotate(2deg);
}

.about-text {
    flex: 1;
    text-align: left;
}

.role {
    font-size: 1rem;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.location {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 2rem;
}

.bio-history {
    margin-bottom: 2rem;
}

.bio-history h4 {
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.history-list {
    list-style: none;
    font-size: 0.9rem;
    line-height: 1.8;
    color: #ddd;
}

.history-list li {
    margin-bottom: 0.8rem;
    padding-left: 1rem;
    border-left: 2px solid var(--color-accent-dim);
}

.history-list .year {
    display: inline-block;
    min-width: 80px;
    color: var(--color-accent);
    font-weight: 500;
}

.bio-message p {
    font-size: 0.95rem;
    line-height: 2;
    color: #f0f0f0;
    margin-bottom: 1.5rem;
}

/* Footer */
.footer {
    padding: 5rem 5%;
    text-align: center;
    background: var(--color-surface);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}

.service-info {
    margin-bottom: 3rem;
    font-size: 0.85rem;
    line-height: 1.8;
    color: #ccc;
    font-weight: 300;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.social-link {
    font-size: 1.1rem;
    border: 1px solid var(--color-text);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    background-color: transparent;
    color: var(--color-text);
    /* Ensure initial color */
}

.social-link:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    transform: scale(1.05);
    color: #fff !important;
    /* Force white text on red background */
}

.copyright {
    font-size: 0.8rem;
    color: #666;
}

/* Hamburger default (hidden on desktop) */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1002;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 1px;
    /* Thin line */
    background-color: var(--color-text);
    position: absolute;
    transition: all 0.3s var(--easing-standard);
}

.hamburger span:nth-child(1) {
    top: 6px;
}

.hamburger span:nth-child(2) {
    bottom: 6px;
}

/* Hamburger Active State (Chevron/X) */
.hamburger.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* Mobile & Responsive */
@media (max-width: 768px) {

    /* Overflow Fix */
    html,
    body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    /* Mobile Header Layout */
    .header {
        padding: 1.5rem 5%;
        justify-content: center;
        /* Center logo by default */
    }

    .logo {
        position: relative;
        z-index: 1001;
        /* Keep above nav overlay */
        text-align: center;
        width: 100%;
    }

    /* Hamburger Button positions absolutely to the right */
    .hamburger {
        display: block;
        position: absolute;
        right: 5%;
        top: 50%;
        transform: translateY(-50%);
    }

    /* Mobile Nav Overlay */
    .nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;

        /* Hidden state */
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: all 0.4s var(--easing-standard);
        z-index: 1000;
    }

    /* Nav Active State */
    .nav.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav a {
        font-size: 1.5rem;
        font-family: var(--font-heading);
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s ease;
    }

    .nav.active a {
        opacity: 1;
        transform: translateY(0);
    }

    .nav.active a:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav.active a:nth-child(2) {
        transition-delay: 0.2s;
    }

    .nav.active a:nth-child(3) {
        transition-delay: 0.3s;
    }

    /* Works Grid Mobile */
    .works-grid {
        grid-template-columns: 1fr;
        /* Single column */
        gap: 2.5rem;
    }

    .section {
        padding: 6rem 5%;
    }
}

/* Hamburger default (hidden on desktop) */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1002;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 1px;
    /* Thin line */
    background-color: var(--color-text);
    position: absolute;
    transition: all 0.3s var(--easing-standard);
}

.hamburger span:nth-child(1) {
    top: 6px;
}

.hamburger span:nth-child(2) {
    bottom: 6px;
}

/* Hamburger Active State (Chevron/X) */
.hamburger.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}