:root {
  --yellow: #fbb72c;
  --yellow-deep: #f2a800;
  --ink: #141414;
  --ink-2: #2a2a2a;
  --muted: #5d5d5d;
  --line: #9a9a9a;
  --bg: #e2e2e2;
  --surface: #ececec;
  --white: #ffffff;
  --side-w: 300px;
  --page-max: 1360px;
  --band: #b9b9b9;
  --head: 'Montserrat', 'Arial Black', sans-serif;
  --body: 'Jost', 'Futura', 'Century Gothic', sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255, 255, 255, .22), transparent 55%),
    radial-gradient(ellipse at 80% 90%, rgba(0, 0, 0, .10), transparent 60%),
    var(--band);
  background-attachment: fixed;
  overflow-x: hidden;
}
/* centred page with grey bands on the sides (wide screens) */
.page {
  max-width: var(--page-max);
  margin: 0 auto;
  background: var(--bg);
  box-shadow: 0 0 60px rgba(0, 0, 0, .28);
}
@media (min-width: 1440px) {
  .page { margin: 2.5rem auto; }
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); }
p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Shared bits ---------- */
.tag {
  display: inline-block;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--head);
  font-weight: 800;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .3em .8em;
  border-radius: 3px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  background: var(--yellow);
  color: var(--white);
  font-family: var(--head);
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1em 2em;
  border-radius: 999px;
  transition: transform .25s var(--ease), background .25s;
}
.btn:hover { background: var(--yellow-deep); transform: translateY(-2px); }
.btn--dark { background: var(--ink); color: var(--yellow); }
.btn--dark:hover { background: #000; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  font-family: var(--head);
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .1em;
}
.lang-switch button { opacity: .45; padding: .3em .2em; transition: opacity .2s; }
.lang-switch button[aria-pressed="true"] { opacity: 1; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.lang-switch button:hover { opacity: 1; }

/* ---------- Floating pill (right) ---------- */
.pill {
  position: fixed;
  right: max(22px, calc((100vw - var(--page-max)) / 2 + 22px));
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--yellow);
  border-radius: 999px;
  padding: 14px 9px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.pill a {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin: 6px 0;
  transition: background .2s;
}
.pill a + a::before {
  content: '';
  position: absolute;
  top: -11px;
  height: 10px;
  border-left: 2px dotted rgba(20, 20, 20, .45);
}
.pill svg { width: 18px; height: 18px; fill: var(--ink); transition: fill .2s; }
.pill a:hover svg, .pill a.is-active svg { fill: var(--white); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--white);
}
.hero__text {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1rem;
  padding: 6rem clamp(1.5rem, 6vw, 5rem);
}
.lang-switch--hero { position: absolute; top: 2rem; left: clamp(1.5rem, 6vw, 5rem); color: var(--ink); }
.hero__hi {
  font-family: var(--head);
  font-weight: 900;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  text-transform: uppercase;
  color: var(--ink);
  letter-spacing: .02em;
}
.hero__name {
  font-family: var(--head);
  font-weight: 900;
  font-size: clamp(2.6rem, 5.6vw, 5.2rem);
  line-height: .95;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: -.01em;
  margin-top: -.6rem;
}
.hero__first { color: var(--yellow); font-weight: 600; letter-spacing: .02em; }
.hero__lead { max-width: 30rem; color: var(--muted); font-size: 1.02rem; margin: .4rem 0 1rem; }
.hero__photo { position: relative; background: #0d0d0d; overflow: hidden; }
.hero__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 25%;
  filter: grayscale(1) contrast(1.08);
}

/* ---------- Layout with sticky sidebar ---------- */
.layout { display: grid; grid-template-columns: var(--side-w) 1fr; }
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  z-index: 30;
}
.side__photo { flex: 0 0 38%; background: #0d0d0d; overflow: hidden; }
.side__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; filter: grayscale(1) contrast(1.08); }
.side__panel { flex: 1; background: var(--yellow); display: flex; flex-direction: column; justify-content: center; }
.side__toggle { display: none; }
.side__nav { display: flex; flex-direction: column; align-items: center; gap: 2rem; }
.side__nav ul {
  list-style: none;
  margin: 0;
  padding: 2.2rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
  position: relative;
}
.side__nav ul::before, .side__nav ul::after {
  content: '';
  position: absolute;
  left: 50%;
  height: 1.4rem;
  border-left: 2px dotted var(--ink);
}
.side__nav ul::before { top: 0; }
.side__nav ul::after { bottom: 0; }
.side__nav a {
  font-family: var(--head);
  font-weight: 800;
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  transition: color .2s;
}
.side__nav a:hover, .side__nav a.is-active { color: var(--white); }
.side .lang-switch { color: var(--ink); }

/* ---------- Sections ---------- */
.content { min-width: 0; }
.section {
  min-height: 100vh;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.25rem, 6vw, 7rem) clamp(3rem, 6vw, 5rem) clamp(1.25rem, 5vw, 5rem);
  padding-right: max(clamp(1.25rem, 6vw, 7rem), 90px);
  background: var(--surface);
  border-bottom: 1px solid #d6d6d6;
}
.title-box {
  border: 1px dashed var(--line);
  padding: clamp(1rem, 2.2vw, 1.8rem) 1rem;
  text-align: center;
  font-family: var(--head);
  font-weight: 900;
  font-size: clamp(2.2rem, 5.6vw, 4.6rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

/* About */
.about__intro { font-size: clamp(1.2rem, 2vw, 1.55rem); font-weight: 300; color: var(--ink); margin-bottom: 1rem; }
.about__intro strong { font-weight: 700; }
.about__text { color: var(--muted); max-width: 62rem; margin-bottom: .8rem; }
.about__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); margin-top: 2.5rem; align-items: start; }
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--ink);
  padding: 1.2rem;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.2rem .6rem;
}
.stat:nth-child(odd) { border-right: 1px dashed #555; }
.stat:nth-child(-n+2) { border-bottom: 1px dashed #555; }
.stat b {
  font-family: var(--head);
  font-weight: 800;
  font-size: clamp(2rem, 3.6vw, 3rem);
  line-height: 1;
  color: var(--yellow);
}
.stat span {
  margin-top: .7rem;
  font-family: var(--head);
  font-weight: 700;
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--white);
}
.services h3 { font-family: var(--head); font-weight: 800; font-size: 1.15rem; margin-bottom: 1.2rem; }
.service { display: grid; grid-template-columns: 54px 1fr; gap: 1rem; padding: .9rem 0; border-bottom: 1px dashed #c9c9c9; }
.service:last-child { border-bottom: 0; }
.service svg { width: 46px; height: 46px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.service:hover svg { stroke: var(--yellow-deep); }
.service h4 { font-family: var(--head); font-weight: 800; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .25rem; }
.service p { font-size: .94rem; color: var(--muted); line-height: 1.5; }

/* Resume */
.resume { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); }
.resume__head {
  font-family: var(--head);
  font-weight: 800;
  font-size: .9rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin: 0 0 1.2rem;
}
.resume__col > .resume__head:not(:first-child) { margin-top: 2.4rem; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.4rem; border-left: 2px dotted var(--ink); }
.timeline li { position: relative; padding-bottom: 1.6rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: '';
  position: absolute;
  left: calc(-1.4rem - 7px);
  top: .25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--yellow);
  border: 2px solid var(--ink);
}
.badge {
  display: inline-block;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--head);
  font-weight: 800;
  font-size: .66rem;
  letter-spacing: .08em;
  padding: .2em .7em;
  border-radius: 3px;
  margin-bottom: .45rem;
}
.timeline h4 { font-family: var(--head); font-weight: 800; font-size: .98rem; }
.timeline .org { font-size: .88rem; font-weight: 600; color: var(--ink-2); margin-bottom: .3rem; }
.timeline p:not(.org) { font-size: .93rem; color: var(--muted); line-height: 1.55; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li {
  font-size: .85rem;
  font-weight: 500;
  padding: .3em .9em;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background .2s;
}
.chips li:hover { background: var(--yellow); }
.langs { color: var(--muted); margin-bottom: 2rem; }

/* Portfolio */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 2.2rem; margin-bottom: 2.2rem; }
.filters button {
  font-family: var(--head);
  font-weight: 800;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  padding: .4em 0;
  transition: color .2s;
}
.filters button:hover, .filters button.is-active { color: var(--yellow-deep); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 1.6rem; }
.card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .06);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  animation: cardIn .45s var(--ease) both;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0, 0, 0, .12); }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .card { animation: none; } }

.thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb__mono {
  font-family: var(--head);
  font-weight: 900;
  font-size: clamp(3.2rem, 6vw, 4.6rem);
  letter-spacing: -.02em;
  line-height: 1;
  transition: transform .4s var(--ease);
}
.card:hover .thumb__mono { transform: scale(1.08); }
.thumb__ph {
  position: absolute;
  left: .8rem;
  bottom: .7rem;
  font-family: var(--head);
  font-weight: 700;
  font-size: .6rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .55;
}
/* placeholder looks — swap for screenshots by setting `image` in js/i18n.js */
.thumb--0 { background: var(--yellow); color: var(--ink); }
.thumb--1 { background: var(--ink); color: var(--yellow); }
.thumb--2 { background: repeating-linear-gradient(135deg, #d9d9d9 0 14px, #cfcfcf 14px 28px); color: var(--ink); }
.thumb--3 { background: radial-gradient(circle at 30% 30%, #3a3a3a, var(--ink)); color: var(--white); }
.thumb--4 { background: linear-gradient(135deg, var(--yellow) 0 50%, var(--ink) 50% 100%); color: var(--white); }
.thumb--4 .thumb__mono { -webkit-text-stroke: 2px var(--ink); }
.thumb--5 { background: radial-gradient(circle at 70% 70%, #ffd77a, var(--yellow) 60%); color: var(--ink); }
.thumb--1 .thumb__ph, .thumb--3 .thumb__ph, .thumb--4 .thumb__ph { color: var(--white); }

.card__body { display: flex; flex-direction: column; gap: .5rem; padding: 1.2rem 1.3rem 1.3rem; flex: 1; }
.card__meta { display: flex; justify-content: space-between; font-family: var(--head); font-weight: 700; font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.card h3 { font-family: var(--head); font-weight: 800; font-size: 1.12rem; }
.card p { font-size: .92rem; color: var(--muted); line-height: 1.5; }
.card__foot { margin-top: auto; padding-top: .8rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-top: 1px dashed #d4d4d4; }
.card__tech { font-size: .78rem; color: var(--ink-2); font-weight: 500; }
.card__link {
  flex-shrink: 0;
  font-family: var(--head);
  font-weight: 800;
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  background: var(--yellow);
  color: var(--ink);
  padding: .45em 1em;
  border-radius: 999px;
  transition: background .2s, color .2s;
}
.card__link:hover { background: var(--ink); color: var(--yellow); }
.card__link--off { background: transparent; border: 1px dashed var(--line); color: var(--muted); }

/* Contact */
.section--contact { display: flex; flex-direction: column; }
.contact__lead { font-size: clamp(1.3rem, 2.4vw, 1.8rem); font-weight: 300; color: var(--ink); }
.contact__lead strong { font-weight: 700; }
.contact__sub { color: var(--muted); margin-top: .4rem; max-width: 46rem; }
.contact__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 1.4rem; margin-top: 2.6rem; }
.ccard {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .4rem;
  padding: 2.2rem 1rem;
  background: var(--white);
  text-decoration: none;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
a.ccard:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0, 0, 0, .12); }
.ccard svg { width: 46px; height: 46px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: .6rem; }
a.ccard:hover svg { stroke: var(--yellow-deep); }
.ccard__label { font-family: var(--head); font-weight: 800; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ccard__value { font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.thanks {
  margin-top: auto;
  padding-top: 4rem;
  text-align: center;
  font-family: var(--head);
  font-weight: 900;
  font-size: clamp(1rem, 2vw, 1.3rem);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
}
.footer { text-align: center; font-size: .8rem; color: var(--muted); margin-top: .6rem; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  :root { --side-w: 240px; }
  .about__grid, .resume { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  body { font-size: 16px; }
  .pill { display: none; }
  .hero { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .hero__photo { order: -1; min-height: 52vh; }
  .hero__text { padding: 2.5rem 1.25rem 3.5rem; }
  .lang-switch--hero { position: static; order: -1; margin-bottom: .5rem; }

  .layout { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; height: auto; }
  .side__photo { display: none; }
  .side__panel { display: block; }
  .side__toggle {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: .95rem 1.25rem;
  }
  .side__brand { font-family: var(--head); font-weight: 900; font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
  .burger { display: grid; gap: 5px; }
  .burger i { display: block; width: 24px; height: 2px; background: var(--ink); transition: transform .25s, opacity .25s; }
  .side.is-open .burger i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .side.is-open .burger i:nth-child(2) { opacity: 0; }
  .side.is-open .burger i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .side__nav { display: none; padding: 0 1.25rem 1.6rem; gap: 1rem; }
  .side.is-open .side__nav { display: flex; }
  .side__nav ul { padding: 1.6rem 0; }

  .section { min-height: 0; padding: 2.5rem 1rem 3.5rem; scroll-margin-top: 56px; }
  .stat { padding: 1.6rem .4rem; }
}

@media (max-width: 420px) {
  .stats { padding: .6rem; }
  .stat span { font-size: .6rem; letter-spacing: .08em; }
}
