/* Koki — 個人開発ポートフォリオ。
   中立の地の上で、色を持つのはアプリのアイコンだけ。
   洗練は余白・階調・字組みで作り、飾りでは作らない。 */

:root {
    --bg:        #FBFAF8;
    --bg-2:      #F3F1EC;
    --ink:       #17171A;
    --ink-soft:  #3F3F45;
    --muted:     #8A8A90;
    --faint:     #A8A8AE;
    --hairline:  rgba(23, 23, 26, 0.10);
    --hair-soft: rgba(23, 23, 26, 0.055);
    --lift:      rgba(23, 23, 26, 0.028);
    --icon-ring: rgba(23, 23, 26, 0.12);
    --shadow:    0 1px 2px rgba(23,23,26,.06), 0 8px 24px -12px rgba(23,23,26,.18);
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg:        #0C0C0E;
        --bg-2:      #16161A;
        --ink:       #F0F0F3;
        --ink-soft:  #C2C2C9;
        --muted:     #7E7E87;
        --faint:     #63636B;
        --hairline:  rgba(255, 255, 255, 0.11);
        --hair-soft: rgba(255, 255, 255, 0.06);
        --lift:      rgba(255, 255, 255, 0.04);
        --icon-ring: rgba(255, 255, 255, 0.13);
        --shadow:    0 1px 2px rgba(0,0,0,.5), 0 10px 30px -14px rgba(0,0,0,.8);
    }
}

:root[data-theme="dark"] {
    --bg:        #0C0C0E;
    --bg-2:      #16161A;
    --ink:       #F0F0F3;
    --ink-soft:  #C2C2C9;
    --muted:     #7E7E87;
    --faint:     #63636B;
    --hairline:  rgba(255, 255, 255, 0.11);
    --hair-soft: rgba(255, 255, 255, 0.06);
    --lift:      rgba(255, 255, 255, 0.04);
    --icon-ring: rgba(255, 255, 255, 0.13);
    --shadow:    0 1px 2px rgba(0,0,0,.5), 0 10px 30px -14px rgba(0,0,0,.8);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    /* 上端だけ、ごく浅く持ち上げる。単調な白紙にしないための唯一の階調 */
    background-image: radial-gradient(120% 60% at 50% -10%, var(--bg-2) 0%, var(--bg) 62%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--ink-soft);
    font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans",
                 "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
    font-size: 15px;
    line-height: 1.95;
    letter-spacing: 0.015em;
    -webkit-font-smoothing: antialiased;
}

.page {
    max-width: 660px;
    margin: 0 auto;
    padding: 104px 24px 128px;
}

/* ---------- ヘッダー ---------- */

.hero { margin-bottom: 12px; }

.name {
    margin: 0;
    font-size: 46px;
    font-weight: 600;
    letter-spacing: 0.09em;
    line-height: 1.1;
    color: var(--ink);
}

.tagline {
    margin: 16px 0 0;
    font-size: 15px;
    color: var(--ink-soft);
    letter-spacing: 0.03em;
}

/* 事実だけの一行。区切りは中黒。 */
.meta {
    margin: 20px 0 0;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: var(--faint);
    text-transform: uppercase;
}

.meta span + span::before {
    content: "·";
    margin: 0 9px;
    opacity: 0.6;
}

/* 作ったものを、まず絵として置く棚 */
.shelf {
    display: flex;
    gap: 11px;
    margin-top: 40px;
    padding-bottom: 4px;
}

.shelf img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    box-shadow: var(--shadow), inset 0 0 0 1px var(--icon-ring);
    transition: transform 260ms cubic-bezier(.2,.7,.3,1);
}

.shelf img:hover { transform: translateY(-3px); }

/* ---------- セクション ---------- */

.section { margin-top: 92px; }

.section-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.section-head h2 {
    margin: 0;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.22em;
    color: var(--muted);
    text-transform: uppercase;
    white-space: nowrap;
}

.section-head::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--hairline);
}

.about p { margin: 0 0 20px; }
.about p:last-child { margin-bottom: 0; }
.about .lede { color: var(--ink); }

/* ---------- アプリ一覧 ---------- */

.group {
    margin: 36px 0 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    color: var(--muted);
}

.app {
    position: relative;
    display: flex;
    gap: 22px;
    align-items: flex-start;
    padding: 24px 16px 24px 18px;
    margin: 0 -16px 0 -18px;
    border-top: 1px solid var(--hair-soft);
    text-decoration: none;
    color: inherit;
    border-radius: 14px;
    transition: background-color 220ms ease;
}

.group + .app { border-top-color: var(--hairline); }

/* ホバーで、そのアプリ自身の色がうっすら差す */
.app::before {
    content: "";
    position: absolute;
    left: 0; top: 8px; bottom: 8px;
    width: 2px;
    border-radius: 2px;
    background: var(--accent);
    opacity: 0;
    transition: opacity 220ms ease;
}

.app:hover { background: var(--lift); }
.app:hover::before { opacity: 0.85; }

.app img {
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    border-radius: 15.3px;
    display: block;
    box-shadow: var(--shadow), inset 0 0 0 1px var(--icon-ring);
    transition: transform 260ms cubic-bezier(.2,.7,.3,1);
}

.app:hover img { transform: scale(1.04); }

.app-body { display: block; min-width: 0; padding-top: 3px; }

.app-name {
    display: block;
    color: var(--ink);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1.5;
}

.app-name::after {
    content: "↗";
    margin-left: 8px;
    font-size: 11px;
    font-weight: 400;
    color: var(--accent);
    vertical-align: 1px;
    opacity: 0;
    transition: opacity 220ms ease;
}

.app:hover .app-name::after { opacity: 1; }

.app-desc {
    display: block;
    margin: 5px 0 0;
    font-size: 14px;
    line-height: 1.85;
}

.app-tech {
    display: block;
    margin: 10px 0 0;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--muted);
    letter-spacing: 0.02em;
}

.app-tech b {
    font-weight: 600;
    color: var(--ink-soft);
    letter-spacing: 0.06em;
}

/* ---------- 連絡先 ---------- */

.contact p { margin: 26px 0 0; }

.contact ul {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.contact a {
    display: inline-block;
    padding: 9px 18px;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    color: var(--ink);
    text-decoration: none;
    font-size: 13.5px;
    letter-spacing: 0.03em;
    transition: background-color 200ms ease, border-color 200ms ease;
}

.contact a:hover {
    background: var(--lift);
    border-color: var(--muted);
}

/* ---------- 表示アニメーション ---------- */

.reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 620ms ease, transform 620ms cubic-bezier(.2,.7,.3,1);
}

.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .shelf img, .app img { transition: none; }
}

/* ---------- 狭い画面 ---------- */

@media (max-width: 480px) {
    .page { padding: 68px 20px 92px; }
    .name { font-size: 36px; }
    .section { margin-top: 68px; }
    .shelf { gap: 9px; margin-top: 32px; }
    .shelf img { width: 40px; height: 40px; }
    .app { gap: 16px; padding: 20px 12px 20px 14px; margin: 0 -12px 0 -14px; }
    .app img { width: 56px; height: 56px; flex-basis: 56px; border-radius: 12.6px; }
    .app-name { font-size: 15px; }
}
