/* Latest work stays distinct from the older hover archive. */
.work-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: -2vh 0 8vh;
  position: relative;
  z-index: 11;
}
.work-categories a {
  border: 1px solid #111;
  border-radius: 100px;
  padding: 12px 18px;
  font-size: 10px;
  text-transform: uppercase;
  transition:
    background 0.2s,
    color 0.2s;
}
.work-categories a:hover {
  background: var(--black);
  color: var(--acid);
}
.work-categories a:focus-visible,
.dental-project:focus-visible,
.trading-project:focus-visible,
.trading-overview-link:focus-visible,
.portfolio-author-credit:focus-visible {
  outline: 3px solid #6d56cb;
  outline-offset: 6px;
}
#recent-projects,
#trading-systems,
#web-projects {
  scroll-margin-top: 35px;
}
.recent-web {
  margin-bottom: 10vh;
}
.recent-section-label,
.archive-group-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 25px;
}
.recent-section-label > span,
.archive-group-label > span {
  font: 11px monospace;
  flex-shrink: 0;
}
.recent-section-label h3,
.archive-group-label h3 {
  font:
    600 clamp(21px, 2.3vw, 36px) / 1.2 Oswald,
    Impact,
    sans-serif;
  letter-spacing: -0.02em;
  margin: 0;
  text-transform: uppercase;
}
.dental-project {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  border: 1px solid #2c1b31;
  background: #211524;
  color: #ffe7d2;
  overflow: hidden;
  position: relative;
}
.dental-project-copy {
  padding: clamp(26px, 4vw, 66px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.dental-project-copy > p {
  font: 10px monospace;
  letter-spacing: 0.1em;
  color: #ddafc4;
  margin: 0 0 26px;
}
.dental-project h4 {
  font:
    600 clamp(50px, 6.6vw, 100px) / 0.94 Oswald,
    Impact,
    sans-serif;
  letter-spacing: -0.04em;
  margin: 0 0 25px;
}
.dental-project h4 i {
  font-style: normal;
  color: #ffc465;
}
.dental-project-copy > span {
  font-size: 12px;
  line-height: 1.9;
  color: #d7c5d0;
  max-width: 340px;
}
.project-skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 22px 0;
}
.project-skill-tags span {
  font: 9px monospace;
  border: 1px solid #77566a;
  padding: 7px 9px;
  border-radius: 100px;
  color: #f3d8df;
}
.dental-project-copy > b {
  font-size: 11px;
  border-bottom: 1px solid #ffd9ae;
  padding-bottom: 8px;
  margin-top: auto;
  padding-top: 16px;
}
.dental-project figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: #352338;
  align-self: stretch;
  min-width: 0;
  padding: 38px 0 0 30px;
}
.dental-project figure img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  object-position: top left;
  box-shadow: -10px 0 45px #0003;
  border-radius: 12px 0 0 0;
  transition: transform 0.6s;
}
.dental-project:hover figure img {
  transform: translateY(-5px);
}
.dental-project figcaption {
  font: 8px monospace;
  color: #d4b8cb;
  padding: 15px 12px 15px 0;
  line-height: 1.6;
  text-transform: uppercase;
}
.trading-portfolio {
  background: #0d1215;
  color: #e4e9e5;
  padding: clamp(25px, 4vw, 64px);
  margin: 0 0 10vh;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.trading-portfolio:before {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 40%;
  height: 250px;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, transparent 0 49px, #d3e2cf08 49px 50px),
    repeating-linear-gradient(0deg, transparent 0 49px, #d3e2cf08 49px 50px);
  z-index: -1;
  mask-image: linear-gradient(90deg, transparent, #000);
}
.trading-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 35px;
  margin-bottom: 45px;
}
.trading-section-heading > div > p {
  font: 9px monospace;
  letter-spacing: 0.12em;
  color: #a5b29d;
  margin: 0 0 22px;
}
.trading-section-heading h3 {
  font:
    600 clamp(48px, 6vw, 92px) / 0.96 Oswald,
    Impact,
    sans-serif;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  margin: 0;
}
.trading-section-heading h3 i {
  font-style: normal;
  color: var(--acid);
}
.trading-section-heading > p {
  max-width: 285px;
  font-size: 11px;
  line-height: 1.9;
  color: #96a49f;
  margin: 0 0 4px;
}
.trading-project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.trading-project {
  border: 1px solid #33413d;
  background: #141d20;
  padding: 25px 24px 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition:
    border-color 0.25s,
    transform 0.25s;
}
.trading-project:hover {
  border-color: #94b985;
  transform: translateY(-4px);
}
.bybit-project {
  --project-accent: #e7bd73;
  background: #191e21;
  border-color: #454236;
}
.spot-project {
  --project-accent: #b0e998;
}
.trading-project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font: 8px monospace;
  color: #a2aaa7;
}
.trading-project-top > span:last-child {
  border: 1px solid #56645280;
  color: var(--project-accent);
  padding: 5px 6px;
  border-radius: 3px;
  text-align: right;
}
.trading-project h4 {
  position: relative;
  font:
    600 clamp(30px, 3.8vw, 58px) / 0.98 Oswald,
    Impact,
    sans-serif;
  letter-spacing: -0.025em;
  margin: 27px 0 18px;
}
.trading-project h4 > span {
  font:
    400 30px Inter,
    sans-serif;
  position: absolute;
  right: 0;
  top: 0;
  color: var(--project-accent);
}
.trading-project > p {
  font-size: 10px;
  line-height: 1.9;
  color: #a8b5af;
  max-width: 360px;
  margin: 0 0 25px;
  min-height: 58px;
}
.trading-project figure {
  margin: auto -10px 0;
  position: relative;
  background: #0b1118;
  border: 1px solid #3a4745;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  padding-top: 13px;
  overflow: hidden;
}
.trading-project figure:before {
  content: "● ● ●";
  position: absolute;
  top: 1px;
  left: 9px;
  font-size: 5px;
  letter-spacing: 2px;
  color: #698076;
}
.trading-project figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1.44;
  object-fit: cover;
  object-position: top;
}
.trading-project figcaption {
  font: 7px monospace;
  letter-spacing: 0.07em;
  color: var(--project-accent);
  background: #101819;
  border-top: 1px solid #2d3934;
  padding: 8px 10px;
}
.trading-project-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 19px 0;
  font-size: 8px;
  color: #899d94;
  line-height: 1.7;
}
.trading-project-bottom b {
  font-size: 9px;
  font-weight: 500;
  color: #dbe5da;
  text-align: right;
  white-space: nowrap;
}
.trading-overview-link {
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 27px 0 0;
  color: var(--acid);
  font-size: 10px;
  line-height: 1.8;
  border-bottom: 1px solid #b7ff1950;
  padding-bottom: 6px;
}
.archive-group-label {
  margin-top: 8vh;
}
.portfolio-author-credit {
  align-self: flex-end;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 21;
  font-size: 10px;
  margin: 18px 0 0;
  text-transform: none;
  color: #a3a69c;
}
.portfolio-author-credit img {
  object-fit: contain;
  filter: brightness(0) invert(1);
}
@media (max-width: 1000px) {
  .dental-project {
    grid-template-columns: 1fr 1.15fr;
  }
  .dental-project-copy {
    padding: 30px;
  }
  .dental-project h4 {
    font-size: 64px;
  }
  .dental-project-copy > span {
    font-size: 11px;
  }
  .dental-project figure {
    padding: 25px 0 0 16px;
  }
  .trading-project {
    padding: 20px 17px 0;
  }
  .trading-project-grid {
    gap: 16px;
  }
  .trading-project-top {
    font-size: 7px;
  }
  .trading-project h4 {
    font-size: 39px;
  }
  .trading-project-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .trading-project-bottom b {
    font-size: 10px;
  }
  .trading-section-heading > p {
    max-width: 240px;
  }
}
@media (max-width: 760px) {
  .work-categories {
    gap: 8px;
    margin: 0 0 42px;
  }
  .work-categories a {
    padding: 10px 13px;
    font-size: 8px;
  }
  .recent-section-label,
  .archive-group-label {
    display: block;
  }
  .recent-section-label h3,
  .archive-group-label h3 {
    font-size: 27px;
    line-height: 1.1;
    margin-top: 14px;
    max-width: 320px;
  }
  .recent-section-label > span,
  .archive-group-label > span {
    font-size: 9px;
  }
  .dental-project {
    grid-template-columns: 1fr;
  }
  .dental-project-copy {
    padding: 28px 24px;
  }
  .dental-project h4 {
    font-size: 65px;
  }
  .dental-project-copy > span {
    font-size: 12px;
    max-width: 340px;
  }
  .dental-project figure {
    padding: 0 0 0 18px;
  }
  .dental-project figure img {
    min-height: 0;
    height: auto;
    aspect-ratio: 1.4;
    object-fit: cover;
    object-position: top;
  }
  .dental-project figcaption {
    font-size: 7px;
  }
  .recent-web {
    margin-bottom: 46px;
  }
  .trading-portfolio {
    padding: 28px 20px;
    margin-left: -20px;
    margin-right: -20px;
    margin-bottom: 54px;
  }
  .trading-section-heading {
    display: block;
    margin-bottom: 30px;
  }
  .trading-section-heading h3 {
    font-size: 62px;
  }
  .trading-section-heading > p {
    max-width: 340px;
    margin-top: 24px;
    font-size: 11px;
  }
  .trading-project-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .trading-project {
    padding: 23px 20px 0;
  }
  .trading-project h4 {
    font-size: 48px;
  }
  .trading-project > p {
    font-size: 11px;
    min-height: 0;
  }
  .trading-project-top {
    font-size: 8px;
  }
  .trading-project figure img {
    aspect-ratio: 1.44;
  }
  .trading-project-bottom {
    flex-direction: row;
    align-items: center;
    font-size: 7px;
  }
  .trading-project-bottom b {
    font-size: 8px;
  }
  .trading-overview-link {
    font-size: 9px;
  }
  .archive-group-label {
    margin-top: 45px;
  }
  .portfolio-author-credit {
    align-self: flex-start;
    margin-top: 25px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .dental-project figure img,
  .trading-project {
    transition: none;
  }
  .trading-project:hover,
  .dental-project:hover figure img {
    transform: none;
  }
}
/* Keep the language control reachable on mobile for the new bilingual cases. */
@media (max-width: 760px) {
  .header .language-switcher {
    display: flex;
    font-size: 10px;
  }
  .header-actions {
    gap: 9px;
  }
  .header .header-cta {
    font-size: 9px;
    padding: 10px 11px;
  }
  .header .header-cta span {
    margin-left: 5px;
  }
}
