@charset "utf-8";

/* ================================================== */
/* Takahashi Mizuki Portfolio CSS - Drawing Machine Style      */
/* ================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Kaisei+Opti:wght@400;700&display=swap');

/* -------------------------------------------------- */
/* CSS Variables                                      */
/* -------------------------------------------------- */
:root {
    --color-bg: #fafafa;
    --color-bg-alt: #f5f5f5;
    --color-text: #1a1a1a;
    --color-text-secondary: #666666;
    --color-accent: #0066cc;
    --color-accent-hover: #0052a3;
    --color-border: #e0e0e0;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Kaisei Opti', serif;
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
    --max-width: 1200px;
    --content-width: 800px;
}

/* -------------------------------------------------- */
/* Base Reset & Typography                            */
/* -------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    font-weight: 400;
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.3;
}

p {
    margin: 0 0 1em;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast), opacity var(--transition-fast);
}

a:hover {
    opacity: 0.7;
}

ul, li {
    margin: 0;
    padding: 0;
    list-style: none;
}

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

/* -------------------------------------------------- */
/* Layout Containers                                  */
/* -------------------------------------------------- */
#top_container,
#container {
    min-height: 100vh;
    background-color: var(--color-bg);
}

#content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

article {
    max-width: var(--content-width);
    margin: 0 auto;
}

/* -------------------------------------------------- */
/* Header & Navigation                                */
/* -------------------------------------------------- */
#header_area {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(250, 250, 250, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

#header_space {
    height: 80px;
}

header {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.header_ul {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.header_ul li {
    display: inline-block;
}

.header_ul li a {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--color-text);
    padding: 8px 0;
    position: relative;
}

.header_ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-text);
    transition: width var(--transition-medium);
}

.header_ul li a:hover {
    opacity: 1;
}

.header_ul li a:hover::after {
    width: 100%;
}

.header_left {
    margin-right: auto;
}

.header_left a {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 700;
}

.header_right {
    margin-left: 32px;
}

/* Hamburger Menu - Desktop (hidden) */
.menu-toggle {
    display: none;
}

.menu-icon {
    display: none;
}

.nav-links {
    display: flex;
    align-items: center;
}

/* -------------------------------------------------- */
/* Top Page                                           */
/* -------------------------------------------------- */
#top_container #content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 80px);
    padding-top: 0;
    padding-bottom: 80px;
}

#top_container article {
    text-align: center;
}

.top_img {
    max-width: 600px;
    width: 100%;
    margin: 0 auto 48px;
    transition: transform var(--transition-medium);
}

.top_img:hover {
    transform: scale(1.02);
}

/* -------------------------------------------------- */
/* Links                                              */
/* -------------------------------------------------- */
.link {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
    letter-spacing: 0.01em;
}

.link a {
    color: var(--color-accent);
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-fast), color var(--transition-fast);
}

.link a:hover {
    opacity: 1;
    border-bottom-color: var(--color-accent);
}

.center {
    text-align: center;
}

.right {
    text-align: right;
}

.left {
    text-align: left;
}

/* -------------------------------------------------- */
/* Works Grid                                         */
/* -------------------------------------------------- */
.works-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-bottom: 64px;
}

@media (max-width: 768px) {
    .works-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.box {
    background-color: var(--color-bg);
    overflow: hidden;
    transition: transform var(--transition-medium);
}

.box:hover {
    transform: translateY(-4px);
}

.works_img {
    width: 100%;
    height: auto;
    transition: transform var(--transition-medium), opacity var(--transition-fast);
}

/* Grid cards: fixed aspect ratio for consistent layout */
.box .works_img {
    aspect-ratio: 4/3;
    object-fit: cover;
}

.box:hover .works_img {
    transform: scale(1.03);
}

.works_video {
    width: 100%;
    margin-bottom: 16px;
}

/* -------------------------------------------------- */
/* Works Detail Page                                  */
/* -------------------------------------------------- */
.works_title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: left;
    margin: 32px 0 8px;
    line-height: 1.4;
}

.works_detail {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    text-align: left;
    margin-bottom: 24px;
    line-height: 1.8;
}

.title_detail {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    text-align: left;
    line-height: 1.8;
    margin-bottom: 16px;
}

.title_list {
    font-family: var(--font-serif);
    font-size: 0.9375rem;
    text-align: left;
    margin: 16px 0 0;
    padding: 0;
    line-height: 1.5;
}

.works_text {
    font-size: 0.9375rem;
    line-height: 1.9;
    text-align: left;
    margin: 0 0 24px;
    color: var(--color-text);
}

.works_text a {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.works_text a:hover {
    opacity: 0.8;
}

.works_year {
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 32px 0 12px;
}

/* -------------------------------------------------- */
/* Photo Credit                                       */
/* -------------------------------------------------- */
.photo_by {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    text-align: right;
    margin: 8px 0 0;
}

.photo_by a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* -------------------------------------------------- */
/* Video Embed                                        */
/* -------------------------------------------------- */
.video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    margin-bottom: 24px;
}

.video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* -------------------------------------------------- */
/* Color Box & Decorative                             */
/* -------------------------------------------------- */
.color_box {
    background-color: var(--color-bg);
    padding: 32px;
    margin-bottom: 24px;
}

.blue {
    color: var(--color-accent);
}

/* -------------------------------------------------- */
/* Spacing                                            */
/* -------------------------------------------------- */
.space {
    height: 48px;
}

/* -------------------------------------------------- */
/* Footer                                             */
/* -------------------------------------------------- */
#footer_area {
    padding: 48px 24px;
    text-align: center;
    border-top: 1px solid var(--color-border);
    margin-top: 64px;
}

footer {
    max-width: var(--max-width);
    margin: 0 auto;
}

.copy {
    font-family: var(--font-serif);
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    letter-spacing: 0.05em;
}

/* -------------------------------------------------- */
/* Responsive Design                                  */
/* -------------------------------------------------- */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    #header_space {
        height: 64px;
    }

    .header_ul {
        height: 64px;
        padding: 0;
    }

    .header_ul li a {
        font-size: 0.8125rem;
    }

    .header_left a {
        font-size: 0.9375rem;
    }

    .header_right {
        margin-left: 0;
    }

    /* Hamburger Menu - Mobile */
    .menu-icon {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 44px;
        height: 44px;
        cursor: pointer;
        z-index: 1001;
    }

    .menu-icon span {
        display: block;
        width: 20px;
        height: 2px;
        background-color: var(--color-text);
        margin: 2px 0;
        transition: transform var(--transition-medium), opacity var(--transition-fast);
    }

    /* Hamburger to X animation */
    .menu-toggle:checked + .menu-icon span:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
    }

    .menu-toggle:checked + .menu-icon span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle:checked + .menu-icon span:nth-child(3) {
        transform: rotate(-45deg) translate(4px, -4px);
    }

    /* Nav Links - Mobile */
    .nav-links {
        position: fixed;
        top: 64px;
        right: 0;
        width: 100%;
        height: calc(100vh - 64px);
        background-color: rgba(250, 250, 250, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 48px;
        transform: translateX(100%);
        transition: transform var(--transition-medium);
    }

    .menu-toggle:checked ~ .nav-links {
        transform: translateX(0);
    }

    .nav-links li {
        margin: 16px 0;
    }

    .nav-links li a {
        font-size: 1.125rem;
        padding: 12px 24px;
    }

    #content {
        padding: 0 16px;
    }

    .top_img {
        max-width: 100%;
        margin-bottom: 32px;
    }

    .works_title {
        font-size: 1.25rem;
    }

    .works_text {
        font-size: 0.9375rem;
    }

    .space {
        height: 32px;
    }

    #footer_area {
        padding: 32px 16px;
        margin-top: 48px;
    }
}

@media (max-width: 480px) {
    .header_right {
        margin-left: 12px;
    }

    .header_ul li a {
        font-size: 0.75rem;
    }
}

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

.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* -------------------------------------------------- */
/* About Page Specific                                */
/* -------------------------------------------------- */
.about-section {
    margin-bottom: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--color-border);
}

.about-section:last-child {
    border-bottom: none;
}

.about-section .works_img {
    max-width: 600px;
    margin: 0 auto 24px;
    display: block;
}

.about-title {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    margin-bottom: 24px;
}

/* About Page Links - Orange with pulse */
.about-section .works_text a {
    color: #e67300;
    animation: subtlePulse 2s ease-in-out infinite;
}

.about-section .works_text a:hover {
    color: #cc6600;
    animation: none;
    opacity: 1;
}

@keyframes subtlePulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* -------------------------------------------------- */
/* Selection Style                                    */
/* -------------------------------------------------- */
::selection {
    background-color: var(--color-accent);
    color: white;
}

::-moz-selection {
    background-color: var(--color-accent);
    color: white;
}

/* ================================================== */
/* Utility Classes & Inline Style Replacements      */
/* ================================================== */

.text-secondary {
    color: var(--color-text-secondary);
}

.works_text--ja {
    color: var(--color-text-secondary);
}

.works_title--first {
    margin-top: 48px;
}

.works_img--mb {
    margin-bottom: 16px;
}

.video--mt {
    margin-top: 32px;
}

.works-year-inline {
    color: var(--color-text-secondary);
    font-size: 0.85em;
}

.contact-hero {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 64px;
}

.page-title {
    margin-top: 48px;
    margin-bottom: 48px;
}

.exhibition-box {
    display: block;
    margin-bottom: 48px;
}

.mt-24 {
    margin-top: 24px;
}

.mt-30 {
    margin-top: 30px;
}

.mt-48 {
    margin-top: 48px;
}
