/* ============================================================
   Keikichi Den — Aviation Sky theme
   ============================================================ */

:root {
    --ana-blue: #0b4d94;
    --deep: #062a56;
    --sky: #2f7fe0;
    --sky-light: #7db9f0;
    --bg: #f3f8fd;
    --card: #ffffff;
    --text: #16283c;
    --muted: #54708c;
    --line: #dbe9f6;
    --radius: 18px;
    --shadow: 0 10px 30px rgba(10, 62, 124, 0.10);
    --shadow-hover: 0 16px 40px rgba(10, 62, 124, 0.16);
    --nav-h: 64px;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
    margin: 0;
    font-family: 'Inter', 'Noto Sans JP', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

html[lang="ja"] body {
    font-family: 'Noto Sans JP', 'Inter', system-ui, sans-serif;
}

img { max-width: 100%; }

/* ---------- Language visibility ---------- */
html[lang="en"] .lang-ja { display: none !important; }
html[lang="ja"] .lang-en { display: none !important; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 clamp(16px, 4vw, 40px);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(219, 233, 246, 0.9);
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 17px;
    color: var(--deep);
    text-decoration: none;
    letter-spacing: 0.01em;
}

.brand-plane {
    width: 26px;
    height: 26px;
    fill: var(--sky);
}
.brand-plane .fold { fill: none; stroke: var(--bg); stroke-width: 2.5; }

.brand-kana {
    margin-left: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.nav-links {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
    padding: 7px 12px;
    border-radius: 999px;
    transition: color 0.2s, background 0.2s;
}
.nav-links a:hover {
    color: var(--ana-blue);
    background: rgba(47, 127, 224, 0.10);
}

.lang-toggle {
    display: flex;
    background: rgba(47, 127, 224, 0.10);
    border-radius: 999px;
    padding: 3px;
    flex-shrink: 0;
}
.lang-toggle button {
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 13px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.lang-toggle button.active {
    background: var(--ana-blue);
    color: #fff;
    box-shadow: 0 2px 8px rgba(11, 77, 148, 0.35);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    overflow: hidden;
    padding: calc(var(--nav-h) + 72px) 20px 150px;
    text-align: center;
    color: #fff;
    background:
        radial-gradient(1000px 500px at 85% -10%, rgba(125, 185, 240, 0.55), transparent 60%),
        radial-gradient(800px 420px at 8% 8%, rgba(255, 255, 255, 0.14), transparent 55%),
        linear-gradient(160deg, var(--deep) 0%, var(--ana-blue) 38%, var(--sky) 72%, var(--sky-light) 105%);
}

/* soft cloud glows */
.hero-clouds::before,
.hero-clouds::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    filter: blur(2px);
}
.hero-clouds::before { width: 420px; height: 150px; left: -80px; top: 18%; }
.hero-clouds::after  { width: 520px; height: 170px; right: -120px; bottom: 26%; }

/* paper plane with dashed flight trail */
.hero-plane {
    position: absolute;
    right: clamp(4%, 10vw, 18%);
    top: 24%;
    width: clamp(120px, 18vw, 220px);
    opacity: 0.85;
    animation: float 6s ease-in-out infinite;
}
.hero-plane .trail {
    stroke: rgba(255, 255, 255, 0.65);
    stroke-width: 2;
    stroke-dasharray: 7 9;
    stroke-linecap: round;
}
.hero-plane .plane { fill: #fff; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-14px); }
}

.hero-inner { position: relative; z-index: 1; }

.hero-photo {
    width: 168px;
    height: 168px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 40px rgba(4, 30, 66, 0.45);
    margin-bottom: 22px;
}

.hero-kicker {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}
html[lang="ja"] .hero-kicker { letter-spacing: 0.06em; }

.hero-name {
    margin: 0;
    font-size: clamp(38px, 6vw, 60px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-shadow: 0 2px 20px rgba(4, 30, 66, 0.35);
}

/* furigana above the kanji name */
.hero-name ruby { ruby-align: center; }
.hero-name rt {
    font-size: clamp(10px, 1.7vw, 15px);
    font-weight: 500;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: none;
    padding-bottom: 0.2em;
}

.hero-tagline {
    max-width: 560px;
    margin: 16px auto 34px;
    font-size: clamp(16px, 2.2vw, 19px);
    color: rgba(255, 255, 255, 0.92);
}

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

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn svg { width: 17px; height: 17px; fill: currentColor; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: #fff;
    color: var(--ana-blue);
    box-shadow: 0 8px 24px rgba(4, 30, 66, 0.3);
}
.btn-primary:hover { box-shadow: 0 12px 30px rgba(4, 30, 66, 0.4); }

.btn-outline {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.65);
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.22); }

/* wave divider into the page body */
.wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    width: 100%;
    height: clamp(50px, 8vw, 110px);
    fill: var(--bg);
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
    max-width: 860px;
    margin: 0 auto;
    padding: 56px 20px 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--deep);
    margin: 0 0 26px;
}
.section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--sky-light), transparent);
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.about-card {
    padding: clamp(22px, 4vw, 34px);
}
.about-card p { margin: 0; color: #33475e; }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0 0 0 52px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--sky) 0%, var(--sky-light) 55%, var(--line) 100%);
}

.timeline-item {
    position: relative;
    margin-bottom: 26px;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-marker {
    position: absolute;
    left: -52px;
    top: 26px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--sky-light);
    display: grid;
    place-items: center;
    box-shadow: 0 3px 10px rgba(10, 62, 124, 0.15);
}
.timeline-marker::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sky-light);
}
.timeline-marker.current {
    background: var(--ana-blue);
    border-color: var(--ana-blue);
}
.timeline-marker.current::after { display: none; }
.timeline-marker.current svg {
    width: 19px;
    height: 19px;
    fill: #fff;
}
.timeline-marker.current svg .fold { fill: none; stroke: var(--ana-blue); stroke-width: 3; }

/* ---------- Job card ---------- */
.job-card { padding: clamp(20px, 3.5vw, 30px); }

.current-job {
    border-color: rgba(47, 127, 224, 0.45);
    box-shadow: 0 12px 36px rgba(47, 127, 224, 0.18);
}

.job-header {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.job-logo-link { flex-shrink: 0; display: grid; place-items: center; }
.job-logo {
    height: 34px;
    width: auto;
    max-width: 130px;
    object-fit: contain;
}
.job-logo.university { height: 44px; }

.job-heading { flex: 1; min-width: 180px; }
.job-heading h3 {
    margin: 0 0 3px;
    font-size: 19px;
    font-weight: 700;
}
.job-heading h3 a {
    color: var(--deep);
    text-decoration: none;
    background-image: linear-gradient(var(--sky), var(--sky));
    background-repeat: no-repeat;
    background-size: 0% 2px;
    background-position: 0 100%;
    transition: background-size 0.25s;
}
.job-heading h3 a:hover { background-size: 100% 2px; }

.badge {
    display: inline-block;
    vertical-align: 2px;
    margin-left: 10px;
    padding: 3px 11px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ana-blue);
    background: rgba(47, 127, 224, 0.13);
    border-radius: 999px;
}
html[lang="ja"] .badge { letter-spacing: 0.02em; }

.job-role {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--sky);
}

.job-date {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--muted);
    text-align: right;
    flex-shrink: 0;
}

.job-bullets {
    list-style: none;
    margin: 0;
    padding: 0;
}
.job-bullets li {
    position: relative;
    padding: 4px 0 4px 22px;
    color: #33475e;
    font-size: 15px;
}
.job-bullets li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0.72em;
    width: 7px;
    height: 7px;
    background: var(--sky);
    border-radius: 1.5px;
    transform: rotate(45deg);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    position: relative;
    margin-top: 90px;
    background: linear-gradient(180deg, var(--ana-blue), var(--deep));
    color: #fff;
}
.wave-footer {
    position: absolute;
    top: -1px;
    bottom: auto;
    transform: rotate(180deg);
}

.footer-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 120px 20px 46px;
    text-align: center;
}

.footer-title {
    margin: 0 0 26px;
    font-size: 24px;
    font-weight: 800;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px 30px;
    margin-bottom: 36px;
}
.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s, transform 0.2s;
}
.footer-links a:hover {
    color: #fff;
    transform: translateY(-2px);
}
.footer-links svg { width: 18px; height: 18px; fill: currentColor; }
.preferred { font-size: 13px; opacity: 0.75; }

.footer-copy {
    margin: 0;
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 720px) {
    .nav { gap: 12px; }
    .nav-links { display: none; }
    .nav-brand { font-size: 15px; }

    .hero { padding-bottom: 120px; }
    .hero-plane { display: none; }
    .hero-photo { width: 132px; height: 132px; }

    .timeline { padding-left: 40px; }
    .timeline::before { left: 11px; }
    .timeline-marker {
        left: -40px;
        width: 26px;
        height: 26px;
    }
    .timeline-marker.current svg { width: 14px; height: 14px; }

    .job-header { gap: 12px; }
    .job-date {
        width: 100%;
        text-align: left;
        order: 3;
    }

    .btn { padding: 11px 18px; font-size: 14px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}
