/* ==========================================================================
   Aryan Sarsam — portfolio
   Theme: "Filament" — jewel threads on deep aubergine, taken from the
   quilled-flower reference: fuchsia, violet, teal, saffron, gold.
   ========================================================================== */

:root {
    /* Ink */
    --ink:        #150B24;
    --ink-1:      #1D1033;
    --ink-2:      #271644;
    --ink-3:      #33205A;

    /* Thread colours */
    --fuchsia:    #F5257E;
    --magenta:    #C41C8F;
    --violet:     #8A44E0;
    --indigo:     #5A2FB0;
    --teal:       #17BFAE;
    --deep-teal:  #0C7C82;
    --saffron:    #FFAE2B;
    --gold:       #F2D680;

    /* Paper */
    --cream:      #F8F2E7;
    --muted:      #BCA9D6;
    --dim:        #8A78A8;
    --line:       rgba(242, 214, 128, 0.16);
    --line-soft:  rgba(188, 169, 214, 0.14);

    --thread: linear-gradient(90deg, var(--fuchsia) 0%, var(--violet) 28%, var(--indigo) 45%, var(--deep-teal) 62%, var(--teal) 78%, var(--saffron) 100%);
    --thread-v: linear-gradient(180deg, var(--fuchsia) 0%, var(--violet) 30%, var(--teal) 65%, var(--saffron) 100%);

    --radius:     3px;
    --radius-lg:  6px;
    --shadow:     0 18px 50px rgba(0, 0, 0, .45);
    --shadow-sm:  0 6px 20px rgba(0, 0, 0, .3);

    --font-display: 'Fraunces', 'Noto Kufi Arabic', Georgia, serif;
    --font-body:    'Karla', 'Noto Sans Arabic', system-ui, -apple-system, sans-serif;
    --font-util:    'Karla', 'Noto Sans Arabic', system-ui, sans-serif;

    --wrap: 1240px;
    --gutter: clamp(20px, 5vw, 56px);
    --ease: cubic-bezier(.22, .68, .36, 1);
}

/* RTL languages get the Arabic-script faces as first choice */
html[dir="rtl"] {
    --font-display: 'Noto Kufi Arabic', 'Fraunces', 'Segoe UI', Tahoma, serif;
    --font-body:    'Noto Sans Arabic', 'Karla', 'Segoe UI', Tahoma, Arial, sans-serif;
    --font-util:    'Noto Sans Arabic', 'Karla', 'Segoe UI', Tahoma, Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--ink);
    color: var(--cream);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    font-weight: 400;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.08;
    margin: 0;
    letter-spacing: -0.01em;
}
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4 {
    letter-spacing: 0;
    line-height: 1.35;
    font-weight: 600;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--fuchsia); color: #fff; }

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

/* Clipped rather than pushed off-canvas: a negative offset would expand the
   scrollable area on right-to-left pages. */
.skip {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    background: var(--gold);
    color: var(--ink);
    z-index: 200;
}
.skip:focus {
    width: auto;
    height: auto;
    clip: auto;
    clip-path: none;
    padding: 12px 20px;
    inset-inline-start: 12px;
    top: 12px;
}

/* ------------------------------------------------------------ layout ---- */
.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

section { position: relative; }

.section {
    padding-block: clamp(64px, 9vw, 128px);
}
.section--tight { padding-block: clamp(48px, 6vw, 80px); }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: clamp(30px, 4vw, 54px);
}

.eyebrow {
    font-family: var(--font-util);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
}
html[dir="rtl"] .eyebrow { letter-spacing: 0; font-size: 13px; }
.eyebrow::before {
    content: "";
    width: 34px; height: 2px;
    background: var(--thread);
    flex: none;
    border-radius: 2px;
}

.section-title {
    font-size: clamp(30px, 4.6vw, 54px);
    font-variation-settings: 'SOFT' 20, 'WONK' 1;
}
html[dir="rtl"] .section-title { font-size: clamp(26px, 4vw, 44px); }

.lede {
    font-size: clamp(17px, 1.5vw, 20px);
    color: var(--muted);
    max-width: 58ch;
}

/* ------------------------------------------------- filament backdrop ---- */
/* The signature: fine vertical threads, like the quilled-paper reference. */
.filaments {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.filaments::before {
    content: "";
    position: absolute;
    inset: -10% -5%;
    background:
        repeating-linear-gradient(90deg,
            rgba(245, 37, 126, .35) 0 1px,
            transparent 1px 7px),
        repeating-linear-gradient(90deg,
            rgba(23, 191, 174, .3) 0 1px,
            transparent 1px 13px),
        repeating-linear-gradient(90deg,
            rgba(255, 174, 43, .22) 0 1px,
            transparent 1px 23px);
    -webkit-mask-image: radial-gradient(115% 78% at 72% 12%, #000 0%, transparent 68%);
    mask-image: radial-gradient(115% 78% at 72% 12%, #000 0%, transparent 68%);
    opacity: .5;
}
.filaments::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 55% at 82% 6%, rgba(138, 68, 224, .34), transparent 70%),
        radial-gradient(52% 48% at 8% 32%, rgba(196, 28, 143, .22), transparent 72%),
        radial-gradient(60% 60% at 50% 108%, rgba(12, 124, 130, .26), transparent 70%);
}

.grain {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: .045;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------ header ---- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(21, 11, 36, .82);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: none;
}
.brand-mark {
    width: 30px; height: 30px;
    flex: none;
    border-radius: 50%;
    background: var(--thread);
    -webkit-mask: radial-gradient(circle at 50% 50%, transparent 0 26%, #000 27%);
    mask: radial-gradient(circle at 50% 50%, transparent 0 26%, #000 27%);
}
.brand-name {
    font-family: var(--font-display);
    font-size: 19px;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
}
html[dir="rtl"] .brand-name { text-transform: none; letter-spacing: 0; font-size: 20px; }
.brand-role {
    display: block;
    font-family: var(--font-util);
    font-size: 10px;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--dim);
    margin-top: 1px;
}
html[dir="rtl"] .brand-role { letter-spacing: 0; font-size: 11px; }

.nav {
    display: flex;
    align-items: center;
    gap: clamp(14px, 2.2vw, 32px);
}
.nav a {
    font-family: var(--font-util);
    font-size: 14px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 6px 0;
    position: relative;
    transition: color .25s var(--ease);
}
html[dir="rtl"] .nav a { text-transform: none; letter-spacing: 0; font-size: 16px; }
.nav a::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    background: var(--thread);
    transition: width .3s var(--ease);
    border-radius: 2px;
}
.nav a:hover { color: var(--cream); }
.nav a:hover::after, .nav a.is-active::after { width: 100%; }
.nav a.is-active { color: var(--cream); }

.lang-switch {
    display: flex;
    align-items: center;
    gap: 2px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 3px;
}
.lang-switch a {
    font-family: var(--font-util);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    padding: 5px 11px;
    border-radius: 999px;
    color: var(--dim);
    transition: all .25s var(--ease);
}
.lang-switch a:hover { color: var(--cream); }
.lang-switch a.is-active {
    background: var(--gold);
    color: var(--ink);
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 14px;
    cursor: pointer;
    font-size: 12px;
    letter-spacing: .16em;
    text-transform: uppercase;
    align-items: center;
    gap: 9px;
}
.nav-toggle span {
    display: block;
    width: 16px; height: 9px;
    border-top: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
}

/* -------------------------------------------------------------- hero ---- */
.hero {
    position: relative;
    padding-block: clamp(56px, 8vw, 112px) clamp(48px, 6vw, 84px);
    overflow: hidden;
}
.hero .wrap {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}

.hero-name {
    font-size: clamp(52px, 10.5vw, 132px);
    line-height: .86;
    letter-spacing: -0.03em;
    margin: 0 0 22px;
    text-transform: uppercase;
    font-variation-settings: 'SOFT' 0, 'WONK' 0;
    font-weight: 300;
}
html[dir="rtl"] .hero-name {
    font-size: clamp(42px, 8vw, 96px);
    line-height: 1.15;
    letter-spacing: 0;
    text-transform: none;
    font-weight: 700;
}
.hero-name .line-2 {
    display: block;
    font-weight: 600;
    background: var(--thread);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-lede {
    font-size: clamp(17px, 1.6vw, 21px);
    color: var(--muted);
    max-width: 46ch;
    margin-bottom: 30px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 36px;
}

.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(20px, 3vw, 44px);
    padding-top: 26px;
    border-top: 1px solid var(--line-soft);
}
.fact-n {
    font-family: var(--font-display);
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1;
    color: var(--gold);
    display: block;
}
.fact-l {
    font-family: var(--font-util);
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--dim);
    margin-top: 7px;
    display: block;
    max-width: 15ch;
}
html[dir="rtl"] .fact-l { letter-spacing: 0; font-size: 13px; text-transform: none; }

/* Stacked prints, as if laid on the studio table */
.hero-stack {
    position: relative;
    aspect-ratio: 4 / 4.4;
}
.hero-stack figure {
    position: absolute;
    margin: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--ink-2);
}
.hero-stack figure img { width: 100%; height: 100%; object-fit: cover; }
.hero-stack .s1 {
    inset-inline-start: 2%; top: 0;
    width: 60%; aspect-ratio: 3/4;
    transform: rotate(-4deg);
    z-index: 1;
}
.hero-stack .s2 {
    inset-inline-end: 2%; top: 14%;
    width: 58%; aspect-ratio: 4/3;
    transform: rotate(3deg);
    z-index: 3;
    outline: 1px solid rgba(242, 214, 128, .35);
}
.hero-stack .s3 {
    inset-inline-start: 12%; bottom: 0;
    width: 66%; aspect-ratio: 1/1;
    transform: rotate(2deg);
    z-index: 2;
}
.hero-stack figure { transition: transform .6s var(--ease); }
.hero-stack:hover .s1 { transform: rotate(-6deg) translateY(-6px); }
.hero-stack:hover .s2 { transform: rotate(4.5deg) translateY(-9px); }
.hero-stack:hover .s3 { transform: rotate(1deg) translateY(-4px); }

/* ------------------------------------------------------------ button ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-util);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 15px 28px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--cream);
    cursor: pointer;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
}
html[dir="rtl"] .btn { letter-spacing: 0; text-transform: none; font-size: 15px; }
.btn svg { width: 15px; height: 15px; flex: none; }
html[dir="rtl"] .btn svg { transform: scaleX(-1); }

.btn--primary {
    background: var(--thread);
    background-size: 220% 100%;
    background-position: 0% 0%;
    color: #1a0d13;
    box-shadow: 0 10px 30px rgba(245, 37, 126, .28);
}
.btn--primary:hover {
    background-position: 100% 0%;
    transform: translateY(-2px);
    box-shadow: 0 14px 38px rgba(138, 68, 224, .38);
}
.btn--ghost {
    border-color: var(--line);
    color: var(--cream);
}
.btn--ghost:hover {
    border-color: var(--gold);
    background: rgba(242, 214, 128, .08);
    transform: translateY(-2px);
}

.link-more {
    font-family: var(--font-util);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gold);
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(242, 214, 128, .3);
    transition: gap .25s var(--ease), border-color .25s var(--ease);
}
html[dir="rtl"] .link-more { letter-spacing: 0; text-transform: none; font-size: 15px; }
.link-more:hover { gap: 15px; border-color: var(--gold); }
.link-more svg { width: 14px; height: 14px; }
html[dir="rtl"] .link-more svg { transform: scaleX(-1); }

/* ----------------------------------------------------------- ribbon ----- */
.ribbon {
    padding-block: 12px;
    border-block: 1px solid var(--line-soft);
    background: rgba(29, 16, 51, .55);
    overflow: hidden;
    position: relative;
    z-index: 2;
}
.ribbon-track {
    display: flex;
    gap: 14px;
    width: max-content;
    direction: ltr; /* the strip is decorative; keep its geometry neutral */
    animation: slide 68s linear infinite;
}
.ribbon:hover .ribbon-track { animation-play-state: paused; }
.ribbon-track img {
    height: clamp(78px, 10vw, 118px);
    width: auto;
    border-radius: var(--radius);
    opacity: .62;
    transition: opacity .3s var(--ease);
}
.ribbon-track img:hover { opacity: 1; }
@keyframes slide {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ------------------------------------------------------------- cards ---- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
    gap: clamp(18px, 2.2vw, 30px);
}

/* Masonry-style column layout for the gallery */
.masonry {
    columns: 3;
    column-gap: clamp(16px, 2vw, 26px);
}
.masonry > * {
    break-inside: avoid;
    margin-bottom: clamp(16px, 2vw, 26px);
}

.card {
    display: block;
    position: relative;
    background: var(--ink-1);
    border-radius: var(--radius-lg);
    overflow: hidden;
    isolation: isolate;
    transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.card::before {
    /* hairline thread frame that lights up on hover */
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: var(--thread);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity .4s var(--ease);
    pointer-events: none;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card:hover::before, .card:focus-visible::before { opacity: 1; }

.card-media { position: relative; overflow: hidden; background: var(--ink-2); }
.card-media img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform .8s var(--ease), filter .5s var(--ease);
    filter: saturate(.94);
}
.card:hover .card-media img { transform: scale(1.045); filter: saturate(1.05); }

.card-body {
    padding: 16px 18px 19px;
    position: relative;
    z-index: 2;
}
.card-title {
    font-family: var(--font-display);
    font-size: 20px;
    line-height: 1.25;
    margin: 0 0 5px;
}
.card-meta {
    font-family: var(--font-util);
    font-size: 11.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--dim);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
html[dir="rtl"] .card-meta { letter-spacing: 0; text-transform: none; font-size: 13px; }
.card-meta span + span::before {
    content: "·";
    margin-inline-end: 10px;
    color: var(--violet);
}

.card--fixed .card-media { aspect-ratio: 4 / 3; }
.card--fixed .card-media img { height: 100%; object-fit: cover; }

/* Collection tile */
.tile {
    position: relative;
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 5 / 4;
    background: var(--ink-2);
}
.tile img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .9s var(--ease), filter .5s var(--ease);
    filter: saturate(.8) brightness(.72);
}
.tile:hover img { transform: scale(1.06); filter: saturate(1) brightness(.82); }
.tile-inner {
    position: absolute;
    inset: auto 0 0 0;
    padding: 22px 22px 20px;
    background: linear-gradient(to top, rgba(14, 7, 24, .94) 12%, rgba(14, 7, 24, .55) 55%, transparent);
    z-index: 2;
}
.tile-inner { display: block; }
.tile-name {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(21px, 2.2vw, 27px);
    margin: 0 0 4px;
    line-height: 1.15;
}
.tile-count {
    display: block;
    font-family: var(--font-util);
    font-size: 11.5px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold);
}
html[dir="rtl"] .tile-count { letter-spacing: 0; text-transform: none; font-size: 13px; }
.tile::after {
    content: "";
    position: absolute;
    inset-inline: 0; bottom: 0;
    height: 3px;
    background: var(--thread);
    transform: scaleX(0);
    transform-origin: inset-inline-start;
    transition: transform .5s var(--ease);
    z-index: 3;
}
.tile:hover::after { transform: scaleX(1); }

/* -------------------------------------------------------------- about --- */
.about-grid {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: clamp(30px, 5vw, 76px);
    align-items: start;
}
.portrait {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.portrait img { width: 100%; height: auto; }
.portrait::after {
    content: "";
    position: absolute; inset: 0;
    box-shadow: inset 0 0 0 1px rgba(242, 214, 128, .3);
    border-radius: var(--radius-lg);
}
.portrait-tag {
    position: absolute;
    inset-inline-start: 0; bottom: 0;
    background: var(--ink);
    color: var(--gold);
    font-family: var(--font-util);
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    padding: 10px 16px;
    z-index: 2;
    border-top: 2px solid transparent;
    border-image: var(--thread) 1;
}
html[dir="rtl"] .portrait-tag { letter-spacing: 0; text-transform: none; font-size: 13px; }

.about-body p { color: var(--muted); }
.about-body p:first-of-type {
    font-size: clamp(18px, 1.7vw, 22px);
    color: var(--cream);
    font-family: var(--font-display);
    line-height: 1.45;
}

/* Timeline — years genuinely are a sequence, so they carry the structure */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 22px;
    padding: 20px 0;
    border-top: 1px solid var(--line-soft);
}
.timeline li:last-child { border-bottom: 1px solid var(--line-soft); }
.timeline .yr {
    font-family: var(--font-display);
    font-size: 19px;
    color: var(--gold);
    padding-top: 2px;
}
.timeline h4 { font-size: 19px; margin-bottom: 4px; }
.timeline p { color: var(--muted); font-size: 15.5px; margin: 0; }

/* Skills */
.skills { display: grid; gap: 16px; }
.skill-row { display: grid; gap: 7px; }
.skill-top {
    display: flex; justify-content: space-between; align-items: baseline;
    font-family: var(--font-util);
    font-size: 13.5px;
    letter-spacing: .06em;
}
.skill-top b { font-weight: 600; }
.skill-top i { font-style: normal; color: var(--dim); font-size: 12px; }
.skill-bar {
    height: 4px;
    border-radius: 4px;
    background: rgba(188, 169, 214, .16);
    overflow: hidden;
}
.skill-bar i {
    display: block;
    height: 100%;
    background: var(--thread);
    border-radius: 4px;
}

/* Client list */
.clients {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
}
.client-chip {
    font-family: var(--font-util);
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    padding: 9px 18px;
    transition: all .3s var(--ease);
}
html[dir="rtl"] .client-chip { letter-spacing: 0; text-transform: none; font-size: 15px; }
.client-chip:hover { border-color: var(--gold); color: var(--cream); }

/* Publication list */
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-list li {
    padding: 15px 0;
    border-bottom: 1px solid var(--line-soft);
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: baseline;
}
.pub-list b { font-weight: 500; font-size: 16.5px; }
.pub-list span {
    font-family: var(--font-util);
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--dim);
    flex: none;
    text-align: end;
}
html[dir="rtl"] .pub-list span { letter-spacing: 0; text-transform: none; font-size: 14px; }

/* ------------------------------------------------------------ filters --- */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: clamp(26px, 3vw, 42px);
}
.filter {
    font-family: var(--font-util);
    font-size: 13px;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid var(--line-soft);
    color: var(--muted);
    transition: all .3s var(--ease);
    white-space: nowrap;
}
html[dir="rtl"] .filter { letter-spacing: 0; text-transform: none; font-size: 15px; }
.filter:hover { color: var(--cream); border-color: var(--gold); }
.filter.is-active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--ink);
    font-weight: 700;
}

/* -------------------------------------------------------- artwork page -- */
.work {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, .85fr);
    gap: clamp(28px, 4vw, 62px);
    align-items: start;
}
.work-figure {
    margin: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--ink-1);
    box-shadow: var(--shadow);
    cursor: zoom-in;
}
.work-figure img { width: 100%; height: auto; }

.work-side { position: sticky; top: 96px; }
.work-title {
    font-size: clamp(30px, 3.6vw, 46px);
    margin-bottom: 18px;
}
.work-desc { color: var(--muted); }

.meta-list { list-style: none; margin: 26px 0; padding: 0; }
.meta-list li {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line-soft);
    font-size: 15px;
}
.meta-list li:first-child { border-top: 1px solid var(--line-soft); }
.meta-list dt, .meta-list .k {
    font-family: var(--font-util);
    font-size: 11.5px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--dim);
    flex: none;
}
html[dir="rtl"] .meta-list .k { letter-spacing: 0; text-transform: none; font-size: 14px; }
.meta-list .v { text-align: end; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tag {
    font-family: var(--font-util);
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(138, 68, 224, .16);
    border: 1px solid rgba(138, 68, 224, .34);
    color: #D9C7F5;
    transition: all .3s var(--ease);
}
html[dir="rtl"] .tag { letter-spacing: 0; text-transform: none; font-size: 14px; }
.tag:hover { background: rgba(138, 68, 224, .3); color: #fff; }

.work-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: clamp(40px, 5vw, 70px);
    padding-top: 26px;
    border-top: 1px solid var(--line-soft);
}
.work-nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
    transition: color .3s var(--ease);
    max-width: 46%;
}
.work-nav a:hover { color: var(--cream); }
.work-nav img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius); flex: none; }
.work-nav .dir {
    display: block;
    font-family: var(--font-util);
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 3px;
}
html[dir="rtl"] .work-nav .dir { letter-spacing: 0; text-transform: none; font-size: 13px; }
.work-nav .nm {
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(10, 5, 18, .95);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    cursor: zoom-out;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 92vh; width: auto; border-radius: var(--radius); }
.lightbox-close {
    position: absolute;
    top: 18px; inset-inline-end: 18px;
    background: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    width: 44px; height: 44px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

/* ------------------------------------------------------------- forms ---- */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label {
    font-family: var(--font-util);
    font-size: 12px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--dim);
}
html[dir="rtl"] .field label { letter-spacing: 0; text-transform: none; font-size: 14px; }
.field input, .field textarea, .field select {
    font: inherit;
    font-size: 16px;
    color: var(--cream);
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 14px 16px;
    width: 100%;
    transition: border-color .25s var(--ease), background .25s var(--ease);
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255, 255, 255, .06);
}
.field input::placeholder, .field textarea::placeholder { color: rgba(188, 169, 214, .45); }
.field .err { color: #FF8FA8; font-size: 13.5px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.notice {
    padding: 15px 20px;
    border-radius: var(--radius);
    border: 1px solid;
    font-size: 15.5px;
}
.notice--ok  { border-color: rgba(23, 191, 174, .5); background: rgba(23, 191, 174, .1); color: #9FEFE4; }
.notice--err { border-color: rgba(245, 37, 126, .5); background: rgba(245, 37, 126, .1); color: #FFB3CD; }

/* contact detail list */
.contact-lines { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.contact-lines li { display: grid; gap: 4px; }
.contact-lines .k {
    font-family: var(--font-util);
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--gold);
}
html[dir="rtl"] .contact-lines .k { letter-spacing: 0; text-transform: none; font-size: 13px; }
.contact-lines .v { font-size: 18px; }
.contact-lines a:hover { color: var(--teal); }

/* ------------------------------------------------------------ footer ---- */
.site-footer {
    border-top: 1px solid var(--line-soft);
    background: var(--ink-1);
    padding-block: clamp(46px, 6vw, 76px) 30px;
    position: relative;
    z-index: 2;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: clamp(28px, 4vw, 60px);
    padding-bottom: 40px;
}
.footer-sig {
    font-family: var(--font-display);
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1;
    margin-bottom: 14px;
    text-transform: uppercase;
    font-weight: 300;
}
html[dir="rtl"] .footer-sig { text-transform: none; font-weight: 600; }
.footer-col h5 {
    font-family: var(--font-util);
    font-size: 11px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0 0 16px;
    font-weight: 700;
}
html[dir="rtl"] .footer-col h5 { letter-spacing: 0; text-transform: none; font-size: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--muted); transition: color .25s var(--ease); }
.footer-col a:hover { color: var(--cream); }
.footer-bottom {
    border-top: 1px solid var(--line-soft);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--dim);
}
.footer-bottom a:hover { color: var(--gold); }

/* thin thread across the very bottom */
.thread-rule { height: 3px; background: var(--thread); }

/* ---------------------------------------------------------- pagination -- */
.pager {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
    flex-wrap: wrap;
}
.pager a, .pager span {
    min-width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--line-soft);
    font-family: var(--font-util);
    font-size: 14px;
    color: var(--muted);
    padding-inline: 14px;
    transition: all .25s var(--ease);
}
.pager a:hover { border-color: var(--gold); color: var(--cream); }
.pager .is-active { background: var(--gold); border-color: var(--gold); color: var(--ink); font-weight: 700; }

/* --------------------------------------------------------- page header -- */
.page-head {
    padding-block: clamp(48px, 6vw, 86px) clamp(28px, 3vw, 44px);
    position: relative;
    overflow: hidden;
}
.page-head .wrap { position: relative; z-index: 2; }
.page-title {
    font-size: clamp(38px, 6.5vw, 78px);
    line-height: .95;
    text-transform: uppercase;
    font-weight: 300;
    letter-spacing: -0.02em;
}
html[dir="rtl"] .page-title { text-transform: none; font-weight: 700; letter-spacing: 0; line-height: 1.25; font-size: clamp(32px, 5.4vw, 62px); }

/* empty state */
.empty {
    border: 1px dashed var(--line-soft);
    border-radius: var(--radius-lg);
    padding: clamp(36px, 6vw, 70px);
    text-align: center;
    color: var(--muted);
}

/* --------------------------------------------------------- responsive --- */
@media (max-width: 1080px) {
    .masonry { columns: 2; }
    .about-grid { grid-template-columns: 1fr; }
    .portrait { max-width: 380px; }
}

@media (max-width: 900px) {
    .hero .wrap { grid-template-columns: 1fr; }
    .hero-stack { max-width: 460px; margin-inline: auto; width: 100%; }
    .work { grid-template-columns: 1fr; }
    .work-side { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-sig-col { grid-column: 1 / -1; }
}

@media (max-width: 780px) {
    body { font-size: 16px; }

    .nav-toggle { display: inline-flex; }

    /* The header uses backdrop-filter, which makes it the containing block for
       fixed children — so the panel needs explicit viewport dimensions. */
    .nav {
        position: fixed;
        top: 0;
        inset-inline-start: 0;
        inset-inline-end: auto;
        bottom: auto;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        background: var(--ink);
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 8px;
        padding: 32px var(--gutter);
        transform: translateY(-100%);
        transition: transform .45s var(--ease);
        z-index: 90;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    .nav.is-open { transform: translateY(0); }
    .nav a { font-size: 30px; font-family: var(--font-display); text-transform: none; letter-spacing: 0; padding: 10px 0; }
    .nav a::after { height: 2px; }
    .nav .lang-switch { margin-top: 18px; align-self: flex-start; }
    .nav .lang-switch a {
        font-family: var(--font-util);
        font-size: 14px;
        font-weight: 700;
        letter-spacing: .08em;
        padding: 8px 16px;
    }
    .nav .lang-switch a::after { display: none; }
    .nav-close {
        position: absolute;
        top: 20px; inset-inline-end: var(--gutter);
        background: none; border: 1px solid var(--line);
        border-radius: 999px; width: 44px; height: 44px;
        font-size: 20px; cursor: pointer;
    }

    .lang-switch { order: 2; }
    .hero-facts { gap: 22px 30px; }
    .timeline li { grid-template-columns: 1fr; gap: 6px; }
    .two-col { grid-template-columns: 1fr; }
    .work-nav { flex-direction: column; }
    .work-nav a { max-width: none; }
    .pub-list li { flex-direction: column; gap: 5px; }
    .pub-list span { text-align: start; }
}

@media (max-width: 560px) {
    .masonry { columns: 1; }
    .grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero-stack .s1 { width: 54%; inset-inline-start: 4%; }
    .hero-stack .s2 { width: 54%; inset-inline-end: 4%; }
    .hero-stack .s3 { width: 60%; inset-inline-start: 14%; }
    .section-head { flex-direction: column; align-items: flex-start; }
}

/* nav is a plain row again on desktop even if JS added the class */
@media (min-width: 781px) {
    .nav-close { display: none; }
    .nav { transform: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
    .ribbon-track { animation: none; }
}

/* reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; }
}

/* print */
@media print {
    .site-header, .site-footer, .ribbon, .filaments, .grain { display: none; }
    body { background: #fff; color: #000; }
}
