@font-face {
  font-family: "Barlow Condensed";
  src: url("./assets/barlow-condensed-900.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("./assets/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --paper: #0c0a0a;
  --panel: #140f0f;
  --ink: #f58e85;
  --muted: #c8b9af;
  --champagne: #e4c4a1;
  --red: #ff6155;
  --line: #3c2d2c;
  --gutter: clamp(1.2rem, 4vw, 4.5rem);
  --body: Inter, "Segoe UI", sans-serif;
  --display: "Barlow Condensed", Impact, "Arial Narrow", sans-serif;
  --ease-out: cubic-bezier(.2, .75, .25, 1);
  scrollbar-color: #6a514d var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.55 var(--body); }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
a:hover { color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
[id] { scroll-margin-top: 1.1rem; }
.skip {
  position: fixed;
  top: .6rem;
  left: var(--gutter);
  z-index: 5;
  padding: .5rem .85rem;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-170%);
}
.skip:focus { transform: none; }
.page { max-width: 100rem; margin-inline: auto; padding-inline: var(--gutter); }
@property --entry-radar-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 235deg;
}
.portfolio-entry {
  --entry-gutter: clamp(1.15rem, 5vw, 2.5rem);
  width: min(34rem, calc(100% - 2rem));
  max-width: none;
  padding: 0 var(--entry-gutter) var(--entry-gutter);
  border: 1px solid #764139;
  background: linear-gradient(145deg, #271313, var(--paper) 70%);
  color: var(--champagne);
  box-shadow: 0 1.4rem 5rem #000b, 0 0 3rem #d7322214;
  isolation: isolate;
}
.portfolio-entry::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--red), #d14a38 36%, transparent 80%);
}
.portfolio-entry::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 2.8rem 0 0 30%;
  background: repeating-radial-gradient(circle at 93% 15%, transparent 0 17px, #ff615525 18px 19px);
  mask-image: radial-gradient(ellipse at 95% 10%, #000 5%, transparent 70%);
  pointer-events: none;
}
.portfolio-entry::backdrop {
  background:
    radial-gradient(ellipse at center, #2d11116b, var(--paper) 74%),
    linear-gradient(#ff615519 1px, transparent 1px) center / 28px 28px,
    linear-gradient(90deg, #ff615519 1px, transparent 1px) center / 28px 28px,
    var(--paper);
}
.portfolio-entry[open] ~ .page { visibility: hidden; }
html:has(.portfolio-entry[open], .page.is-unlocking) { overflow: hidden; scrollbar-gutter: stable; }
.entry-label {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-inline: calc(-1 * var(--entry-gutter));
  padding: .85rem var(--entry-gutter);
  border-bottom: 1px solid var(--line);
  background: #0c0a0a80;
  color: var(--muted);
  font: .72rem/1.45 Consolas, "Courier New", monospace;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.entry-label::before {
  content: "";
  flex: 0 0 6px;
  height: 6px;
  background: var(--red);
  box-shadow: 0 0 .65rem #ff61558c;
}
.portfolio-entry #entry-title {
  margin: clamp(1.6rem, 5vw, 2.5rem) 0 clamp(1.5rem, 4vw, 2rem);
  font: 900 clamp(2.35rem, 9vw, 5.25rem)/.82 var(--display);
  letter-spacing: -.025em;
}
#entry-title span { display: block; color: var(--red); }
.portfolio-entry .action-button {
  width: min(100%, 13rem);
  min-height: 3rem;
  border-color: var(--red);
  background: var(--red);
  color: var(--paper);
  font: 700 .83rem/1.2 Consolas, "Courier New", monospace;
  text-transform: uppercase;
  letter-spacing: .035em;
}
.portfolio-entry .action-button:active {
  border-color: var(--champagne);
  background: var(--champagne);
  box-shadow: 0 0 0 2px #ff615555, 0 0 1.45rem #ff6155a0;
  transition-duration: 60ms;
}
@media (hover: hover) {
  .portfolio-entry .action-button:hover:not(:active) {
    box-shadow: 0 0 0 1px #ff615544, 0 0 1.55rem #ff615570;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .portfolio-entry[open]::after {
    background:
      conic-gradient(from var(--entry-radar-angle, 235deg) at 93% 15%, transparent 0 296deg, #ff615530 347deg, #ff8b7180 359deg, transparent 360deg),
      repeating-radial-gradient(circle at 93% 15%, transparent 0 17px, #ff615525 18px 19px);
    animation: entry-radar-sweep 12s linear infinite;
  }
  .portfolio-entry .action-button { transition: box-shadow 180ms var(--ease-out); }
  @keyframes entry-radar-sweep {
    from { --entry-radar-angle: 235deg; }
    to { --entry-radar-angle: 595deg; }
  }
  .matrix-reveal {
    display: block;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 6;
    background: #0c0a0a;
    animation: matrix-dissolve 5000ms linear both;
    pointer-events: none;
  }
  .page.is-unlocking :is(.top, .hero h1, .scene, .hero-content, .hero-feature, .projects, .profile-grid, .bottom) {
    animation: var(--assemble-effect, assemble-panel) 560ms steps(12, end) var(--assemble-at, 4190ms) both;
  }
  .page.is-unlocking .hero h1 { --assemble-at: 1300ms; }
  .page.is-unlocking .scene { --assemble-at: 3680ms; --assemble-effect: assemble-portrait; }
  .page.is-unlocking .top { --assemble-at: 3910ms; }
  .page.is-unlocking :is(.hero-content, .hero-feature) { --assemble-at: 4020ms; }
  .page.is-unlocking :is(.profile-grid, .bottom) { --assemble-at: 4380ms; }
  @keyframes matrix-dissolve {
    0%, 27.7% { opacity: 1; background-color: #0c0a0a; }
    37.8%, 73.1% { opacity: 1; background-color: transparent; }
    84.9%, 100% { opacity: 0; background-color: transparent; }
  }
  @keyframes assemble-panel {
    from { opacity: 0; clip-path: inset(0 0 100%); translate: 0 12px; }
    35% { opacity: .66; clip-path: inset(0 0 55%); }
    to { opacity: 1; clip-path: inset(0); translate: 0 0; }
  }
  @keyframes assemble-portrait {
    0% { opacity: 0; clip-path: polygon(0 0, 100% 0, 100% 0, 75% 0, 75% 0, 50% 0, 50% 0, 25% 0, 25% 0, 0 0); }
    50% { opacity: .85; clip-path: polygon(0 0, 100% 0, 100% 40%, 75% 40%, 75% 78%, 50% 78%, 50% 55%, 25% 55%, 25% 30%, 0 30%); }
    100% { opacity: 1; clip-path: polygon(0 0, 100% 0, 100% 100%, 75% 100%, 75% 100%, 50% 100%, 50% 100%, 25% 100%, 25% 100%, 0 100%); }
  }
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 4.6rem;
  border-bottom: 1px solid var(--line);
}
.top a, .text-link { text-decoration: none; }
.brand { display: grid; text-transform: uppercase; font-size: .73rem; font-weight: 700; letter-spacing: .07em; line-height: 1.35; }
.brand span:first-child { color: var(--red); }
.brand span:last-child { color: var(--muted); font-size: .65rem; }
nav { display: flex; align-items: center; gap: clamp(.65rem, 3vw, 2.1rem); }
nav a, .text-link { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: .78rem; font-weight: 700; }
nav a { color: var(--muted); }

.hero {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: clamp(30rem, 48vw, 46rem);
  padding: 2rem 0 clamp(2rem, 5vw, 4.5rem);
  overflow: clip;
  background: radial-gradient(ellipse at 55% 64%, #2f1010, var(--paper) 64%);
}
.hero h1 {
  position: absolute;
  inset: .06em 0 auto;
  z-index: -3;
  color: #cc3027;
  font: 900 25.3cqw/.79 var(--display);
  text-transform: uppercase;
  letter-spacing: -.023em;
  white-space: nowrap;
  text-align: center;
  background: linear-gradient(180deg, #ed3b2f 9%, #a91a14 58%, #4d1111);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.scene {
  position: absolute;
  z-index: -2;
  width: min(58%, 47rem);
  height: 100%;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  pointer-events: none;
}
.scene-art {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  transform: perspective(1400px) translate(var(--x, 0px), var(--y, 0px)) rotateY(var(--turn, 0deg));
  transition: transform 200ms var(--ease-out);
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(0deg, var(--paper) 1%, transparent 42%);
  pointer-events: none;
}
.hero-content { max-width: 42%; }
.intro { min-height: 1.5em; margin-bottom: .65rem; color: var(--muted); font: clamp(.92rem, 1.6vw, 1.2rem)/1.55 Consolas, "Courier New", monospace; }
.terminal-prompt { margin-right: .2em; color: var(--red); }
.terminal-line { position: relative; display: inline-block; white-space: nowrap; }
.terminal-line.is-typing .terminal-copy { opacity: 0; }
.terminal-output { position: absolute; inset: 0 auto auto 0; }
.terminal-copy.has-caret { position: relative; }
.terminal-line .has-caret::after {
  content: "";
  position: absolute;
  left: calc(100% + .065em);
  top: .14em;
  width: .105em;
  height: .67em;
  background: currentColor;
}
.terminal-copy.has-caret::after { animation: terminal-blink 1.15s step-end infinite; }
@keyframes terminal-blink { 50% { opacity: 0; } }
.hero-subtitle {
  color: var(--champagne);
  font: 900 clamp(3.15rem, 7.4vw, 8rem)/.83 var(--display);
  text-transform: uppercase;
  letter-spacing: -.012em;
  text-shadow: 0 2px 20px #0c0a0acc;
}
.hero-content .action-button { margin-top: .9rem; }
.hero-feature {
  display: grid;
  gap: .15rem;
  min-width: 9rem;
  padding: .65rem 0;
  border-top: 1px solid var(--line);
  color: var(--champagne);
  font-size: .93rem;
  font-weight: 650;
  text-decoration: none;
}
.hero-feature span:first-child, .category { color: var(--red); text-transform: uppercase; font-size: .69rem; font-weight: 700; letter-spacing: .09em; }

.section { padding-block: 1.65rem 2.75rem; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: center; gap: 1.3rem; margin-bottom: 1.4rem; }
.section-heading::after { content: ""; flex: 1; height: 1px; background: var(--line); }
h2 { font: 700 clamp(1.1rem, 2.1vw, 1.6rem)/1.15 var(--body); text-transform: uppercase; letter-spacing: -.035em; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.2rem, 3vw, 2.4rem); }
.project { min-width: 0; }
.project-image {
  display: block;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background: var(--panel);
}
.project-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shwe-preview img { object-position: center top; }
.tank-preview { display: grid; place-items: center; background: radial-gradient(ellipse at center, #2b1111, var(--paper) 76%); }
.tank-preview img { width: 78%; height: auto; object-fit: contain; }
.project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .65rem; }
.project-status { padding: .12rem .45rem; border: 1px solid var(--line); color: var(--muted); font-size: .65rem; font-weight: 650; }
a.project-image:hover, .project:focus-within a.project-image { border-color: var(--red); }
.portfolio-preview { display: grid; align-items: center; overflow: hidden; background: #160c0c; container-type: inline-size; }
.portfolio-preview span { color: #cf3428; text-align: center; text-transform: uppercase; font: 900 24cqw/.8 var(--display); letter-spacing: -.035em; }
.portfolio-preview img { position: absolute; inset: 3% auto 0 24%; width: 60%; height: 100%; object-fit: contain; object-position: bottom; }
.project-info { padding: 1rem 0 0; }
.project-toggle, .project-thumbnail { display: none; }
.project:has(.project-details) { display: flex; flex-direction: column; }
.project-details, .project-details-inner { display: contents; }
.project-details .project-image { order: -1; }
h3 { margin: .2rem 0 .4rem; font: 900 clamp(2.1rem, 4vw, 4.3rem)/.93 var(--display); text-transform: uppercase; }
.project-info p:not(.category), .project-description, .profile-grid p { color: var(--muted); max-width: 40rem; font-size: .92rem; }
.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  width: fit-content;
  padding: .5rem .9rem;
  border: 1px solid var(--red);
  border-radius: .25rem;
  background: #2b1111;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.action-button:hover, .action-button:active {
  background: var(--red);
  color: var(--paper);
}
.project-info > .action-button { margin-top: .85rem; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.profile-grid .section { border: 0; min-height: 11rem; padding: 1.5rem 0 2.5rem; }
.profile-grid p { margin-top: .6rem; }
.about h3 { margin-top: .75rem; color: var(--champagne); }
.about .action-button { max-width: 100%; margin-top: 1rem; }
.profile-grid .contact { padding-inline: 1.5rem; border-left: 1px solid var(--line); background: linear-gradient(120deg, #321111, var(--panel)); }
.contact-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.contact-phone {
  gap: .45rem;
  padding-inline-end: 1.15rem;
  font: 700 clamp(1rem, 2.5vw, 1.15rem)/1.45 Consolas, "Courier New", monospace;
}
.contact-phone:is(:hover, :active) .terminal-prompt { color: inherit; }
.bottom { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); min-height: 4.3rem; color: var(--muted); font-size: .8rem; }

@media (prefers-reduced-motion: no-preference) {
  .project.is-in-view .project-image {
    animation: reveal-project 550ms var(--ease-out) both;
  }
  .project:focus-within .project-image { animation: none; }
  @keyframes reveal-project {
    from { opacity: .55; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .project { transition: transform 280ms var(--ease-out); }
  .project:hover { transform: translateY(-4px); }
  .project-image img { transition: transform 450ms var(--ease-out); }
  .project:hover .project-image img { transform: scale(1.045); }
  .project:hover .project-image { border-color: var(--red); }
  .project-image::after {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: min(18rem, 80%);
    aspect-ratio: 1;
    background: radial-gradient(circle, #ff615537, transparent 68%);
    transform: translate(calc(var(--light-x, 0px) - 50%), calc(var(--light-y, 0px) - 50%));
    opacity: 0;
    transition: opacity 250ms var(--ease-out);
    pointer-events: none;
  }
  .project-image:hover::after { opacity: 1; }
}
@supports (animation-timeline: view()) and (animation-range: exit 0% exit 85%) {
  @media (prefers-reduced-motion: no-preference) {
    .hero { view-timeline-name: --hero; }
    .hero h1, .scene {
      animation: auto linear both;
      animation-timeline: --hero;
      animation-range: exit 0% exit 85%;
    }
    .hero h1 { animation-name: recede-title; }
    .scene { animation-name: recede-portrait; }
    @keyframes recede-title {
      to { transform: translateY(-46px); opacity: .32; }
    }
    @keyframes recede-portrait {
      to { transform: translate(-50%, 32px); opacity: .58; }
    }
  }
}

@media (max-width: 850px) {
  .hero { min-height: clamp(27rem, 70vw, 37rem); }
  .scene { width: 80%; }
  .hero-subtitle { font-size: clamp(3.4rem, 8vw, 5rem); }
}
@media (min-width: 601px) {
  .profile-grid .about { padding-inline-end: clamp(1.25rem, 4vw, 3rem); }
}
@media (max-width: 600px) {
  .top { min-height: 3.65rem; gap: .5rem; }
  .brand span:last-child { max-width: 9rem; font-size: .57rem; }
  nav { gap: .65rem; }
  nav a { font-size: .71rem; }
  .hero { min-height: clamp(27rem, 114vw, 32rem); padding-bottom: 1.25rem; }
  .hero h1 { top: .14em; }
  .scene { left: 55%; width: 124%; height: 87%; }
  .hero::after { background: linear-gradient(0deg, var(--paper) 1%, #0c0a0ae0 18%, #0c0a0a30 51%, transparent 66%); }
  .hero-content { max-width: 100%; }
  .hero-subtitle { font-size: clamp(3rem, 11.8vw, 4rem); }
  .hero-feature { display: none; }
  .hero-content .action-button { margin-top: .55rem; }
  .project-grid, .profile-grid { grid-template-columns: 1fr; }
  .projects { padding-bottom: 2rem; }
  .project-grid { gap: 0; }
  .project-image { border: 0; }
  .project + .project {
    display: grid;
    grid-template-columns: min(32%, 10rem) minmax(0, 1fr);
    align-items: start;
    align-content: start;
    column-gap: clamp(.7rem, 3vw, 1rem);
    padding-block: 1rem;
    border-top: 1px solid var(--line);
  }
  .project:first-child { padding-bottom: 1.35rem; }
  .project:last-child { padding-bottom: 0; }
  .project + .project .project-info { padding: 0; }
  .project + .project h3 { font-size: clamp(1.6rem, 5.5vw, 2.35rem); }
  .project + .project .project-info p:not(.category), .project-description { font-size: .82rem; }
  .project-status { border: 0; padding: 0; }
  .project-title:has(+ .project-toggle) { display: none; }
  .project-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: start;
    text-transform: inherit;
    cursor: pointer;
  }
  .project-toggle-icon { color: var(--red); font: 1.2rem/1 var(--body); }
  .project-toggle-icon::before { content: '+'; }
  .project-toggle[aria-expanded="true"] .project-toggle-icon::before { content: '−'; }
  .project-thumbnail { display: block; cursor: pointer; }
  .project-thumbnail:is(.tank-preview, .portfolio-preview) { display: grid; }
  .project:has(.project-toggle) .project-info { cursor: pointer; }
  .project-details {
    display: grid;
    grid-column: 1 / -1;
    grid-template-rows: 0fr;
    opacity: 0;
    visibility: hidden;
    transition:
      grid-template-rows 560ms cubic-bezier(.4, 0, .2, 1),
      opacity 430ms ease,
      visibility 0s linear 560ms;
  }
  .project:has(.project-toggle[aria-expanded="true"]) .project-details {
    grid-template-rows: 1fr;
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
  }
  .project-details-inner { display: block; overflow: hidden; min-height: 0; }
  .project .project-details .project-image { margin-top: .85rem; animation: none; }
  .project-description { margin-top: .55rem; }
  .profile-grid .section { min-height: 8rem; }
  .profile-grid .contact { border: 0; border-top: 1px solid var(--line); padding-inline: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .matrix-reveal { display: none; }
  .terminal-line.is-typing .terminal-copy { opacity: 1; }
  .terminal-output { display: none; }
  .terminal-copy.has-caret::after { content: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  :root { scrollbar-color: auto; }
  .hero h1 { background: none; -webkit-text-fill-color: currentColor; }
}
