:root {
  --color-bg: rgb(248, 246, 243);
  --color-text: rgb(42, 49, 50);
  --color-muted: rgb(95, 101, 102);
  --color-muted-2: rgb(118, 125, 126);
  --color-accent-orange: rgb(255, 89, 0);
  --color-link-blue: rgb(0, 153, 255);
  --color-navy: rgb(0, 22, 102);
  --color-panel-dark: rgb(42, 49, 50);
  --color-panel-heading: rgb(202, 220, 252);
  --color-panel-subtitle: rgb(235, 233, 228);
  --color-cta-circle: rgb(31, 21, 21);
  --color-contact-row-bg: rgb(233, 233, 233);

  --color-perk: rgb(191, 255, 79);
  --color-perk-bg-fill: rgb(245, 245, 235);
  --color-perk-card-bg: rgb(255, 255, 255);

  --color-bt: rgb(99, 0, 170);
  --color-bt-bg-fill: rgb(218, 211, 238);
  --color-bt-card-bg: rgb(243, 240, 249);

  --color-brolly: rgb(242, 80, 89);
  --color-brolly-bg-fill: rgb(251, 198, 200);
  --color-brolly-card-bg: rgb(254, 236, 237);

  --color-btn-fill-perk: rgb(240, 255, 214);
  --color-btn-fill-bt: rgb(242, 240, 249);
  --color-btn-fill-brolly: rgb(254, 236, 237);

  --font-satoshi: "Satoshi", sans-serif;
  --font-libre-baskerville: "Libre Baskerville", serif;
  --font-inter-display: "Inter Display", sans-serif;
  --font-dm-sans: "DM Sans", sans-serif;
}

@font-face {
  font-family: "Satoshi";
  src: url("/assets/fonts/satoshi/satoshi-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("/assets/fonts/satoshi/satoshi-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("/assets/fonts/satoshi/satoshi-500-italic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter Display";
  src: url("/assets/fonts/inter-display/inter-display-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* === Reset / base === */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-dm-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img {
  max-width: 100%;
  display: block;
}
a {
  text-decoration: none;
  color: inherit;
}

/*
  Entrance-animated elements start hidden via CSS (not just the JS "from"
  keyframe) so they never flash fully visible on first paint before
  animations.js takes over. animations.js has a safety net that force-reveals
  these if the animation library ever fails to load.
*/
[data-appear],
[data-appear-slide] {
  opacity: 0;
}

.container {
  max-width: 1288px;
  margin: 0 auto;
  padding: 0 40px;
}

/* === Hero === */
.hero {
  position: relative;
  padding: 260px 20px 190px;
  overflow: visible;
}

.hero__polaroids {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
}

/*
  Each polaroid is centered on the hero content's midpoint, then offset by a
  fixed pixel margin measured from the live site (desktop/tablet/phone). This
  keeps the animation's `transform` (x/y/rotate/scale, set by animations.js)
  free to run without fighting a positioning transform.
*/
.polaroid {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  will-change: transform, opacity;
}
.polaroid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.polaroid--1 { width: 286px; height: 312px; margin: -331px 0 0 -662px; }
.polaroid--2 { width: 225px; height: 191px; margin: 71px 0 0 -549px; }
.polaroid--3 { width: 249px; height: 200px; margin: 67px 0 0 296px; }
.polaroid--4 { width: 229px; height: 260px; margin: -306px 0 0 404px; }

.hero__content {
  max-width: 660px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero__title {
  font-family: var(--font-libre-baskerville);
  font-style: italic;
  font-weight: 400;
  font-size: 80px;
  line-height: 1.2em;
  letter-spacing: -2px;
  color: var(--color-accent-orange);
  margin: 0 0 16px;
}
.hero__title span {
  display: inline-block;
}

.hero__subtitle {
  font-family: var(--font-satoshi);
  font-size: 24px;
  line-height: 1.4em;
  letter-spacing: -0.5px;
  color: rgba(0, 0, 0, 0.5);
  margin: 0 0 32px;
}
.hero__subtitle strong,
.hero__subtitle em {
  font-weight: 500;
  font-style: normal;
  color: inherit;
}
.hero__subtitle em {
  font-style: italic;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.cta-blob {
  display: inline-flex;
  align-items: center;
  height: 48px;
  gap: 10px;
  padding: 0 20px 0 10px;
  border-radius: 100px;
  background: var(--color-cta-circle);
  cursor: pointer;
}
.cta-blob__circle {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  transition: width 0.3s ease, height 0.3s ease;
}
.cta-blob:hover .cta-blob__circle,
.cta-blob:focus-visible .cta-blob__circle {
  width: 28px;
  height: 28px;
}
.cta-blob__dot {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--color-bg);
  opacity: 1;
  transition: opacity 0.2s ease;
}
.cta-blob:hover .cta-blob__dot,
.cta-blob:focus-visible .cta-blob__dot {
  opacity: 0;
}
.cta-blob__emoji-mask {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--color-bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cta-blob__emoji {
  display: block;
  font-size: 14px;
  line-height: 1;
  transform: translateX(-150%) rotate(300deg);
  transition: transform 0.3s ease;
}
.cta-blob:hover .cta-blob__emoji,
.cta-blob:focus-visible .cta-blob__emoji {
  transform: translateX(0) rotate(300deg);
}
.cta-blob__label {
  font-family: var(--font-satoshi);
  font-weight: 500;
  font-size: 16px;
  color: #fff;
}

.btn-cv {
  display: inline-flex;
  align-items: center;
  height: 48px;
  gap: 5px;
  padding: 0 16px;
  border-radius: 50px;
  background: var(--color-accent-orange);
  color: #fff;
  font-family: var(--font-satoshi);
  font-weight: 500;
  font-size: 16px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}
.btn-cv:hover,
.btn-cv:focus-visible {
  background: rgb(191, 67, 0);
  transform: scale(1.1);
}
.btn-cv svg {
  flex-shrink: 0;
}

/* === Projects === */
.projects {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1288px;
  margin: 40px auto 0;
}

.employer-block {
  border-radius: 32px;
  padding: 28px;
}
.employer-block--perk { background: var(--color-perk-bg-fill); }
.employer-block--bt { background: var(--color-bt-bg-fill); }
.employer-block--brolly { background: var(--color-brolly-bg-fill); }

.employer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.employer-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}
.employer-logo {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  object-fit: cover;
}
.employer-name {
  font-family: var(--font-dm-sans);
  font-weight: 500;
  font-size: 36px;
  letter-spacing: -0.72px;
  margin: 0;
  color: var(--color-text);
}
.employer-date {
  font-family: var(--font-dm-sans);
  font-size: 16px;
  color: var(--color-muted);
  margin: 0;
}

.employer-link,
.employer-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 39px;
  font-family: var(--font-inter-display);
  font-size: 16px;
  letter-spacing: -0.32px;
  overflow: hidden;
  isolation: isolate;
}
.employer-link__fill {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 320px;
  height: 320px;
  margin: -160px 0 0 -160px;
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.45s cubic-bezier(0.19, 1, 0.22, 1);
  z-index: -1;
  pointer-events: none;
}
.employer-link:hover .employer-link__fill,
.employer-link:focus-visible .employer-link__fill,
.employer-badge:hover .employer-link__fill,
.employer-badge:focus-visible .employer-link__fill {
  transform: scale(1);
}
.employer-link__text,
.employer-link__icon {
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}
.employer-link__icon {
  display: inline-flex;
  flex-shrink: 0;
  width: 0;
  height: 14px;
  margin-left: 0;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.3s ease, transform 0.3s ease, width 0.3s ease, margin-left 0.3s ease;
}
.employer-link:hover .employer-link__icon,
.employer-link:focus-visible .employer-link__icon,
.employer-badge:hover .employer-link__icon,
.employer-badge:focus-visible .employer-link__icon {
  width: 14px;
  margin-left: 6px;
  opacity: 1;
  transform: translateX(0);
}

.employer-link--perk,
.employer-badge--perk { background: var(--color-perk); color: #000; }
.employer-link--perk .employer-link__fill,
.employer-badge--perk .employer-link__fill { background: var(--color-btn-fill-perk); }

.employer-link--bt,
.employer-badge--bt { background: var(--color-bt); color: #fff; }
.employer-link--bt .employer-link__fill,
.employer-badge--bt .employer-link__fill { background: var(--color-btn-fill-bt); }
.employer-link--bt:hover .employer-link__text,
.employer-link--bt:hover .employer-link__icon,
.employer-link--bt:focus-visible .employer-link__text,
.employer-link--bt:focus-visible .employer-link__icon,
.employer-badge--bt:hover .employer-link__text,
.employer-badge--bt:hover .employer-link__icon { color: var(--color-text); }

.employer-badge--brolly { background: var(--color-brolly); color: #fff; cursor: default; }
.employer-badge--brolly .employer-link__fill { background: var(--color-btn-fill-brolly); }
.employer-badge--brolly:hover .employer-link__text,
.employer-badge--brolly:hover .employer-link__icon,
.employer-badge--brolly:focus-visible .employer-link__text,
.employer-badge--brolly:focus-visible .employer-link__icon { color: var(--color-text); }

.project-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.project-cards--single {
  grid-template-columns: 1fr;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  border-radius: 24px;
  background: var(--color-perk-card-bg);
  transition: background-color 0.3s ease;
}
.employer-block--bt .project-card { background: var(--color-bt-card-bg); }
.employer-block--brolly .project-card { background: var(--color-brolly-card-bg); }
.project-card:hover,
.project-card:focus-visible {
  background: rgb(254, 254, 254);
}
.project-card__image {
  border-radius: 8px;
  overflow: hidden;
  height: 283px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}
.project-card:hover .project-card__image img,
.project-card:focus-visible .project-card__image img {
  transform: scale(1.1);
}
.project-card__title {
  font-family: var(--font-dm-sans);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.48px;
  color: var(--color-text);
  margin: 0 0 4px;
}
.project-card__summary {
  font-family: var(--font-dm-sans);
  font-size: 16px;
  letter-spacing: -0.1px;
  color: var(--color-muted);
  margin: 0;
}

/* === Behind the screen === */
.btc {
  position: relative;
  max-width: 1288px;
  margin: 40px auto 0;
  padding: 64px 40px;
  border-radius: 32px;
  background: var(--color-panel-dark);
  overflow: hidden;
  text-align: center;
}
.btc__bg-pattern {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 160%;
  max-width: none;
  height: 60%;
  object-fit: cover;
  object-position: bottom;
  transform: translateX(-50%);
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 40%);
  mask-image: linear-gradient(to bottom, transparent, black 40%);
  pointer-events: none;
}
.btc__content {
  position: relative;
  z-index: 1;
}
.btc__icon {
  margin: 0 auto 16px;
  width: 56px;
  height: 56px;
  object-fit: contain;
}
.btc__title {
  font-family: var(--font-libre-baskerville);
  font-style: italic;
  font-weight: 400;
  font-size: 64px;
  line-height: 1.2em;
  letter-spacing: -2px;
  color: var(--color-panel-heading);
  margin: 0 0 12px;
}
.btc__subtitle {
  font-family: var(--font-dm-sans);
  font-size: 20px;
  line-height: 1.3em;
  letter-spacing: -0.2px;
  color: var(--color-panel-subtitle);
  max-width: 480px;
  margin: 0 auto 48px;
}

.btc__gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.btc__photo {
  position: relative;
  width: 190px;
  aspect-ratio: 2 / 3;
  will-change: transform, opacity;
}
.btc__photo-inner {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
}
.btc__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.btc__caption {
  position: absolute;
  top: -14px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 40px;
  background: var(--color-muted-2);
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -100%) scale(0.1);
  transform-origin: bottom center;
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.btc__caption::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--color-muted-2);
  transform: translateX(-50%) rotate(65deg);
  border-radius: 2px;
}
.btc__photo:hover .btc__caption,
.btc__photo:focus-visible .btc__caption {
  opacity: 1;
  transform: translate(-50%, -100%) scale(1);
}
.btc__caption span {
  font-family: var(--font-dm-sans);
  font-size: 16px;
  letter-spacing: -0.1px;
  color: var(--color-bg);
}
.btc__caption svg {
  flex-shrink: 0;
  display: none;
}

/* === Contact === */
.contact {
  max-width: 1288px;
  margin: 40px auto 0;
  padding: 80px 40px;
  border-radius: 48px;
  text-align: center;
}
.contact__icon {
  margin: 0 auto 16px;
  width: 56px;
  height: 56px;
  object-fit: contain;
}
.contact__title {
  font-family: var(--font-libre-baskerville);
  font-style: italic;
  font-weight: 400;
  font-size: 64px;
  line-height: 1.2em;
  letter-spacing: -2px;
  color: var(--color-navy);
  margin: 0 0 12px;
}
.contact__subtitle {
  font-family: var(--font-dm-sans);
  font-size: 20px;
  letter-spacing: -0.2px;
  color: var(--color-muted);
  margin: 0 0 32px;
}
.contact__details {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.contact__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 16px;
  background: var(--color-contact-row-bg);
}
.contact__label {
  font-family: var(--font-dm-sans);
  font-size: 16px;
  color: var(--color-text);
}
.contact__value-group {
  display: flex;
  align-items: center;
}
.contact__value {
  font-family: var(--font-dm-sans);
  font-size: 16px;
  letter-spacing: -0.1px;
  text-align: right;
  color: var(--color-text);
}
.contact__arrow {
  flex-shrink: 0;
  width: 0;
  margin-left: 0;
  opacity: 0;
  color: var(--color-muted);
  overflow: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, width 0.25s ease, margin-left 0.25s ease;
  transform: translate(-2px, 2px);
}
.contact__item:hover .contact__arrow,
.contact__item:focus-visible .contact__arrow {
  width: 14px;
  margin-left: 8px;
  opacity: 1;
  transform: translate(0, 0);
}

/* === Footer === */
.footer {
  text-align: center;
  padding: 60px 40px 40px;
  font-family: var(--font-dm-sans);
  font-size: 16px;
  color: var(--color-muted);
}

/* === Responsive === */
@media (max-width: 1199.98px) {
  .hero {
    padding: 240px 32px 180px;
  }
  .hero__title {
    font-size: 64px;
  }
  .polaroid--1 { width: 286px; height: 312px; margin: -351px 0 0 -554px; }
  .polaroid--2 { width: 211px; height: 196px; margin: 45px 0 0 -440px; }
  .polaroid--3 { width: 252px; height: 193px; margin: 44px 0 0 231px; }
  .polaroid--4 { width: 265px; height: 275px; margin: -332px 0 0 250px; }
  .project-cards {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 809.98px) {
  .container,
  .projects,
  .btc,
  .contact {
    padding-left: 20px;
    padding-right: 20px;
  }
  .hero {
    padding: 220px 20px 160px;
  }
  .hero__title {
    font-size: 40px;
    letter-spacing: -1px;
  }
  .hero__subtitle {
    font-size: 16px;
  }
  .hero__actions {
    flex-wrap: wrap;
  }
  .polaroid--1 { width: 210px; height: 229px; margin: -350px 0 0 -242px; }
  .polaroid--2 { width: 207px; height: 187px; margin: 98px 0 0 -250px; }
  .polaroid--3 { width: 207px; height: 187px; margin: 98px 0 0 56px; }
  .polaroid--4 { width: 155px; height: 176px; margin: -324px 0 0 82px; }

  .project-cards {
    grid-template-columns: 1fr;
  }
  .employer-name {
    font-size: 28px;
  }

  .btc {
    padding: 48px 20px;
  }
  .btc__title,
  .contact__title {
    font-size: 40px;
  }
  .btc__gallery {
    flex-direction: column;
    gap: 16px;
  }
  .btc__photo {
    width: 100%;
    max-width: 260px;
    aspect-ratio: 4 / 3;
  }

  .contact {
    padding: 60px 20px;
  }
  .contact__item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .contact__value-group {
    align-self: flex-end;
  }
}
