/* Dessinandier portfolio – styles
   Ported from the Claude Design project "Portfolio Dessinandier". */

/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Salmont';
  src: url(../assets/Salmont.woff2) format('woff2');
  font-weight: normal; font-style: normal; font-display: swap;
  unicode-range: U+0000-00C6, U+00C8, U+00CA, U+00CC-00CE, U+00D0-00DB, U+00DD-00E6, U+00E8, U+00EA, U+00EC-00EE, U+00F0-00FB, U+00FD-FFFF;
}
/* Accented capitals/letters missing from Salmont fall back to Outfit 800 */
@font-face {
  font-family: 'Salmont';
  src: url(../assets/Outfit-800-latin.woff2) format('woff2');
  font-weight: normal; font-style: normal; font-display: swap;
  unicode-range: U+00C7, U+00C9, U+00CB, U+00CF, U+00DC, U+00E7, U+00E9, U+00EB, U+00EF, U+00FC;
}
@font-face {
  font-family: 'Departure Mono';
  src: url(../assets/DepartureMono-Regular.woff) format('woff');
  font-weight: 100 900; font-style: normal; font-display: swap;
}

/* ---------- Themes ---------- */
:root {
  --bg: #efeae7; --surface: #f7f3f0; --surface2: #efdcd0; --ink: #331f22; --muted: #6b5049;
  --panel: #331f22; --panelInk: #efeae7; --panelAccent: #f2bd7a; --band: #8c6355;
  --line: rgba(51,31,34,.14); --folder1: #331f22; --folder2: #8c6355;
  --amber: #f2bd7a; --coral: #ff8667; --brown: #8c6355; --cocoa: #331f22; --cream: #efeae7; --sand: #efdcd0;
  --ease: cubic-bezier(.2,.7,.2,1);
  --nav-top: 96px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #1c1214; --surface: #261a1c; --surface2: #36262a; --ink: #efeae7; --muted: #c9b2a8;
  --panel: #efdcd0; --panelInk: #331f22; --panelAccent: #8c6355; --band: #5e4139;
  --line: rgba(239,234,231,.16); --folder1: #36262a; --folder2: #5e4139;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-padding-top: 16px; }
body {
  -webkit-font-smoothing: antialiased;
  background: var(--bg); color: var(--ink);
  font-family: 'Outfit', sans-serif;
  min-height: 100vh;
  padding: 16px 16px 0;
  transition: background .35s, color .35s;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--coral); }
::selection { background: var(--amber); color: var(--cocoa); }
button { font-family: inherit; }
img { max-width: none; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

.sal { font-family: 'Salmont', sans-serif; font-weight: normal; }
.mono { font: 500 13px 'Departure Mono', monospace; letter-spacing: .06em; }
.muted { color: var(--muted); }
.accent { color: var(--amber); }
.msym {
  font-family: 'Material Symbols Sharp';
  font-weight: normal; font-style: normal; line-height: 1;
  font-variation-settings: 'FILL' 1, 'wght' 500;
  display: block; overflow: hidden; white-space: nowrap;
  -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga';
}

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--amber); color: var(--cocoa); padding: 12px 18px; border-radius: 999px; font-weight: 600;
  transition: top .2s;
}
.skip:focus { top: 16px; color: var(--cocoa); }

/* ---------- Buttons ---------- */
.btn {
  font: 600 16px 'Outfit', sans-serif; border: 0; padding: 15px 26px; border-radius: 999px; cursor: pointer;
  transition: transform .2s, background .2s;
}
.btn-amber { color: var(--cocoa); background: var(--amber); }
.btn-amber:hover { transform: translateY(-2px); }
.btn-ghost-light { color: var(--cream); background: transparent; border: 2px solid rgba(239,234,231,.7); padding: 13px 24px; }
.btn-ghost-light:hover { background: rgba(239,234,231,.12); }
.btn-outline { color: var(--ink); background: transparent; border: 2px solid var(--ink); padding: 13px 22px; font-size: 15px; }
.round-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(239,234,231,.92); color: var(--cocoa);
  cursor: pointer; display: grid; place-items: center; padding: 0; flex: none;
}
.round-btn svg { display: block; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 28px; left: 50%; transform: translate(-50%, 0);
  transition: transform .4s var(--ease);
  width: min(1120px, calc(100% - 64px));
  background: var(--brown); border-radius: 999px; padding: 10px 10px 10px 22px;
  display: flex; align-items: center; gap: 14px; z-index: 40;
  box-shadow: 0 10px 30px rgba(51,31,34,.25);
}
body.nav-hidden .nav { transform: translate(-50%, -140px); }
.nav-brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.nav-brand:hover { color: #fff; }
.nav-icon {
  width: 26px; height: 33px; transform: translateY(-2px); background: #fff; flex: none;
  -webkit-mask: url(../assets/icon.svg) center/contain no-repeat; mask: url(../assets/icon.svg) center/contain no-repeat;
}
.nav-name { font-family: 'Salmont', sans-serif; font-size: 26px; color: #fff; line-height: 1; transform: translateY(3px); display: block; }
.nav-spacer { flex: 1; }
.nav-links { display: flex; gap: 2px; }
.nav-link {
  font: 500 15px 'Outfit', sans-serif; color: var(--cream); background: transparent; border: 0;
  padding: 10px 14px; border-radius: 999px; cursor: pointer; transition: background .2s;
}
.nav-link:hover { background: rgba(239,234,231,.14); }
.theme-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--sand); color: var(--cocoa);
  cursor: pointer; display: grid; place-items: center; padding: 0; transition: transform .25s; flex: none;
}
.theme-btn:hover { transform: rotate(-20deg); }
.theme-btn .msym { font-size: 22px; width: 22px; height: 22px; }
.burger {
  display: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(239,234,231,.14);
  cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 0; flex: none;
}
.burger span { width: 18px; height: 3px; background: var(--cream); display: block; transition: transform .25s; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
.mobile-menu {
  position: fixed; top: 96px; right: 32px; left: 32px; background: var(--brown); border-radius: 28px;
  padding: 10px; display: grid; gap: 4px; z-index: 39; box-shadow: 0 18px 40px rgba(51,31,34,.3);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu button {
  font: 500 18px 'Outfit', sans-serif; color: var(--cream); background: transparent; border: 0;
  padding: 14px 16px; text-align: left; border-radius: 18px; cursor: pointer;
}
.mobile-menu button:hover { background: rgba(239,234,231,.1); }
.mobile-menu button.is-accent { color: var(--cocoa); background: var(--amber); }

/* ---------- Hero ---------- */
.hero {
  position: relative; border-radius: 40px; overflow: hidden;
  height: clamp(460px, 64vw, 780px); background: #d9b98d;
}
.hero-slides img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0; transform: scale(1);
  transition: opacity 1s ease, transform 7s linear;
}
.hero-slides img.is-active { opacity: 1; transform: scale(1.06); }
.hero-shade {
  position: absolute; inset: auto 0 0 0; height: 55%; pointer-events: none;
  background: linear-gradient(to top, rgba(51,31,34,.7), rgba(51,31,34,0));
}
.hero-bar {
  position: absolute; left: clamp(20px, 4vw, 56px); right: clamp(20px, 4vw, 56px); bottom: clamp(118px, 12vw, 150px);
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; z-index: 3;
}
.hero-caption {
  display: grid; gap: 10px; text-align: left; background: transparent; border: 0; padding: 0;
  cursor: zoom-in; color: #fff; min-width: 0;
}
.hero-project { font: 500 12px 'Departure Mono', monospace; letter-spacing: .06em; opacity: .9; }
.hero-title { font: normal clamp(28px, 4vw, 52px)/1 'Salmont', sans-serif; text-wrap: balance; max-width: 760px; }
.hero-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.hero-tags span {
  font: 600 12px 'Outfit', sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #fff;
  border: 1.5px solid rgba(255,255,255,.85); border-radius: 999px; padding: 6px 12px;
}
.hero-tags span.enlarge { color: var(--cocoa); background: var(--amber); border-color: var(--amber); }
.hero-ctrl { display: flex; align-items: center; gap: 10px; }
.hero-dots { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hero-dots button {
  width: 10px; height: 10px; border-radius: 999px; border: 0; padding: 0; cursor: pointer;
  background: rgba(255,255,255,.6); transition: width .35s, background .35s;
}
.hero-dots button.is-active { width: 30px; background: var(--amber); }

/* ---------- Intro band ---------- */
.intro {
  position: relative; margin: -96px auto 0; max-width: 1280px;
  background: var(--band); color: var(--cream); border-radius: 48px;
  padding: clamp(28px, 5vw, 64px);
  display: flex; flex-wrap: wrap; align-items: center; gap: clamp(24px, 5vw, 72px);
  z-index: 2; transition: background .35s;
}
.screw { position: absolute; right: 32px; bottom: 32px; pointer-events: none; }
.screw-top { top: 32px; bottom: auto; }
.avatar { width: clamp(170px, 22vw, 270px); height: auto; display: block; flex: none; }
.intro-text { flex: 1 1 380px; min-width: 0; display: grid; gap: 18px; }
.intro h1 { margin: 0; font: 500 clamp(30px, 4.2vw, 56px)/1.08 'Outfit', sans-serif; letter-spacing: -.01em; text-wrap: pretty; }
.intro p { margin: 0; font: 400 clamp(17px, 1.5vw, 21px)/1.45 'Outfit', sans-serif; max-width: 600px; text-wrap: pretty; }
.intro-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

/* ---------- Section heads ---------- */
/* minmax(0, 1fr): a wide child (e.g. the one-row filter bar on phones) must not stretch the section past the screen */
.block { max-width: 1280px; margin: clamp(56px, 8vw, 110px) auto 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.gallery { margin-top: clamp(64px, 9vw, 120px); gap: 24px; }
.block-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.block-title { display: grid; gap: 8px; }
.kicker { font: 500 13px 'Departure Mono', monospace; letter-spacing: .06em; color: var(--muted); }
.block h2 { margin: 0; font: normal clamp(36px, 5vw, 64px)/1 'Salmont', sans-serif; }
.block-note { margin: 0; max-width: 380px; font-size: 17px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }

/* ---------- Folder tabs (shared) ---------- */
.tab-row { display: flex; align-items: flex-end; }
.tab-row-end { justify-content: flex-end; }
.tab { border-radius: 26px 26px 0 0; padding: 14px 22px 4px; }
.fillet { width: 16px; height: 16px; flex: none; display: block; }

/* ---------- Disciplines ---------- */
.disc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px 16px; }
.disc {
  display: flex; flex-direction: column; background: transparent; border: 0; padding: 0; text-align: left;
  cursor: pointer; font-family: 'Outfit', sans-serif; transition: transform .25s; color: inherit;
}
.disc:hover { transform: translateY(-4px); }
.disc-name { font: normal 32px/1.02 'Salmont', sans-serif; display: block; }
.disc-desc { font-size: 16px; line-height: 1.4; display: block; }

.disc-da { grid-column: span 2; grid-row: span 2; color: var(--panelInk); }
.disc-da .tab { background: var(--panel); padding: 14px 24px 4px; }
.disc-da .fillet-r { background: radial-gradient(circle at 100% 0, transparent 15.5px, var(--panel) 16px); }
.disc-da-body {
  flex: 1; position: relative; container-type: inline-size; background: var(--panel);
  border-radius: 0 44px 44px 44px; padding: clamp(26px, 3vw, 40px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px; min-height: 300px;
}
.disc-da-icon {
  position: absolute; top: clamp(18px, 2.5vw, 30px); right: clamp(18px, 2.5vw, 30px);
  font-size: 72px; width: 72px; height: 72px; color: var(--panelAccent); margin: 8px;
}
.disc-da-years { font-size: clamp(64px, 18cqw, 230px); line-height: .85; color: var(--panelAccent); margin-top: 90px; white-space: nowrap; display: block; }
.disc-da-text { margin: 0; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.4; max-width: 460px; text-wrap: pretty; display: block; }
.see-more { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.circle-arrow { width: 34px; height: 34px; border-radius: 50%; border: 2px solid currentColor; display: grid; place-items: center; }

.disc-illu { color: var(--cocoa); }
.disc-illu .tab { background: var(--amber); }
.disc-illu .fillet-l { background: radial-gradient(circle at 0 0, transparent 15.5px, var(--amber) 16px); }
.disc-illu-body {
  flex: 1; background: var(--amber); border-radius: 44px 0 44px 44px; padding: 30px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; min-height: 200px;
}

.disc-card {
  justify-content: space-between; gap: 20px; border-radius: 44px; padding: 30px; min-height: 240px;
}
.disc-card-text { display: grid; gap: 8px; }
.disc-3d { background: var(--surface2); color: var(--ink); transition: transform .25s, background .35s; }
.disc-logo { background: var(--coral); color: var(--cocoa); }

.sectors { display: flex; flex-direction: column; color: var(--ink); }
.sectors .tab { background: var(--surface2); transition: background .35s; }
.sectors .fillet-r { background: radial-gradient(circle at 100% 0, transparent 15.5px, var(--surface2) 16px); }
.sectors-body {
  flex: 1; background: var(--surface2); border-radius: 0 44px 44px 44px; padding: 30px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; min-height: 200px; transition: background .35s;
}
.pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pills li { font: 600 15px 'Outfit', sans-serif; border: 1.5px solid var(--ink); border-radius: 999px; padding: 8px 14px; }

/* ---------- Gallery: switch & filters ---------- */
.mode-switch { display: flex; background: var(--surface2); border-radius: 999px; padding: 5px; gap: 4px; transition: background .35s; }
.mode-switch button {
  font: 600 15px 'Outfit', sans-serif; border: 0; cursor: pointer; padding: 11px 20px; border-radius: 999px;
  background: transparent; color: var(--ink); transition: background .2s, color .2s;
}
.mode-switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

.filters {
  position: sticky; top: var(--nav-top); z-index: 4;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 28px; padding: 8px;
  transition: top .4s var(--ease), background .35s;
}
body.nav-hidden .filters { top: 12px; }
.filter-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; }
.filter-tags button {
  display: flex; align-items: center; gap: 8px; font: 600 14px 'Outfit', sans-serif; letter-spacing: .04em; text-transform: uppercase;
  border: 1.5px solid var(--line); background: transparent; color: var(--ink);
  padding: 9px 14px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.filter-tags button:hover { border-color: var(--ink); }
.filter-tags button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filter-tags .count { font: 500 12px 'Departure Mono', monospace; opacity: .7; }
.result-label { font: 500 13px 'Departure Mono', monospace; color: var(--muted); padding: 0 10px; }

/* ---------- Gallery: by discipline ---------- */
.works-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 45%), 1fr));
  grid-auto-rows: 220px; grid-auto-flow: dense; gap: 14px;
}
.tile {
  position: relative; border: 0; padding: 0; cursor: zoom-in; border-radius: 26px; overflow: hidden;
  background: var(--surface2); transition: transform .3s var(--ease), box-shadow .3s, background .35s;
}
.tile:hover, .tile:focus-visible { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(51,31,34,.22); }
.tile img, .ptile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .cap {
  position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex;
  opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; pointer-events: none;
}
.tile:hover .cap, .tile:focus-visible .cap { opacity: 1; transform: translateY(0); }
.cap-box {
  background: var(--cocoa); color: var(--cream); border-radius: 16px; padding: 8px 12px; text-align: left;
  display: grid; gap: 2px; min-width: 0; max-width: 100%;
}
.cap-title { font: normal 15px/1.15 'Salmont', sans-serif; color: var(--amber); }
.cap-meta { font: 500 11px 'Departure Mono', monospace; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.more-works { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 8px; }
.more-works .btn { font-size: 15px; }
.more-count { font: 500 13px 'Departure Mono', monospace; color: var(--muted); width: 100%; text-align: center; }

/* ---------- Gallery: by project ---------- */
.projects { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.proj { display: grid; grid-template-columns: minmax(0, 1fr); color: var(--cream); }
.proj-tabrow { display: flex; align-items: flex-end; }
.proj.is-mirror .proj-tabrow, .proj.is-mirror .proj-body { flex-direction: row-reverse; }
.proj-tab { background: var(--pbg); border-radius: 30px 30px 0 0; padding: 18px 28px 4px; max-width: calc(100% - 30px); transition: background .35s; }
.proj-title { font: normal clamp(26px, 3.6vw, 46px)/1 'Salmont', sans-serif; display: block; margin: 0; }
.proj-fillet { width: 30px; height: 30px; flex: none; background: radial-gradient(circle at 100% 0, transparent 29.5px, var(--pbg) 30px); }
.proj.is-mirror .proj-fillet { background: radial-gradient(circle at 0 0, transparent 29.5px, var(--pbg) 30px); }
.proj-body {
  background: var(--pbg); border-radius: 0 40px 40px 40px; padding: clamp(18px, 2.4vw, 30px);
  display: flex; flex-wrap: wrap; gap: 22px; transition: background .35s;
}
.proj.is-mirror .proj-body { border-radius: 40px 0 40px 40px; }
.proj-info { flex: 1 1 250px; min-width: 0; display: flex; flex-direction: column; gap: 16px; padding: 6px 4px; }
.proj-meta { font: 500 13px 'Departure Mono', monospace; letter-spacing: .05em; opacity: .85; }
.proj-desc { margin: 0; font-size: 17px; line-height: 1.5; text-wrap: pretty; }
.proj-role { display: grid; gap: 4px; font-size: 15px; }
.proj-role .label { font: 500 12px 'Departure Mono', monospace; opacity: .75; }
.proj-role .value { font-weight: 600; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.proj-tags span, .lb-tags span {
  font: 600 12px 'Outfit', sans-serif; letter-spacing: .05em; text-transform: uppercase;
  border: 1.5px solid currentColor; border-radius: 999px; padding: 5px 10px;
}
.proj-grid { flex: 3 1 460px; min-width: 0; display: grid; grid-auto-rows: 170px; gap: 10px; }
.ptile {
  position: relative; border: 0; padding: 0; cursor: zoom-in; border-radius: 20px; overflow: hidden;
  background: rgba(239,234,231,.2); transition: transform .3s;
}
.ptile:hover, .ptile:focus-visible { transform: scale(.985); }
.ptile .ptag {
  position: absolute; left: 8px; bottom: 8px; font: 600 11px 'Outfit', sans-serif; letter-spacing: .05em; text-transform: uppercase;
  background: var(--cream); color: var(--cocoa); border-radius: 999px; padding: 4px 9px; opacity: 0; transition: opacity .25s; pointer-events: none;
}
.ptile:hover .ptag, .ptile:focus-visible .ptag { opacity: 1; }
.pmore {
  grid-row: 3 / span 1; position: relative; border: 2px solid currentColor; padding: 14px; cursor: pointer; border-radius: 20px;
  background: transparent; color: inherit; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
  text-align: left; font-family: 'Outfit', sans-serif; transition: background .2s;
}
.pmore:hover { background: rgba(239,234,231,.16); }
.pmore-count { font: normal 40px/1 'Salmont', sans-serif; }
.pmore-label { display: flex; align-items: center; gap: 8px; font: 600 13px 'Outfit', sans-serif; letter-spacing: .05em; text-transform: uppercase; }
.pmore-label .circle-arrow { width: 28px; height: 28px; }

.empty {
  border: 2px dashed var(--line); border-radius: 40px; padding: 60px 24px; text-align: center; color: var(--muted); font-size: 18px; margin: 0;
}

/* ---------- Contact ---------- */
.contact { max-width: 1280px; margin: clamp(72px, 10vw, 140px) auto 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.tab-coral { background: var(--coral); color: var(--cocoa); border-radius: 30px 30px 0 0; padding: 16px 28px 4px; }
.fillet-coral { background: radial-gradient(circle at 100% 0, transparent 15.5px, var(--coral) 16px); }
.contact-body {
  position: relative; background: var(--coral); color: var(--cocoa); border-radius: 0 48px 48px 48px;
  padding: clamp(28px, 5vw, 64px); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px;
}
.contact-text { flex: 1 1 420px; min-width: 0; display: grid; gap: 18px; }
.contact h2 { margin: 0; font: normal clamp(40px, 6.4vw, 92px)/.98 'Salmont', sans-serif; text-wrap: balance; }
.contact p { margin: 0; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.45; max-width: 520px; }
.contact-links { flex: 0 1 auto; display: grid; gap: 12px; min-width: 0; }
.mail {
  font: normal clamp(18px, 2vw, 26px) 'Salmont', sans-serif; background: var(--cocoa); color: var(--amber);
  padding: 18px 28px; border-radius: 999px; text-align: center; overflow-wrap: anywhere; transition: color .2s;
}
.mail:hover { color: var(--cream); }
.socials { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; align-items: center; }
.socials a {
  width: 44px; height: 44px; color: var(--cocoa); display: grid; place-items: center; position: relative;
  transition: opacity .2s;
}
/* The hover lift moves the icon, not the link, so the Discord tip stays anchored where it is. */
.socials a svg { transition: transform .2s; }
.socials a:hover { color: var(--cocoa); }
.socials a:hover svg { transform: translateY(-3px); }
.socials a.copied::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  background: var(--cocoa); color: var(--cream); font: 500 12px 'Departure Mono', monospace; white-space: nowrap;
  padding: 8px 12px; border-radius: 12px; pointer-events: none;
}

/* ---------- Footer ---------- */
.footer { margin: clamp(48px, 7vw, 90px) -16px 0; position: relative; overflow: hidden; }
.footer img { width: 100%; min-width: 900px; height: auto; display: block; position: relative; left: 50%; transform: translateX(-50%); }
.footer-bar {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px clamp(20px, 4vw, 48px);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; color: var(--cream);
  font: 500 13px 'Departure Mono', monospace; background: linear-gradient(to top, rgba(51,31,34,.75), rgba(51,31,34,0));
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(28,18,20,.92);
  display: flex; align-items: center; justify-content: center; padding: clamp(12px, 3vw, 40px);
}
.lightbox[hidden] { display: none; }
.lb-inner { width: min(1200px, 100%); max-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.lb-stage { position: relative; border-radius: 30px; overflow: hidden; background: var(--cocoa); height: min(72vh, 760px); touch-action: pan-y; }
.lb-stage img { width: 100%; height: 100%; object-fit: contain; display: block; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; background: var(--cream); }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
.lb-info {
  background: var(--brown); color: var(--cream); border-radius: 26px; padding: 16px 18px 16px 24px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
}
.lb-text { display: grid; gap: 4px; flex: 1 1 240px; min-width: 0; }
.lb-title { font: normal 24px/1.1 'Salmont', sans-serif; color: var(--amber); }
.lb-meta { font: 500 13px 'Departure Mono', monospace; }
.lb-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.lb-tags span { padding: 6px 11px; border-color: var(--cream); }
.lb-counter { font: 500 13px 'Departure Mono', monospace; opacity: .85; }
.lb-close { font: 600 14px 'Outfit', sans-serif; border: 0; background: var(--cream); color: var(--cocoa); padding: 12px 18px; border-radius: 999px; cursor: pointer; }

/* ---------- Responsive ---------- */
/* Below 1200px the Discord "copied" tip, centred on its icon, can run past the screen edge.
   Centre it over the whole icon row instead and let it wrap within the row's width. */
@media (max-width: 1199px) {
  .socials { position: relative; }
  .socials a { position: static; }
  .socials a.copied::after { width: max-content; max-width: 100%; white-space: normal; text-align: center; }
}
@media (max-width: 899px) {
  .proj-grid { grid-auto-rows: 140px; }
}
@media (max-width: 859px) {
  .nav-links { display: none; }
  .burger { display: flex; }
  .disc-da { grid-column: span 1; grid-row: span 1; }
  .works-grid { grid-auto-rows: 160px; }
}
@media (max-width: 599px) {
  .avatar { margin: 0 auto; }
  .intro-cta { justify-content: center; }
  .br-desk { display: none; }
  .intro .screw { top: 32px; bottom: auto; }
  .contact-body { justify-content: center; }
  .contact .screw { display: none; } /* would sit on the title */
  /* Keep logo, theme toggle and menu button on one line on phones */
  :root { --nav-top: 88px; }
  .nav { top: 16px; width: calc(100% - 32px); gap: 8px; padding-left: 16px; }
  .nav-name { font-size: 22px; }
  .mobile-menu { top: 88px; left: 16px; right: 16px; }
  /* Sticky filter bar: every tag visible (wrapped on several lines), a bit more compact than on desktop */
  .filter-tags { gap: 6px; }
  .filter-tags button { font-size: 13px; padding: 8px 12px; gap: 6px; }
  .result-label { width: 100%; padding: 2px 10px 4px; }
}
/* Narrow phones (< 380px, e.g. OnePlus 10 Pro): the e-mail button and the social icons shrink with the
   screen so each stays on one line. --cw = width available inside the contact card (screen - 88px). */
@media (max-width: 379px) {
  .contact-links { --cw: calc(100vw - 88px); }
  .mail { font-size: clamp(11px, calc((100vw - 130px) / 13.5), 18px); padding: 16px 18px; }
  .socials { flex-wrap: nowrap; gap: calc(var(--cw) / 18); }
  .socials a { width: clamp(28px, calc(var(--cw) / 6.6), 44px); height: clamp(28px, calc(var(--cw) / 6.6), 44px); }
  .socials svg { width: 68%; height: auto; }
  .socials a[download] svg { width: 64%; }
}
@media (max-width: 359px) {
  .nav-name { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
  .hero-slides img.is-active { transform: none; }
}
