/* Variables */
:root {
    --color-mint: #00A99D;
    --color-mint-light: #eaf8f4;
    --color-pink: #dca8c0; /* Slightly darker for text/lines */
    --color-pink-light: #fdf2f6;
    --color-text: #333333;
    --color-text-light: #666666;
    --font-base: "Noto Sans JP", sans-serif;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-base);
    color: var(--color-text);
    line-height: 1.8;
    background-color: #fff;
    overflow-x: hidden;
    padding-top: 80px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul { list-style: none; }

/* Layout Utilities */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
    width: 100%;
    box-sizing: border-box;
}

.flex-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.section {
    padding-top: 80px;
    padding-bottom: 80px;
}

/* Header */
.header {
    display: flex;
    background-color: rgba(255, 255, 255, 0.95);
    justify-content: space-between;
    align-items: center;
    padding: 0px 40px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    border-bottom: 1px solid #eee;
    height: 80px;
}

.logo {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--color-mint);
}

/* ナビゲーションの文字色（text-mint）が効くように調整 */
.nav a.text-mint {
    color: var(--color-mint);
    padding-left: 0;
    border-bottom: 2px solid var(--color-mint); /* 左線より下線の方がヘッダーには一般的 */
    padding-bottom: 4px;
    border-left: none; /* もし左線が不要なら */
    display: inline-block;
}

.nav a {
    margin-left: 25px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Typography Helpers */
.highlight {
    background: var(--color-mint);
    color: #fff;
    padding: 0px 8px;
    margin-bottom: 15px;
}

.hero-title {
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--color-mint);
}

.hero-tagline{
    font-size: 2rem;
    color: var(--color-mint);
}

.section-label {
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.section-label .big-char {
    font-size: 4rem;
    float: left;
    margin-right: 10px;
    line-height: 0.8;
}

.section-label .ja-label {
    font-size: 1.2rem;
    display: block;
    margin-top: 5px;
}

.text-mint { color: var(--color-mint); border-left: 4px solid var(--color-mint); padding-left: 15px; }
.text-pink { color: var(--color-pink); border-left: 4px solid var(--color-pink); padding-left: 15px; }

.marker-mint { background: linear-gradient(transparent 60%, #bdf3dd 60%); }
.marker-pink { background: linear-gradient(transparent 60%, #fce1ed 60%); }

.section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.desc {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: 30px;
}

/* Buttons */
.btn-outline {
    display: inline-block;
    padding: 10px 30px;
    border: 1px solid #ccc;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--color-text);
}

.btn-outline:hover {
    background-color: var(--color-mint);
    border-color: var(--color-mint);
    color: #fff;
}

.arrow { margin-left: 10px; }

/* Visual Elements */
.image-content {
    display: flex;
}

.logo-big {
    width: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.abstract-shape {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    position: relative;
}

.mint-shape {
    background: var(--color-mint);
    opacity: 0.5;
    /* CSSで勾玉のような形状を簡易再現（クリップパスなどは複雑なのでborder-radiusで調整） */
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
}

.circle-bg {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    overflow: hidden;
}

.mint-bg { background-color: var(--color-mint-light); color: var(--color-mint); }
.pink-bg { background-color: var(--color-pink-light); color: var(--color-pink); }

.main-svg-icon {
    width: 65%; 
    height: auto;
    display: block;
}

/* Photo Placeholders */
.photo-circle {
    background-color: #ddd;
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    /* 実際の画像がある場合は background-image: url(...) を指定 */
}

/* Photo Cluster Section */
.photo-cluster {
    position: relative;
    width: 400px;
    height: 400px;
}

.photo-cluster .p1 {
    width: 200px; height: 200px;
    position: absolute; top: 0; left: 20px;
    background-image: url(img/lab01.JPG);
    background-size: cover;
}
.photo-cluster .p2 {
    width: 150px; height: 150px;
    position: absolute; bottom: 50px; right: 0;
    background-image: url(img/lab02.JPG);
    background-size: cover;
}
.photo-cluster .p3 {
    width: 100px; height: 100px;
    position: absolute; bottom: 0; left: 50px;
    background-image: url(img/lab03.jpg);
    background-size: cover;
}

/* Background Sections */
.bg-mint-light { background-color: var(--color-mint-light); }
.bg-pink-light { background-color: var(--color-pink-light); }
.text-dark { color: var(--color-text); font-size: 0.7em; }
.section-header-lg {
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: bold;
}

.photo-pair {
    display: flex;
    gap: 20px;
}

.photo-pair .p4, .photo-pair .p5, .photo-pair .p6, .photo-pair .p7 {
    width: 180px; height: 180px;
}

.photo-pair .p4 {
    background-image: url('img/photo01.jpg');
    background-size: cover;
}

.photo-pair .p5 {
    background-image: url('img/photo02.jpg');
    background-size: cover;
}

.photo-pair .p6 {
    background-image: url('img/photo03.jpg');
    background-size: cover;
}

.photo-pair .p7 {
    background-image: url('img/photo04.jpg');
    background-size: cover;
}

/* Footer */
.footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0;
    font-size: 0.8rem;
    text-align: center;
}

.footer-links a {
    color: #ccc;
    margin: 0 10px;
}

.copyright {
    margin-top: 20px;
    color: #666;
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay {
    transition-delay: 0.2s;
}

/* Responsive */
@media (max-width: 768px) {
    .container main .flex-row > div {
        width: 100% !important;
        max-width: 100% !important;
        padding-right: 0;
    }

    .abstract-shape, .circle-bg, .photo-cluster {
        margin: 30px auto 0;
    }

    .flex-row, .flex-row.reverse {
        flex-direction: column;
        text-align: left;
    }
    
    .reverse {
        flex-direction: column-reverse; /* スマホでは画像が上に来るようにする場合 */
    }

    .logo-big, .abstract-shape, .circle-bg, .photo-cluster {
        width: 300px;
        height: 300px;
        margin: 0 auto;
    }
    
    .photo-pair {
        display: flex !important;
        flex-direction: row;
        justify-content: center;
        gap: 15px;
        width: 100%;
        margin: 20px auto;
    }
    
    .photo-pair .p4, .photo-pair .p5 {
        width: 140px;
        height: 140px;
        flex-shrink: 0;
        background-size: cover;
        background-position: center;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between; /* 3本の線を均等に配置 */
        width: 30px;
        height: 20px;
        z-index: 110;
        box-sizing: border-box;
    }

    .hamburger span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: var(--color-text);
        transition: all 0.3s ease-in-out;
        border-radius: 2px;
        transform: translateZ(0);
    }

    /* ボタンが開いている時のアニメーション (X印) */
    .hamburger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    /* 2. ナビゲーションを全画面メニュー化 */
    .nav {
        display: flex; /* 非表示から変更 */
        position: fixed;
        top: 0;
        right: -100%; /* 最初は画面の外に隠す */
        width: 80%;
        height: 100vh;
        background-color: #fff;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: 0.5s ease-in-out;
        z-index: 100;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }

    .nav.active {
        right: 0; /* 画面内に出現 */
    }

    .nav a {
        margin: 0;
        font-size: 1.2rem;
    }

    /* 3. 全体のサイズ調整 */
    .page-title {
        font-size: 1.8rem; /* 少し小さく */
        margin-bottom: 25px;
    }

    .year-label-lg {
        font-size: 1.4rem;
        margin-bottom: 25px;
    }

    .section {
        padding-top: 40px;
        padding-bottom: 40px; 
    }

    .header {
        padding: 0 20px;
        height: 70px; /* 少し低く */
    }
    
    body.sub-page {
        padding-top: 70px;
    }

    /*プロフィールセクションを縦並びにする*/
    .profile-section.flex-row {
        gap: 20px;
    }

    /* 2. 画像コンテナの幅を100%にする */
    .profile-section .image-content {
        width: 100% !important;
        display: flex;
        justify-content: center; /* 写真を中央に寄せる */
    }

    /*消えていた写真に「高さ」と「幅」を明示的に与える */
    .profile-photo {
        width: 200px;
        height: 200px;
        margin: 0 auto;
        background-size: cover;
        background-position: center;
    }
}

/* --- Additions for Sub-pages --- */

/* Sub-page Header Adjustment */
body.sub-page {
    padding-top: 80px; /* Header height space */
    display: flex;          /* Flexboxレイアウトを有効化 */
    flex-direction: column; /* 子要素（header, main, footer）を縦に並べる */
    min-height: 100vh;      /* 画面の高さ100%分を最低限確保する */
    align-items: stretch; 
    margin: 0;
}
body.sub-page main {
    flex: 1; /* 余ったスペースをすべて使い切る（＝フッターが下に押し出される） */
    width: 100%;
    text-align: left;
}

/* Page Title */
.page-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    font-weight: bold;
}
.page-title span {
    display: block;
    font-size: 1rem;
    font-weight: normal;
    color: var(--color-text-light);
    margin-top: 5px;
}

/* --- About Page (about.html) --- */
.profile-section {
    margin-bottom: 80px;
}
.profile-name {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px;
    border-bottom: none;
}
.profile-en {
    font-size: 1rem;
    color: var(--color-text-light);
    display: block;
    margin-bottom: 20px;
}
.history-list {
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--color-text);
}
.history-list dt {
    float: left;
    clear: left;
    width: 80px;
    font-weight: bold;
    margin-bottom: 5px;
}
.history-list dd {
    margin-left: 80px;
    margin-bottom: 5px;
}
.profile-photo {
    width: 100%;
    max-width: 300px;
    height: 350px;
    background-color: #ddd; /* Image placeholder */
    background-size: cover;
    margin: 0 auto;
}

#project-gallery-app {
    display: flex;
    margin-top: 40px;
}

/* --- Achievements Page (works.html) --- */
.year-block {
    margin-bottom: 20px;
}
.year-heading {
    font-size: 1.5rem;
    color: var(--color-mint);
    margin-bottom: 10px;
    padding-bottom: 0px;
}
.achievement-category {
    margin-bottom: 30px;
    padding-left: 20px;
}
.cat-title {
    font-size: 1.5rem;
    color: var(--color-mint);
    border-left: 5px solid var(--color-mint);
    padding-left: 15px;
    margin-bottom: 15px;
    font-weight: bold;
}
/* For categories needing pink style if any */
.cat-title.pink {
    color: var(--color-pink);
    border-left-color: var(--color-pink);
}

.paper-list {
    list-style-type: disc;
    padding-left: 25px;
    margin-top: 10px;
}

.paper-list li {
    margin-bottom: 8px;
    font-size: 0.95rem;
    line-height: 1.6;
    text-indent: 0;        
    padding-left: 0;       
    list-style-position: outside;
}

/* --- Members Page (members.html) --- */
.member-year-section {
    margin-bottom: 60px;
}
.year-label-lg {
    font-size: 1.8rem;
    color: var(--color-mint);
    border-left: 5px solid var(--color-mint);
    padding-left: 15px;
    margin-bottom: 40px;
    font-weight: bold;
}
.grade-group {
    margin-bottom: 40px;
}
.grade-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 15px;
}
.member-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.member-list li {
    font-size: 1rem;
}
.alumni-section h3 {
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: bold;
}

/* --- Contact Page (contact.html) --- */
.access-map iframe {
    width: 100%;
    height: 300px;
    border: 0;
    background-color: #eee;
}
.address-text {
    margin-bottom: 20px;
}
.contact-form {
    max-width: 600px;
    margin-top: 40px;
}
.form-group {
    margin-bottom: 25px;
}
.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}
.form-input, .form-textarea {
    width: 100%;
    padding: 15px;
    background-color: #e0e0e0; /* Gray bg as per wireframe */
    border: none;
    font-family: inherit;
    font-size: 1rem;
}
.form-textarea {
    height: 200px;
    resize: vertical;
}
.btn-submit {
    background: #fff;
    border: 1px solid #333;
    padding: 10px 50px;
    border-radius: 50px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1rem;
    margin-top: 10px;
}
.btn-submit:hover {
    background: #333;
    color: #fff;
}

/* Responsive adjustments for sub-pages */
@media (max-width: 768px) {
    .gallery-item { width: calc(50% - 8px); }
    .history-list dt { float: none; width: auto; }
    .history-list dd { margin-left: 0; margin-bottom: 15px; }
}

/* デスクトップではハンバーガーを隠す */
@media (min-width: 769px) {
    .hamburger { display: none; }
}