:root {
    --white: #FFFFFF;
    --paper: #F5F7FB;
    --paper-2: #EFF3F9;
    --navy: #273F7B;
    --navy-700: #1F3468;
    --ink: #15213F;
    --slate: #55607A;
    --muted: #8A93A8;
    --line: #E5E9F1;
    --line-2: #D6DDEC;
    --accent: #0EA5C4;
    --accent-soft: #E1F4F8;
    --pain: #B34430;
    --pain-soft: #F7E9E5;

    --container: 1220px;
    --gutter: clamp(20px, 5vw, 64px);
    --r: 14px;

    --f-sans: 'Poppins', Arial, sans-serif;
    --f-serif: 'Poppins', Arial, sans-serif;
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    font-family: var(--f-sans);
    color: var(--slate);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-size: 17px;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none
}

img {
    max-width: 100%;
    display: block
}

h1,
h2,
h3,
h4 {
    font-family: var(--f-serif);
    margin: 0;
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1.05
}

h1,
h2 {

    font-weight: 300;
}

h3,
h4 {
    font-family: var(--f-sans);
    font-weight: 500;
}

h1 b,
h2 b,
h3 b,
h4 b {
    font-weight: 700
}

p {
    margin: 0
}

::selection {
    background: var(--navy);
    color: #fff
}

.wrap {
    max-width: var(--container);
    margin: 0 auto;
    padding-inline: var(--gutter)
}

.section {
    padding-block: clamp(72px, 9vw, 132px)
}

/* mono eyebrow / structural label */
.eyebrow {
    font-family: var(--f-sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--navy);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.eyebrow::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.idx {
    font-family: var(--f-sans);
    font-size: 12px;
    color: var(--muted);
    letter-spacing: .08em;
    font-weight: 600
}

.lede {
    font-family: var(--f-sans);
    color: var(--slate);
    max-width: none;
    line-height: 1.55
}

/* buttons */
.btn {

    --fg: #fff;
    font-family: var(--f-sans);
    font-weight: 600;
    font-size: 15px;
    background: var(--bg);
    color: rgb(85, 96, 122);
    padding: 13px 22px;
    border-radius: 100px;
    border: 2px solid transparent;
    border-color: var(--line-2);
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    transition: transform .25s cubic-bezier(.2, .8, .2, 1), background .25s, box-shadow .25s;
    white-space: nowrap;
}

.btn svg {
    width: 16px;
    height: 16px;
    transition: transform .25s
}



.btn:hover svg {
    transform: translate(3px, 0)
}

.btn.ghost {
    --bg: transparent;
    --fg: var(--navy);
    border-color: var(--line-2)
}

.btn.ghost:hover {
    background: var(--paper);
    box-shadow: none;
    transform: translateY(-2px)
}

.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px
}

/* ---------- NAV ---------- */
header.nav {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s, box-shadow .3s, transform .35s ease;
}

header.nav.kapih-nav-hidden {
    transform: translateY(-100%);
}

header.nav.stuck {
    border-color: var(--line);
    box-shadow: 0 1px 0 rgba(21, 33, 63, .02)
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 74px;
    gap: 24px
}

.brand img {
    height: 70px;
    width: auto
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px
}

.nav-links a {
    font-family: var(--sans);
    font-size: 14.5px;
    font-weight: 500;
    color: var(--slate);
    padding: 9px 14px;
    border-radius: 9px;
    position: relative;
    transition: color .2s
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 6px;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .28s cubic-bezier(.2, .8, .2, 1)
}

.nav-links a:hover {
    color: var(--navy)
}

.nav-links a:hover::after {
    transform: scaleX(1)
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 14px
}

.menu-btn {
    display: none;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 8px;
    color: var(--ink)
}

.menu-btn svg {
    width: 26px;
    height: 26px
}

.mobile-menu {
    display: none;
    position: fixed;
    inset: 74px 0 0;
    background: #fff;
    z-index: 55;
    padding: 24px var(--gutter);
    flex-direction: column;
    gap: 4px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s, transform .25s
}

.mobile-menu.open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    display: flex
}

.mobile-menu a {
    font-family: var(--sans);
    font-weight: 500;
    font-size: 22px;
    color: var(--ink);
    padding: 14px 0;
    border-bottom: 1px solid var(--line)
}

.mobile-menu .btn {
    margin-top: 20px;
    justify-content: center
}




/* ---------- PROJECTS ---------- */
.proj-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 52px
}

.proj {
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s, border-color .35s;
    display: flex;
    flex-direction: column
}

.proj:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 48px -30px rgba(21, 33, 63, .4);
    border-color: var(--line-2)
}

.proj .top {
    aspect-ratio: 16/10;
    position: relative;
    overflow: hidden;

    border-bottom: 1px solid var(--line)
}

.proj .top img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.10);
    object-position: center top;

}



.proj .body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1
}

.proj .tag {
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600
}

.proj h3 {
    font-size: 19px;
    line-height: 1.25;
    color: var(--ink);
    font-weight: 600
}

.proj p {
    font-family: var(--sans);
}

.proj .rm {
    margin-top: auto;
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--navy);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600
}

.proj .rm svg {
    width: 14px;
    height: 14px;
    transition: transform .25s
}

.proj:hover .rm svg {
    transform: translateX(4px)
}

#projects {
    padding-top: clamp(10px, 2vw, 24px);
}

@media(max-width:900px) {
    .proj-grid {
        grid-template-columns: 1fr 1fr
    }
}

@media(max-width:600px) {
    .proj-grid {
        grid-template-columns: 1fr
    }
}

/* ---------- FOOTER ---------- */
footer {
    background: var(--ink);
    color: rgba(255, 255, 255, .72);
    padding-block: 64px 30px;
    font-family: var(--sans);
}

.foot-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
    gap: 40px
}

.foot-brand img {
    height: 200px;
    width: 300px;
    max-width: 800px;
    /* margin-bottom: 22px; */
    object-fit: contain;
}

.foot-brand p {
    font-size: 15px;
    color: rgba(255, 255, 255, .6);
    max-width: 34ch;
    line-height: 1.65
}

.fcol h4 {
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .5);
    font-weight: 600;
    margin-bottom: 18px
}

.fcol a,
.fcol .fi {
    display: block;
    font-size: 15px;
    color: rgba(255, 255, 255, .72);
    padding: 6px 0;
    transition: color .2s
}

.fcol .fi {
    white-space: nowrap;
}

.fcol a:hover {
    color: #fff
}

.socials {
    display: flex;
    gap: 12px;
    margin-top: 8px
}

.socials a {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 10px;
    display: grid;
    place-items: center;
    transition: background .25s, border-color .25s
}

.socials a:hover {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .3)
}

.socials svg {
    width: 18px;
    height: 18px;
    fill: currentColor
}

.foot-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 52px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-family: var(--sans);
    font-size: 11.5px;
    letter-spacing: .06em;
    color: rgba(255, 255, 255, .45);
    font-weight: 600
}

@media(max-width:900px) {
    .foot-grid {
        grid-template-columns: 1fr 1fr
    }

    .foot-brand {
        grid-column: 1/-1
    }
}

@media(max-width:520px) {
    .foot-grid {
        grid-template-columns: 1fr
    }
}

/* reveal */
.reveal {
    opacity: 1;
    transform: translateY(22px);
    transition: opacity .7s cubic-bezier(.2, .8, .2, 1), transform .7s cubic-bezier(.2, .8, .2, 1)
}

.reveal.in {
    opacity: 1;
    transform: none
}

@media(max-width:960px) {
    .nav-links {
        display: none
    }

    .menu-btn {
        display: block
    }

    .hero-grid {
        grid-template-columns: 1fr
    }

    .twin {
        max-width: 520px;
        margin-top: 12px
    }

    .cap-grid {
        grid-template-columns: 1fr
    }

    .about-grid {
        grid-template-columns: 1fr
    }

    /* mobile: no pin/scrub — plain stacked, click-to-switch cards */
    .cap-panelwrap {
        min-height: 0
    }

    .cap-panel {
        position: relative;
        inset: auto;
        display: none;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        margin-bottom: 16px;
        border-radius: var(--r);
        min-height: 340px;
    }

    .cap-panel.active {
        display: flex
    }
}

@media(prefers-reduced-motion:reduce) {
    * {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important
    }

    .reveal {
        opacity: 1;
        transform: none
    }
}

.shead h2 .soft {
    color: var(--navy);
    font-weight: 700
}