/*
+------------------------------------------------------+
|  MODULE:   ALEXANDRUBOGDAN.DEV / INDEX               |
|  STATUS:   DEV                                       |
|  LOADS:    / (index.html only)                       |
|  CONTAINS: ID-card hero, hello card, marquee, flip   |
|            build cards, education, stack,            |
|            experience, contact                       |
|  STYLE:    Mobile-first. Breakpoints: 40rem, 56rem.  |
+------------------------------------------------------+
*/

/* +------------------------------------------------------+ */
/* |  SECTION: HERO ROW (ID card + hello world)           | */
/* +------------------------------------------------------+ */
.row-id {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.375rem;
  align-items: stretch;
}

.idcard {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding: 1.375rem;
  border-radius: 1.125rem;
}

.polar {
  position: relative;
  border-radius: 0.5rem;
  background: linear-gradient(150deg, #c9c4ba 0%, #8d887e 55%, #45413a 100%);
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  max-width: 15rem;
  margin: 0 auto;
}

.polar img {
  width: calc(100% + 2rem);
  max-width: none;
  height: auto;
  display: block;
  margin: -1.75rem -1rem 0;
  filter: grayscale(1) contrast(1.05);
  border: 0.5rem solid #fdfaf2;
  border-bottom-width: 1.625rem;
  transform: rotate(-2deg);
  box-shadow: 0.25rem 0.375rem 0.875rem rgba(0, 0, 0, 0.4);
}

.polar .clip {
  position: absolute;
  top: -2.5rem;
  left: 0.25rem;
  transform: rotate(-6deg);
  width: 2.5rem;
  height: auto;
  z-index: 2;
}

.idcard h1 {
  font-family: var(--disp);
  font-weight: 700;
  font-size: clamp(2.6rem, 5.5vw, 3.6rem);
  line-height: 0.9;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.idcard h1 svg.smile {
  width: 2rem;
  height: 2rem;
  transform: rotate(8deg);
  flex: none;
  margin-top: 0.25rem;
}

.idcard .bio {
  font-size: 0.6875rem;
  color: #4a443b;
  max-width: 52ch;
  margin: 0.375rem 0 0.625rem;
}

.idtable {
  border: 0.125rem solid var(--line);
}

.idtable > div {
  display: grid;
  grid-template-columns: 8rem 1fr;
  border-bottom: 0.0625rem solid var(--line);
}

.idtable > div:last-child {
  border-bottom: 0;
}

.idtable dt {
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.4375rem 0.625rem;
  border-right: 0.0625rem solid var(--line);
  background: var(--paper-2);
}

.idtable dd {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.375rem 0.625rem;
}

.idtable dd .on {
  display: none;
  background: var(--green);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.125rem 0.4375rem;
  margin-right: 0.375rem;
  transform: rotate(-1deg);
}

.handles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.625rem 1.25rem;
  margin-top: 0.875rem;
}

.handles a {
  display: inline-flex;
  align-items: center;
  gap: 0.5625rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  min-width: 0;
}

.handles a .txt {
  border-bottom: 0.125rem solid var(--line);
  padding-bottom: 0.0625rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.handles a:hover .txt {
  background: var(--yellow);
}

.handles .ibox {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.4375rem;
  flex: none;
  background: var(--ink);
  color: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.handles .ibox svg {
  width: 1rem;
  height: 1rem;
}

.hello {
  padding: 0.875rem;
  display: none;
}

.hello .crt {
  flex: 1;
  background: #191713;
  border-radius: 0.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.25rem 1rem;
  min-height: 15rem;
}

.hello .monitor {
  width: min(100%, 15rem);
  background: linear-gradient(160deg, #cfcabf 0%, #a8a296 55%, #7d786c 100%);
  border-radius: 0.625rem;
  padding: 0.875rem 0.875rem 0.75rem;
  box-shadow: 0 0.375rem 1rem rgba(0, 0, 0, 0.5);
}

.hello .screen {
  position: relative;
  background: #101410;
  border-radius: 0.5rem;
  border: 0.1875rem solid #55514a;
  padding: 1.125rem 0.875rem;
  overflow: hidden;
}

.hello .screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 2px, rgba(53, 224, 124, 0.07) 3px, rgba(0, 0, 0, 0) 4px);
}

.hello h2 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #35e07c;
  text-shadow: 0 0 0.5rem rgba(53, 224, 124, 0.65);
  margin: 0;
}

.hello h2 .cursor {
  display: inline-block;
  width: 0.3em;
  height: 1em;
  background: #35e07c;
  box-shadow: 0 0 0.5rem rgba(53, 224, 124, 0.65);
  vertical-align: -0.1em;
  margin-left: 0.2em;
  animation: blink 1.06s steps(1) infinite;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.hello .vents {
  margin-top: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.hello .vents::before {
  content: "";
  width: 3rem;
  height: 0.375rem;
  background: repeating-linear-gradient(to right, #6f6a5f 0 0.3rem, rgba(0, 0, 0, 0) 0.3rem 0.6rem);
}

.hello .vents::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #35e07c;
  box-shadow: 0 0 0.4rem rgba(53, 224, 124, 0.8);
}

.hello .base {
  width: min(80%, 12rem);
  height: 1.375rem;
  background: linear-gradient(160deg, #b5b0a5, #8d887e);
  border-radius: 0.25rem;
  box-shadow: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.5rem;
}

.hello .base span:first-child {
  flex: 1;
  height: 0.25rem;
  background: #55514a;
  border-radius: 0.125rem;
}

.hello .base span:last-child {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: #d94f38;
}

.hello3d {
  position: relative;
  cursor: pointer;
}

html.settled .hello3d.drop.tilt-r {
  transition: transform 0.4s ease;
  transition-delay: 0s;
}

html.ready .hello3d.drop.tilt-r:hover {
  transform: rotate(0.45deg) scale(1.04);
  transition: transform 0.4s ease;
  transition-delay: 0s;
}

.hello3d .flip3d {
  flex: 1;
  position: relative;
}

.face3d--crt {
  display: flex;
}

.face3d--crt .crt {
  flex: 1;
}

.face3d--gh {
  display: flex;
  opacity: 0;
  visibility: hidden;
}

.hello3d.is-flipped .face3d--gh {
  opacity: 1;
  visibility: visible;
}

.hello3d.is-flipped .face3d--crt {
  opacity: 0;
  visibility: hidden;
}

/* one-shot signal-corruption swap: jolt the whole card content,
   slice bars and scanlines on top, faces switch mid-burst via JS */
.hello3d.glitching .flip3d {
  animation: glitch-jolt 0.55s steps(1) both;
}

.hello3d.glitching .flip3d::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(rgba(53, 224, 124, 0.3), rgba(53, 224, 124, 0.3)) 0 18% / 100% 0.375rem no-repeat,
    linear-gradient(rgba(217, 79, 56, 0.34), rgba(217, 79, 56, 0.34)) 0 42% / 100% 0.25rem no-repeat,
    linear-gradient(rgba(240, 196, 55, 0.32), rgba(240, 196, 55, 0.32)) 0 64% / 100% 0.5rem no-repeat,
    linear-gradient(rgba(240, 232, 214, 0.24), rgba(240, 232, 214, 0.24)) 0 81% / 100% 0.1875rem no-repeat;
  animation: glitch-bars 0.55s steps(1) both;
}

.hello3d.glitching .flip3d::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(19, 17, 16, 0.5) 0 0.125rem,
    transparent 0.125rem 0.25rem
  );
  animation: glitch-flicker 0.55s steps(1) both;
}

@keyframes glitch-jolt {
  0% {
    transform: none;
    filter: none;
  }
  9% {
    transform: translate(-0.3125rem, 0.125rem);
    filter: drop-shadow(0.3125rem 0 rgba(217, 79, 56, 0.85))
      drop-shadow(-0.3125rem 0 rgba(53, 224, 124, 0.85));
  }
  18% {
    transform: translate(0.375rem, -0.0625rem) skewX(-1.5deg);
    filter: none;
  }
  27% {
    transform: translate(-0.5rem, 0) scaleY(1.05);
    filter: drop-shadow(-0.4375rem 0 rgba(53, 224, 124, 0.9))
      drop-shadow(0.4375rem 0 rgba(240, 196, 55, 0.75));
  }
  36% {
    transform: translate(0.25rem, 0.1875rem) skewX(2deg);
  }
  45% {
    transform: translate(-0.1875rem, -0.125rem);
    filter: drop-shadow(0.25rem 0 rgba(217, 79, 56, 0.8))
      drop-shadow(-0.25rem 0 rgba(240, 232, 214, 0.6));
  }
  60% {
    transform: translate(0.3125rem, 0.0625rem) scaleY(0.97);
    filter: none;
  }
  75% {
    transform: translate(-0.125rem, 0);
    filter: drop-shadow(-0.1875rem 0 rgba(53, 224, 124, 0.7));
  }
  88% {
    transform: translate(0.0625rem, 0);
    filter: none;
  }
  100% {
    transform: none;
    filter: none;
  }
}

@keyframes glitch-bars {
  0% {
    opacity: 0;
  }
  10% {
    opacity: 1;
    background-position: -1.25rem 12%, 1.875rem 48%, -0.625rem 70%, 0.9375rem 88%;
  }
  25% {
    background-position: 1.375rem 30%, -2.125rem 8%, 0.75rem 55%, -1.25rem 76%;
  }
  40% {
    background-position: -1.875rem 60%, 1.125rem 22%, -0.9375rem 38%, 1.75rem 14%;
  }
  55% {
    background-position: 0.75rem 80%, -1.375rem 66%, 1.875rem 10%, -0.75rem 45%;
  }
  70% {
    background-position: -0.9375rem 25%, 0.625rem 85%, -1.5625rem 62%, 1.125rem 33%;
  }
  85% {
    opacity: 1;
    background-position: 0.5rem 50%, -0.75rem 35%, 1.25rem 75%, -0.5rem 20%;
  }
  100% {
    opacity: 0;
  }
}

@keyframes glitch-flicker {
  0% {
    opacity: 0;
  }
  10% {
    opacity: 0.9;
    transform: translateY(0);
  }
  30% {
    opacity: 0.4;
    transform: translateY(0.125rem);
  }
  50% {
    opacity: 0.85;
    transform: translateY(-0.1875rem);
  }
  70% {
    opacity: 0.35;
    transform: translateY(0.0625rem);
  }
  90% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
  }
}

/* one-shot restore back to the CRT: scanlined phosphor cover with a
   boot log counting up, a segmented progress bar over a dim track,
   then a scan beam sweeps the CRT back in (faces switch via JS) */
.hello3d.restoring .flip3d::before {
  content: "> SYS.RESTORE INIT\00000a> MODULE: HELLO_WORLD";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  padding: 1.25rem 1.5rem;
  white-space: pre-line;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(53, 224, 124, 0.09), transparent 70%),
    repeating-linear-gradient(
      0deg,
      rgba(53, 224, 124, 0.06) 0 0.125rem,
      transparent 0.125rem 0.25rem
    ),
    #131110;
  color: #35e07c;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.625rem;
  line-height: 1.8;
  letter-spacing: 0.12em;
  text-shadow: 0 0 0.5rem rgba(53, 224, 124, 0.65);
  animation: restore-cover 0.82s steps(1) both;
}

.hello3d.restoring .flip3d::after {
  content: "";
  position: absolute;
  z-index: 4;
  pointer-events: none;
  left: 12%;
  right: 12%;
  top: 55%;
  height: 1rem;
  border: 0.0938rem solid #35e07c;
  padding: 0.1875rem;
  box-shadow: 0 0 0.75rem rgba(53, 224, 124, 0.3);
  background:
    repeating-linear-gradient(90deg, #35e07c 0 0.3125rem, transparent 0.3125rem 0.4375rem)
      left center / 0% 100% no-repeat content-box,
    repeating-linear-gradient(
        90deg,
        rgba(53, 224, 124, 0.18) 0 0.3125rem,
        transparent 0.3125rem 0.4375rem
      )
      left center / 100% 100% no-repeat content-box;
  animation: restore-bar 0.82s both;
}

/* held state after the load: the log text and bar fade away, the
   seam line draws itself top to bottom, then a pixel agent coding
   (staggered type-loop lines, Alex-approved) and the CLICK TO
   OPEN tag fade in centered; everything rides the door phase out */
.hello3d.restoring.hold .flip3d::before {
  color: transparent;
  text-shadow: none;
  transition:
    color 0.6s ease 0.1s,
    text-shadow 0.6s ease 0.1s;
}

.hello3d.restoring.hold .flip3d::after {
  background-size:
    100% 100%,
    100% 100%;
  animation: fade-out 0.55s ease 0.1s both;
}

.holdstack {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
}

.hello3d.restoring.hold .holdstack {
  display: flex;
}

.hello3d.restoring.hold:not(.is-flipped) .holdstack {
  animation: fade-out 0.55s ease 0.1s both;
}

.agentbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 11rem;
  padding: 0.625rem 0.75rem;
  background: #131110;
  border: 0.0625rem solid rgba(53, 224, 124, 0.5);
  box-shadow: 0 0 0.75rem rgba(53, 224, 124, 0.3);
  color: #35e07c;
}

.hello3d.restoring.hold .agentbox {
  animation: fade-in 0.45s ease 0.6s both;
}

.opentag {
  margin: 0;
  padding: 0.375rem 0.625rem;
  background: #131110;
  border: 0.0625rem solid rgba(53, 224, 124, 0.5);
  color: #35e07c;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  white-space: nowrap;
  text-shadow: 0 0 0.5rem rgba(53, 224, 124, 0.65);
}

.hello3d.restoring.hold .opentag {
  animation: fade-in 0.45s ease 0.75s both;
}

.agentbox .agentfig {
  width: 3rem;
  height: auto;
  flex: none;
  filter: drop-shadow(0 0 0.375rem rgba(53, 224, 124, 0.5));
}

.agentcode {
  flex: 1;
}

.agentcode span {
  display: block;
  height: 0.25rem;
  margin: 0.375rem 0;
  background: #35e07c;
  box-shadow: 0 0 0.375rem rgba(53, 224, 124, 0.6);
  transform-origin: 0 50%;
  animation: code-type 0.45s ease-out both;
}

.agentcode span:nth-child(1) {
  width: 80%;
}

.agentcode span:nth-child(2) {
  width: 55%;
  animation-delay: 0.5s;
}

.agentcode span:nth-child(3) {
  width: 70%;
  animation-delay: 1s;
}

.agentcode span:nth-child(4) {
  width: 45%;
  animation-delay: 1.5s;
}

@keyframes code-type {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}

.agentquote {
  width: 13rem;
  margin: 0;
  padding: 0.5rem 0.75rem;
  background: #131110;
  border: 0.0625rem solid rgba(53, 224, 124, 0.5);
  box-shadow: 0 0 0.75rem rgba(53, 224, 124, 0.3);
  text-align: center;
  color: #35e07c;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.6875rem;
  line-height: 1.6;
  letter-spacing: 0.04em;
  text-shadow: 0 0 0.5rem rgba(53, 224, 124, 0.55);
}

.hello3d.restoring.hold .agentquote {
  animation: fade-in 0.5s ease 2.1s both;
}

.agentquote .qa {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.5625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
}

.hello3d.restoring.hold .face3d--gh::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 0.1875rem;
  margin-left: -0.0938rem;
  z-index: 5;
  pointer-events: none;
  background: #35e07c;
  box-shadow: 0 0 0.75rem rgba(53, 224, 124, 0.8);
  transform-origin: 50% 0;
  animation: seam-draw 0.7s ease-in-out 0.35s both;
}

@keyframes seam-draw {
  0% {
    transform: scaleY(0);
  }
  100% {
    transform: scaleY(1);
  }
}

@keyframes fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes fade-out {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* phase 2: the doors live on the CRT face's pseudos and part from
   the center outward; the cover keeps only the log text, which
   fades while the two seam lines ride the doors to the sides */
.hello3d.restoring:not(.is-flipped) .flip3d::before {
  background: transparent;
  color: transparent;
  text-shadow: none;
  transition:
    color 0.55s ease 0.1s,
    text-shadow 0.55s ease 0.1s;
}

.hello3d.restoring:not(.is-flipped) .flip3d::after {
  background-size:
    100% 100%,
    100% 100%;
  animation: fade-out 0.55s ease 0.1s both;
}

.hello3d.restoring:not(.is-flipped) .face3d--crt::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 50%;
  z-index: 1;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(53, 224, 124, 0.06) 0 0.125rem,
      transparent 0.125rem 0.25rem
    ),
    #131110;
  border-right: 0.0625rem solid rgba(53, 224, 124, 0.45);
  filter: blur(1px);
  animation: door-open 0.7s ease-in-out both;
}

.hello3d.restoring:not(.is-flipped) .face3d--crt::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 50%;
  z-index: 1;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(53, 224, 124, 0.06) 0 0.125rem,
      transparent 0.125rem 0.25rem
    ),
    #131110;
  border-left: 0.0625rem solid rgba(53, 224, 124, 0.45);
  filter: blur(1px);
  animation: door-open 0.7s ease-in-out both;
}

.hello3d.restoring:not(.is-flipped) .face3d--crt {
  animation: crt-warm 0.7s ease-out both;
}

@keyframes restore-cover {
  0% {
    opacity: 1;
    content: "> SYS.RESTORE INIT\00000a> MODULE: HELLO_WORLD";
  }
  15% {
    content: "> SYS.RESTORE INIT\00000a> MODULE: HELLO_WORLD\00000a> LOADING 014%";
  }
  30% {
    content: "> SYS.RESTORE INIT\00000a> MODULE: HELLO_WORLD\00000a> LOADING 037%";
  }
  45% {
    content: "> SYS.RESTORE INIT\00000a> MODULE: HELLO_WORLD\00000a> LOADING 052%";
  }
  60% {
    content: "> SYS.RESTORE INIT\00000a> MODULE: HELLO_WORLD\00000a> LOADING 071%";
  }
  75% {
    content: "> SYS.RESTORE INIT\00000a> MODULE: HELLO_WORLD\00000a> LOADING 088%";
  }
  90% {
    content: "> SYS.RESTORE INIT\00000a> MODULE: HELLO_WORLD\00000a> LOADING 100%\00000a> OK";
  }
  100% {
    opacity: 1;
    content: "> SYS.RESTORE INIT\00000a> MODULE: HELLO_WORLD\00000a> LOADING 100%\00000a> OK";
  }
}

@keyframes restore-bar {
  0% {
    background-size:
      0% 100%,
      100% 100%;
    opacity: 1;
    animation-timing-function: steps(14, end);
  }
  100% {
    background-size:
      100% 100%,
      100% 100%;
    opacity: 1;
  }
}

@keyframes door-open {
  0% {
    width: 50%;
  }
  100% {
    width: 0%;
  }
}

@keyframes crt-warm {
  0% {
    filter: brightness(1.25);
  }
  100% {
    filter: none;
  }
}

.ghpanel {
  flex: 1;
  background: #191713;
  border-radius: 0.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.125rem;
  padding: 1.25rem 1.5rem;
}

.ghtitle {
  margin: 0;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8f8a7d;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ghtitle::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #35e07c;
  box-shadow: 0 0 0.4rem rgba(53, 224, 124, 0.8);
}

.ghstats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ghstats li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--yellow);
  text-shadow: 0 0 0.5rem rgba(240, 196, 55, 0.4);
}

.ghstats .ghicon {
  flex: none;
  display: flex;
  width: 1.375rem;
  height: 1.375rem;
}

.ghstats .ghicon svg {
  width: 100%;
  height: 100%;
}

/* +------------------------------------------------------+ */
/* |  SECTION: BUILDS (flip cards)                        | */
/* +------------------------------------------------------+ */
.builds h2 {
  color: var(--ink);
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.125rem;
}

.pcard {
  position: relative;
  cursor: pointer;
  min-height: 13.5rem;
  border: 0.125rem solid var(--line);
  border-radius: 0.25rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0.25rem 0.25rem 0 rgba(0, 0, 0, 0.35);
  transition: transform 0.2s var(--pop), box-shadow 0.2s ease;
}

.pcard--c1 { background: var(--yellow); }
.pcard--c2 { background: var(--orange); color: var(--paper); }
.pcard--c3 { background: var(--green); color: var(--paper); }
.pcard--c4 { background: var(--paper-2); }

.pcard:hover {
  transform: translateY(-0.25rem);
  box-shadow: 0.375rem 0.375rem 0 rgba(0, 0, 0, 0.4);
}

.pcard .year {
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.pcard h3 {
  font-family: var(--disp);
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-top: 0.375rem;
}

.pcard .pix {
  align-self: flex-end;
  width: 4.5rem;
  height: auto;
}

.pcard .flipme {
  font-family: var(--mono);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* +------------------------------------------------------+ */
/* |  SECTION: BUILD DETAIL MODAL                         | */
/* +------------------------------------------------------+ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal[hidden] {
  display: none;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 6, 0.72);
}

.modal__card {
  position: relative;
  background: var(--paper);
  border: 0.125rem solid var(--line);
  border-radius: 0.5rem;
  box-shadow: 0.5rem 0.5rem 0 rgba(0, 0, 0, 0.5);
  max-width: 46rem;
  width: 100%;
  max-height: 88vh;
  overflow: auto;
  animation: pop 0.3s var(--pop);
}

@keyframes pop {
  from {
    transform: translateY(1.25rem) scale(0.96);
    opacity: 0;
  }
}

.modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.125rem;
  border-bottom: 0.125rem solid var(--line);
  border-radius: 0.375rem 0.375rem 0 0;
  background: var(--paper-2);
}

.modal--c1 .modal__head { background: var(--yellow); }
.modal--c2 .modal__head { background: var(--orange); }
.modal--c3 .modal__head { background: var(--green); }
.modal--c4 .modal__head { background: var(--paper-2); }

.modal__year {
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink);
  text-transform: uppercase;
  background: var(--paper);
  border: 0.125rem solid var(--line);
  border-radius: 0.25rem;
  padding: 0.3125rem 0.625rem;
  transform: rotate(-1.2deg);
}

.modal__close {
  background: var(--ink);
  color: var(--paper);
  border: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
  transition: background 150ms ease, transform 200ms ease;
}

.modal__close:hover {
  background: var(--red);
  transform: rotate(90deg);
}

.modal__close svg {
  width: 0.875rem;
  height: 0.875rem;
}

.modal__body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.125rem;
  padding: 1.125rem;
}

.modal__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #faf4e2;
  border: 0.125rem solid var(--line);
  border-radius: 0.375rem;
  padding: 1rem 1.125rem 1.125rem;
  box-shadow: 0.25rem 0.25rem 0 rgba(19, 17, 16, 0.18);
}

.modal__card h3 {
  font-family: var(--disp);
  font-weight: 700;
  font-size: 1.625rem;
  line-height: 1.05;
  margin: 0 0 0.875rem;
}

.modal__poster {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 10rem;
  margin-bottom: 1rem;
  border: 0.125rem solid var(--line);
  border-radius: 0.25rem;
  background-color: var(--paper-2);
  background-image: radial-gradient(rgba(19, 17, 16, 0.2) 0.0625rem, transparent 0.09375rem);
  background-size: 0.5rem 0.5rem;
  transform: rotate(-0.5deg);
}

.modal--c1 .modal__poster { background-color: var(--yellow); }
.modal--c2 .modal__poster { background-color: var(--orange); }
.modal--c3 .modal__poster { background-color: var(--green); }
.modal--c4 .modal__poster { background-color: var(--red); }

.modal__poster svg {
  width: 9rem;
  height: auto;
}

.modal__slug {
  position: absolute;
  left: 0.625rem;
  bottom: 0.4375rem;
  font-family: var(--mono);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.75;
}

.modal__intro p {
  font-size: 0.9375rem;
  margin: 0;
}

.modal__actions {
  margin-top: auto;
  padding-top: 1rem;
}

.modal__actions[hidden] {
  display: none;
}

.modal__actions .go {
  margin: 0;
}

.modal__actions .go + .go {
  margin-top: 0.5rem;
}

.modal__actions .go a {
  display: block;
  text-align: center;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-radius: 0.25rem;
  text-decoration: none;
  box-shadow: 0.25rem 0.25rem 0 rgba(19, 17, 16, 0.25);
}

.modal__actions .go a:hover {
  background: var(--red);
}

.modal__actions .go span {
  display: block;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border: 0.125rem dashed var(--ink);
  border-radius: 0.25rem;
  color: var(--ink);
}

.modal__rail {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.modal__box {
  background: #faf4e2;
  border: 0.125rem solid var(--line);
  border-radius: 0.375rem;
  padding: 0.875rem 1rem 1rem;
  box-shadow: 0.25rem 0.25rem 0 rgba(19, 17, 16, 0.18);
}

.modal__box--inside {
  transform: rotate(0.5deg);
}

.modal__box--spec {
  transform: rotate(-0.4deg);
  flex: 1;
}

.modal__label {
  display: block;
  font-family: var(--mono);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6b6459;
  padding-bottom: 0.4375rem;
  margin-bottom: 0.75rem;
  border-bottom: 0.0625rem solid rgba(19, 17, 16, 0.25);
}

.modal__box .feats {
  list-style: none;
  display: grid;
  gap: 0.5625rem;
}

.modal__box .feats li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.8125rem;
}

.modal__box .feats li::before {
  content: "✱";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--red);
  font-family: var(--mono);
  font-weight: 700;
}

.modal__box .spec {
  border: 0.125rem solid var(--line);
  border-radius: 0.25rem;
  background: var(--paper);
  overflow: hidden;
}

.modal__box .spec > div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.4375rem 0.625rem;
  border-bottom: 0.0625rem solid rgba(19, 17, 16, 0.2);
}

.modal__box .spec > div:nth-child(odd) {
  background: var(--paper-2);
}

.modal__box .spec > div:last-child {
  border-bottom: 0;
}

.modal__box .spec dt {
  font-family: var(--mono);
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b6459;
  padding-top: 0.1875rem;
}

.modal__box .spec dd {
  font-size: 0.75rem;
  font-weight: 600;
  text-align: right;
}

@media (min-width: 40rem) {
  .modal__body {
    grid-template-columns: 1.45fr 1fr;
  }

  .modal__poster {
    min-height: 12rem;
  }
}

/* +------------------------------------------------------+ */
/* |  SECTION: INFO BLOCKS (education / stack / xp)       | */
/* +------------------------------------------------------+ */
.row-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.375rem;
  align-items: stretch;
}

.entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  padding: 0.625rem 0;
  border-bottom: 0.125rem solid rgba(19, 17, 16, 0.25);
}

.entry:last-of-type {
  border-bottom: 0;
}

.entry h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
}

.entry .sub {
  font-size: 0.78125rem;
  opacity: 0.8;
}

.entry .yr {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
  padding-top: 0.1875rem;
}

.blk--orange .entry,
.blk--green .entry {
  border-bottom-color: rgba(240, 232, 214, 0.35);
}

.blk .pixart {
  position: absolute;
  right: 1.25rem;
  bottom: 1rem;
  width: 5rem;
  height: auto;
  opacity: 0.95;
}

.stackline {
  font-size: 0.875rem;
  padding: 0.375rem 0;
}

.stackline b {
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  width: fit-content;
  border: 0.0938rem solid currentColor;
  padding: 0.125rem 0.5rem;
  margin-bottom: 0.3125rem;
}

.stack3d {
  perspective: 60rem;
  cursor: pointer;
}

.stack3d .pill {
  font-size: 0.625rem;
  padding: 0.125rem 0.5rem;
}

html.settled .stack3d.drop.tilt-r {
  transition: transform 0.4s ease;
  transition-delay: 0s;
}

html.ready .stack3d.drop.tilt-r:hover {
  transform: rotate(0.45deg) scale(1.04);
  transition: transform 0.4s ease;
  transition-delay: 0s;
}

.flip3d {
  display: grid;
  transform-style: preserve-3d;
  transition: transform 0.55s var(--pop);
}

.face3d {
  grid-area: 1 / 1;
  backface-visibility: hidden;
  min-width: 0;
}

.face3d--list {
  transform: rotateY(180deg);
}

.stack3d.is-flipped .flip3d {
  transform: rotateY(180deg);
}

.logogrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(2.875rem, 1fr));
  gap: 0.5rem;
}

.logogrid .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  background: var(--paper);
  border: 0.125rem solid var(--line);
  border-radius: 0.125rem;
  box-shadow: 0.1875rem 0.1875rem 0 rgba(19, 17, 16, 0.25);
  color: var(--ink);
}

.logogrid .logo:nth-child(3n) {
  transform: rotate(0.8deg);
}

.logogrid .logo:nth-child(4n + 1) {
  transform: rotate(-0.8deg);
}

.logogrid .logo svg {
  width: 58%;
  height: 58%;
}

/* +------------------------------------------------------+ */
/* |  SECTION: CONTACT                                    | */
/* +------------------------------------------------------+ */
.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.contact h2 {
  margin: 0;
  color: var(--paper);
}

.contact .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--disp);
  font-weight: 700;
  font-size: 1.0625rem;
  padding: 0.875rem 1.375rem;
  text-decoration: none;
  border: 0.125rem solid var(--line);
  box-shadow: 0.3125rem 0.3125rem 0 rgba(0, 0, 0, 0.5);
  transform: rotate(-0.8deg);
  transition: transform 0.15s var(--pop), box-shadow 0.15s ease, background 0.15s ease;
}

.contact .btn:hover {
  transform: rotate(-0.8deg) translate(-0.125rem, -0.125rem);
  box-shadow: 0.5rem 0.5rem 0 rgba(0, 0, 0, 0.5);
  background: #f5d268;
}

.contact .btn svg {
  width: 1.125rem;
  height: 1.125rem;
}

.contact .note {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: #b8ad97;
  max-width: 26rem;
}

/* +------------------------------------------------------+ */
/* |  SECTION: SCALE UP (tablet, 40rem)                   | */
/* +------------------------------------------------------+ */
@media (min-width: 40rem) {
  .idcard {
    grid-template-columns: clamp(12rem, 36%, 16rem) 1fr;
  }

  .idtable dd .on {
    display: inline-block;
  }

  .polar {
    max-width: none;
    margin: 0;
  }

  .handles {
    grid-template-columns: 1fr 1fr;
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .blk .pixart {
    width: 7rem;
  }
}

/* +------------------------------------------------------+ */
/* |  SECTION: SCALE UP (desktop, 56rem)                  | */
/* +------------------------------------------------------+ */
@media (min-width: 56rem) {
  .row-id {
    grid-template-columns: 2.85fr 1fr;
  }

  .hello {
    display: flex;
  }

  .cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .row-3 {
    grid-template-columns: 1fr 1fr;
  }
}
