/* =====================================================================
   STYLE  -  colours, sizes and layout. You normally do not need to edit this.
   To change the main colours, edit the first lines below (:root).
   ===================================================================== */

:root {
  --bg: #0f0f11;
  --card: #18181b;
  --line: rgba(255, 255, 255, .1);
  --txt: #f4f4f5;
  --mut: #a1a1aa;
  --acc: #eab308
}

* {
  box-sizing: border-box;
  margin: 0
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px
}

body {
  background: var(--bg);
  color: var(--txt);
  font: 16px/1.6 Inter, system-ui, sans-serif;
  overflow-x: hidden
}

a {
  color: inherit;
  text-decoration: none
}

button {
  font: inherit
}

.w {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px
}

h1,
h2,
h3 {
  font-family: 'Space Grotesk', Inter, sans-serif;
  line-height: 1.1
}

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


/* ===== NAVIGATION BAR (top) ===== */
nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(15, 15, 17, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line)
}

nav .w {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px
}

nav .l {
  display: flex;
  gap: 22px;
  align-items: center;
  font-size: 14px;
  color: var(--mut)
}

.logo {
  font: 700 20px 'Space Grotesk', Inter, system-ui, sans-serif;
  color: #fff
}

.logo i {
  color: var(--acc);
  font-style: normal
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 99px;
  background: #fff;
  color: #0f0f11;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid #fff;
  cursor: pointer;
  transition: .2s
}

.btn.o {
  background: none;
  color: #fff;
  border-color: var(--line)
}


/* ===== HERO: intro text and photo ===== */
.hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 40px
}

.hero h1 {
  font-size: clamp(34px, 5.2vw, 62px);
  letter-spacing: -.02em
}

.hero p {
  color: var(--mut);
  max-width: 560px;
  margin: 18px 0 24px;
  font-size: 18px
}

.av {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--mut);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 5px 14px;
  margin-bottom: 18px
}

.av:before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e
}

.r {
  display: flex;
  gap: 12px;
  flex-wrap: wrap
}

.pt {
  position: relative;
  aspect-ratio: 4/5;
  width: 100%;
  max-width: 340px;
  justify-self: end;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, #27272a, #18181b);
  display: grid;
  place-items: center;
  border: 1px solid var(--line)
}

.pt span {
  font: 700 64px 'Space Grotesk', Inter, system-ui, sans-serif;
  color: #3f3f46
}

.pt img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover
}


/* ===== SKILL CARDS under the hero ===== */
.sv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  padding-bottom: 48px
}

.sv button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  color: inherit;
  cursor: pointer;
  transition: .2s
}

.sv b {
  display: block;
  font: 700 18px 'Space Grotesk', Inter, system-ui, sans-serif
}

.sv small {
  display: block;
  color: var(--mut);
  font-size: 13px;
  margin: 4px 0 10px;
  line-height: 1.45
}

.sv em {
  margin-top: auto;
  font-style: normal;
  color: var(--acc);
  font-size: 13px
}


/* ===== "SELECTED WORK" HEADING ===== */
.hd {
  padding: 40px 0 14px;
  border-top: 1px solid var(--line)
}

.hd h2 {
  font-size: 32px
}

.hd p {
  color: var(--mut);
  font-size: 15px;
  margin-top: 6px
}


/* ===== SKILL TABS AND FILTERS ===== */
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0;
  scrollbar-width: none;
  position: sticky;
  top: 60px;
  z-index: 10;
  background: var(--bg)
}

.tabs::-webkit-scrollbar {
  display: none
}

.tab {
  flex: none;
  padding: 9px 18px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: none;
  color: var(--mut);
  font: 500 14px Inter, system-ui, sans-serif;
  cursor: pointer;
  transition: .2s
}

.tab b {
  font-weight: 500;
  opacity: .6;
  margin-left: 6px
}

.tab.on {
  background: var(--acc);
  border-color: var(--acc);
  color: #0f0f11
}

.sub {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 0 6px
}

.sub:empty {
  display: none
}

.sub button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--mut);
  padding: 6px 4px;
  margin-right: 12px;
  font-size: 14px;
  cursor: pointer
}

.sub button b {
  font-weight: 500;
  opacity: .6;
  margin-left: 5px
}

.sub button.on {
  color: #fff;
  border-color: var(--acc)
}


/* ===== PROJECT CARDS ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
  padding: 10px 0 24px
}

.card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  background: none;
  border: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
  min-width: 0
}

.im {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, hsl(var(--h, 40) 40% 24%), hsl(var(--h, 40) 35% 11%));
  border: 1px solid var(--line)
}

.im img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform .5s
}

.im:after {
  content: "View project \2192";
  position: absolute;
  inset: auto 0 0 0;
  padding: 34px 14px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .8));
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transition: .25s
}

.card:focus-visible .im:after {
  opacity: 1
}

.im.bad img {
  display: none
}

.im.bad:before {
  content: attr(data-i);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 700 54px 'Space Grotesk', Inter, system-ui, sans-serif;
  color: rgba(255, 255, 255, .3)
}

.bd,
.mc {
  position: absolute;
  z-index: 1;
  padding: 3px 10px;
  border-radius: 99px;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 600;
  color: #fff
}

.bd {
  top: 10px;
  left: 10px
}

.bd.ok {
  background: #16a34a;
  border-color: #16a34a
}

.mc {
  top: 10px;
  right: 10px
}

.card .k {
  color: var(--acc);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-top: 10px;
  display: block
}

.card h3 {
  font-size: 18px;
  margin-top: 2px
}

.card .c {
  color: var(--mut);
  font-size: 13px;
  display: block;
  margin-top: 2px
}

.more {
  text-align: center;
  padding-bottom: 48px
}


/* ===== ABOUT: EXPERIENCE AND SKILLS ===== */
.sec {
  padding: 56px 0;
  border-top: 1px solid var(--line)
}

.sec h2 {
  font-size: 30px;
  margin-bottom: 24px
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px
}

.tl {
  border-left: 1px solid var(--line);
  padding: 0 0 26px 24px;
  position: relative
}

.tl:before {
  content: "";
  position: absolute;
  left: -5px;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--acc)
}

.tl h3 {
  font-size: 18px
}

.tl small {
  color: var(--acc);
  display: block;
  margin: 2px 0 6px
}

.tl p {
  color: var(--mut);
  font-size: 15px
}

.sk h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 10px
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px
}

.chips span {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 13px;
  color: var(--mut)
}


/* ===== FOOTER / CONTACT ===== */
footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 28px;
  background: #0b0b0d
}

footer h2 {
  font-size: clamp(30px, 5vw, 48px);
  margin-bottom: 20px
}

footer .r {
  margin-bottom: 40px
}

.ft {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--mut);
  font-size: 14px
}

.stage.long {
  align-items: flex-start;
  overflow-y: auto
}

.stage.long img {
  max-height: none;
  width: 100%;
  height: auto;
  border-radius: 0
}

/* project modal */

/* ===== PROJECT POP-UP ===== */
.ov {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(5, 5, 7, .82);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px
}

.ov.on {
  display: flex
}

.md {
  position: relative;
  width: 100%;
  max-width: 1100px;
  height: min(760px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  overflow: hidden
}

.gal {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #0c0c0e
}

.stage {
  flex: 1;
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  touch-action: pan-y
}

.stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  user-select: none;
  -webkit-user-drag: none
}

.nb {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2
}

.nb.p {
  left: 10px
}

.nb.n {
  right: 10px
}

.cnt {
  position: absolute;
  top: auto;
  right: auto;
  left: 14px;
  bottom: 12px;
  z-index: 2
}

.th {
  display: flex;
  gap: 8px;
  padding: 6px 16px 14px;
  overflow-x: auto;
  flex: none;
  scrollbar-width: thin
}

.th button {
  flex: none;
  width: 68px;
  height: 52px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: var(--card);
  cursor: pointer;
  opacity: .5;
  transition: .2s
}

.th button.on {
  border-color: var(--acc);
  opacity: 1
}

.th img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block
}

.side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  border-left: 1px solid var(--line)
}

.body {
  flex: 1;
  overflow-y: auto;
  padding: 28px 28px 16px
}

.body .k {
  color: var(--acc);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .1em;
  display: block;
  padding-right: 48px
}

.body h3 {
  font-size: 30px;
  margin: 6px 0 16px;
  padding-right: 48px
}

.body dl {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 8px 12px;
  font-size: 14px;
  margin-bottom: 16px
}

.body dt {
  color: var(--mut)
}

.body dd {
  margin: 0
}

.body p {
  color: var(--mut);
  margin-bottom: 18px
}

.nt {
  font-size: 13px;
  border-left: 3px solid var(--acc);
  padding: 2px 0 2px 12px;
  color: var(--mut);
  margin: 0 0 18px
}

.ns {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  color: var(--mut);
  padding: 24px;
  min-height: 240px
}

.pn {
  flex: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--card)
}

.pb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  background: none;
  border: 0;
  color: var(--txt);
  font-size: 13px;
  cursor: pointer;
  padding: 6px;
  border-radius: 10px
}

.pb span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.pb.nx {
  justify-content: flex-end;
  text-align: right
}

.pn small {
  color: var(--mut);
  font-size: 12px
}

.ib {
  /* dark frosted button with a light edge + shadow, so it stays visible on ANY picture (even white ones) */
  background: rgba(12, 12, 14, .78);
  border: 1px solid rgba(255, 255, 255, .32);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: none;
  transition: .2s
}

.cl {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  background: rgba(12, 12, 14, .78)
}

.cnt {
  display: none !important
}

#gi {
  transition: opacity .2s
}

.stage {
  cursor: default
}

.stage.long {
  cursor: default !important
}

.th {
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 16px;
  overflow: visible
}

.th button.d {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, .28);
  opacity: 1;
  position: relative;
  transition: .2s
}

.th button.d:after {
  content: "";
  position: absolute;
  inset: -12px -5px
}

.th button.d.on {
  width: 26px;
  background: var(--acc)
}

.th small {
  color: var(--mut);
  font-size: 12px;
  margin-left: 8px;
  white-space: nowrap
}

.sw {
  flex: none;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 14px 64px 12px 20px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none
}

.sw::-webkit-scrollbar {
  display: none
}

.sw button {
  flex: none;
  padding: 6px 14px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: none;
  color: var(--mut);
  font: 500 13px Inter, system-ui, sans-serif;
  cursor: pointer;
  transition: .2s
}

.sw button.on {
  background: var(--acc);
  border-color: var(--acc);
  color: #0f0f11
}

@media(max-width:860px) {
  .sw {
    padding: 12px 16px 10px
  }
}

@media(min-width:861px) {
  .sw {
    flex-wrap: wrap;
    overflow: visible
  }
}

@media(hover:hover) {
  .sw button:hover {
    color: #fff
  }

  .btn:hover {
    background: var(--acc);
    color: #0f0f11;
    border-color: var(--acc)
  }

  .sv button:hover {
    border-color: var(--acc);
    transform: translateY(-2px)
  }

  .tab:hover {
    color: #fff
  }

  .card:hover img {
    transform: scale(1.04)
  }

  .pb:hover {
    background: rgba(255, 255, 255, .07)
  }

  .ib:hover {
    background: var(--acc);
    color: #000
  }

  nav .l a:not(.btn):hover {
    color: #fff
  }

  .card:hover .im:after {
    opacity: 1
  }
}

@media(max-width:860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 36px
  }

  .pt {
    justify-self: start;
    max-width: 112px;
    aspect-ratio: 1;
    border-radius: 50%;
    order: -1
  }

  .hero>div:first-child {
    order: 1
  }

  .pt span {
    font-size: 32px
  }

  .hero {
    gap: 20px
  }

  .two {
    grid-template-columns: 1fr;
    gap: 32px
  }

  nav .l a.h {
    display: none
  }

  nav .l {
    gap: 10px
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px
  }

  .ov {
    padding: 0;
    align-items: flex-end
  }

  .md {
    height: 94%;
    max-width: none;
    border-radius: 20px 20px 0 0;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 52%) minmax(0, 1fr)
  }

  .th {
    padding: 4px 12px 10px
  }

  .th button {
    width: 52px;
    height: 40px
  }

  .stage {
    padding: 10px
  }

  .side {
    border-left: 0;
    border-top: 1px solid var(--line)
  }

  .body {
    padding: 18px 20px 10px
  }

  .body h3 {
    font-size: 24px
  }

  .cl {
    background: rgba(0, 0, 0, .7)
  }
}

@media(max-width:560px) {
  .sv {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px
  }

  .sv small {
    display: none
  }

  .sv button {
    padding: 14px 16px
  }

  .sv b {
    margin-bottom: 8px
  }
}

@media(max-width:420px) {
  .w {
    padding-left: 16px;
    padding-right: 16px
  }

  .hero .r .btn {
    flex: 1 1 calc(50% - 6px);
    text-align: center
  }

  .hero .r .btn:first-child {
    flex-basis: 100%
  }

  .btn {
    padding: 9px 16px
  }

  .hero p {
    font-size: 16px
  }

  #pp span {
    display: none
  }
}

@media(prefers-reduced-motion:reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important
  }
}

/* modal v2 */
.swh {
  flex: none;
  padding: 16px 64px 12px 20px;
  border-bottom: 1px solid var(--line)
}

.lb {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mut);
  margin-bottom: 10px
}

.sw {
  padding: 0;
  border: 0;
  overflow: visible;
  flex-wrap: wrap
}

.sw button.on {
  background: #f4f4f5;
  border-color: #f4f4f5;
  color: #0f0f11
}

.th {
  justify-content: flex-start;
  align-items: stretch;
  gap: 10px;
  padding: 12px 20px 0;
  overflow-x: auto;
  overflow-y: hidden
}

.th button.t {
  flex: 1 0 calc(25% - 8px);
  min-width: 72px;
  width: auto;
  height: auto;
  aspect-ratio: 4/3;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: #1b1b1f;
  cursor: pointer;
  opacity: .55;
  transition: .2s
}

.th button.t.on {
  opacity: 1;
  border-color: #fff
}

.th button.t img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  display: block
}

.th button.t img.lg {
  object-fit: cover;
  object-position: top;
  padding: 0
}

.cap {
  flex: none;
  padding: 8px 20px 14px;
  font-size: 12px;
  color: var(--mut);
  min-height: 34px
}

.ex {
  flex: none;
  padding: 12px 20px;
  border-top: 1px solid var(--line)
}

.ex .lb {
  margin-bottom: 8px
}

.exl {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: none
}

.exl::-webkit-scrollbar {
  display: none
}

.exl button {
  flex: none;
  width: 72px;
  height: 54px;
  padding: 0;
  border-radius: 8px;
  border: 2px solid transparent;
  background: #222226;
  overflow: hidden;
  cursor: pointer;
  opacity: .55;
  transition: .2s;
  color: var(--mut);
  font: 700 13px Inter, system-ui, sans-serif;
  display: grid;
  place-items: center
}

.exl button.on {
  opacity: 1;
  border-color: #fff
}

.exl img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block
}

.pb {
  position: relative;
  color: var(--mut)
}

.pb.nx {
  color: #fff;
  font-weight: 600;
  font-size: 15px
}

.pv {
  display: none;
  position: absolute;
  bottom: calc(100% + 12px);
  width: 170px;
  background: #222226;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .55);
  font-style: normal;
  pointer-events: none;
  text-align: left;
  z-index: 6;
  font-weight: 500
}

.pv img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
  display: block
}

.pv em {
  display: block;
  font: 500 12px Inter, system-ui, sans-serif;
  color: var(--txt);
  margin-top: 6px;
  font-style: normal;
  white-space: normal
}

#pp .pv {
  left: 0
}

#pn .pv {
  right: 0
}

#dl .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px
}

@media(hover:hover) {

  .pb:hover .pv,
  .pb:focus-visible .pv {
    display: block
  }
}

@media(max-width:860px) {
  .swh {
    padding: 12px 16px 10px
  }

  .swh .lb {
    display: none
  }

  .sw {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none
  }

  .sw::-webkit-scrollbar {
    display: none
  }

  .th {
    padding: 8px 14px 0
  }

  .th button.t {
    min-width: 56px;
    aspect-ratio: auto;
    height: 44px
  }

  .cap {
    padding: 6px 16px 8px;
    min-height: 0
  }

  .ex {
    display: none
  }

  .pv {
    display: none !important
  }
}

.th {
  box-sizing: border-box;
  height: 88px;
  flex: none
}

.th button.t {
  flex: 1 1 0;
  max-width: calc(25% - 8px);
  min-width: 0;
  height: 76px;
  aspect-ratio: auto
}

@media(max-width:860px) {
  .th {
    height: 52px
  }

  .th button.t {
    height: 44px;
    min-width: 0
  }
}

.cap {
  height: 41px;
  min-height: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: 19px
}

@media(max-width:860px) {
  .cap {
    height: 34px
  }
}


/* =====================================================================
   THUMBNAIL STRIP  -  fixed-size thumbnails that scroll sideways,
   so 4 or 40 images all look good
   ===================================================================== */
.th {
  position: relative;
  display: flex;
  gap: 8px;
  height: 76px;
  padding: 12px 20px 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
}
.th::-webkit-scrollbar { display: none; }
.th button.t {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  max-width: none;
  min-width: 0;
  aspect-ratio: auto;
  scroll-snap-align: center;
  border-radius: 10px;
}
.th button.t img, .th button.t img.lg { width: 100%; height: 100%; padding: 0; object-fit: cover; object-position: top; }
.th button.t:active { transform: scale(.94); }


/* =====================================================================
   MOTION  -  small animations. All of them switch off automatically for
   people who turned on "reduce motion" in their device settings.
   ===================================================================== */
@keyframes up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); } 100% { box-shadow: 0 0 0 9px rgba(34,197,94,0); } }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Hero: elements rise in one after another */
.hero .av, .hero h1, .hero p, .hero .r, .hero .pt { animation: up .7s cubic-bezier(.2,.8,.2,1) both; }
.hero .av { animation-delay: .05s; } .hero h1 { animation-delay: .12s; } .hero p { animation-delay: .2s; }
.hero .r { animation-delay: .28s; } .hero .pt { animation-delay: .2s; }
.av:before { animation: pulse 2s infinite; }                      /* pulsing green dot */

/* Sections fade up when they scroll into view */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); transition-delay: var(--d, 0ms); }
.rv.in { opacity: 1; transform: none; }

/* Project cards: appear in a wave when you change tab, lift on hover, shimmer while loading */
.card.pop { animation: up .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d, 0ms); }
.card, .cert { transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.card:active, .cert:active { transform: scale(.98); }
.im:not(.ok):not(.bad) { background: linear-gradient(110deg, #18181b 30%, #26262b 50%, #18181b 70%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }

/* Buttons, chips and tabs react when pressed */
.btn:active, .tab:active, .sv button:active, .sw button:active { transform: scale(.96); }
.btn#copy.done { background: #22c55e; border-color: #22c55e; color: #0f0f11; }

/* Top bar: shadow after scrolling, underline slides in under links, progress line */
nav { transition: box-shadow .3s; }
nav.scrolled { box-shadow: 0 8px 30px rgba(0,0,0,.4); }
nav .l a.h { position: relative; }
nav .l a.h:after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--acc); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
#prog { position: fixed; top: 0; left: 0; width: 100%; height: 2px; background: var(--acc); transform: scaleX(0); transform-origin: left; z-index: 30; pointer-events: none; }
#totop { position: fixed; right: 18px; bottom: 18px; z-index: 25; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: rgba(24,24,27,.85); backdrop-filter: blur(8px); color: #fff; font-size: 18px; cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .3s, transform .3s, background .2s; }
#totop.on { opacity: 1; pointer-events: auto; transform: none; }

/* Pop-up: fades in and rises; picture slides in the direction you are going */
.ov { display: flex; visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .25s ease, visibility 0s linear .25s; }
.ov.on { visibility: visible; opacity: 1; pointer-events: auto; transition: opacity .25s ease; }
.md, .cvb { transform: translateY(20px) scale(.97); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.ov.on .md, .ov.on .cvb { transform: none; }
#gi { transition: opacity .25s ease, transform .3s cubic-bezier(.2,.8,.2,1); }
.nb:active { transform: translateY(-50%) scale(.9); }
.th button.t, .exl button { transition: opacity .2s, border-color .2s, transform .2s; }

@media (hover: hover) {
  .card:hover, .cert:hover { transform: translateY(-4px); }
  .btn:hover, .sv button:hover { transform: translateY(-2px); }
  nav .l a.h:hover:after { transform: scaleX(1); }
  #totop:hover { background: var(--acc); color: #0f0f11; }
  .nb.p:hover { transform: translateY(-50%) translateX(-3px); }
  .nb.n:hover { transform: translateY(-50%) translateX(3px); }
  .th button.t:hover, .exl button:hover { opacity: 1; transform: translateY(-2px); }
  .pt:hover { transform: rotate(-2deg) scale(1.03); }
}
.pt { transition: transform .4s cubic-bezier(.2,.8,.2,1); }


/* =====================================================================
   CERTIFICATES
   ===================================================================== */
.sub2 { color: var(--mut); margin: -14px 0 24px; font-size: 15px; }
.certs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.cert { display: flex; flex-direction: column; align-items: stretch; background: none; border: 0; color: inherit; text-align: left; cursor: pointer; min-width: 0; font: inherit; }
.cert .im img { object-position: top; }
.cert b { margin-top: 10px; font: 600 16px 'Space Grotesk', Inter, system-ui, sans-serif; }
.cert span { color: var(--mut); font-size: 13px; }
#cv { z-index: 55; }
.cvb { position: relative; width: 100%; max-width: 900px; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cvs { position: relative; width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 0; }
.cvs img { flex: 0 1 auto; min-width: 0; max-width: calc(100% - 100px); max-height: 74vh; border-radius: 10px; background: #fff; transition: opacity .25s; }
.cvc { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cvc b { font: 600 20px 'Space Grotesk', Inter, system-ui, sans-serif; }
.cvc span { color: var(--mut); font-size: 14px; }
.cl2 { position: absolute; top: -8px; right: 0; z-index: 5; background: rgba(12,12,14,.78); }
@media (max-width: 860px) { .cvs img { max-width: calc(100% - 92px); max-height: 62vh; } .cl2 { top: -4px; } }


/* =====================================================================
   PHONES AND SMALL SCREENS  -  the pop-up becomes one smooth scrolling
   sheet: picture on top, details below, previous/next bar stays visible
   ===================================================================== */
.grab { display: none; }
@media (max-width: 860px) {
  .ov { padding: 0; align-items: flex-end; }
  .md { display: flex; flex-direction: column; height: 98%; max-width: none; border-radius: 20px 20px 0 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; transform: translateY(100%); transition: transform .4s cubic-bezier(.2,.8,.2,1); }
  .ov.on .md { transform: none; }
  .grab { display: block; flex: none; width: 100%; padding: 10px 0 0; height: 24px; touch-action: none; cursor: grab; }
  .grab:after { content: ""; display: block; width: 42px; height: 4px; margin: 0 auto; border-radius: 4px; background: rgba(255,255,255,.28); }
  .cl { position: sticky; top: 12px; right: auto; align-self: flex-end; flex: none; margin: 0 12px -40px 0; }
  .gal { flex: none; }
  .stage { flex: none; height: min(48vh, 380px); }
  .th { height: 64px; padding: 8px 14px 0; }
  .th button.t { width: 48px; height: 48px; border-radius: 8px; }
  .cap { height: 30px; padding: 6px 16px 0; }
  .side { display: flex; flex-direction: column; flex: 1 0 auto; overflow: visible; border-left: 0; border-top: 1px solid var(--line); }
  .swh { padding: 12px 16px 10px; }
  .body { flex: 1 0 auto; overflow: visible; padding: 18px 16px 12px; }
  .ex { display: block; padding: 12px 16px; }
  .pn { position: sticky; bottom: 0; z-index: 4; }
}
@media (max-width: 380px) {
  .hero h1 { font-size: 32px; }
  .tab { padding: 8px 14px; }
  .sv b { font-size: 16px; }
  .btn { padding: 9px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; }
  .rv { opacity: 1; transform: none; }
}

.sw, .exl { position: relative; }   /* needed so the chips and strip can centre the active item */

/* Previous / next bar: give the next project's name more room */
.pn { grid-template-columns: minmax(0, .9fr) auto minmax(0, 1.25fr); }
.pb.nx { font-size: 14px; }
@media (max-width: 480px) { .pw { display: none; } }   /* phones: show "2 of 6" instead of "Project 2 of 6" */
@media (max-width: 480px) {
  .pn { grid-template-columns: auto minmax(0, 1fr) minmax(0, auto); }   /* phones: arrow | counter | next project name */
  #pc { text-align: center; }
  .pb.nx { max-width: 62vw; }
}

/* Cards are buttons: remove the browser padding so they line up with the headings */
.card, .cert { padding: 0; }


/* =====================================================================
   STICKY TABS + FILTER  (both stay pinned under the top bar)
   ===================================================================== */
.stick { position: sticky; top: 60px; z-index: 10; background: var(--bg); }
.stick:after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 16px; background: linear-gradient(var(--bg), transparent); pointer-events: none; }
.tabs { position: static; top: auto; }
.sub { padding: 0 0 8px; }
.tabs.intro .tab { animation: up .6s cubic-bezier(.2,.8,.2,1) backwards; }
.tabs.intro .tab:nth-child(2) { animation-delay: .06s; } .tabs.intro .tab:nth-child(3) { animation-delay: .12s; }
.tabs.intro .tab:nth-child(4) { animation-delay: .18s; } .tabs.intro .tab:nth-child(5) { animation-delay: .24s; }


/* =====================================================================
   LOADING MORE PROJECTS WHILE YOU SCROLL
   ===================================================================== */
.more { display: none; justify-content: center; padding: 28px 0 48px; text-align: center; }
.more.on { display: flex; }
.dots { display: flex; gap: 8px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--acc); animation: bounce 1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
.end { text-align: center; color: var(--mut); font-size: 13px; padding: 8px 0 48px; }
.end:empty { display: none; }

/* Things that animate in when they scroll into view (cards, skill cards, certificates) */
.rvk { opacity: 0; }
.rvk.in { opacity: 1; animation: up .7s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: var(--d, 0ms); }
.rvk.in.nan { animation: none; }

/* Pictures fade and un-zoom as they finish loading */
.im img { opacity: 0; transform: scale(1.08); transition: opacity .7s ease, transform 1s cubic-bezier(.2,.8,.2,1); }
.im.ok img { opacity: 1; transform: none; }
.th img, .exl img, .st img { animation: fadeIn .5s ease backwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes down { from { transform: translateY(-100%); opacity: 0; } to { transform: none; opacity: 1; } }
nav { animation: down .6s cubic-bezier(.2,.8,.2,1) backwards; }
@media (hover: hover) { .card:hover .im.ok img { transform: scale(1.04); transition: transform .5s; } }


/* =====================================================================
   SKILL CARDS under the hero: icon, count, stack of project pictures
   ===================================================================== */
.sv { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.sv button { position: relative; overflow: hidden; min-height: 260px; padding: 20px; background: linear-gradient(165deg, rgba(var(--rgb), .10), var(--card) 60%); transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .3s, box-shadow .3s; }
.sv button:before { content: ""; position: absolute; right: -50px; top: -50px; width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--rgb), .3), transparent 70%); opacity: .55; transition: opacity .4s, transform .6s; pointer-events: none; }
.sv .top { position: relative; display: flex; justify-content: space-between; align-items: center; width: 100%; margin-bottom: 18px; }
.sv .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(var(--rgb), .16); color: var(--c); }
.sv .ic svg { width: 22px; height: 22px; }
.sv .n { font: 600 12px Inter, system-ui, sans-serif; padding: 5px 11px; border-radius: 99px; background: rgba(var(--rgb), .14); color: var(--c); }
.sv b { position: relative; font-size: 21px; }
.sv small { position: relative; font-size: 14px; margin: 6px 0 4px; }
.sv .st { position: relative; display: flex; align-items: center; margin-top: auto; padding-top: 18px; min-height: 78px; }
.sv .st i { width: 84px; height: 60px; border-radius: 11px; overflow: hidden; border: 2px solid var(--card); margin-left: -26px; background: #222226; box-shadow: 0 8px 18px rgba(0,0,0,.45); transition: margin .4s cubic-bezier(.2,.8,.2,1), transform .4s cubic-bezier(.2,.8,.2,1); }
.sv .st i:first-child { margin-left: 0; }
.sv .st img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; opacity: 1; transform: none; }
.sv em { position: relative; display: flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--c); font-size: 13px; font-weight: 600; }
.sv em u { text-decoration: none; display: inline-block; transition: transform .3s; }
@media (hover: hover) {
  .sv button:hover { border-color: rgba(var(--rgb), .55); box-shadow: 0 18px 40px -18px rgba(var(--rgb), .5); }
  .sv button:hover:before { opacity: 1; transform: scale(1.25); }
  .sv button:hover .st i { margin-left: -10px; } .sv button:hover .st i:first-child { margin-left: 0; }
  .sv button:hover .st i:nth-child(2) { transform: rotate(-3deg) translateY(-3px); }
  .sv button:hover .st i:nth-child(3) { transform: rotate(3deg) translateY(-3px); }
  .sv button:hover em u { transform: translateX(5px); }
}
@media (max-width: 560px) {
  .sv { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .sv button { min-height: 0; padding: 14px; }
  .sv small { display: none; }
  .sv .top { margin-bottom: 12px; }
  .sv .ic { width: 38px; height: 38px; border-radius: 11px; } .sv .ic svg { width: 19px; height: 19px; }
  .sv .n { font-size: 11px; padding: 4px 9px; }
  .sv b { font-size: 18px; }
  .sv .st { padding-top: 12px; min-height: 0; }
  .sv .st i { width: 56px; height: 42px; margin-left: -18px; border-radius: 9px; }
  .sv em { margin-top: 10px; font-size: 12px; }
}


/* =====================================================================
   PHONES: the skill menu sits at the very top of the pop-up and stays there
   ===================================================================== */
@media (max-width: 860px) {
  .side { display: contents; }
  .grab { order: -6; }
  .cl { order: -5; top: 9px; margin: 9px 12px -49px 0; z-index: 7; }
  .swh { order: -4; position: sticky; top: 0; z-index: 5; background: var(--card); border-bottom: 1px solid var(--line); padding: 10px 64px 10px 16px; }
  .sw { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent); }
  .gal { order: 0; } .body { order: 1; flex: 1 0 auto; } .ex { order: 2; } .pn { order: 3; }
  .stage { height: min(44vh, 380px); }
}
@media (prefers-reduced-motion: reduce) {
  .rvk { opacity: 1; } .im img { opacity: 1; transform: none; } .dots i { animation: none; }
}

/* Skill-card pictures: if a picture is missing, show a coloured tile with initials */
.sv .st i.nf { background: linear-gradient(135deg, hsl(var(--h) 35% 30%), hsl(var(--h) 40% 15%)); display: grid; place-items: center; }
.sv .st i.nf:before { content: attr(data-i); font: 700 15px 'Space Grotesk', Inter, system-ui, sans-serif; color: rgba(255,255,255,.55); }
