@font-face {
  font-family: 'W95FA';
  src: url('/fonts/w95fa.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Jersey 10';
  src: url('/fonts/jersey10.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --blue: #0500fc;
  --ink: #0f0f0f;
  --chrome: #d9d9d9;
  --chrome-dark: #4c4c4c;
  --chrome-light: #ebebeb;
  --title-gray: #898e91;
  --menu-gray: #696969;
  --f-ui: Tahoma, 'Segoe UI', Verdana, sans-serif;
  --f-tre: 'Trebuchet MS', 'Segoe UI', Tahoma, sans-serif;
  --f-px: 'W95FA', 'Courier New', monospace;
  --f-jersey: 'Jersey 10', 'W95FA', monospace;
  --content-w: 1400px;
}

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

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  max-width: 2048px;
  margin: 0 auto;
  background: #fff;
  color: var(--ink);
  font-family: var(--f-ui);
  overflow-x: clip;
}

img { max-width: 100%; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  opacity: 0;
}

.px-title {
  font-family: var(--f-jersey);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  -webkit-text-stroke: 0.024em var(--ink);
  paint-order: stroke fill;
}

/* ---------- Win95 kit ---------- */

.win {
  background: var(--chrome);
  padding: 10px;
  box-shadow:
    inset 2px 2px 0 0 #fff,
    inset -2px -2px 0 0 var(--chrome-dark),
    0 0 0 1px rgba(0, 0, 0, 0.85),
    4px 5px 0 0 rgba(0, 0, 0, 0.28);
}

.titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 29px;
  padding: 0 5px;
  background: var(--title-gray);
}

.titlebar--blue { background: var(--blue); }

.titlebar__icon { width: 23px; height: 23px; image-rendering: pixelated; flex: none; }

.titlebar__text {
  font: 700 20px/1 var(--f-tre);
  color: #fff;
  text-transform: capitalize;
  margin-right: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.winbtns { display: flex; gap: 7px; align-items: center; flex: none; }

.btn95 {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  width: 22px; height: 22px;
  background: var(--chrome);
  border: 0;
  box-shadow:
    inset 1.5px 1.5px 0 0 #fff,
    inset -1.5px -1.5px 0 0 rgba(0, 0, 0, 0.65),
    1px 1px 0 1px #000;
}

.btn95--min i {
  display: block;
  width: 12px; height: 12px;
  border: 2px solid #7c7c7c;
  border-top-width: 4px;
  margin-bottom: 3px;
  background: var(--chrome);
}

.btn95--close {
  background-image: url('/assets/group3.svg');
  background-size: cover;
  box-shadow: none;
}

.menubar {
  display: flex;
  gap: 16px;
  padding: 7px 8px;
  font: 16px/1 var(--f-px);
  color: var(--menu-gray);
  text-transform: capitalize;
}

.inset-canvas {
  background: #fff;
  border: 2.5px solid #737373;
  box-shadow: inset 4px 4px 0 0 rgba(0, 0, 0, 0.7);
}

.field {
  display: flex;
  align-items: center;
  height: 29px;
  padding: 0 7px;
  background: #fff;
  box-shadow: inset 2px 2px 0 0 var(--chrome-dark), inset -2px -2px 0 0 var(--chrome-light);
  font: 16px/1 var(--f-px);
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
}

.field a { color: inherit; text-decoration: none; }
.field a:hover, .field a:focus-visible { text-decoration: underline; color: var(--blue); }

.sb {
  position: absolute;
  display: flex;
  background: conic-gradient(#fff 25%, var(--chrome) 0 50%, #fff 0 75%, var(--chrome) 0) 0 0 / 4px 4px;
}

.sb--v {
  flex-direction: column;
  align-items: center;
  top: 2.5px; right: 2.5px; bottom: 26px;
  width: 24px;
  padding: 1px;
}

.sb--v img:last-child { margin-top: auto; }

.sb--h {
  align-items: center;
  left: 2.5px; right: 26px; bottom: 2.5px;
  height: 24px;
  padding: 1px;
  overflow: hidden;
}

.sb--h img { flex: 0 0 auto; }

.sb--h img:last-child { margin-left: auto; }

.sb__thumb {
  width: 22px;
  background: var(--chrome);
  box-shadow:
    inset 1.5px 1.5px 0 0 #fff,
    inset -1.5px -1.5px 0 0 rgba(0, 0, 0, 0.65),
    1px 1px 0 0 #000;
  margin: 1px 0;
}

.sb--h .sb__thumb { height: 22px; margin: 0 1px; flex: 0 1 auto; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-bottom: 60px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: min(1190px, 118vw);
  background: url('/assets/bg-clouds.webp') center bottom / cover no-repeat;
  z-index: -1;
}

.welcome {
  position: relative;
  display: table;
  margin: 0 auto;
  padding: 0 0.1em;
  font-size: clamp(78px, 14vw, 224px);
  line-height: 0.95;
  white-space: nowrap;
}

.welcome::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: 14%;
  height: 72%;
  background: #fff;
  z-index: -1;
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: fit-content;
  margin: clamp(8px, 1.5vw, 20px) auto 0;
  font-size: clamp(38px, 6.4vw, 93px);
  line-height: 0.989;
  letter-spacing: -0.03em;
  color: var(--blue);
  text-transform: uppercase;
  font-weight: 400;
}

.hero-title span { background: #fff; padding: 0.02em 0.18em; }

.hero-title__l2 { font-weight: 700; }

.collage {
  position: relative;
  max-width: 1600px;
  margin: clamp(24px, 2vw, 30px) auto 0;
}

@media (min-width: 1290px) {
  .collage { height: 1250px; }
  .win--about { position: absolute; left: calc(50% - 364px); top: 0; z-index: 3; }
  .win--notepad { position: absolute; left: calc(50% - 596px); top: 543px; z-index: 2; }
  .win--paint { position: absolute; left: calc(50% - 204px); top: 576px; z-index: 1; }
}

@media (max-width: 1289.98px) {
  .collage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    padding: 0 12px;
  }
}

/* About window */

.win--about { width: min(728px, 100%); }

.tabs {
  display: flex;
  align-items: flex-end;
  padding: 14px 10px 0;
}

.tab {
  font: 16px/1 var(--f-px);
  color: var(--ink);
  text-transform: capitalize;
  background: var(--chrome);
  padding: 8px 14px 6px;
  box-shadow:
    inset 1.5px 1.5px 0 0 #fff,
    inset -1.5px 0 0 0 var(--chrome-dark);
  position: relative;
}

.tab u { text-decoration: underline; }

.tab--active {
  padding-bottom: 9px;
  z-index: 2;
  margin-bottom: -2px;
}

.tabpanel {
  display: flex;
  gap: 26px;
  align-items: flex-start;
  padding: 22px 20px 26px;
  box-shadow:
    inset 1.5px 1.5px 0 0 #fff,
    inset -1.5px -1.5px 0 0 var(--chrome-dark);
}

.photo-frame {
  flex: none;
  width: 235px;
  padding: 3px;
  border: 2.5px solid #828282;
  box-shadow: inset 4px 4px 0 0 rgba(0, 0, 0, 0.6);
  background: var(--chrome);
  font-size: 0;
}

.photo-frame img { width: 100%; height: auto; }

.groupbox {
  flex: 1;
  min-width: 0;
  border: 1px solid #7c7c7c;
  box-shadow: inset 1px 1px 0 0 #fff, 1px 1px 0 0 #fff;
  padding: 14px 12px 16px;
}

.groupbox legend {
  font: 16px/1 var(--f-px);
  text-transform: capitalize;
  padding: 0 4px;
}

.contacts { display: flex; flex-direction: column; gap: 15px; }

.contacts__row {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}

.contacts__label {
  font: 16px/1 var(--f-px);
  text-transform: capitalize;
  white-space: nowrap;
}

.contacts__row .field { width: min(246px, 70%); flex: none; }

/* Notepad window */

.win--notepad { width: min(692px, 100%); }

.notepad__canvas {
  position: relative;
  min-height: 342px;
  padding: 14px 56px 56px 40px;
  font: 20px/1.3 var(--f-tre);
}

.notepad__header {
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  margin-bottom: 26px;
}

.notepad__text p { margin-bottom: 1.3em; }
.notepad__text p:last-child { margin-bottom: 0; }

.cv-link {
  color: var(--blue);
  text-underline-offset: 3px;
}

/* Paint window */

.win--paint { width: min(838px, 100%); }

.paint__body { display: flex; gap: 4px; }

.paint__toolbar {
  flex: none;
  width: 73px;
  height: 295px;
  overflow: hidden;
  position: relative;
}

.paint__toolbar img {
  position: absolute;
  width: 553.85%;
  height: 199.93%;
  max-width: none;
  left: -17.97%;
  top: -21.64%;
}

.paint__stage { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }

.paint__canvas {
  position: relative;
  aspect-ratio: 739 / 524;
  overflow: hidden;
}

.doodle {
  position: absolute;
  overflow: hidden;
  transform: rotate(180deg) scaleY(-1);
}

.doodle img { position: absolute; max-width: none; }

.doodle--mark {
  width: 49.3%;
  aspect-ratio: 364 / 318;
  left: 40.5%;
  top: 40.5%;
}

.doodle--mark img {
  width: 193.19%;
  height: 221.08%;
  left: -48.99%;
  top: -73.11%;
}

.doodle--wow {
  width: 33.8%;
  aspect-ratio: 250 / 117;
  left: 57.5%;
  top: 7%;
}

.doodle--wow img {
  width: 281.28%;
  height: 600.89%;
  left: -57.73%;
  top: -53.4%;
}

.paint__palette {
  width: min(411px, 100%);
  height: 51px;
  overflow: hidden;
  position: relative;
  margin-bottom: 2px;
}

.paint__palette img {
  position: absolute;
  width: 108.76%;
  height: 1269.22%;
  max-width: none;
  left: -1.95%;
  top: -1051.68%;
}

/* ---------- Tools ---------- */

.tools {
  background: var(--blue);
  margin-top: clamp(40px, 6vw, 116px);
  padding: clamp(32px, 4vw, 59px) 16px clamp(80px, 11vw, 214px);
}

.tools-title {
  position: relative;
  width: fit-content;
  margin: 0 auto 0 max(16px, calc(50% - 631px));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: clamp(38px, 6.4vw, 93px);
  line-height: 0.989;
  letter-spacing: -0.03em;
  color: var(--blue);
  text-transform: uppercase;
  font-family: var(--f-ui);
  font-weight: 700;
}

.tools-title__line { position: relative; background: #fff; padding: 0.02em 0.18em; }

.tools-title__line:first-of-type { padding-right: 1.88em; }

.tools-title__line:last-of-type > span { position: relative; z-index: 2; }

.tools-title__amp {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: -0.16em;
  width: 0.68em;
  background: #fff;
  color: #fff;
  font-family: var(--f-jersey);
  font-size: 2.5em;
  font-weight: 400;
  line-height: 0.72;
  letter-spacing: 0;
  text-align: center;
  -webkit-text-stroke: 0.024em var(--ink);
  paint-order: stroke fill;
}

.panels {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  align-items: stretch;
  justify-content: center;
  max-width: 1262px;
  margin: clamp(48px, 6vw, 118px) auto 0;
}

.panel {
  width: min(611px, 100%);
  min-height: 345px;
  display: flex;
  flex-direction: column;
}

.panel__heading {
  font: 400 36px/1 var(--f-tre);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 24px 0 0 38px;
}

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-content: flex-start;
  margin: 22px 38px 30px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: var(--chrome);
  font: 23px/1 var(--f-px);
  text-transform: capitalize;
  color: var(--ink);
  box-shadow:
    inset 4.5px 4.5px 0 0 #fff,
    inset -4.5px -4.5px 0 0 var(--chrome-dark);
  filter: drop-shadow(0 5px 2.5px rgba(0, 0, 0, 0.15)) drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.95));
}

.chip img { image-rendering: pixelated; flex: none; }

/* ---------- Experience ---------- */

.experience { position: relative; overflow-x: clip; }

.hill {
  width: min(1285px, 100%);
  height: clamp(180px, 22vw, 422px);
  margin-left: auto;
  background: url('/assets/bg-hill.webp') center 62% / cover no-repeat;
}

.xp-title {
  position: relative;
  margin: clamp(-240px, -12vw, -100px) 0 0 clamp(16px, calc(50% - 64px), calc(100% - 299px));
  width: fit-content;
  display: flex;
  align-items: center;
  font-size: clamp(38px, 6.4vw, 93px);
  line-height: 0.82;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.xp-title__pixel {
  font-size: 2.41em;
  line-height: 0.82;
  background: #fff;
  padding: 0 0.03em;
}

.xp-title__solid {
  color: var(--blue);
  font-weight: 700;
  font-family: var(--f-ui);
  background: #fff;
  padding: 0.12em 0.15em 0.1em 0.05em;
}

.total {
  display: flex;
  gap: 21px;
  align-items: flex-start;
  width: fit-content;
  margin: clamp(48px, 8vw, 114px) auto 0 clamp(16px, calc(50% - 44px), calc(100% - 324px));
  font: 700 clamp(34px, 4.6vw, 67px)/0.989 var(--f-ui);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--blue);
}

.jobs {
  max-width: var(--content-w);
  margin: clamp(60px, 9vw, 190px) auto 0;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: clamp(70px, 9vw, 170px);
}

.job {
  display: flex;
  justify-content: space-between;
  gap: 40px;
}

.job__dates {
  font: 700 clamp(40px, 6.2vw, 90px)/0.989 var(--f-ui);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--blue);
  white-space: nowrap;
  flex: none;
}

.job__body {
  position: relative;
  width: min(937px, 100%);
  border-top: 8px solid var(--blue);
  padding-top: 45px;
  display: grid;
  grid-template-columns: minmax(280px, 402px) minmax(300px, 489px);
  justify-content: space-between;
  gap: 30px 45px;
}

.job__head {
  display: flex;
  flex-direction: column;
  gap: 15px;
  font: 700 28px/1.25 var(--f-tre);
  text-transform: uppercase;
  letter-spacing: 0;
}

.job__desc { font: 22px/1.3 var(--f-tre); grid-column: 2; grid-row: 1 / span 2; }

.job__desc p { margin-bottom: 1.3em; }
.job__desc p:last-child { margin-bottom: 0; }

.job__desc code { font-family: var(--f-px); font-size: 0.92em; }

.job__stack {
  grid-column: 2;
  font: 22px/1.3 var(--f-tre);
}

.job__stack strong {
  display: block;
  text-transform: uppercase;
  margin-bottom: 1.3em;
}

/* ---------- Contact ---------- */

.contact {
  background: var(--blue);
  margin-top: clamp(60px, 8vw, 170px);
  padding: clamp(60px, 12vw, 237px) 16px max(40px, 16%);
}

.cform {
  position: relative;
  z-index: 1;
  max-width: var(--content-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(36px, 4.5vw, 66px);
}

.cform__line {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 25px;
  row-gap: 36px;
}

.cform__line--split { justify-content: space-between; }

.cform__cluster {
  display: flex;
  align-items: flex-end;
  gap: 25px;
  flex: 1 1 auto;
  min-width: 0;
}

.cform__cluster .cform__input { flex: 0 1 var(--w, 300px); }

.cform__label {
  font: clamp(26px, 3.3vw, 48px)/0.989 var(--f-ui);
  letter-spacing: -0.03em;
  color: #fff;
  white-space: nowrap;
}

.cform__input {
  background: transparent;
  border: 0;
  border-bottom: 1.8px solid #fff;
  border-radius: 0;
  width: min(var(--w, 300px), 100%);
  padding: 0 2px 6px;
  font: clamp(22px, 2.5vw, 36px)/0.989 var(--f-ui);
  letter-spacing: -0.03em;
  color: #fff;
}

.cform__input--wide { flex: 1; min-width: min(280px, 100%); }

.cform__input::placeholder { color: rgba(255, 255, 255, 0.75); opacity: 1; }

.cform__input:focus-visible { outline: 1px dotted #fff; outline-offset: 6px; }

.cform__input[aria-invalid="true"] { border-bottom: 2px dashed #ffb8b8; }

.pills { display: flex; flex-wrap: wrap; gap: 20px; }

.pill {
  border: 1.8px solid #fff;
  background: transparent;
  color: #fff;
  font: clamp(20px, 2.5vw, 36px)/0.989 var(--f-ui);
  letter-spacing: -0.03em;
  padding: clamp(14px, 1.7vw, 24px) clamp(28px, 3.7vw, 54px);
  cursor: pointer;
  white-space: nowrap;
}

.pill:focus-visible { outline: 1px dotted #fff; outline-offset: 4px; }

.pill--active, .pill[aria-pressed='true'] {
  background: #fff;
  color: var(--blue);
}

.cform__submit {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(10px, 2vw, 40px);
}

.send {
  border: 0;
  background: var(--chrome);
  padding: 21px 29px;
  font: clamp(32px, 3.8vw, 55px)/1 var(--f-px);
  text-transform: capitalize;
  color: var(--ink);
  cursor: pointer;
  box-shadow:
    inset 8px 8px 0 0 #fff,
    inset -8px -8px 0 0 var(--chrome-dark);
  filter: drop-shadow(0 9px 4.5px rgba(0, 0, 0, 0.15)) drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.95));
}

.send:active {
  box-shadow:
    inset 8px 8px 0 0 var(--chrome-dark),
    inset -8px -8px 0 0 #fff;
}

.send:disabled { opacity: 0.7; cursor: wait; }

.send:focus-visible { outline: 2px dotted var(--ink); outline-offset: -14px; }

.send-cursor {
  margin-top: 30px;
  image-rendering: pixelated;
  width: clamp(80px, 10vw, 156px);
  height: auto;
}

/* ---------- Crowd ---------- */

.crowd {
  position: relative;
  display: flex;
  justify-content: center;
  overflow: hidden;
  margin-top: -17%;
  background: linear-gradient(to bottom, var(--blue) 49.1%, #fff 49.1%);
  pointer-events: none;
}

.crowd img { flex: none; width: max(100%, 760px); max-width: none; height: auto; }

/* ---------- Message box ---------- */

.msgbox {
  position: fixed;
  inset: 0;
  margin: auto;
  border: 0;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  min-width: min(420px, 90vw);
  padding: 10px;
}

.msgbox::backdrop { background: rgba(15, 15, 15, 0.35); }

.msgbox__text {
  font: 18px/1.4 var(--f-px);
  padding: 26px 18px 8px;
}

.msgbox__actions { display: flex; justify-content: center; padding: 18px 0 10px; }

.msgbox__ok {
  border: 0;
  cursor: pointer;
  font-size: 18px;
  padding: 8px 40px;
}

.btn95--close[id] { cursor: pointer; border: 0; padding: 0; }

/* ---------- Mobile ---------- */

@media (max-width: 940px) {
  .job { flex-direction: column; gap: 24px; }
  .job__body { grid-template-columns: 1fr; width: 100%; }
  .job__desc { grid-column: 1; grid-row: auto; }
  .job__stack { grid-column: 1; }
}

@media (max-width: 760px) {
  .tabpanel { flex-direction: column; align-items: center; }
  .photo-frame { width: min(235px, 80%); }
  .contacts { width: 100%; }
  .contacts__row { justify-content: flex-start; flex-wrap: wrap; }
  .contacts__row .field { width: 100%; }
  .notepad__canvas { padding: 14px 40px 46px 18px; font-size: 17px; }
  .notepad__header { font-size: 15px; }
  .paint__toolbar { width: 52px; height: 210px; }
  .menubar { gap: 12px; font-size: 14px; }
  .titlebar__text { font-size: 16px; }
  .job__head { font-size: 22px; }
  .job__desc, .job__stack { font-size: 18px; }
  .panel__heading { margin-left: 22px; }
  .chips { margin: 18px 22px 24px; }
  .chip { font-size: 19px; padding: 10px 12px; }
  .chip img { width: 22px; height: 22px; }
  .cform__line--split { justify-content: flex-start; }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  html.js [data-anim] { opacity: 0; }
  html.js [data-anim='win'] { transform: scale(0.72); }
  html.js [data-anim='pop'] { transform: scale(0.6); }
  html.js [data-anim='chip'] { transform: scale(0); }
  html.js [data-anim='slide'] { transform: translateX(-48px); }
  html.js [data-anim='rise'] { transform: translateY(46px); }
  html.js [data-anim='drag'] { transform: translate(var(--dx, -64px), 72px); }
  html.js .crowd[data-anim] { will-change: transform, opacity; }

  html.js [data-anim].in {
    opacity: 1;
    transform: none;
    transition:
      opacity 0.3s ease-out var(--d, 0ms),
      transform 0.45s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0ms);
  }

  html.js .welcome { opacity: 0; transform: scale(0.6); }
  html.js .hero-title span { opacity: 0; transform: translateY(0.4em); }

  html.js.loaded .welcome,
  html.js.loaded .hero-title span {
    opacity: 1;
    transform: none;
    transition:
      opacity 0.32s ease-out var(--d, 0ms),
      transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0ms);
  }

  html.js .win--paint .doodle { clip-path: inset(0 100% 0 0); }
  html.js .win--paint.in .doodle--wow { clip-path: inset(0); transition: clip-path 0.5s steps(8) 0.5s; }
  html.js .win--paint.in .doodle--mark { clip-path: inset(0); transition: clip-path 1.1s steps(14) 0.95s; }

  .send-cursor { animation: cursor-nudge 1.1s steps(2) infinite; }
}

@keyframes cursor-nudge {
  50% { transform: translateY(-12px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
