/*
 * AttenkaMe — portfolio Abdullah Al Haddad.
 *
 * Mengikuti PDF portofolionya: latar hampir hitam #10100F, label emas
 * #E1AD55, judul kapital besar yang rapat (di PDF: Helvetica; di web:
 * Inter Tight), dan teks isi DM Sans abu terang. Tanpa gradien.
 */

@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/inter-tight-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter Tight'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/inter-tight-500.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/dm-sans-400.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/dm-sans-500.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/dm-sans-700.woff2') format('woff2'); }

:root {
    --font-display: 'Inter Tight', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-body: 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

    --bg: #10100f;
    --bg-raised: #191918;
    --white: #ffffff;
    --text: #f2f2f0;
    --muted: #bdbdbd;
    --dim: #8b8b88;
    --rule: #333332;
    --gold: #e1ad55;

    --gutter: clamp(1.25rem, 6.25vw, 7.5rem);
    --nav-h: 4.25rem;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-h);
    -webkit-text-size-adjust: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

html:has(dialog[open]) { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

::selection { background: var(--gold); color: var(--bg); }

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 4px;
}

.skip-link {
    position: fixed;
    left: 1rem;
    top: -4rem;
    z-index: 60;
    padding: 0.6rem 1rem;
    background: var(--white);
    color: var(--bg);
    font-weight: 700;
    transition: top 160ms ease;
}
.skip-link:focus { top: 1rem; }

.icon { width: 1.25rem; height: 1.25rem; flex: none; }

/* ---------- Tata letak ---------- */

.shell {
    width: 100%;
    max-width: 112rem;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* Seperti satu halaman PDF: teks di kiri, gambar di kanan. */
.slide { padding-block: clamp(5rem, 3rem + 7vw, 10rem); }

.split {
    display: grid;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 64rem) {
    .split {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
        gap: 4rem 8%;
    }

    .split--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}

/* ---------- Huruf ---------- */

.eyebrow {
    font-family: var(--font-display);
    font-size: clamp(1rem, 0.9rem + 0.4vw, 1.3rem);
    line-height: 1.3;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--gold);
}

.title {
    margin-top: 1.25rem;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.4rem, 1.1rem + 3.2vw, 4.25rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    color: var(--white);
}

.title--xl { font-size: clamp(3rem, 1.2rem + 4.6vw, 6rem); line-height: 0.92; }

.body {
    margin-top: 1.75rem;
    max-width: 38rem;
    font-size: clamp(1.05rem, 0.96rem + 0.35vw, 1.3rem);
    line-height: 1.62;
    color: var(--muted);
}

.body + .body { margin-top: 1.25rem; }
.built { margin-top: 2.25rem; }

/* Tautan tebal bergaris bawah, seperti "VINSLEATHER.COM ↗" di PDF. */
.hard-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.35rem);
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: var(--white);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.2em;
    transition: color 160ms ease;
}

.hard-link:hover { color: var(--gold); }
.hard-link .arrow { width: 0.85em; height: 0.85em; }

.project-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
    margin-top: 2.5rem;
}

/* ---------- Navigasi ---------- */

.site-nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 40;
    background: var(--bg);
    border-bottom: 1px solid transparent;
    transition: border-color 200ms ease;
}

.site-nav[data-stuck='true'] { border-bottom-color: var(--rule); }

.nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    height: var(--nav-h);
}

.nav-brand {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.25rem;
    letter-spacing: -0.04em;
    color: var(--white);
}

.nav-links {
    display: none;
    align-items: center;
    gap: 2.25rem;
}

@media (min-width: 56rem) {
    .nav-links { display: flex; }
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding-block: 0.35rem;
    font-family: var(--font-display);
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: var(--dim);
    transition: color 160ms ease;
}

.nav-link:hover,
.nav-link[aria-current='true'] { color: var(--white); }

.nav-link::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 220ms var(--ease-out);
}

.nav-link[aria-current='true']::after { transform: scaleX(1); }
.nav-pdf .icon { width: 1rem; height: 1rem; }

.nav-menu { position: relative; }

@media (min-width: 56rem) {
    .nav-menu { display: none; }
}

.nav-menu summary {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.75rem;
    padding-inline: 0.25rem;
    font-family: var(--font-display);
    font-size: 0.9375rem;
    text-transform: uppercase;
    color: var(--text);
    list-style: none;
    cursor: pointer;
}

.nav-menu summary::-webkit-details-marker { display: none; }

.nav-menu__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    width: 14rem;
    display: grid;
    padding: 0.5rem 0;
    background: var(--bg-raised);
    border: 1px solid var(--rule);
}

.nav-menu__panel a {
    padding: 0.75rem 1.1rem;
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: 0.9375rem;
    color: var(--muted);
}

.nav-menu__panel a:hover { color: var(--white); background: #222221; }

/* ---------- Hero (halaman 1 PDF) ---------- */

.hero {
    display: grid;
    padding-top: var(--nav-h);
}

@media (min-width: 64rem) {
    .hero {
        grid-template-columns: 46% 54%;
        min-height: max(40rem, 100svh);
    }
}

.hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(3rem, 2rem + 4vw, 5rem) var(--gutter) clamp(3rem, 2rem + 4vw, 5rem);
}

@media (min-width: 64rem) {
    .hero-copy { padding-right: 2.5rem; }
}

.hero-name {
    margin-top: 1.5rem;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(3.1rem, 0.6rem + 8.6vw, 8.6rem);
    line-height: 0.9;
    letter-spacing: -0.055em;
    text-transform: uppercase;
    color: var(--white);
}

/* Di layar lebar ukuran mengikuti lebar kolom (46%), bukan seluruh layar. */
@media (min-width: 64rem) {
    .hero-name { font-size: clamp(4rem, 7.5vw, 9.5rem); }
}

.hero-name span { display: block; }

.hero-role {
    margin-top: 1.5rem;
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 1.1rem + 1vw, 2.2rem);
    letter-spacing: -0.03em;
    color: var(--muted);
}

.hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin-top: clamp(2.5rem, 2rem + 2vw, 4rem);
}

.hero-links .hard-link { text-transform: none; font-size: 1.15rem; letter-spacing: -0.01em; }
.hero-pdf-size { color: var(--dim); font-weight: 400; }

.hero-photo {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--bg-raised);
}

@media (min-width: 64rem) {
    .hero-photo { aspect-ratio: auto; }
}

.hero-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 80%;
}

/* ---------- Tentang + keahlian (halaman 2) ---------- */

.skills .eyebrow { margin-bottom: 0.6rem; }

.skill-group {
    display: grid;
    gap: 0.35rem;
    margin-top: 1.9rem;
    font-size: clamp(1.15rem, 1rem + 0.5vw, 1.55rem);
    line-height: 1.45;
    color: var(--text);
}

.skill-group .dot { color: var(--dim); }

/* ---------- Pengalaman + pendidikan (halaman 3) ---------- */

.title--rule {
    margin-top: 0;
    padding-bottom: clamp(1.5rem, 1rem + 1.5vw, 2.5rem);
    border-bottom: 5px solid var(--rule);
}

.entry { margin-top: clamp(2rem, 1.5rem + 1.5vw, 3rem); }

.entry-title {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.75rem);
    letter-spacing: -0.02em;
    color: var(--white);
}

.entry-org {
    margin-top: 0.4rem;
    font-size: clamp(1.05rem, 0.96rem + 0.35vw, 1.3rem);
    line-height: 1.55;
    color: var(--gold);
}

.entry .body { margin-top: 0.85rem; }

@media (max-width: 63.99rem) {
    #education { margin-top: 2rem; }
}

/* ---------- Daftar karya ---------- */

.slide--index { border-top: 1px solid var(--rule); }

.work-index { border-top: 1px solid var(--rule); }

.work-index a {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr);
    gap: 0.15rem 1rem;
    padding-block: 1rem;
    border-bottom: 1px solid var(--rule);
    transition: color 160ms ease;
}

@media (min-width: 40rem) {
    .work-index a { grid-template-columns: 3rem minmax(0, 1fr) auto; align-items: baseline; }
}

.idx-num { font-family: var(--font-display); color: var(--gold); font-size: 1rem; }

.idx-title {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 1rem + 0.7vw, 1.6rem);
    letter-spacing: -0.035em;
    text-transform: uppercase;
    color: var(--white);
    transition: transform 220ms var(--ease-out);
}

.idx-label {
    grid-column: 2;
    font-size: 0.9rem;
    color: var(--dim);
}

@media (min-width: 40rem) {
    .idx-label { grid-column: auto; text-align: right; }
}

.work-index a:hover .idx-title { transform: translateX(0.35rem); }

/* ---------- Proyek ---------- */

.project-media {
    display: grid;
    gap: clamp(0.75rem, 0.5rem + 0.6vw, 1.5rem);
}

/* Satu baris = beberapa gambar dengan tinggi sama; lebarnya sebanding rasio gambar. */
.media-row {
    display: flex;
    align-items: flex-start;
    gap: clamp(0.75rem, 0.5rem + 0.6vw, 1.5rem);
}

.media-row .shot { flex: var(--ar) 1 0%; min-width: 0; }

.shot {
    position: relative;
    display: block;
    overflow: hidden;
    cursor: zoom-in;
}

.shot img {
    width: 100%;
    transition: transform 600ms var(--ease-out), opacity 300ms ease;
}

.shot:hover img { transform: scale(1.015); }

.shot-zoom {
    position: absolute;
    right: 0.6rem;
    top: 0.6rem;
    display: grid;
    place-items: center;
    width: 2.1rem;
    height: 2.1rem;
    background: var(--bg);
    color: var(--white);
    opacity: 0;
    transition: opacity 200ms ease;
}

.shot-zoom .icon { width: 1rem; height: 1rem; }
.shot:hover .shot-zoom,
.shot:focus-visible .shot-zoom { opacity: 1; }

/* Dua gambar bertumpuk miring (Adikari, Aleeza), seperti di PDF. */
.media-stagger .media-row {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: clamp(0.75rem, 0.5rem + 0.6vw, 1.5rem) 0;
}

.media-stagger .shot:nth-child(1) { grid-column: 1 / 8; grid-row: 1; }
.media-stagger .shot:nth-child(2) { grid-column: 4 / 11; grid-row: 2; }

/* ---------- Karya lain (halaman 13) ---------- */

.other-list { display: grid; gap: clamp(1.75rem, 1.4rem + 1vw, 2.5rem); }

.other-name {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: clamp(1.15rem, 1rem + 0.4vw, 1.35rem);
    color: var(--text);
}

.other-list .body { margin-top: 0.4rem; }

/* ---------- Galeri (halaman 14) ---------- */

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(0.75rem, 0.5rem + 0.6vw, 1.5rem);
}

.gallery-grid img {
    width: 100%;
    aspect-ratio: 607 / 385;
    object-fit: cover;
}

/* ---------- Kontak (halaman 15) ---------- */

.slide--contact { padding-bottom: clamp(6rem, 4rem + 8vw, 12rem); }

.contact-list { display: grid; gap: 0.35rem; }

.contact-list a {
    display: grid;
    gap: 0.1rem;
    padding-block: 0.65rem;
}

.contact-kind {
    font-family: var(--font-display);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--dim);
}

.contact-value {
    width: fit-content;
    font-size: clamp(1.3rem, 1rem + 1.2vw, 2.1rem);
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--white);
    overflow-wrap: anywhere;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.18em;
    transition: text-decoration-color 160ms ease, color 160ms ease;
}

.contact-list a:hover .contact-value { text-decoration-color: var(--gold); }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--rule); }

.footer-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 2rem;
    padding-block: 1.75rem;
    font-size: 0.9375rem;
    color: var(--dim);
}

.footer-row a:hover { color: var(--white); }

/* ---------- Lightbox ---------- */

.lightbox {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
}

.lightbox::backdrop { background: rgb(0 0 0 / 0.6); }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); animation: fade-in 220ms ease; }

@keyframes fade-in {
    from { opacity: 0; }
}

.lb-top {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem var(--gutter);
    border-bottom: 1px solid var(--rule);
}

.lb-title {
    flex: 1;
    min-width: 0;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: var(--white);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.lb-counter { font-family: var(--font-display); color: var(--gold); font-variant-numeric: tabular-nums; }

.lb-btn {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--rule);
    color: var(--white);
    transition: background-color 160ms ease, border-color 160ms ease;
}

.lb-btn:hover { background: #222221; border-color: #4a4a48; }

.lb-stage {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    justify-items: center;
    align-items: center;
    gap: 1rem;
    min-height: 0;
    padding: clamp(1rem, 0.5rem + 2vw, 2.5rem) clamp(1rem, 5vw, 6rem) 1.25rem;
}

.lb-stage img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.lb-caption { color: var(--muted); font-size: 0.9375rem; text-align: center; }

.lb-prev,
.lb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg);
}

.lb-prev { left: clamp(0.5rem, 1.5vw, 1.5rem); }
.lb-next { right: clamp(0.5rem, 1.5vw, 1.5rem); }
.lb-prev[hidden], .lb-next[hidden] { display: none; }

/* ---------- 404 ---------- */

.not-found {
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 100svh;
    padding-block: 1.5rem 4rem;
}

.not-found > div { align-self: center; }

/* ---------- Gerak ---------- */

.js [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out);
}

.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .js [data-reveal] { opacity: 1; transform: none; }
}

@media print {
    .site-nav, .lightbox, .shot-zoom { display: none; }
    .js [data-reveal] { opacity: 1; transform: none; }
}
