/* ============================================
   YUMA TANAKA PORTFOLIO - ACADEMIC/TRUSTED DESIGN
   Human-Centered Design Principles Implementation
   ============================================ */

/* --- Design Tokens --- */
:root {
    /* Colors - Fact-Based Palette */
    --bg-paper: #f4f4f0;
    --bg-pure: #ffffff;
    --bg-soft: #eeeee8;

    --ink-black: #2b2b2b;
    --ink-gray: #595959;
    --ink-light: #8c8c8c;

    --brand-blue: #003366;
    --brand-blue-dark: #002244;

    --accent-red: #a50000;
    --accent-warm: #b8860b;
    --accent-warm-light: rgba(212, 168, 71, 0.12);

    --border-line: #dcdcdc;
    --border-strong: #2b2b2b;

    /* Typography */
    --font-sans: "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
    --font-serif: "Noto Serif JP", "YuMincho", "Yu Mincho", serif;

    /* Layout */
    --grid-gap: 24px;
    --section-spacing: 80px;
    --content-width: 1080px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    background-color: var(--bg-paper);
    color: var(--ink-black);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    line-height: 1.75;
    /* ゆとりある行間 */
    letter-spacing: 0.02em;
}

a {
    color: var(--brand-blue);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}

a:hover {
    border-bottom-color: var(--brand-blue);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Typography System --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.3;
    color: var(--ink-black);
    margin-bottom: 1rem;
}

.heading-xl {
    /* Page Title */
    font-size: 3.5rem;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    border-bottom: 4px solid var(--ink-black);
    padding-bottom: 1rem;
}

.heading-lg {
    /* Section Title */
    font-size: 2.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-strong);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.heading-md {
    /* Article Title */
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.heading-sm {
    /* Sub-Title */
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.serif-text {
    font-family: var(--font-serif);
}

.meta-text {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    color: var(--ink-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Structure & Layout --- */
.container {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: var(--section-spacing) 0;
    border-bottom: 1px solid var(--border-line);
}

.section:last-child {
    border-bottom: none;
}

/* --- Navigation --- */
.global-nav {
    background: rgba(244, 244, 240, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-strong);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.global-nav.scrolled {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink-black);
    letter-spacing: -0.02em;
}

.site-title:hover {
    text-decoration: none;
    border-bottom: none;
}

.nav-list {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-item a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-item a:hover,
.nav-item a.active {
    color: var(--brand-blue);
    border-bottom: 1px solid var(--brand-blue);
}

/* --- Grid System (Editorial) --- */
.editorial-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--grid-gap);
    align-items: start;
}

/* --- Components: Articles / Cards --- */
/* "静寂"のデザイン: 派手なシャドウやホバーエフェクトを排除 */

.article-row {
    grid-column: span 12;
    display: grid;
    grid-template-columns: 200px 1fr;
    /* 左:メタデータ, 右:本文 */
    gap: var(--grid-gap);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-line);
}

.article-row:last-child {
    border-bottom: none;
}

.article-meta {
    font-size: 0.875rem;
    color: var(--ink-light);
}

.article-date {
    display: block;
    font-weight: 600;
    color: var(--ink-black);
    margin-bottom: 0.5rem;
}

.article-tag {
    display: inline-block;
    font-size: 0.75rem;
    border: 1px solid var(--border-line);
    padding: 2px 8px;
    border-radius: 2px;
    margin-top: 0.5rem;
    color: var(--ink-gray);
}

.article-content h3 {
    margin-top: 0;
}

.lead-paragraph {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--ink-black);
    margin-bottom: 1.5rem;
}

.body-text {
    color: var(--ink-gray);
    margin-bottom: 1.5rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brand-blue);
}

.read-more::after {
    content: "→";
    transition: transform 0.2s ease;
}

.read-more:hover::after {
    transform: translateX(4px);
}

/* --- Hero Section (Academic Style) --- */
.academic-hero {
    padding: 80px 0;
    border-bottom: 4px solid var(--ink-black);
}

.hero-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.hero-main h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 2rem;
}

.hero-intro {
    font-size: 1.25rem;
    color: var(--ink-gray);
    max-width: 600px;
}

/* hero-portrait styles moved below portrait-img */

.portrait-img {
    width: 100%;
    border-radius: 2px;
}

.hero-portrait {
    border: 1px solid var(--border-line);
    padding: 1rem;
    background: var(--bg-pure);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* --- Identity Grid --- */
/* グリッドと罫線で区切る、表のようなデザイン */
.identity-table {
    width: 100%;
    border-top: 2px solid var(--ink-black);
    border-bottom: 2px solid var(--ink-black);
}

.identity-row {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-line);
    align-items: baseline;
}

.identity-row:last-child {
    border-bottom: none;
}

.id-name {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
}

.id-role {
    font-size: 0.9rem;
    color: var(--ink-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.id-desc {
    font-size: 0.95rem;
    color: var(--ink-black);
}

/* --- Skills (Minimal Charts) --- */
.skill-list {
    list-style: none;
    border-top: 1px solid var(--border-strong);
}

.skill-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-line);
    align-items: center;
}

.skill-name {
    font-weight: 600;
}

.process-bar-track {
    width: 100%;
    height: 4px;
    background: var(--border-line);
    position: relative;
}

.process-bar-fill {
    height: 100%;
    background: var(--brand-blue);
    position: absolute;
    top: 0;
    left: 0;
}

/* --- Form (Paper Style) --- */
.paper-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--bg-pure);
    border: 1px solid var(--border-line);
}

.form-field {
    margin-bottom: 2rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-line);
    background: var(--bg-paper);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--brand-blue);
    background: var(--bg-pure);
}

.btn-submit {
    background: var(--brand-blue);
    color: white;
    border: none;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 2px;
}

.btn-submit:hover {
    background: var(--brand-blue-dark);
}

/* --- Footer --- */
.site-footer {
    padding: 3rem 0;
    border-top: 4px solid var(--ink-black);
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    font-size: 0.8rem;
    color: var(--ink-light);
}

/* --- Utility Layouts --- */
.layout-2col-sidebar {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.sidebar-box {
    background: var(--bg-pure);
    border: 1px solid var(--border-line);
    padding: 1.5rem;
}

.col-full {
    grid-column: span 12;
}

/* --- Scroll Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Hamburger Menu --- */
.hamburger {
    display: none;

    .hamburger {
        display: block;
    }
}