/* ===== Variables ===== */
:root {
    --bg: #fafaf9;
    --bg-elev: #ffffff;
    --bg-dark: #0e0e10;
    --text: #1a1a1a;
    --text-sub: #666;
    --text-mute: #999;
    --border: #e8e6e3;
    --accent: #0e0e10;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);
    --radius: 16px;
    --radius-sm: 10px;
    --font-jp: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", sans-serif;
    --font-en: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    margin: 0;
    font-family: var(--font-jp);
    color: var(--text);
    line-height: 1.8;
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-image:
        radial-gradient(circle at 0% 0%, rgba(14, 14, 16, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(14, 14, 16, 0.02) 0%, transparent 50%);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

p {
    margin: 0 0 1em;
}

/* ===== Header (Glass Fixed Nav) ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 100;
    background: rgba(250, 250, 249, 0.75);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid rgba(232, 230, 227, 0.6);
}

.logo {
    font-family: var(--font-en);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    color: var(--accent);
}

header nav ul {
    display: flex;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

header nav a {
    font-family: var(--font-en);
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--text-sub);
    position: relative;
    transition: color 0.2s ease;
}

header nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 1.5px;
    background: var(--accent);
    transition: width 0.25s ease;
}

header nav a:hover {
    color: var(--accent);
}

header nav a:hover::after {
    width: 100%;
}

/* ===== Main ===== */
main {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 32px;
}

section {
    padding: 80px 0;
}

.eyebrow {
    font-family: var(--font-en);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-mute);
    margin: 0 0 12px;
}

h2 {
    font-family: var(--font-jp);
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 32px;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

h3 {
    font-family: var(--font-jp);
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--text);
}

.lead {
    color: var(--text-sub);
    font-size: 0.98rem;
    margin-bottom: 28px;
}

/* ===== Hero ===== */
.hero {
    min-height: 92vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px 0 80px;
}

.hero-greeting {
    font-family: var(--font-en);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-mute);
    margin: 0 0 20px;
}

.hero-title {
    font-family: var(--font-en);
    font-size: clamp(3rem, 9vw, 6rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    margin: 0 0 24px;
    color: var(--accent);
}

.hero-dot {
    color: var(--text-mute);
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-sub);
    margin: 0 0 16px;
    font-weight: 500;
}

.hero-lead {
    font-size: 0.98rem;
    color: var(--text-sub);
    max-width: 560px;
    margin: 0 0 36px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 999px;
    font-family: var(--font-en);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-ghost {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ===== About Card ===== */
.about-card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow-sm);
}

.about-card h3 {
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.ruby {
    font-size: 0.7em;
    color: var(--text-mute);
    font-weight: 500;
    margin-left: 4px;
}

.meta-list {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

.meta-list li {
    display: flex;
    flex-direction: column;
    font-size: 0.95rem;
}

.meta-list span {
    font-family: var(--font-en);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-mute);
    margin-bottom: 4px;
}

/* ===== Card Grid (Hobby) ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #d6d2cc;
}

.card h3 {
    font-family: var(--font-en);
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 10px;
    letter-spacing: 0.01em;
}

.card p {
    font-size: 0.92rem;
    color: var(--text-sub);
    margin: 0;
    line-height: 1.7;
}

/* ===== Work Item ===== */
.work-item {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.work-tag {
    display: inline-block;
    font-family: var(--font-en);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(14, 14, 16, 0.06);
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.work-item h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.work-note {
    font-size: 0.9rem;
    color: var(--text-sub);
    margin: 0 0 20px;
}

.work-papers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.work-papers .link-card {
    padding: 18px 22px;
}

.work-papers .link-card-title {
    font-size: 0.92rem;
    line-height: 1.5;
}

/* ===== Link Card (Blog) ===== */
.link-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.link-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.link-card-label {
    font-family: var(--font-en);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-mute);
    background: rgba(14, 14, 16, 0.05);
    padding: 5px 10px;
    border-radius: 6px;
}

.link-card-title {
    flex: 1;
    font-weight: 500;
    color: var(--text);
}

.link-card-arrow {
    font-size: 1.3rem;
    color: var(--text-mute);
    transition: transform 0.25s ease, color 0.25s ease;
}

.link-card:hover .link-card-arrow {
    transform: translate(3px, -3px);
    color: var(--accent);
}

/* ===== Contact Link ===== */
.contact-link {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-dark);
    color: #fff;
    border-radius: var(--radius);
    padding: 24px 32px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.contact-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.contact-label {
    font-family: var(--font-en);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
    padding: 5px 10px;
    border-radius: 6px;
}

.contact-value {
    flex: 1;
    font-family: var(--font-en);
    font-size: 1rem;
    font-weight: 500;
    word-break: break-all;
}

.contact-arrow {
    font-size: 1.3rem;
    transition: transform 0.25s ease;
}

.contact-link:hover .contact-arrow {
    transform: translateX(4px);
}

/* ===== Footer ===== */
footer {
    margin-top: 60px;
    padding: 32px;
    text-align: center;
    border-top: 1px solid var(--border);
}

footer p {
    margin: 0;
    font-family: var(--font-en);
    font-size: 0.82rem;
    color: var(--text-mute);
    letter-spacing: 0.04em;
}

.footer-note {
    margin-top: 6px !important;
    font-size: 0.75rem !important;
    opacity: 0.75;
}

.footer-note a {
    color: var(--text-sub);
    border-bottom: 1px solid var(--border);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-note a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    header {
        height: 56px;
        padding: 0 20px;
    }

    .logo {
        font-size: 0.95rem;
    }

    header nav ul {
        gap: 16px;
    }

    header nav a {
        font-size: 0.78rem;
    }

    main {
        padding: 0 20px;
    }

    section {
        padding: 60px 0;
    }

    h2 {
        font-size: 1.55rem;
        margin-bottom: 24px;
    }

    .hero {
        min-height: auto;
        padding: 110px 0 60px;
    }

    .hero-sub {
        font-size: 1rem;
    }

    .about-card,
    .work-item {
        padding: 24px;
    }

    .link-card,
    .contact-link {
        flex-wrap: wrap;
        gap: 12px;
        padding: 20px 22px;
    }

    .contact-value {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    header nav ul {
        gap: 12px;
    }

    header nav a {
        font-size: 0.72rem;
    }
}
