/* ============================================================
   YUKI NODA PORTFOLIO — Dark Editorial Design
   ============================================================ */

/* === RESET === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === DESIGN TOKENS === */
:root {
    --bg:           #080c06;
    --bg-2:         #0c110a;
    --bg-3:         #111608;
    --text:         #dde8d8;
    --text-muted:   #5e6e56;
    --text-dim:     #3a4436;
    --accent:       #b8f05c;
    --accent-glow:  rgba(184, 240, 92, 0.18);
    --accent-dim:   rgba(184, 240, 92, 0.07);
    --border:       rgba(255, 255, 255, 0.055);
    --border-hover: rgba(184, 240, 92, 0.28);

    --font-display: 'Fraunces', Georgia, serif;
    --font-mono:    'DM Mono', 'Courier New', monospace;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.7, 0, 0.3, 1);
}

/* === BASE === */
html {
    scroll-behavior: smooth;
    cursor: none;
}

body {
    font-family: var(--font-mono);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    opacity: 0;
    transition: opacity 0.6s ease;
}

body.loaded {
    opacity: 1;
}

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

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
.cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.08s ease, width 0.2s ease, height 0.2s ease;
    will-change: left, top;
}

.cursor-follower {
    position: fixed;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(184, 240, 92, 0.35);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out),
                border-color 0.3s ease, background 0.3s ease;
    will-change: left, top;
}

.cursor-follower.hovered {
    width: 64px;
    height: 64px;
    border-color: var(--accent);
    background: var(--accent-dim);
}

@media (hover: none) {
    .cursor, .cursor-follower { display: none; }
    html { cursor: auto; }
}

/* ============================================================
   GRAIN OVERLAY
   =========================================
   =================== */
.grain {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: 8000;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grainShift 0.4s steps(3) infinite;
}

@keyframes grainShift {
    0%   { transform: translate(0, 0); }
    33%  { transform: translate(-3%, -4%); }
    66%  { transform: translate(4%, 2%); }
    100% { transform: translate(-1%, 3%); }
}

/* ============================================================
   LOADER
   ============================================================ */
.loader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.9s var(--ease-in-out), visibility 0.9s;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-inner {
    text-align: center;
    user-select: none;
}

.loader-count {
    font-family: var(--font-display);
    font-size: clamp(6rem, 15vw, 10rem);
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
    letter-spacing: -4px;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 60px rgba(184, 240, 92, 0.3);
}

.loader-bar {
    width: 180px;
    height: 1px;
    background: var(--border);
    margin: 24px auto 16px;
    overflow: hidden;
}

.loader-bar-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
}

.loader-label {
    font-size: 0.65rem;
    letter-spacing: 4px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 50px;
    z-index: 1000;
    transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    background: rgba(8, 12, 6, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom-color: var(--border);
}

.logo {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 3px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
}

.logo-dot {
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
    flex-shrink: 0;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-size: 0.72rem;
    letter-spacing: 2.5px;
    font-weight: 400;
    color: var(--text-muted);
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.35s var(--ease-out);
}

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

.nav-links a:hover::after {
    width: 100%;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 1.5px;
}

.status-pulse {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2.5s ease infinite;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    padding: 0 50px 90px;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse 80% 60% at 70% 50%, rgba(184,240,92,0.03) 0%, transparent 70%);
}

.hero-side-text {
    position: absolute;
    right: -100px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    font-size: 0.62rem;
    letter-spacing: 5px;
    color: var(--text-dim);
    white-space: nowrap;
    pointer-events: none;
    text-transform: uppercase;
}

.hero-bg-svg {
    position: absolute;
    right: 4%;
    top: 50%;
    transform: translateY(-50%);
    width: 55%;
    max-width: 680px;
    pointer-events: none;
    animation: slowSpin 40s linear infinite;
    will-change: transform;
}

@keyframes slowSpin {
    from { transform: translateY(-50%) rotate(0deg); }
    to   { transform: translateY(-50%) rotate(360deg); }
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 950px;
}

.hero-label {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 44px;
    opacity: 0;
    animation: fadeUp 1s var(--ease-out) forwards 1.4s;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 10px var(--accent);
    animation: pulse 2.5s ease infinite;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 10.5vw, 10.5rem);
    font-weight: 900;
    line-height: 0.88;
    letter-spacing: -3px;
    margin-bottom: 64px;
}

.line-wrap {
    overflow: hidden;
    display: block;
}

.line {
    display: inline-block;
    opacity: 0;
    transform: translateY(105%);
    animation: lineReveal 1.1s var(--ease-out) forwards;
}

.line[data-delay="0"] { animation-delay: 1.5s; }
.line[data-delay="1"] { animation-delay: 1.68s; }
.line[data-delay="2"] { animation-delay: 1.86s; }

.line.italic {
    font-style: italic;
    color: var(--accent);
}

@keyframes lineReveal {
    to { opacity: 1; transform: translateY(0); }
}

.hero-footer {
    display: flex;
    align-items: center;
    gap: 60px;
    opacity: 0;
    animation: fadeUp 1s var(--ease-out) forwards 2.1s;
}

.hero-name {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hero-name-jp {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.hero-name-en {
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 4px;
    text-transform: uppercase;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 16px 40px;
    border: 1px solid var(--border);
    border-radius: 60px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 2.5px;
    font-weight: 400;
    color: var(--text);
    background: transparent;
    position: relative;
    overflow: hidden;
    transition: color 0.4s ease, border-color 0.4s ease;
}

.btn-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s var(--ease-out);
    z-index: -1;
}

.btn-hero:hover {
    color: var(--bg);
    border-color: var(--accent);
}

.btn-hero:hover::before {
    transform: scaleX(1);
}

.scroll-indicator {
    position: absolute;
    bottom: 44px;
    right: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    z-index: 10;
    opacity: 0;
    animation: fadeIn 1s ease forwards 2.6s;
}

.scroll-line {
    width: 1px;
    height: 55px;
    background: linear-gradient(to bottom, transparent, var(--accent));
    animation: scrollPulse 2.5s ease infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.2; transform: scaleY(0.8); }
    50% { opacity: 1; transform: scaleY(1); }
}

.scroll-indicator span {
    font-size: 0.58rem;
    letter-spacing: 4px;
    color: var(--text-muted);
    writing-mode: vertical-rl;
    text-transform: uppercase;
}

/* ============================================================
   STATS
   ============================================================ */
.stats-section {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 55px 50px;
    background: var(--bg-2);
}

.stats-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 70px;
    max-width: 900px;
    margin: 0 auto;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.stat-num-wrap {
    display: flex;
    align-items: baseline;
    gap: 2px;
    line-height: 1;
}

.stat-num {
    font-family: var(--font-display);
    font-size: 3.8rem;
    font-weight: 900;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 30px rgba(184,240,92,0.25);
}

.stat-plus {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.66rem;
    color: var(--text-muted);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    text-align: center;
}

.stat-divider {
    width: 1px;
    height: 60px;
    background: var(--border);
}

/* ============================================================
   WORKS
   ============================================================ */
.works-section {
    padding: 120px 50px 140px;
    max-width: 1400px;
    margin: 0 auto;
}

.works-header {
    margin-bottom: 80px;
}

.section-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 3.5px;
    margin-bottom: 22px;
    text-transform: uppercase;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6.5vw, 6.5rem);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -2px;
}

.section-desc {
    margin-top: 22px;
    color: var(--text-muted);
    font-size: 0.82rem;
    letter-spacing: 1.5px;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 2px;
    background: var(--border);
    border: 1px solid var(--border);
}

.card {
    background: var(--bg-2);
    position: relative;
    overflow: hidden;
    transition: background 0.4s ease;
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-dim);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.card:hover {
    background: var(--bg-3);
}

.card:hover::after {
    opacity: 1;
}

.card-num {
    position: absolute;
    top: 22px;
    right: 22px;
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: var(--text-dim);
    z-index: 2;
}

.card-image-wrap {
    height: 260px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-3) 100%);
    transition: background 0.4s ease;
}

.card:hover .card-image-wrap {
    background: linear-gradient(135deg, var(--bg-2) 0%, rgba(184,240,92,0.04) 100%);
}

.card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-img-placeholder svg {
    width: 90px;
    height: 90px;
    transition: transform 0.5s var(--ease-out), opacity 0.4s ease;
    opacity: 0.7;
}

.card:hover .card-img-placeholder svg {
    transform: scale(1.08);
    opacity: 1;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease-out);
}

.card:hover .card-img {
    transform: scale(1.06);
}

.card-body {
    padding: 36px;
    position: relative;
    z-index: 2;
}

.card-tag {
    font-size: 0.62rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 500;
}

.card-body h3 {
    font-family: var(--font-display);
    font-size: 1.65rem;
    font-weight: 700;
    margin: 14px 0 16px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.card-body p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.85;
}

.card-arrow {
    margin-top: 28px;
    color: var(--accent);
    display: flex;
    align-items: center;
    transform: translateX(0);
    transition: transform 0.35s var(--ease-out);
}

.card:hover .card-arrow {
    transform: translateX(8px);
}

/* Reveal Animation */
.reveal-item {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
}

.reveal-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee-section {
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 22px 0;
    background: var(--accent-dim);
}

.marquee-track {
    display: flex;
    white-space: nowrap;
    animation: marqueeScroll 25s linear infinite;
}

.marquee-track span {
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: var(--text-muted);
    text-transform: uppercase;
    flex-shrink: 0;
}

@keyframes marqueeScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-section {
    padding: 150px 50px 160px;
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--border);
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: radial-gradient(ellipse 70% 60% at 20% 60%, rgba(184,240,92,0.025) 0%, transparent 65%);
}

.contact-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 3.5px;
    margin-bottom: 60px;
    text-transform: uppercase;
}

.contact-content {
    position: relative;
    z-index: 2;
}

.contact-title {
    font-family: var(--font-display);
    font-size: clamp(4.5rem, 13vw, 13rem);
    font-weight: 900;
    line-height: 0.83;
    letter-spacing: -6px;
    margin-bottom: 55px;
}

.contact-title em {
    font-style: italic;
    color: var(--accent);
    text-shadow: 0 0 80px rgba(184,240,92,0.15);
}

.contact-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    margin-bottom: 45px;
}

.contact-email {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: clamp(0.85rem, 1.8vw, 1.3rem);
    letter-spacing: 0.5px;
    color: var(--text);
    position: relative;
    transition: color 0.35s ease;
}

.contact-email::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.5s var(--ease-out);
}

.contact-email:hover {
    color: var(--accent);
}

.contact-email:hover::after {
    width: 100%;
}

.contact-deco {
    position: absolute;
    right: 30px;
    bottom: 60px;
    font-family: var(--font-display);
    font-size: clamp(8rem, 18vw, 18rem);
    font-weight: 900;
    color: rgba(255,255,255,0.018);
    line-height: 1;
    pointer-events: none;
    user-select: none;
    letter-spacing: -10px;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    padding: 26px 50px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-2);
}

.footer-left,
.footer-right {
    font-size: 0.66rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 4px rgba(184, 240, 92, 0.4); }
    50%       { box-shadow: 0 0 14px rgba(184, 240, 92, 0.85); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
    .cards-grid {
        grid-template-columns: 1fr 1fr;
    }
    .card--large {
        grid-column: 1 / -1;
    }
    .card--large .card-image-wrap {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 16px 24px;
    }
    .header-status {
        display: none;
    }
    .hero {
        padding: 80px 24px 70px;
        align-items: center;
        min-height: 100dvh;
    }
    .hero-bg-svg {
        opacity: 0.15;
        width: 90%;
        right: 5%;
    }
    .hero-side-text {
        display: none;
    }
    .hero-title {
        letter-spacing: -2px;
        margin-bottom: 44px;
    }
    .hero-footer {
        gap: 30px;
        flex-wrap: wrap;
    }
    .stats-section {
        padding: 40px 24px;
    }
    .stats-inner {
        gap: 30px;
        flex-wrap: wrap;
    }
    .stat-divider {
        display: none;
    }
    .works-section {
        padding: 80px 24px 100px;
    }
    .cards-grid {
        grid-template-columns: 1fr;
    }
    .card--large {
        grid-column: auto;
    }
    .contact-section {
        padding: 100px 24px 120px;
    }
    .contact-title {
        letter-spacing: -3px;
    }
    .contact-deco {
        font-size: 6rem;
        right: 10px;
        bottom: 40px;
    }
    footer {
        padding: 20px 24px;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    .scroll-indicator {
        right: 24px;
    }
}
/* 落ち葉のコンテナ */
#leaf-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1; /* 背景とテキストの間に配置 */
}

/* 葉のスタイル */
.leaf-item {
    position: absolute;
    top: -20px;
    width: 15px;
    height: 15px;
    background: var(--accent); /* あなたのサイトのアクセントカラーを使用 */
    opacity: 0.3;
    border-radius: 2px 15px 5px 15px; /* 葉の形 */
    filter: blur(0.5px);
}

/* 落下と揺れのアニメーション */
@keyframes fall {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.4; }
    90% { opacity: 0.4; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

@keyframes sway {
    0% { margin-left: 0; }
    100% { margin-left: 50px; }
}
/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-section {
    padding: 130px 50px 150px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.about-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 3.5px;
    margin-bottom: 70px;
    text-transform: uppercase;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 80px;
    align-items: center;
    max-width: 780px;
}

/* Text column */
.about-text-col {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.about-title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 5.5vw, 5.5rem);
    font-weight: 900;
    line-height: 1.0;
    letter-spacing: -2px;
}

.about-title em {
    font-style: italic;
    color: var(--accent);
    text-shadow: 0 0 60px rgba(184,240,92,0.15);
}

.about-bio {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-bio p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 2.0;
    letter-spacing: 0.3px;
}

.about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.about-tag {
    display: inline-block;
    padding: 7px 16px;
    border: 1px solid var(--border);
    border-radius: 60px;
    font-size: 0.64rem;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    background: transparent;
    transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}

.about-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

/* Photo column */
.about-photo-col {
    position: relative;
    height: 600px;
}

.about-photo-main {
    position: absolute;
    left: 0;
    top: 0;
    width: 78%;
}

.photo-frame {
    position: relative;
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--bg-2);
}

.photo-frame--main {
    aspect-ratio: 3/4;
    max-height: 530px;
}

.about-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(18%) contrast(1.05);
    transition: filter 0.6s ease, transform 0.8s var(--ease-out);
}

.about-photo-col:hover .about-img {
    filter: grayscale(0%) contrast(1.0);
    transform: scale(1.03);
}

.photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 55%,
        rgba(8,12,6,0.6) 100%
    );
    pointer-events: none;
}

/* Corner brackets */
.photo-corner {
    position: absolute;
    width: 22px;
    height: 22px;
    pointer-events: none;
    z-index: 2;
}

.photo-corner--tl {
    top: 12px;
    left: 12px;
    border-top: 1px solid var(--accent);
    border-left: 1px solid var(--accent);
}

.photo-corner--br {
    bottom: 12px;
    right: 12px;
    border-bottom: 1px solid var(--accent);
    border-right: 1px solid var(--accent);
}

.photo-label-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0 0;
    font-size: 0.58rem;
    letter-spacing: 3px;
    color: var(--text-dim);
    text-transform: uppercase;
}

.photo-label-dot {
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Avatar illustration */
.about-photo-avatar {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 220px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.avatar-ring {
    position: absolute;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    border: 1px solid rgba(184,240,92,0.2);
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    animation: avatarPulse 4s ease infinite;
    pointer-events: none;
}

@keyframes avatarPulse {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.5; }
    50%       { transform: translateX(-50%) scale(1.06); opacity: 1; }
}

.avatar-img {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 2px solid var(--bg-3);
    box-shadow:
        0 0 0 1px rgba(184,240,92,0.15),
        0 20px 50px rgba(0,0,0,0.7),
        0 0 40px rgba(184,240,92,0.07);
    background: var(--bg-2);
    display: block;
    transition: box-shadow 0.5s ease, transform 0.5s var(--ease-out);
}

.about-photo-col:hover .avatar-img {
    box-shadow:
        0 0 0 1.5px rgba(184,240,92,0.4),
        0 20px 50px rgba(0,0,0,0.7),
        0 0 50px rgba(184,240,92,0.12);
    transform: translateY(-4px);
}

.avatar-badge {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 16px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 1.5px;
    color: var(--accent);
    display: flex;
    flex-direction: column;
    gap: 2px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* Responsive about */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    .about-photo-col {
        height: 480px;
    }
    .about-photo-avatar {
        width: 180px;
        right: 10px;
    }
    .avatar-img {
        width: 140px;
        height: 140px;
    }
    .avatar-ring {
        width: 158px;
        height: 158px;
    }
}

@media (max-width: 768px) {
    .about-section {
        padding: 80px 24px 100px;
    }
}

/* ============================================================
   CONTACT — DUAL EMAIL
   ============================================================ */
.contact-emails {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    max-width: 820px;
}

.contact-email-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 36px;
    background: var(--bg-2);
    transition: background 0.3s ease;
    flex-wrap: wrap;
}

.contact-email-row:hover {
    background: var(--bg-3);
}

.contact-email-divider {
    height: 1px;
    background: var(--border);
}

.contact-email-type {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
}

.contact-email-tag {
    font-size: 0.58rem;
    color: var(--accent);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 500;
}

.contact-email-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* Override old single contact-email style for new usage */
.contact-emails .contact-email {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: clamp(0.75rem, 1.4vw, 1.05rem);
    letter-spacing: 0.5px;
    color: var(--text);
    position: relative;
    transition: color 0.3s ease;
}

.contact-emails .contact-email::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.5s var(--ease-out);
}

.contact-emails .contact-email:hover {
    color: var(--accent);
}

.contact-emails .contact-email:hover::after {
    width: 100%;
}

.contact-email-icon {
    flex-shrink: 0;
    opacity: 0;
    transform: translate(-4px, 4px);
    transition: opacity 0.3s ease, transform 0.3s var(--ease-out);
}

.contact-emails .contact-email:hover .contact-email-icon {
    opacity: 1;
    transform: translate(0, 0);
}

@media (max-width: 768px) {
    .contact-email-row {
        padding: 22px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* ============================================================
   PROFILE FLIP CARD
   ============================================================ */
.profile-flip-card {
    position: absolute;
    right: 7%;
    top: 50%;
    transform: translateY(-50%);
    width: 210px;
    height: 300px;
    perspective: 1200px;
    cursor: pointer;
    z-index: 20;
    opacity: 0;
    animation: fadeIn 1s ease forwards 2.3s;
}

.profile-flip-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-flip-card.flipped .profile-flip-inner {
    transform: rotateY(180deg);
}

/* Shared face styles */
.profile-flip-front,
.profile-flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ---- FRONT FACE ---- */
.profile-flip-front {
    background: var(--bg-3);
    border: 1px solid var(--border-hover);
    gap: 18px;
    box-shadow:
        0 0 60px rgba(184,240,92,0.06),
        inset 0 0 30px rgba(184,240,92,0.02);
}

.profile-circle-photo {
    width: 144px;
    height: 144px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--accent);
    box-shadow:
        0 0 0 6px rgba(184,240,92,0.08),
        0 0 40px rgba(184,240,92,0.2);
    flex-shrink: 0;
    transition: box-shadow 0.4s ease;
}

.profile-flip-card:hover .profile-circle-photo {
    box-shadow:
        0 0 0 8px rgba(184,240,92,0.14),
        0 0 60px rgba(184,240,92,0.35);
}

.profile-circle-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
    display: block;
}

.profile-front-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.profile-front-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 1px;
}

.profile-front-en {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 3.5px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.profile-flip-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.58rem;
    letter-spacing: 3px;
    color: var(--accent);
    opacity: 0.55;
    transition: opacity 0.3s ease;
    text-transform: uppercase;
    animation: hintPulse 2.5s ease infinite;
}

.profile-flip-card:hover .profile-flip-hint {
    opacity: 1;
}

@keyframes hintPulse {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 0.9; }
}

/* ---- BACK FACE ---- */
.profile-flip-back {
    background: var(--accent);
    transform: rotateY(180deg);
    gap: 10px;
    padding: 24px 18px;
}

.profile-back-deco-top {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 2.5px;
    color: rgba(8,12,6,0.45);
    text-transform: uppercase;
    position: absolute;
    top: 18px;
}

.profile-illus-circle {
    width: 136px;
    height: 136px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255,255,255,0.9);
    border: 3px solid rgba(8,12,6,0.12);
    box-shadow: 0 8px 30px rgba(8,12,6,0.18);
    flex-shrink: 0;
}

.profile-illus-circle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.profile-back-name-jp {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--bg);
    letter-spacing: 2px;
}

.profile-back-roles {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.58rem;
    color: rgba(8,12,6,0.6);
    letter-spacing: 1.5px;
    text-align: center;
    line-height: 1.6;
    flex-wrap: wrap;
    justify-content: center;
}

.back-sep {
    color: rgba(8,12,6,0.3);
}

.profile-back-deco-bottom {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 3px;
    color: rgba(8,12,6,0.4);
    text-transform: uppercase;
    position: absolute;
    bottom: 18px;
}

@media (max-width: 1024px) {
    .profile-flip-card {
        right: 4%;
        width: 180px;
        height: 260px;
    }
    .profile-circle-photo,
    .profile-illus-circle {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 768px) {
    .profile-flip-card {
        position: static;
        transform: none;
        margin: 40px auto 0;
        width: 170px;
        height: 250px;
    }
}

/* ============================================================
   INSTAGRAM ROW
   ============================================================ */
.contact-ig-icon {
    flex-shrink: 0;
    color: var(--accent);
    opacity: 0.75;
    transition: opacity 0.3s ease;
}

.contact-instagram:hover .contact-ig-icon {
    opacity: 1;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    border-top: 1px solid var(--border);
    padding: 32px 50px;
    background: var(--bg);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-name {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 3px;
    color: var(--text-muted);
}

.footer-copy {
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: var(--text-dim);
}

/* ============================================================
   CARD UPDATES — tall image, link button, new tag
   ============================================================ */
.card-image-wrap--tall {
    height: 340px;
}

.new-tag {
    color: var(--accent) !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.new-tag::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent);
    animation: pulse 2s ease infinite;
}

.card-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    padding: 12px 28px;
    border: 1px solid var(--accent);
    border-radius: 40px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 2.5px;
    color: var(--accent);
    background: transparent;
    position: relative;
    overflow: hidden;
    transition: color 0.35s ease;
    text-decoration: none;
}

.card-link-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
    z-index: -1;
}

.card-link-btn:hover {
    color: var(--bg);
}

.card-link-btn:hover::before {
    transform: scaleX(1);
}

/* ============================================================
   UNIBASE CARD
   ============================================================ */
.card--unibase .card-body {
    padding: 40px 44px;
    display: flex;
    gap: 60px;
    align-items: center;
    height: 100%;
}

.card-body--unibase {
    flex-direction: row !important;
}

.unibase-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.unibase-left h3 {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.5px;
    margin: 0;
}

.unibase-left h3 em {
    font-style: italic;
    color: var(--accent);
}

.unibase-left p {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.9;
}

.unibase-stats {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    min-width: 220px;
}

.unibase-stat {
    padding: 22px 28px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(184,240,92,0.025);
    transition: background 0.3s ease;
}

.unibase-stat:hover {
    background: rgba(184,240,92,0.06);
}

.unibase-stat-num {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: -0.5px;
    text-shadow: 0 0 20px rgba(184,240,92,0.25);
}

.unibase-stat-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    line-height: 1.5;
}

.unibase-stat-divider {
    height: 1px;
    background: var(--border);
}

@media (max-width: 1024px) {
    .card--unibase .card-body,
    .card-body--unibase {
        flex-direction: column !important;
        gap: 32px;
    }
    .unibase-stats {
        flex-direction: row;
        min-width: unset;
        width: 100%;
    }
    .unibase-stat {
        flex: 1;
    }
    .unibase-stat-divider {
        width: 1px;
        height: auto;
    }
}

@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr !important;
    }
    .card--large,
    .card--unibase {
        grid-row: unset !important;
        grid-column: unset !important;
    }
    .unibase-stats {
        flex-direction: column;
    }
    .unibase-stat-divider {
        width: auto;
        height: 1px;
    }
}

/* ============================================================
   WEB DEV STATS (Card 02)
   ============================================================ */
.webdev-stats {
    display: flex;
    gap: 0;
    margin-top: 24px;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.webdev-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 16px 20px;
    background: rgba(184,240,92,0.03);
    transition: background 0.3s ease;
}

.webdev-stat:hover {
    background: rgba(184,240,92,0.07);
}

.webdev-stat-num {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
    text-shadow: 0 0 20px rgba(184,240,92,0.2);
}

.webdev-stat-unit {
    font-size: 1rem;
    font-weight: 700;
}

.webdev-stat-label {
    font-size: 0.58rem;
    color: var(--text-muted);
    letter-spacing: 1.2px;
    line-height: 1.5;
}

.webdev-stat-divider {
    width: 1px;
    background: var(--border);
}

/* ============================================================
   UNIBASE BLOCK inside Space card
   ============================================================ */
.unibase-block {
    margin-top: 24px;
    border: 1px solid rgba(184,240,92,0.2);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(184,240,92,0.03);
}

.unibase-block-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(184,240,92,0.15);
    background: rgba(184,240,92,0.05);
}

.unibase-block-label {
    font-size: 0.56rem;
    letter-spacing: 3px;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 500;
}

.unibase-block-name {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: 1px;
}

.unibase-block-desc {
    font-size: 0.72rem !important;
    color: var(--text-muted) !important;
    line-height: 1.85 !important;
    padding: 14px 18px !important;
    margin: 0 !important;
}

.unibase-block-stats {
    display: flex;
    border-top: 1px solid rgba(184,240,92,0.12);
}

.unibase-block-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    border-right: 1px solid rgba(184,240,92,0.12);
}

.unibase-block-stat:last-child {
    border-right: none;
}

.unibase-block-stat span {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--accent);
    display: block;
}

.unibase-block-stat small {
    font-size: 0.54rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    line-height: 1.4;
}