/*
Theme Name: Sakai Jun
Theme URI: https://sakaijun.com
Author: Sakai Jun
Description: Sakai Jun Portfolio Site
Version: 1.0
*/

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

html {
    height: 100%;
}

body {
    position: relative;
    min-height: 100%;
    padding-bottom: 120px; /* フッターの高さ分、常に余白を確保しておく */
    font-family: sans-serif;
}

/* ============================================
   ハンバーガーメニュー（タブレット・スマホのみ）
   ============================================ */

.hamburger-menu {
    display: none;
}

@media (max-width: 1024px) {
    .hamburger-menu {
        display: block;
        position: fixed;
        top: 16px;
        right: 16px;
        z-index: 99999;
    }

    .hamburger-btn {
        width: 44px;
        height: 44px;
        background: #0b318f;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 6px;
        padding: 10px;
    }

    .hamburger-btn span {
        display: block;
        width: 24px;
        height: 2px;
        background: #fff;
        transition: all 0.3s;
        transform-origin: center;
    }

    .hamburger-btn.is-open span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger-btn.is-open span:nth-child(2) {
        opacity: 0;
    }
    .hamburger-btn.is-open span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hamburger-nav {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh;
        background: #0b318f;
        z-index: 9998;
        transition: right 0.3s ease;
        padding: 80px 24px 40px;
    }

    .hamburger-nav.is-open {
        right: 0;
    }

    .hamburger-nav ul {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .hamburger-nav a {
        display: block;
        color: #fff;
        text-decoration: none;
        font-size: 14px;
        font-style: italic;
        font-weight: bold;
        padding: 12px 16px;
        border-bottom: 1px solid rgba(255,255,255,0.2);
    }

    .hamburger-close {
        position: absolute;
        top: 16px;
        right: 16px;
        width: 36px;
        height: 36px;
        background: rgba(255,255,255,0.2);
        border: 2px solid #fff;
        border-radius: 50%;
        color: #fff;
        font-size: 1.2rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }

    .hamburger-sns {
        display: flex;
        gap: 16px;
        margin-top: 32px;
        padding: 0 16px;
    }

    .hamburger-sns a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: 2px solid #fff;
        border-radius: 50%;
        color: #fff;
        font-size: 1.2rem;
        text-decoration: none;
        border-bottom: 2px solid #fff;
        padding: 0;
    }

    .hamburger-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 9997;
    }

    .hamburger-overlay.is-open {
        display: block;
    }

    /* タブレット・スマホではPCナビを非表示 */
    .main-nav {
        display: none !important;
    }
}

/* PCではPCナビを表示 */
@media (min-width: 1025px) {
    .hamburger-menu {
        display: none !important;
    }
    .main-nav {
        display: block;
    }
}

/* ============================================
   トップページ ヘッダー
   ============================================ */

.site-header {
    position: relative;
    width: 100%;
    height: 400px;
    background-color: #ffffff;
    background-image: url('images/illust-format.png');
    background-size: 120%;
    background-position: center 30%;
    background-repeat: no-repeat;
    isolation: isolate;
    overflow: hidden;
}

@media (max-width: 600px) {
    .site-header { height: 280px; }
}

.site-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ffffff;
    opacity: 0.7;
    z-index: 0;
}

.color-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        to right,
        #00a2ff 0%, #00a2ff 33.33%,
        #ffff00 33.33%, #ffff00 66.66%,
        #ff00ff 66.66%, #ff00ff 100%
    );
    mix-blend-mode: multiply;
    z-index: 1;
}

/* ============================================
   ナビゲーション・ロゴ（共通）
   ============================================ */

.main-nav, .hero-logo {
    position: relative;
    z-index: 2;
}

.main-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 8px;
    padding: 40px 80px 0;
}

.main-nav a {
    background-color: #0b318f;
    color: #fff;
    padding: 6px 16px;
    font-size: 13px;
    text-decoration: none;
    border-radius: 2px;
    font-style: italic;
    font-weight: bold;
}

.hero-logo {
    text-align: center;
    margin-top: 60px;
}

.hero-logo a {
    display: inline-block;
    text-decoration: none;
}

.logo-main {
    max-width: 700px;
    width: 80%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.logo-sub-wrap {
    position: relative;
    display: inline-block;
    margin: 16px auto 0;
}

.red-band {
    position: absolute;
    top: 0; left: -12px;
    width: calc(100% + 24px);
    height: 100%;
    background-color: #e60012;
    opacity: 0.85;
    mix-blend-mode: multiply;
    z-index: 0;
}

.logo-sub-img {
    position: relative;
    z-index: 1;
    width: 25vw;
    max-width: 400px;
    min-width: 200px;
    height: auto;
    display: block;
    padding: 4px 0;
}

/* ============================================
   トップページ 紹介文
   ============================================ */

.intro-text {
    background-color: #fff;
    padding: 16px 80px;
    max-width: 1280px;
    margin: 0 auto;
    text-align: center;
    font-size: 14px;
    line-height: 1.9;
    color: #0b318f;
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 500;
}

.intro-text p:last-child {
    margin-top: 16px;
    font-size: 12px;
    color: #666;
}

/* ============================================
   トップページ 作品グリッド
   ============================================ */

.works-section {
    position: relative;
}

.color-blocks {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    z-index: 0;
}

.block-cyan    { background-color: #00a2ff; }
.block-yellow  { background-color: #ffff00; }
.block-magenta { background-color: #ff00ff; }

.works-grid {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0;
    padding: 48px 80px 48px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    align-items: center;
}

.work-card {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
}

.video-play-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    pointer-events: none; /* クリックはカード全体のonclickに任せる */
    z-index: 2;
}

.video-play-badge i {
    margin-left: 3px; /* 三角の視覚的重心を中央に寄せる */
}

@media (max-width: 768px) {
    .video-play-badge {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }
}

.work-card img {
    width: 100%;
    height: auto;
    display: block;
}

.work-card-info {
    padding: 8px 4px;
    text-align: center;
}

.work-card-title {
    font-size: 12px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
    font-family: "Noto Sans JP", sans-serif;
}

.work-card-tags {
    font-size: 11px;
    color: #0b318f;
    font-family: "Noto Sans JP", sans-serif;
}

.work-tag {
    margin-right: 6px;
}

.work-tag-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.work-tag-link:hover {
    text-decoration: underline;
}

.load-more-wrap {
    text-align: center;
    padding: 40px 0 60px;
    position: relative;
    z-index: 1;
}

.load-more-btn {
    background-color: #0b318f;
    color: #fff;
    border: none;
    padding: 12px 48px;
    font-size: 14px;
    font-family: "Noto Sans JP", sans-serif;
    font-weight: bold;
    cursor: pointer;
    border-radius: 2px;
    letter-spacing: 2px;
    font-style: italic;
}

.load-more-btn:hover {
    background-color: #1a2f6e;
}

/* ============================================
   サブページ共通ヘッダー
   ============================================ */

.page-header {
    position: relative;
    width: 100%;
    height: 320px;
    background-color: #ffffff;
    isolation: isolate;
    overflow: hidden;
}

.color-overlay-page {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        to right,
        #00a2ff 0%, #00a2ff 33.33%,
        #ffff00 33.33%, #ffff00 66.66%,
        #ff00ff 66.66%, #ff00ff 100%
    );
    mix-blend-mode: multiply;
    z-index: 1;
}

.page-header .main-nav,
.page-header .hero-logo {
    position: relative;
    z-index: 2;
}

.page-header .main-nav ul {
    padding-top: 40px;
}

.page-title {
    font-size: 32px;
    margin-bottom: 40px;
    letter-spacing: 4px;
    font-style: italic;
    font-weight: bold;
}

/* ============================================
   Contactページ
   ============================================ */

.contact-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 120px 24px 60px;
    text-align: center;
    font-family: "Noto Sans JP", sans-serif;
}

.contact-text {
    font-size: 14px;
    line-height: 2;
    color: #0b318f;
    margin-bottom: 40px;
}

.contact-mail-list {
    font-size: 16px;
    line-height: 2.2;
    color: #0b318f;
}

.contact-mail-list a {
    color: #0b318f;
    text-decoration: none;
}

.contact-mail-list a:hover {
    text-decoration: underline;
}

.mail-label {
    font-weight: bold;
    margin-right: 8px;
}

/* ============================================
   Profileページ
   ============================================ */

.profile-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 80px 24px;
    font-family: "Noto Sans JP", sans-serif;
}

.profile-content .page-title {
    text-align: center;
}

.profile-name {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin: 32px 0;
    letter-spacing: 4px;
    color: #0b318f;
}

.profile-summary {
    font-size: 14px;
    line-height: 2;
    color: #0b318f;
    margin-bottom: 40px;
    text-align: center;
}

.career-title {
    font-size: 18px;
    text-align: center;
    margin: 40px 0 24px;
    letter-spacing: 2px;
    color: #0b318f;
}

.career-list {
    list-style: none;
    font-size: 13px;
    line-height: 1.9;
    color: #0b318f;
}

.career-list li {
    display: flex;
    align-items: flex-start;
    gap: 1em;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.career-year {
    font-weight: bold;
    color: #0b318f;
    white-space: nowrap;
    min-width: 60px;
}

.career-contents {
    display: flex;
    flex-direction: column;
    gap: 0.3em;
}

/* ============================================
   Privacy Policyページ
   ============================================ */

.privacy-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 120px 24px 60px;
    font-family: "Noto Sans JP", sans-serif;
    color: #0b318f;
    text-align: left;
}

.privacy-intro {
    font-size: 14px;
    line-height: 2;
    margin-bottom: 40px;
    text-align: center;
}

.privacy-body h2 {
    font-size: 16px;
    margin-top: 32px;
    margin-bottom: 12px;
    border-left: 4px solid #0b318f;
    padding-left: 10px;
}

.privacy-body p {
    font-size: 14px;
    line-height: 2;
    margin-bottom: 16px;
}

.privacy-body ul {
    margin: 0 0 16px 20px;
    font-size: 14px;
    line-height: 2;
}

.privacy-body a {
    color: #0b318f;
    text-decoration: underline;
}

.privacy-date {
    margin-top: 48px;
    font-size: 13px;
    text-align: right;
    color: #666;
}

/* ============================================
   フッター
   ============================================ */

.site-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 120px;
}

.color-blocks-footer {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    z-index: 0;
}

.footer-credit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    color: #000;
    font-size: 10px;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    text-align: center;
    margin: 0;
    white-space: nowrap;
}

.footer-credit a {
    color: #000;
    text-decoration: none;
}

.footer-credit a:hover {
    text-decoration: underline;
}

/* ============================================
   Archive Page
   ============================================ */

.archive-content {
    padding-bottom: 80px;
}

.archive-year-section {
    margin-bottom: 0;
}

.archive-year-label {
    background: #fff;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 5px solid #1a2f6e;
}

.archive-year-dot {
    color: #1a2f6e;
    font-size: 1.1rem;
    font-weight: 700;
}

.archive-year-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a2f6e;
}

.archive-year-img {
    height: 1.8em;
    width: auto;
    display: block;
}

.archive-works-section {
    position: relative;
}

.archive-works-section .color-blocks {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    z-index: 0;
}

.archive-works-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 70px;
    padding: 36px 40px 48px;
}

.archive-work-card {
    cursor: pointer;
    aspect-ratio: 1 / 1;
    position: relative;
    transition: opacity 0.2s;
    isolation: isolate;
}

.archive-work-card:hover {
    opacity: 0.85;
}

.archive-work-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #1a2f6e;
    transform: translate(15px, 20px);
    z-index: 0;
}

.archive-work-card img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #fff;
}

.archive-no-image {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #999;
    background: #fff;
}

.no-works {
    text-align: center;
    color: #999;
    padding: 60px 0;
    background: #fff;
}

/* ============================================
   モーダル（トップ・アーカイブ共通）
   ============================================ */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    overflow-y: auto;
}

.modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-bg {
    position: fixed;
    inset: 0;
    display: flex;
    z-index: 0;
}

.modal-bg-cyan    { flex: 1; background: #00a2ff; opacity: 0.92; }
.modal-bg-yellow  { flex: 1; background: #ffff00; opacity: 0.92; }
.modal-bg-magenta { flex: 1; background: #ff00ff; opacity: 0.92; }

.modal-inner {
    background: #fff;
    max-width: 800px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    z-index: 1;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    color: #333;
}

.modal-slider { position: relative; }
.modal-slide { display: none; }
.modal-slide.is-active { display: block; }

.modal-slide img {
    max-height: 75vh;
    width: auto;
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    font-size: 1.5rem;
    padding: 10px 16px;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
}

.slider-prev { left: 0; }
.slider-next { right: 0; }
.slider-prev:hover, .slider-next:hover { background: rgba(0,0,0,0.8); }

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    display: inline-block;
    cursor: pointer;
}

.slider-dot.is-active { background: #1a2f6e; }

.modal-video iframe {
    width: 100%;
    max-height: 75vh;
    aspect-ratio: 16/9;
}

.modal-caption {
    margin-top: 16px;
    padding: 12px;
    background: #fff;
    text-align: center;
}

.modal-caption-title {
    font-size: 13px;
    font-weight: bold;
    color: #0b318f;
    margin-bottom: 4px;
    font-family: "Noto Sans JP", sans-serif;
}

.modal-caption-worktype {
    font-size: 12px;
    color: #0b318f;
    margin-bottom: 4px;
    font-family: "Noto Sans JP", sans-serif;
}

.modal-caption-tags {
    font-size: 12px;
    color: #0b318f;
    font-family: "Noto Sans JP", sans-serif;
}

/* ============================================
   Responsive - タブレット（769px〜1024px）
   ============================================ */

@media (min-width: 769px) and (max-width: 1024px) {
    .site-header {
        height: 400px;
        background-size: 180%;
        background-position: center 20%;
    }
    .page-header {
        height: 220px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    /* main-navは1024px以下で非表示になるため、
       page-header内はhero-logoだけをflexboxで上下左右中央に配置する */
    .page-header .hero-logo {
        margin-top: 0;
    }
    .archive-works-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 40px;
        padding: 24px 24px 36px;
    }
    .archive-work-card::before {
        transform: translate(10px, 12px);
    }
    .archive-year-label {
        justify-content: center;
        border-left: none;
        border-bottom: 3px solid #1a2f6e;
    }
    .works-grid {
        grid-template-columns: repeat(4, 1fr);
        padding: 32px 40px;
        gap: 28px;
    }
}

/* ============================================
   Responsive - スマホ（〜768px）
   ============================================ */

@media (max-width: 768px) {
    .site-header {
        background-size: 250%;
        background-position: center 25%;
    }
    .page-header {
        height: 200px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    /* main-navは1024px以下で非表示になるため、
       page-header内はhero-logoだけをflexboxで上下左右中央に配置する */
    .page-header .hero-logo {
        margin-top: 0;
    }
    .works-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 16px;
        gap: 16px;
    }
    .intro-text {
        padding: 16px;
        font-size: 13px;
        text-align: left;
    }
    .intro-text br {
        display: none;
    }
    .profile-summary {
        text-align: left;
    }
    .profile-summary .career-desc br {
        display: none;
    }
    .archive-works-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 56px 24px;
        padding: 20px 32px 56px;
    }
    .archive-work-card::before {
        transform: translate(8px, 10px);
    }
    .archive-year-label {
        justify-content: center;
        border-left: none;
        border-bottom: 3px solid #1a2f6e;
        padding: 10px 16px;
    }
    .archive-year-img {
        height: 1.0em; /* 0.85em → 1.0em：もう少しだけ大きく */
    }
    .profile-content {
        padding: 40px 24px;
    }
    .contact-content {
        padding: 60px 24px 40px;
    }
    .contact-mail-list {
        font-size: 14px;
    }
    .privacy-content {
        padding: 60px 24px 40px;
    }
}

/* ============================================
   Responsive - PC（1025px〜）モーダル拡大
   ============================================ */

@media (min-width: 1025px) {
    .modal-inner {
        max-width: min(96vw, 1800px); /* 1400px → 1800pxまで拡大 */
        max-height: 94vh;             /* 92vh → 94vh */
        padding: 40px;
    }

    .modal-slide img {
        max-height: 86vh; /* 82vh → 86vh */
    }

    .modal-video iframe {
        max-height: 86vh;
    }
}

/* ============================================
   Responsive - 外部大画面モニター（1600px〜）
   ノートPCでは94〜96vwでほぼ画面いっぱいになるが、
   1600px以上の外部モニターでは相対的に小さく見えるため
   この帯だけvwの割合を上げてより大きく表示する
   ============================================ */

@media (min-width: 1600px) {
    .modal-inner {
        max-width: min(85vw, 2000px);
    }
}

.page-title {
    display: none;
}