/* =========================================================
   ROOT
   ========================================================= */
:root {
    --paper: #f5f2ea;
    --paper-soft: #ebe7dc;
    --ink: #171815;
    --muted: #676a61;
    --muted-light: #85887e;
    --lime: #c7d36f;
    --lime-dark: #70773b;
    --line: #d5d1c6;
    --white: #ffffff;
    --dark-line: rgba(245, 242, 234, 0.14);
    --max-width: 1280px;
    --font-display: "Sora", sans-serif;
    --font-body: "Inter", sans-serif;
    --font-mono: "JetBrains Mono", monospace;
    --ease: cubic-bezier(.2, .7, .2, 1);
    --ease-sweep: cubic-bezier(.77, 0, .18, 1);
}

/* Keep the editorial paper palette intentionally consistent across
   light/dark viewer settings — it's part of the design language. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --paper: #f5f2ea;
        --paper-soft: #ebe7dc;
        --ink: #171815;
    }
}
:root[data-theme="dark"] {
    --paper: #f5f2ea;
    --paper-soft: #ebe7dc;
    --ink: #171815;
}

/* =========================================================
   RESET
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 40px; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; }
::selection { background: var(--lime); color: var(--ink); }

/* =========================================================
   MOBILE TOP BAR
   ========================================================= */
.mobile-bar { display: none; }

/* =========================================================
   FLOATING PROFILE / NAV PANEL
   ========================================================= */
.spine {
    position: fixed;
    top: 50%;
    left: 32px;
    transform: translateY(-50%);
    width: 300px;
    min-height: 650px;
    padding: 22px;
    background: var(--ink);
    color: var(--paper);
    border: 1px solid rgba(245, 242, 234, 0.12);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.20), 10px 10px 0 rgba(199, 211, 111, 0.10);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.spine::before {
    content: "";
    position: absolute;
    width: 145px; height: 145px;
    top: -78px; right: -78px;
    border-radius: 50%;
    background: var(--lime);
    opacity: 0.9;
    pointer-events: none;
}
.spine::after {
    content: "";
    position: absolute;
    width: 1px; height: 100px;
    left: 0; bottom: 70px;
    background: var(--lime);
    opacity: 0.6;
    pointer-events: none;
}
@media (min-width: 901px) {
    .spine:hover {
        transform: translateY(-50%) translateX(4px);
        box-shadow: 0 34px 82px rgba(0, 0, 0, 0.25), 14px 14px 0 rgba(199, 211, 111, 0.13);
    }
}

/* =========================================================
   PROFILE IDENTITY
   ========================================================= */
.identity { position: relative; z-index: 2; }

.identity__image {
    position: relative;
    width: 100%;
    height: 265px;
    margin-bottom: 24px;
    overflow: hidden;
    background: #24251f;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.identity__image .identity__initial {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 96px;
    letter-spacing: -0.05em;
    color: var(--paper);
    opacity: 0.9;
    transform: scale(1.01);
    transition: transform 0.65s var(--ease), color 0.45s ease;
}
.identity__image:hover .identity__initial {
    transform: scale(1.08);
    color: var(--lime);
}
.identity__image::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(245, 242, 234, 0.20);
    pointer-events: none;
    z-index: 2;
}
.identity__image::after {
    content: "";
    position: absolute;
    width: 36px; height: 36px;
    right: 14px; bottom: 14px;
    border-right: 2px solid var(--lime);
    border-bottom: 2px solid var(--lime);
    z-index: 3;
    transition: width 0.35s var(--ease), height 0.35s var(--ease);
}
.identity__image:hover::after { width: 46px; height: 46px; }

.identity__dot {
    position: absolute;
    width: 11px; height: 11px;
    left: 14px; bottom: 14px;
    border-radius: 50%;
    background: var(--lime);
    border: 2px solid var(--ink);
    z-index: 3;
    box-shadow: 0 0 0 0 rgba(199, 211, 111, 0.35);
    transition: box-shadow 0.35s ease, transform 0.35s ease;
}
.identity__image:hover .identity__dot {
    transform: scale(1.15);
    box-shadow: 0 0 0 6px rgba(199, 211, 111, 0.10);
}

.identity__number {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #898b82;
}
.identity__info h1 {
    display: inline-block;
    margin: 0;
    padding: 2px 5px 2px 0;
    font-family: var(--font-display);
    font-size: 30px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.045em;
    background-image: linear-gradient(90deg, var(--lime), var(--lime));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0% 4px;
    transition: background-size 0.4s var(--ease), transform 0.3s var(--ease);
}
.identity__info h1:hover { background-size: 100% 4px; transform: translateX(5px); }
.identity__info p {
    margin: 9px 0 0;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--lime);
    transition: transform 0.3s var(--ease), letter-spacing 0.3s ease;
}
.identity__info p:hover { transform: translateX(3px); letter-spacing: 0.08em; }

/* =========================================================
   SIDEBAR NAVIGATION
   ========================================================= */
.spine__nav {
    position: relative;
    z-index: 2;
    margin-top: 42px;
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--dark-line);
}
.spine__nav a {
    position: relative;
    min-height: 58px;
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 0;
    color: var(--paper);
    text-decoration: none;
    border-bottom: 1px solid var(--dark-line);
    overflow: hidden;
    transition: padding-left 0.3s var(--ease), color 0.25s ease;
}
.spine__nav a::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--lime);
    transform: translateX(-101%);
    transition: transform 0.4s var(--ease-sweep);
    z-index: -1;
}
.spine__nav a::before {
    content: "";
    position: absolute;
    left: 0; top: 0;
    width: 2px; height: 0;
    background: var(--lime);
    transition: height 0.25s ease;
    z-index: 2;
}
.spine__nav a:hover::after { transform: translateX(0); }
.spine__nav a:hover::before { height: 100%; }
.spine__nav a:hover { padding-left: 14px; color: var(--ink); }
.spine__nav a.is-active { color: var(--ink); }
.spine__nav a.is-active::after { transform: translateX(0); }
.spine__nav a.is-active::before { height: 100%; }

.nav__index {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #74776e;
    transition: color 0.25s ease, transform 0.3s var(--ease);
}
.nav__text {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1;
    font-weight: 500;
    letter-spacing: -0.025em;
    transition: transform 0.3s var(--ease), letter-spacing 0.3s ease;
}
.nav__arrow {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1;
    color: #70736b;
    transform: translateX(-3px);
    transition: color 0.25s ease, transform 0.3s var(--ease);
}
.spine__nav a:hover .nav__index,
.spine__nav a:hover .nav__arrow,
.spine__nav a.is-active .nav__index,
.spine__nav a.is-active .nav__arrow { color: var(--ink); }
.spine__nav a:hover .nav__index { transform: translateX(3px); }
.spine__nav a:hover .nav__text { transform: translateX(5px); letter-spacing: 0.01em; }
.spine__nav a:hover .nav__arrow { transform: translateX(2px); }

/* =========================================================
   SIDEBAR FOOTER
   ========================================================= */
.identity__footer {
    position: relative;
    z-index: 2;
    margin-top: auto;
    padding-top: 27px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    font-family: var(--font-mono);
    font-size: 9px;
    line-height: 1.5;
    letter-spacing: 0.08em;
    color: #777970;
}
.identity__links { display: flex; gap: 18px; }
.identity__links a {
    position: relative;
    color: var(--paper);
    font-family: var(--font-body);
    font-size: 11px;
    letter-spacing: 0;
    text-decoration: none;
    transition: color 0.25s ease, transform 0.25s var(--ease);
}
.identity__links a:hover { color: var(--lime); transform: translateY(-2px); }

/* =========================================================
   MAIN CONTENT
   ========================================================= */
.content { width: calc(100% - 365px); margin-left: 365px; padding: 0 55px 80px 30px; }
.content > section, .intro, footer {
    width: min(100%, var(--max-width));
    margin-left: auto;
    margin-right: auto;
}

/* =========================================================
   HERO
   ========================================================= */
.intro {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 90px 0 80px;
    position: relative;
}
.intro::before {
    content: "PHP / MYSQL / WEB";
    position: absolute;
    top: 48px; right: 0;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.08em;
    color: var(--muted-light);
}
.intro::after {
    content: "01";
    position: absolute;
    right: 0; bottom: 30px;
    font-family: var(--font-display);
    font-size: clamp(100px, 15vw, 220px);
    line-height: 0.8;
    font-weight: 700;
    letter-spacing: -0.08em;
    color: rgba(23, 24, 21, 0.045);
    pointer-events: none;
}
.eyebrow {
    margin: 0 0 24px;
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--muted);
}
.eyebrow::before {
    content: "";
    display: inline-block;
    width: 28px; height: 1px;
    margin-right: 10px;
    background: var(--ink);
    vertical-align: middle;
}
.intro h1 {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(55px, 7vw, 105px);
    line-height: 0.96;
    letter-spacing: -0.065em;
    font-weight: 700;
    background-image: linear-gradient(90deg, var(--lime), var(--lime));
    background-repeat: no-repeat;
    background-position: 0 88%;
    background-size: 0% 17%;
    transition: background-size 0.55s var(--ease), transform 0.35s var(--ease);
}
.intro h1:hover { background-size: 100% 17%; transform: translateX(5px); }
.intro h1 strong {
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-decoration-color: var(--lime);
    text-underline-offset: 8px;
    transition: color 0.3s ease, text-decoration-thickness 0.3s ease, text-underline-offset 0.3s ease;
}
.intro h1 strong:hover { color: var(--lime-dark); text-decoration-thickness: 6px; text-underline-offset: 6px; }
.lead {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 40px 0 0;
    font-size: 18px;
    line-height: 1.7;
    color: var(--muted);
    transition: color 0.25s ease;
}
.lead:hover { color: var(--ink); }

/* =========================================================
   SECTION BASE
   ========================================================= */
#about, #skills, #projects, #contact {
    position: relative;
    padding: 120px 0;
    border-top: 1px solid var(--line);
}
.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 60px;
}
.section-heading h2 {
    display: inline-block;
    margin: 0;
    padding: 4px 7px 4px 0;
    font-family: var(--font-display);
    font-size: clamp(35px, 4vw, 60px);
    line-height: 1;
    letter-spacing: -0.055em;
    font-weight: 650;
    background-image: linear-gradient(90deg, var(--lime), var(--lime));
    background-repeat: no-repeat;
    background-position: 0 90%;
    background-size: 0% 14%;
    transition: background-size 0.45s var(--ease), transform 0.3s var(--ease);
}
.section-heading h2:hover { background-size: 100% 14%; transform: translateX(7px); }
.section-number { font-family: var(--font-mono); font-size: 10px; color: var(--muted); white-space: nowrap; }

/* =========================================================
   ABOUT
   ========================================================= */
#about {
    display: grid;
    grid-template-columns: minmax(250px, 0.75fr) minmax(350px, 1.25fr);
    gap: 80px;
}
#about .section-heading { grid-column: 1 / -1; }
.about__text { max-width: 620px; font-size: 18px; line-height: 1.8; color: var(--muted); }
.about__text p { margin: 0 0 24px; transition: color 0.25s ease, transform 0.25s var(--ease); }
.about__text p:last-child { margin-bottom: 0; }
.about__text p:hover { color: var(--ink); transform: translateX(5px); }

/* =========================================================
   STATS
   ========================================================= */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); grid-column: 1 / -1; }
.stat { min-height: 150px; padding: 24px; border-right: 1px solid var(--line); transition: background-color 0.3s ease, transform 0.3s var(--ease); }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; }
.stat:hover { background: rgba(199, 211, 111, 0.12); transform: translateY(-3px); }
.stat__value {
    display: block;
    margin-bottom: 15px;
    font-family: var(--font-display);
    font-size: 34px;
    line-height: 1;
    font-weight: 650;
    letter-spacing: -0.05em;
    transition: color 0.3s ease, transform 0.3s var(--ease);
}
.stat:hover .stat__value { color: var(--ink); transform: translateX(5px); }
.stat__label {
    display: block;
    max-width: 120px;
    font-family: var(--font-mono);
    font-size: 9px;
    line-height: 1.5;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

/* =========================================================
   SKILLS
   ========================================================= */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.skill-group { min-height: 300px; padding: 32px 32px 32px 0; border-right: 1px solid var(--line); }
.skill-group + .skill-group { padding-left: 32px; }
.skill-group:last-child { border-right: 0; }
.skill-group h3 {
    margin: 0 0 28px;
    font-family: var(--font-mono);
    font-size: 10px;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
}
.skill-group ul { margin: 0; padding: 0; list-style: none; }
.skill-group li {
    position: relative;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: 18px;
    letter-spacing: -0.025em;
    transition: transform 0.3s var(--ease), letter-spacing 0.25s ease, color 0.25s ease;
}
.skill-group li:last-child { border-bottom: 0; }
.skill-group li::before {
    content: "→";
    position: absolute;
    left: -18px;
    opacity: 0;
    color: var(--ink);
    transition: left 0.3s var(--ease), opacity 0.3s ease;
}
.skill-group li:hover { transform: translateX(6px); letter-spacing: 0.01em; color: var(--ink); }
.skill-group li:hover::before { left: 0; opacity: 1; }
.skill-note {
    display: block;
    margin-top: 4px;
    font-family: var(--font-body);
    font-size: 12px;
    letter-spacing: 0;
    color: var(--muted-light);
}

/* =========================================================
   PROJECTS
   ========================================================= */
.project { display: grid; grid-template-columns: minmax(350px, 1.3fr) minmax(280px, 0.7fr); gap: 70px; align-items: center; }
.project__image {
    position: relative;
    overflow: hidden;
    background: var(--paper-soft);
    aspect-ratio: 16 / 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.project__image .project__glyph {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(60px, 8vw, 110px);
    letter-spacing: -0.05em;
    color: var(--ink);
    opacity: 0.08;
    transition: transform 0.6s var(--ease), opacity 0.5s ease;
}
.project:hover .project__image .project__glyph { transform: scale(1.045); opacity: 0.14; }
.project__image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--lime);
    opacity: 0;
    mix-blend-mode: multiply;
    transition: opacity 0.35s ease;
    z-index: 1;
}
.project:hover .project__image::before { opacity: 0.18; }
.project__image::after {
    content: "VIEW PROJECT";
    position: absolute;
    right: 0; bottom: 0;
    padding: 12px 16px;
    background: var(--lime);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.05em;
    transition: padding 0.3s var(--ease), letter-spacing 0.3s ease;
}
.project:hover .project__image::after { padding-right: 23px; letter-spacing: 0.08em; }
.project__content h3 {
    display: inline-block;
    margin: 0 0 20px;
    padding-right: 7px;
    font-family: var(--font-display);
    font-size: clamp(32px, 4vw, 58px);
    line-height: 0.98;
    letter-spacing: -0.055em;
    font-weight: 650;
    background-image: linear-gradient(90deg, var(--lime), var(--lime));
    background-repeat: no-repeat;
    background-position: 0 90%;
    background-size: 0% 15%;
    transition: background-size 0.45s var(--ease), transform 0.35s var(--ease);
}
.project:hover .project__content h3 { background-size: 100% 15%; transform: translateX(7px); }
.project__content p { margin: 0 0 28px; color: var(--muted); font-size: 16px; line-height: 1.75; transition: color 0.25s ease, transform 0.25s var(--ease); }
.project__content p:hover { color: var(--ink); transform: translateX(4px); }
.project__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.project__tags span {
    display: inline-block;
    padding: 7px 10px;
    border: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.04em;
    color: var(--muted);
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s var(--ease);
}
.project__tags span:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); transform: translateY(-3px); }
.project__links { display: flex; flex-wrap: wrap; gap: 24px; }
.project__links a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 5px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid var(--ink);
    transition: color 0.25s ease, transform 0.25s var(--ease), letter-spacing 0.25s ease;
}
.project__links a::after { content: "↗"; transition: transform 0.25s var(--ease); }
.project__links a:hover { color: var(--muted); transform: translateX(5px); letter-spacing: 0.02em; }
.project__links a:hover::after { transform: translate(3px, -3px); }

/* =========================================================
   CONTACT
   ========================================================= */
#contact { padding-bottom: 80px; }
.contact-grid { display: grid; grid-template-columns: minmax(280px, 0.8fr) minmax(350px, 1.2fr); gap: 100px; }
.contact-copy h3 {
    display: inline-block;
    max-width: 550px;
    margin: 0;
    padding-right: 8px;
    font-family: var(--font-display);
    font-size: clamp(40px, 5vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    font-weight: 650;
    background-image: linear-gradient(90deg, var(--lime), var(--lime));
    background-repeat: no-repeat;
    background-position: 0 91%;
    background-size: 0% 14%;
    transition: background-size 0.5s var(--ease), transform 0.35s var(--ease);
}
.contact-copy h3:hover { background-size: 100% 14%; transform: translateX(6px); }
.contact-copy p { max-width: 500px; margin: 25px 0 0; color: var(--muted); line-height: 1.7; transition: color 0.25s ease; }
.contact-copy p:hover { color: var(--ink); }

.contact-form { display: flex; flex-direction: column; gap: 28px; }
.form-group { position: relative; }
.form-group label {
    display: block;
    margin-bottom: 10px;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color 0.25s ease;
}
.form-group:hover label { color: var(--ink); }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 13px 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    outline: none;
    color: var(--ink);
    font-size: 16px;
    transition: border-color 0.25s ease, padding-left 0.25s var(--ease);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group input:hover, .form-group textarea:hover { border-bottom-color: #8b8d84; }
.form-group input:focus, .form-group textarea:focus { padding-left: 8px; border-bottom-color: var(--ink); }

.contact-form button {
    position: relative;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 15px 23px;
    background: var(--ink);
    color: var(--paper);
    border: 0;
    cursor: pointer;
    overflow: hidden;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    transition: transform 0.25s var(--ease);
}
.contact-form button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--lime);
    transform: translateX(-101%);
    transition: transform 0.4s var(--ease-sweep);
}
.contact-form button:hover::before { transform: translateX(0); }
.contact-form button:hover { color: var(--ink); transform: translateY(-3px); }
.contact-form button span, .contact-form button::after { position: relative; z-index: 2; }
.contact-form button::after { content: "→"; font-size: 17px; transition: transform 0.25s var(--ease); }
.contact-form button:hover::after { transform: translateX(5px); }
.form-status { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin: 0; min-height: 1em; }
.form-status.is-success { color: var(--lime-dark); }

/* =========================================================
   FOOTER
   ========================================================= */
footer {
    padding: 28px 0 0;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}
footer a { position: relative; color: var(--ink); text-decoration: none; transition: color 0.25s ease, letter-spacing 0.25s ease; }
footer a::after {
    content: "";
    position: absolute;
    left: 0; bottom: -3px;
    width: 100%; height: 1px;
    background: var(--lime);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s var(--ease);
}
footer a:hover { color: var(--lime-dark); letter-spacing: 0.03em; }
footer a:hover::after { transform: scaleX(1); transform-origin: left; }

/* =========================================================
   SCROLLBAR
   ========================================================= */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: #b8b4a9; transition: background 0.2s ease; }
::-webkit-scrollbar-thumb:hover { background: var(--ink); }

/* =========================================================
   TABLET
   ========================================================= */
@media (max-width: 1150px) {
    .spine { left: 20px; width: 270px; }
    .content { width: calc(100% - 320px); margin-left: 320px; padding-right: 35px; }
    .identity__image { height: 235px; }
    .intro h1 { font-size: clamp(50px, 6vw, 82px); }
    .project { gap: 45px; }
    .contact-grid { gap: 60px; }
}

/* =========================================================
   TABLET / MOBILE
   ========================================================= */
@media (max-width: 900px) {
    html { scroll-padding-top: 85px; }
    body { overflow-x: hidden; }

    .mobile-bar {
        position: sticky;
        top: 0;
        z-index: 2000;
        height: 70px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 20px;
        background: var(--ink);
        color: var(--paper);
        border-bottom: 1px solid rgba(245, 242, 234, 0.12);
    }
    .mobile-bar__name { font-family: var(--font-display); font-size: 18px; font-weight: 650; letter-spacing: -0.04em; }
    .mobile-bar button {
        width: 42px; height: 42px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: 1px solid rgba(245, 242, 234, 0.25);
        color: var(--paper);
        cursor: pointer;
        flex-direction: column;
        gap: 4px;
    }
    .mobile-bar button span { display: block; width: 18px; height: 1px; background: var(--paper); transition: transform 0.25s ease, opacity 0.25s ease; }
    .mobile-bar button[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
    .mobile-bar button[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .mobile-bar button[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

    .spine {
        position: relative;
        top: auto; left: auto;
        transform: none;
        width: auto; min-height: auto;
        margin: 16px;
        display: none;
    }
    .spine.is-open { display: flex; }
    .spine:hover { transform: none; box-shadow: 0 28px 70px rgba(0, 0, 0, 0.20), 10px 10px 0 rgba(199, 211, 111, 0.10); }

    .content { width: auto; margin-left: 0; padding: 0 20px 60px; }

    .intro { min-height: calc(100vh - 70px); padding: 80px 0; }
    .intro::before { top: 25px; }
    .intro::after { right: -10px; font-size: 120px; }
    .intro h1 { font-size: clamp(48px, 10vw, 78px); }
    .lead { margin-top: 30px; font-size: 16px; }

    #about, #skills, #projects, #contact { padding: 85px 0; }

    #about { display: block; }
    #about .section-heading { margin-bottom: 45px; }
    .about__text { margin-bottom: 55px; font-size: 16px; }
    .stats { grid-template-columns: 1fr; }

    .skills-grid { grid-template-columns: 1fr; }
    .skill-group, .skill-group + .skill-group { min-height: auto; padding: 28px 0; border-right: 0; border-bottom: 1px solid var(--line); }
    .skill-group:last-child { border-bottom: 0; }

    .project { grid-template-columns: 1fr; gap: 40px; }
    .project__image { aspect-ratio: 16 / 10; }

    .contact-grid { grid-template-columns: 1fr; gap: 55px; }
    .contact-copy h3 { font-size: clamp(40px, 9vw, 65px); }

    footer { align-items: flex-start; flex-direction: column; gap: 12px; padding-bottom: 25px; }
}

/* =========================================================
   SMALL MOBILE
   ========================================================= */
@media (max-width: 600px) {
    .content { padding-left: 16px; padding-right: 16px; }
    .spine { margin: 10px; }
    .identity__image { height: 280px; }
    .identity__info h1 { font-size: 27px; }
    .spine__nav { margin-top: 32px; }
    .spine__nav a { min-height: 56px; }
    .nav__text { font-size: 15px; }
    .intro { padding: 70px 0 85px; }
    .intro h1 { font-size: clamp(43px, 12vw, 62px); letter-spacing: -0.065em; }
    .intro h1 strong { text-decoration-thickness: 2px; text-underline-offset: 5px; }
    .lead { font-size: 15px; line-height: 1.65; }
    .section-heading { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 40px; }
    .section-heading h2 { font-size: 38px; }
    .stat, .stat:first-child { min-height: auto; padding: 22px 0; border-right: 0; border-bottom: 1px solid var(--line); }
    .stat:last-child { border-bottom: 0; }
    .stat__value { font-size: 30px; }
    .project__content h3 { font-size: 39px; }
    .project__content p { font-size: 15px; }
    #contact { padding-bottom: 65px; }
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--lime);
    outline-offset: 4px;
}
.form-status.is-success { color: green; margin-top: 10px; font-weight: 500; }
.form-status.is-error { color: red; margin-top: 10px; font-weight: 500; }