@charset "UTF-8";

/*---------- 共通 ----------*/
:root {
    /* 色スタイル */
    --bg-color: #d2f3ff;
    --header-bg-color: #ffffff;
    --white: #ffffff;
    --font-black: #1d2129;
    --muted: rgba(255, 255, 255, 0.7);
    --panel-blue: #0F588D;
    --panelBorder: rgba(255, 255, 255, 0.4);
}

body {
    font-family: "Noto Sans JP", sans-serif;
    color: var(--font-black);
    font-size: 18px;
    line-height: 1.5;

    background-color: var(--bg-color);
}

.dotgothic16-regular {
    font-family: "DotGothic16", sans-serif;
    font-weight: 400;
    font-style: normal;
}

img {
    max-width: 100%;
}

/*---------- Utility ----------*/
.u-content-wrapper {
    width: min(92vw, 960px);
    margin-inline: auto;
    text-align: center;
}

/*---------- Component ----------*/

h1 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.c-logo__text {
    /* font-family: "DotGothic16", sans-serif; */
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.c-logo__pipe {
    font-weight: normal;
}

.c-logo__text-sub {
    font-size: 20px;
}

/*----- 見出し -----*/
.c-section-title {
    font-size: 24px;
    padding-block-start: 30px;
    padding-block-end: 30px;
}

/*----- カード -----*/
.c-product-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    background: var(--white);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--panel-blue);
    text-decoration: none;
    color: inherit;
}

.c-product-card:hover {
    transform: translateY(-2px);
}

.c-product-card__img {
    object-fit: cover;
    height: 200px;
    border-radius: 500px;
}

.c-product-card__title {
    font-weight: bold;
    border-bottom: 1px solid var(--font-black);
    letter-spacing: 0.08em;
}

.c-product-card__detail {
    text-align: left;
}

/* .c-product-card__tag {} */

/*----- header -----*/
.c-header-nav__item {
    border-bottom: 1px solid var(--white);
}

.c-header-nav__item:hover {
    border-bottom: 1px solid var(--font-black);
}

.l-header {
    background-color: var(--header-bg-color);
    padding-block: 10px;
}

.l-header>.u-content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.l-header-nav {
    margin-block: auto;
}

.l-header-nav__list {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/*----- footer -----*/

.c-copyright {
    font-size: 12px;
}

.l-footer {
    background-color: var(--white);
}

.l-footer>.u-content-wrapper {
    text-align: right;
}


/*----- ハンバーガーメニュー -----*/
.c-ham-nav {
    /* fixed + 全部0で画面いっぱいに敷き詰めることができる */
    /* 100vw, 100vhと同じ */
    position: fixed;
    /* top, right, bottom, leftを一括指定 */
    inset: 0 -100vw 0 100vw;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 1;
}

/* メニューが開いている時 */
/* 先祖にopenが付いている時は開くようにする（今回はBodyに） */
.open .c-ham-nav {
    translate: -100vw 0;
}

.c-ham-nav ul {
    /* background-color: orange; */
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    text-align: center;
}

.c-ham-nav li a {
    font-size: 1.8rem;
    display: block;
}

.ham-button {
    position: fixed;
    top: 20px;
    right: 20px;
    /* background-color: orange; */
    width: 50px;
    height: 50px;
    z-index: 2;
}

.ham-line {
    display: block;
    height: 2px;
    width: 30px;
    background-color: #2c2c2c;
    margin: auto;
    position: relative;
}

.open .ham-line {
    background-color: transparent;

}

.ham-line::before,
.ham-line::after {
    content: '';
    display: block;
    height: 100%;
    width: 100%;
    background-color: #2c2c2c;
    position: absolute;
}

.ham-line::before {
    top: -10px;
}

.open .ham-line::before {
    rotate: 45deg;
    top: 0;
}

.ham-line::after {
    top: 10px;
}

.open .ham-line::after {
    rotate: -45deg;
    top: 0;
}

/* vidually-hidden */
/* HTML上には書きたいけど、ブラウザ上では非表示にする */
/* https://qiita.com/randy39/items/fca820d500dfe9ec1a52 */
.visually-hidden {
    position: fixed !important;
    /* keep it on viewport */
    top: 0px !important;
    left: 0px !important;
    /* give it non-zero size, VoiceOver on Safari requires at least 2 pixels
     before allowing buttons to be activated. */
    width: 4px !important;
    height: 4px !important;
    /* visually hide it with overflow and opacity */
    opacity: 0 !important;
    overflow: hidden !important;
    /* remove any margin or padding */
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    /* ensure no other style sets display to none */
    display: block !important;
    visibility: visible !important;
}


/*---------- index.html ----------*/

.l-projects-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

/*---------- castle showcase ----------*/

#stage {
    height: 700px;
}

#castleCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    /* 3D側は触れる必要がないので、canvasはイベント無効化 */
    pointer-events: none;
}

/* コンテナ：3Dを背景として持つ */
.projects-showcase {
    position: relative;
    width: 100%;
    height: 100%;
    /* #stage の高さに追従 */
    border-radius: 18px;
    overflow: hidden;
}

/* Swiper：右上に重ねてサイズを決める */
.projects-showcase #cards-root {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: min(340px, 40vw);
    height: min(400px, 70%);
}

/* Swiper 本体（cards effect） */
.swiper {
    flex: 1;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.swiper-slide {
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 10px;
    box-sizing: border-box;
}

.swiper-card {
    width: 100%;
    background: var(--panel-blue);
    border: 1px solid var(--panelBorder);
    border-radius: 16px;
    padding: 14px 14px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
    color: var(--muted);
}

.swiper-card-title {
    margin: 0;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: .02em;
}

.swiper-card-body {
    margin: 8px 0 0;
    font-size: 16px;
    line-height: 1.65;
}

.swiper-link {
    display: inline-block;
    color: var(--panel-blue);
    background: #ffffff;
    margin-block: 10px;
    padding-inline: 4px;
    font-weight: bold;
    line-height: 1.65;
    border-radius: 6px;
}

/* “カードが重なって見える”演出（activeが最前面） */
.swiper-wrapper {
    position: relative;
}

.swiper-slide {
    transition: transform 240ms ease, opacity 240ms ease;
    opacity: .35;
    transform: scale(.92);
    z-index: 1;
}

.swiper-slide-prev,
.swiper-slide-next {
    opacity: .65;
    transform: scale(.96);
    z-index: 5;
}

.swiper-slide-active {
    opacity: 1;
    transform: scale(1);
    z-index: 10;
}

/*---------- skill ----------*/

.c-skill-list {
    background-color: #fff;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;

    align-items: center;
}

.u-pc-only {
    display: none;
}

/*---------- contact ----------*/

.l-contact-list {
    background-color: #fff;
    padding-block: 30px;
    margin-bottom: 30px;
}

/* 768px以上の画面幅用スタイル */
@media screen and (min-width: 768px) {
    .u-sp-only {
        display: none;
    }

    .u-pc-only {
        display: block;
    }
}