/* ══════════════════════════════════════════════════
   Chiyu Neko — Neko-OS Portfolio
   style.css
   ══════════════════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --peach:   #FFDAB9;
    --pink:    #FFB6C1;
    --cream:   #FFF5EE;
    --white:   #FFFFFF;
    --blush:   #FFC8D3;
    --orange:  #FF8C69;
    --deep:    #5C3D2E;
    --soft:    #8B5E6A;
    --muted:   #C9929F;
    --shadow:  rgba(255,140,105,0.18);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Nunito', sans-serif;
    background: var(--cream);
    color: var(--deep);
    overflow-x: hidden;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--peach); }
::-webkit-scrollbar-thumb { background: var(--pink); border-radius: 99px; }

/* ── Shared ── */
.section {
    padding: 80px 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.section-label {
    display: inline-flex;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 48px;
}

.section-title {
    font-family: 'Fredoka One', cursive;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--deep);
    letter-spacing: 0.5px;
}

.tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 99px;
    background: var(--pink);
    color: var(--deep);
}

.card {
    background: white;
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 4px 32px var(--shadow);
    border: 2px solid var(--peach);
}

/* ── Navbar ── */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,245,238,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--peach);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-logo {
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    color: var(--orange);
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.nav-links a {
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--soft);
    letter-spacing: 0.5px;
    transition: color 0.2s;
}

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

.nav-os-dot { display: flex; gap: 6px; }

.dot {
    width: 11px; height: 11px;
    border-radius: 50%;
}

/* ── Hero ── */
.hero-wrapper {
    background: linear-gradient(135deg, #fff0ea 0%, #ffe4f0 60%, #fff5ee 100%);
    border-bottom: 2px solid var(--peach);
    padding: 60px 24px 80px;
    position: relative;
    overflow: hidden;
}

.hero-wrapper::before {
    content: '';
    position: absolute;
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(255,140,105,0.12) 0%, transparent 70%);
    top: -80px; right: -80px;
    border-radius: 50%;
}

.hero-wrapper::after {
    content: '';
    position: absolute;
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(255,182,193,0.2) 0%, transparent 70%);
    bottom: -60px; left: 60px;
    border-radius: 50%;
}

.hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-badge::before {
    content: '';
    width: 28px; height: 2px;
    background: var(--orange);
    border-radius: 2px;
    display: inline-block;
}

.hero-name {
    font-family: 'Fredoka One', cursive;
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    line-height: 1.05;
    color: var(--deep);
    margin-bottom: 8px;
}

.hero-name span { color: var(--orange); }

.hero-class {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero-bio {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--soft);
    max-width: 420px;
    margin-bottom: 28px;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--orange);
    color: white;
    font-family: 'Fredoka One', cursive;
    font-size: 1rem;
    padding: 12px 28px;
    border-radius: 99px;
    text-decoration: none;
    box-shadow: 0 6px 24px rgba(255,140,105,0.35);
    letter-spacing: 0.5px;
}

.hero-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: var(--orange);
    font-family: 'Fredoka One', cursive;
    font-size: 1rem;
    padding: 12px 28px;
    border-radius: 99px;
    text-decoration: none;
    border: 2px solid var(--peach);
    letter-spacing: 0.5px;
    margin-left: 12px;
}

/* ── Character Card ── */
.char-card {
    background: white;
    border-radius: 32px;
    padding: 32px;
    box-shadow: 0 12px 60px var(--shadow);
    border: 3px solid var(--peach);
    position: relative;
    overflow: hidden;
}

.char-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--peach), var(--pink), var(--orange));
    border-radius: 32px 32px 0 0;
}

.char-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--peach), var(--pink));
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 4px 20px var(--shadow);
    border: 3px solid white;
    overflow: hidden;
}

.char-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.char-name-card {
    font-family: 'Fredoka One', cursive;
    font-size: 1.5rem;
    text-align: center;
    color: var(--deep);
    margin-bottom: 4px;
}

.char-role {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 24px;
}

.level-bar-wrap { margin-bottom: 20px; }

.level-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--soft);
    margin-bottom: 6px;
}

.level-bar {
    height: 10px;
    background: var(--cream);
    border-radius: 99px;
    overflow: hidden;
    border: 1.5px solid var(--peach);
}

.level-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--peach), var(--orange));
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.stat-item {
    background: var(--cream);
    border-radius: 16px;
    padding: 10px 8px;
    text-align: center;
    border: 1.5px solid var(--peach);
}

.stat-val {
    font-family: 'Fredoka One', cursive;
    font-size: 1.4rem;
    color: var(--orange);
}

.stat-name {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
}

/* ── Section Header with Ears ── */
.ear-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.ear-icon {
    font-size: 1.5rem;
    background: var(--peach);
    border-radius: 50%;
    width: 44px; height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 12px var(--shadow);
}

/* ── Inventory Grid ── */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.inv-slot {
    aspect-ratio: 1;
    background: white;
    border-radius: 20px;
    border: 2.5px solid var(--peach);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 12px var(--shadow);
}

.inv-slot:hover {
    transform: translateY(-4px);
    border-color: var(--pink);
    box-shadow: 0 8px 28px var(--shadow);
}

.inv-slot.featured {
    border-color: var(--orange);
    background: linear-gradient(135deg, #fff6f0, #fff0f5);
}

.inv-slot.empty {
    background: var(--cream);
    opacity: 0.5;
}

/* Image inside inventory slot */
.inv-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0; left: 0;
    border-radius: 18px;
}

/* Overlay text on top of image */
.inv-slot .inv-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(92,61,46,0.85));
    padding: 24px 10px 10px;
    border-radius: 0 0 18px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.inv-rarity {
    position: absolute;
    top: 10px; right: 10px;
    width: 8px; height: 8px;
    border-radius: 50%;
    z-index: 1;
}

.rarity-gold   { background: #FFD700; box-shadow: 0 0 6px #FFD700; }
.rarity-silver { background: #C0C0C0; box-shadow: 0 0 6px #C0C0C0; }
.rarity-bronze { background: #CD7F32; box-shadow: 0 0 6px #CD7F32; }

.inv-emoji { font-size: 2.2rem; }
.inv-name  { font-size: 0.68rem; font-weight: 800; text-align: center; color: var(--soft); line-height: 1.3; }
.inv-year  { font-size: 0.6rem; font-weight: 600; color: var(--muted); }

/* When slot has an image, flip text colours for overlay */
.inv-slot.has-image .inv-name { color: white; }
.inv-slot.has-image .inv-year { color: rgba(255,255,255,0.75); }

/* ── Quest Log ── */
.quest-log {
    background: white;
    border-radius: 28px;
    border: 2px solid var(--peach);
    box-shadow: 0 4px 32px var(--shadow);
    overflow: hidden;
}

.quest-header {
    background: linear-gradient(90deg, var(--peach), #ffe0ec);
    padding: 20px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--peach);
}

.quest-header-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    color: var(--deep);
}

.quest-tabs { display: flex; gap: 8px; }

.quest-tab {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 99px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
}

.tab-active   { background: var(--orange); color: white; }
.tab-inactive { background: white; color: var(--muted); border: 1.5px solid var(--peach); }

.quest-body { padding: 8px 0; }

.quest-item {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 18px 28px;
    border-bottom: 1.5px solid var(--cream);
    transition: background 0.15s;
    cursor: pointer;
}

.quest-item:hover { background: var(--cream); }
.quest-item:last-child { border-bottom: none; }

.quest-status-bubble {
    width: 48px; height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.status-done     { background: #d4f5e4; }
.status-active   { background: #ffecd0; }
.status-upcoming { background: #e8e8ff; }

.quest-title { font-size: 0.92rem; font-weight: 800; color: var(--deep); margin-bottom: 3px; }
.quest-sub   { font-size: 0.75rem; color: var(--muted); font-weight: 600; }

.quest-badge {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 99px;
    white-space: nowrap;
}

.badge-done     { background: #d4f5e4; color: #2d7a55; }
.badge-active   { background: #ffecd0; color: #c06a00; }
.badge-upcoming { background: #e8e8ff; color: #5050aa; }

/* ── Skill Tree ── */
.skill-tree {
    background: white;
    border-radius: 28px;
    border: 2px solid var(--peach);
    padding: 40px;
    box-shadow: 0 4px 32px var(--shadow);
    position: relative;
    overflow: hidden;
}

.skill-tree::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
            radial-gradient(circle at 30% 30%, rgba(255,218,185,0.25) 0%, transparent 50%),
            radial-gradient(circle at 70% 70%, rgba(255,182,193,0.2) 0%, transparent 50%);
    pointer-events: none;
}

.skill-tree-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
    z-index: 1;
}

.skill-branch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.skill-node {
    width: 72px; height: 72px;
    border-radius: 50%;
    border: 3px solid var(--peach);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 16px var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.skill-node:hover {
    border-color: var(--orange);
    transform: scale(1.12);
    box-shadow: 0 8px 28px rgba(255,140,105,0.3);
}

.skill-node.active {
    border-color: var(--orange);
    background: linear-gradient(135deg, var(--peach), #ffe0f0);
    box-shadow: 0 0 0 4px rgba(255,140,105,0.2), 0 8px 28px var(--shadow);
}

.skill-level-dots { display: flex; gap: 4px; }

.skill-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--peach);
}

.skill-dot.filled { background: var(--orange); }

.skill-label { font-size: 0.78rem; font-weight: 800; color: var(--deep); text-align: center; }
.skill-sub   { font-size: 0.65rem; font-weight: 600; color: var(--muted); text-align: center; }

/* ── Guild ── */
.guild-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.guild-main {
    background: white;
    border-radius: 28px;
    border: 2px solid var(--peach);
    padding: 28px;
    box-shadow: 0 4px 32px var(--shadow);
}

.guild-emblem {
    width: 80px; height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    overflow: hidden;
}

.guild-emblem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
}

.guild-name {
    font-family: 'Fredoka One', cursive;
    font-size: 1.4rem;
    color: var(--deep);
    margin-bottom: 4px;
}

.guild-desc { font-size: 0.85rem; color: var(--soft); line-height: 1.7; }

.guild-stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.g-stat {
    text-align: center;
    background: var(--cream);
    border-radius: 14px;
    padding: 12px 8px;
    border: 1.5px solid var(--peach);
}

.g-stat-val   { font-family: 'Fredoka One', cursive; font-size: 1.3rem; color: var(--orange); }
.g-stat-label { font-size: 0.62rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }

.guild-activity { display: flex; flex-direction: column; gap: 12px; }

.activity-card {
    background: white;
    border-radius: 20px;
    border: 2px solid var(--peach);
    padding: 18px 20px;
    box-shadow: 0 2px 12px var(--shadow);
    display: flex;
    align-items: center;
    gap: 14px;
}

.activity-icon {
    font-size: 1.6rem;
    background: var(--cream);
    width: 44px; height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-title { font-size: 0.85rem; font-weight: 800; color: var(--deep); }
.activity-sub   { font-size: 0.73rem; color: var(--muted); font-weight: 600; }

/* ── Contact ── */
.contact-wrapper {
    background: linear-gradient(135deg, #fff0ea, #ffe4f0);
    border-top: 2px solid var(--peach);
    padding: 80px 24px;
}

.letter-card {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 28px;
    padding: 40px;
    box-shadow: 0 8px 48px var(--shadow);
    border: 2px solid var(--peach);
    position: relative;
}

.letter-card::before {
    content: '🐾';
    position: absolute;
    top: -18px; left: 50%;
    transform: translateX(-50%);
    background: var(--peach);
    border-radius: 50%;
    width: 40px; height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 2px 12px var(--shadow);
}

.washi          { position: absolute; width: 60px; height: 20px; border-radius: 4px; opacity: 0.7; }
.washi-tl       { top: 12px;    left: -8px;  transform: rotate(-35deg); background: var(--pink); }
.washi-tr       { top: 12px;    right: -8px; transform: rotate(35deg);  background: var(--peach); }
.washi-bl       { bottom: 12px; left: -8px;  transform: rotate(35deg);  background: #b5e8d0; }
.washi-br       { bottom: 12px; right: -8px; transform: rotate(-35deg); background: #c8d8ff; }

.letter-greeting {
    font-family: 'Fredoka One', cursive;
    font-size: 1.4rem;
    color: var(--deep);
    margin-bottom: 6px;
    text-align: center;
}

.letter-sub { font-size: 0.82rem; color: var(--muted); text-align: center; margin-bottom: 28px; }

.form-field { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--soft);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    background: var(--cream);
    border: 2px solid var(--peach);
    border-radius: 14px;
    padding: 12px 16px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    color: var(--deep);
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus { border-color: var(--pink); }
textarea.form-input { resize: vertical; min-height: 100px; }

.form-input.input-error  { border-color: #e05555; }
.form-input.input-valid  { border-color: #6BCB77; }

.form-error {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #e05555;
    margin-top: 4px;
    min-height: 16px;
}

.submit-btn {
    width: 100%;
    background: var(--orange);
    color: white;
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    padding: 14px;
    border-radius: 99px;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(255,140,105,0.35);
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

/* ── Footer ── */
footer {
    text-align: center;
    padding: 28px;
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 600;
    border-top: 2px solid var(--peach);
    background: var(--cream);
}

/* ── Animations ── */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0   rgba(255,140,105,0.35); }
    70%  { box-shadow: 0 0 0 12px rgba(255,140,105,0); }
    100% { box-shadow: 0 0 0 0   rgba(255,140,105,0); }
}

.float { animation: float 3.2s ease-in-out infinite; }
.pulse { animation: pulse-ring 2s infinite; }

.sparkle { position: absolute; pointer-events: none; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .hero-inner        { grid-template-columns: 1fr; }
    .inventory-grid    { grid-template-columns: repeat(3, 1fr); }
    .skill-tree-grid   { grid-template-columns: repeat(2, 1fr); }
    .guild-layout      { grid-template-columns: 1fr; }
    .nav-links         { display: none; }
}
