/* ==================================================
   PINEAPPLE PIZZA PLAN
   JAPANESE EDITORIAL DESIGN
   Version 1.0
================================================== */

:root {
    --paper: #F5F2EA;
    --paper-deep: #EBE6DA;
    --ink: #24231F;
    --muted: #77736B;
    --accent: #E65B35;
    --accent-dark: #B94327;
    --line: #DCD7CC;
    --white: #FFFEFA;

    --font-main:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Noto Sans SC",
        "PingFang SC",
        sans-serif;

    --font-editorial:
        Georgia,
        "Times New Roman",
        serif;

    --page-width: 1120px;
}

/* ---------- RESET ---------- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-main);
    font-size: 15px;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

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

button {
    font-family: inherit;
}

img {
    max-width: 100%;
}

/* ---------- COMMON LAYOUT ---------- */

.container {
    width: min(100% - 64px, var(--page-width));
    margin-inline: auto;
}

main {
    width: 100%;
}

.section {
    min-height: auto;
    padding: 112px 0;
    border-top: 1px solid var(--line);
}

/* ---------- HEADER ---------- */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(245, 242, 234, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.nav-container {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    color: var(--ink);
    font-family: var(--font-editorial);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.035em;
    white-space: nowrap;
}

.logo::before {
    content: "●";
    color: var(--accent);
    margin-right: 10px;
    font-size: 12px;
}

nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

nav a {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    transition: color 0.2s ease;
}

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

/* ---------- VISITOR LOCATION ---------- */

#visitorLocation {
    padding: 8px 32px;
    background: var(--paper-deep);
    color: var(--muted);
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.04em;
}

/* ---------- HERO ---------- */

#home {
    min-height: 690px;
    display: flex;
    align-items: center;
    padding: 120px 0;
    text-align: left;
    border-top: none;
}

#home .container {
    position: relative;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 28px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.19em;
    text-transform: uppercase;
}

#home h1 {
    margin: 0 0 28px;
    color: var(--ink);
    font-family: var(--font-main);
    font-size: clamp(48px, 7vw, 82px);
    font-weight: 850;
    line-height: 1.13;
    letter-spacing: -0.065em;
}

#home h1 span {
    color: var(--accent);
}

.hero-description {
    max-width: 570px;
    margin: 0 0 30px;
    color: var(--muted);
    font-size: 16px;
    line-height: 2;
}

/* ---------- IP LOOKUP ---------- */

#ipButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    margin: 0 0 10px;
    padding: 10px 18px;
    border: 1px solid var(--ink);
    border-radius: 3px;
    background: var(--ink);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

#ipButton:hover {
    background: var(--accent);
    border-color: var(--accent);
    opacity: 1;
}

#ipResult {
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

/* ---------- HERO LINKS ---------- */

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 20px;
    border: 1px solid var(--ink);
    font-size: 12px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.button-primary {
    background: var(--ink);
    color: var(--white);
}

.button-primary:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.button-secondary {
    background: transparent;
    color: var(--ink);
}

.button-secondary:hover {
    background: var(--paper-deep);
}

/* ---------- SECTION HEADING ---------- */

.section-heading {
    display: flex;
    align-items: baseline;
    gap: 22px;
    margin-bottom: 48px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.section-heading span {
    color: var(--accent);
    font-family: var(--font-editorial);
    font-size: 16px;
    font-style: italic;
}

.section-heading h2 {
    margin: 0;
    color: var(--ink);
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

/* ---------- ABOUT ---------- */

.about-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 70px;
}

.about-text h3 {
    margin-bottom: 20px;
    font-size: 23px;
    font-weight: 750;
}

.about-text p {
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
    line-height: 2.1;
}

.about-image {
    min-height: 270px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--paper-deep);
    border: 1px solid var(--line);
}

.image-placeholder {
    color: var(--muted);
    font-family: var(--font-editorial);
    font-size: 20px;
    letter-spacing: 0.12em;
}

/* ---------- PROJECTS ---------- */

.project-list {
    display: flex;
    flex-direction: column;
}

.project {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 24px;
    padding: 34px 10px;
    border-bottom: 1px solid var(--line);
    transition: background 0.2s ease;
}

.project:first-child {
    border-top: 1px solid var(--line);
}

.project:hover {
    background: rgba(255, 254, 250, 0.55);
}

.project-number {
    color: var(--accent);
    font-family: var(--font-editorial);
    font-size: 28px;
    font-style: italic;
}

.project-content h3 {
    margin-bottom: 10px;
    font-size: 21px;
    font-weight: 800;
}

.project-content p {
    max-width: 700px;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.9;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 18px;
}

.tags span {
    padding: 3px 9px;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.025em;
}

.project-link,
.project-content > a {
    display: inline-block;
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 800;
}

.project-link:hover,
.project-content > a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ---------- CUSTOM AREA ---------- */

.custom-content {
    color: var(--muted);
}

.custom-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

button.changelog-trigger {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    width: auto;
    margin: 0;
    padding: 14px 20px;
    border: 1px solid var(--ink);
    border-radius: 2px;
    background: var(--ink);
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.2s ease;
}

button.changelog-trigger:hover {
    background: var(--accent);
    border-color: var(--accent);
    opacity: 1;
}

.changelog-arrow {
    color: #FFB39D;
    font-size: 17px;
}

/* ---------- CHANGELOG MODAL ---------- */

.changelog-modal[hidden] {
    display: none !important;
}

.changelog-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(25, 24, 21, 0.72);
    backdrop-filter: blur(5px);
}

.changelog-panel {
    display: flex;
    flex-direction: column;
    width: min(720px, 100%);
    max-height: 85vh;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

.changelog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 25px 28px;
    border-bottom: 1px solid var(--line);
}

.changelog-label {
    color: var(--accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.15em;
}

.changelog-header h2 {
    margin: 8px 0 0;
    font-size: 24px;
}

button.changelog-close {
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    font-size: 25px;
    cursor: pointer;
}

button.changelog-close:hover {
    background: var(--accent);
    color: white;
    opacity: 1;
}

.changelog-content {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 8px 28px 20px;
}

.changelog-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
}

.changelog-item time {
    color: var(--accent);
    font-family: var(--font-editorial);
    font-size: 12px;
    font-style: italic;
}

.changelog-item h3 {
    margin: 5px 0;
    font-size: 17px;
}

.changelog-item p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.9;
}

.changelog-footer {
    padding: 13px 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 0.12em;
    text-align: center;
}

body.changelog-open {
    overflow: hidden;
}

/* ---------- CONTACT ---------- */

.contact > .container > p {
    margin-bottom: 25px;
    color: var(--muted);
}

.contact-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.contact-links a {
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 700;
}

.wechat p {
    color: var(--muted);
    font-size: 13px;
}

#contact img {
    width: 170px;
    height: 170px;
    margin: 12px 0;
    border: 1px solid var(--line);
    object-fit: contain;
}

.social-icon img {
    width: 25px;
    height: 25px;
    border: 0;
    transition: transform 0.2s ease;
}

.social-icon:hover img {
    transform: translateY(-3px);
}

/* ---------- FOOTER ---------- */

footer {
    padding: 28px 0;
    border-top: 1px solid var(--line);
    background: var(--paper-deep);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
    font-size: 11px;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 760px) {
    .container {
        width: min(100% - 40px, var(--page-width));
    }

    .nav-container {
        min-height: 68px;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        padding: 10px 0;
    }

    .logo {
        font-size: 14px;
    }

    nav {
        justify-content: center;
        gap: 22px;
    }

    #home {
        min-height: 580px;
        padding: 90px 0;
    }

    #home h1 {
        font-size: clamp(43px, 10vw, 65px);
    }

    .section {
        padding: 78px 0;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-image {
        min-height: 190px;
    }

    .project {
        grid-template-columns: 52px 1fr;
        gap: 14px;
        padding: 26px 5px;
    }

    .project-number {
        font-size: 22px;
    }

    .footer-content {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 420px) {
    .container {
        width: calc(100% - 32px);
    }

    nav {
        gap: 16px;
    }

    nav a {
        font-size: 12px;
    }

    #home h1 {
        font-size: 42px;
    }

    .section-heading h2 {
        font-size: 27px;
    }

    .changelog-modal {
        padding: 10px;
    }

    .changelog-header {
        padding: 18px;
    }

    .changelog-content {
        padding: 5px 18px 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
/* About section image */
.about-image-placeholder {
    overflow: hidden;
    padding: 0;
}

.about-image-placeholder img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}