:root {
  --bg: #f4efe3;
  --fg: #2d2923;
  --card: #fffaf0;
  --muted: #6e665b;
  --soft: #e8dfcf;
  --accent: #d66a2f;
  --accent-2: #7f8b52;
  --line: #2d2923;
  --dot: rgba(45, 41, 35, 0.2);
  --shadow: 8px 8px 0 var(--line);
  --shadow-sm: 4px 4px 0 var(--line);
}

body.dark {
  --bg: #1d1a17;
  --fg: #f4efe3;
  --card: #27231f;
  --muted: #c7bbab;
  --soft: #332e28;
  --accent: #f08b4f;
  --accent-2: #aab47b;
  --line: #f4efe3;
  --dot: rgba(244, 239, 227, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--fg);
  background-color: var(--bg);
  background-image: radial-gradient(circle, var(--dot) 1px, transparent 1.5px);
  background-attachment: fixed;
  background-size: 22px 22px;
  font-family: "Helvetica Neue", "Aptos", sans-serif;
  letter-spacing: 0;
  transition: background-color 180ms ease, color 180ms ease;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

p,
h1,
h2,
h3,
ul,
dl,
dd {
  margin: 0;
}

ul {
  padding-left: 1.15rem;
}

li + li {
  margin-top: 0.65rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  padding: 0 28px;
  border-bottom: 4px solid var(--line);
  background: var(--bg);
}

.brand,
.header-link,
.theme-toggle,
.intro-role,
.section-title span,
.tech-list li,
.hero-notes span,
.work-meta time {
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-weight: 900;
  text-transform: uppercase;
}

.brand {
  border: 3px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-sm);
  padding: 8px 12px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.brand:hover {
  box-shadow: 2px 2px 0 var(--line);
  transform: translate(2px, 2px);
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.nav-links a {
  border: 2px solid transparent;
  padding: 8px 10px;
  color: var(--fg);
  font-weight: 800;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.nav-links a:hover {
  border-color: var(--line);
  background: var(--soft);
  transform: translate(-1px, -1px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-link,
.theme-toggle,
.button {
  border: 3px solid var(--line);
  border-radius: 0;
  background: var(--card);
  color: var(--fg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.header-link,
.theme-toggle {
  padding: 9px 12px;
  font-size: 0.82rem;
}

.theme-toggle:hover,
.header-link:hover,
.button:hover {
  box-shadow: 2px 2px 0 var(--line);
  transform: translate(2px, 2px);
}

.section-pad {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 88px 0;
}

.intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 56px;
  align-items: center;
  min-height: calc(100vh - 68px);
  padding-top: 72px;
}

.intro::before {
  position: absolute;
  top: 92px;
  left: 0;
  width: 96px;
  height: 7px;
  content: "";
  border: 2px solid var(--line);
  background: var(--accent);
  box-shadow: 4px 4px 0 var(--line);
  transform-origin: left;
  animation: heroRule 700ms ease both;
}

.intro-copy {
  display: grid;
  gap: 24px;
}

.intro-role {
  width: fit-content;
  max-width: 100%;
  border: 3px solid var(--line);
  background: var(--fg);
  color: var(--bg);
  box-shadow: var(--shadow-sm);
  padding: 8px 12px;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
  animation: stampInHero 540ms ease 80ms both;
}

h1 {
  max-width: 880px;
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: clamp(2.7rem, 7.5vw, 5.9rem);
  font-weight: 900;
  line-height: 0.97;
  text-transform: uppercase;
}

.intro h1 {
  animation: heroTitleIn 760ms cubic-bezier(0.2, 0.9, 0.2, 1) 160ms both;
}

.intro-copy > p:not(.intro-role) {
  animation: heroTextIn 620ms ease 320ms both;
}

h2 {
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 1.02;
  text-transform: uppercase;
}

h3 {
  font-size: 1.28rem;
  font-weight: 900;
  line-height: 1.25;
}

.intro-copy > p:not(.intro-role),
.section-title p,
.project-content p,
.contact-section p {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.7;
}

.intro-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.intro-actions .button {
  animation: buttonPunch 480ms ease both;
}

.intro-actions .button:nth-child(1) {
  animation-delay: 460ms;
}

.intro-actions .button:nth-child(2) {
  animation-delay: 560ms;
}

.button {
  display: inline-flex;
  max-width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.button.primary {
  background: var(--accent);
  color: #19130f;
}

.button.secondary:hover,
.theme-toggle:hover,
.header-link:hover {
  background: var(--fg);
  color: var(--bg);
}

.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 6px;
}

.hero-notes span,
.tech-list li {
  border: 2px solid var(--line);
  background: var(--card);
  box-shadow: 3px 3px 0 var(--line);
  padding: 6px 9px;
  font-size: 0.76rem;
}

.hero-notes span {
  animation: notePop 520ms ease both;
}

.hero-notes span:nth-child(1) {
  animation-delay: 660ms;
}

.hero-notes span:nth-child(2) {
  animation-delay: 730ms;
}

.hero-notes span:nth-child(3) {
  animation-delay: 800ms;
}

.hero-notes span:nth-child(4) {
  animation-delay: 870ms;
}

.profile-panel,
.work-item,
.project-card,
.skill-columns,
.contact-section {
  position: relative;
  border: 4px solid var(--line);
  border-radius: 0;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.profile-panel:hover,
.work-item:hover,
.project-card:hover,
.skill-columns:hover,
.contact-section:hover {
  box-shadow: 12px 12px 0 var(--line);
  transform: translate(-4px, -4px);
}

.profile-panel {
  overflow: hidden;
}

.interface-panel {
  animation: panelIn 760ms cubic-bezier(0.2, 0.9, 0.2, 1) 260ms both;
}

.hero-profile-card {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 22px;
  border-bottom: 4px solid var(--line);
  background: var(--soft);
  overflow: hidden;
}

.hero-profile-card::after {
  position: absolute;
  right: -18px;
  bottom: 18px;
  width: 76px;
  height: 20px;
  content: "";
  border: 3px solid var(--line);
  background: var(--accent);
  box-shadow: 5px 5px 0 var(--line);
  transform: rotate(-8deg);
  animation: profileTape 760ms ease 760ms both;
}

.profile-card-head {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  animation: profileItemIn 560ms ease 420ms both;
}

.profile-cutout {
  --portrait-cut: polygon(
    43% 1%,
    58% 2%,
    70% 9%,
    76% 22%,
    74% 35%,
    69% 47%,
    86% 55%,
    99% 63%,
    100% 82%,
    98% 98%,
    74% 100%,
    55% 96%,
    41% 96%,
    26% 100%,
    2% 98%,
    0 82%,
    1% 63%,
    14% 55%,
    31% 47%,
    25% 34%,
    24% 21%,
    31% 8%
  );
  position: relative;
  width: 150px;
  aspect-ratio: 0.76;
  margin: 0;
  transform: rotate(-2deg);
}

.profile-cutout::before,
.profile-cutout::after {
  position: absolute;
  content: "";
  clip-path: var(--portrait-cut);
}

.profile-cutout::before {
  inset: 0;
  z-index: 0;
  background: #fffaf1;
  transform: translate(4px, 5px) rotate(2deg);
}

.profile-cutout::after {
  inset: 2px;
  z-index: 1;
  background: #fffaf1;
}

.profile-cutout img {
  position: absolute;
  inset: 4px;
  z-index: 2;
  display: block;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  object-fit: cover;
  object-position: 50% 7%;
  clip-path: var(--portrait-cut);
  filter: saturate(0.82) contrast(1.08);
}

.profile-name {
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
}

.profile-title {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 900;
}

.profile-summary {
  max-width: 28ch;
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.55;
  animation: profileItemIn 560ms ease 520ms both;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  animation: profileItemIn 560ms ease 620ms both;
}

.profile-stats div {
  display: grid;
  gap: 2px;
  min-width: 0;
  border: 2px solid var(--line);
  background: var(--card);
  box-shadow: 3px 3px 0 var(--line);
  padding: 8px;
}

.profile-stats strong {
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 1rem;
  font-weight: 900;
}

.profile-stats span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.profile-status {
  display: flex;
  gap: 9px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  border: 3px solid var(--line);
  background: var(--accent);
  box-shadow: 4px 4px 0 var(--line);
  color: #19130f;
  padding: 8px 10px;
  font-size: 0.82rem;
  font-weight: 900;
  animation: profileItemIn 560ms ease 720ms both;
}

.profile-status span {
  width: 10px;
  height: 10px;
  border: 2px solid var(--line);
  background: var(--card);
  animation: statusBlink 1.6s steps(2, end) infinite;
}

.profile-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  animation: profileItemIn 560ms ease 820ms both;
}

.profile-card-links a {
  border: 2px solid var(--line);
  background: var(--card);
  box-shadow: 3px 3px 0 var(--line);
  padding: 7px 9px;
  font-size: 0.82rem;
  font-weight: 900;
}

.terminal-bar {
  display: flex;
  gap: 7px;
  padding-bottom: 6px;
}

.terminal-bar span {
  width: 12px;
  height: 12px;
  border: 2px solid var(--line);
  background: var(--accent);
  animation: terminalDot 1.9s ease-in-out infinite;
}

.terminal-bar span:nth-child(2) {
  background: var(--accent-2);
  animation-delay: 120ms;
}

.terminal-bar span:nth-child(3) {
  background: var(--card);
  animation-delay: 240ms;
}

.profile-panel dl {
  display: grid;
}

.profile-panel dl > div {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
}

.profile-panel dl > div + div {
  border-top: 3px solid var(--line);
}

.profile-panel dt {
  color: var(--muted);
  font-weight: 800;
}

.profile-panel dd {
  font-weight: 800;
  line-height: 1.45;
}

.profile-panel dd a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.profile-panel dd a + a {
  margin-left: 12px;
}

.cred-strip {
  display: grid;
  width: min(1120px, calc(100% - 40px));
  grid-template-columns: repeat(4, 1fr);
  margin: 0 auto;
  border: 4px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}

.cred-strip div {
  display: grid;
  gap: 8px;
  padding: 24px 20px;
}

.cred-strip div + div {
  border-left: 4px solid var(--line);
}

.cred-strip strong {
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 2rem;
  font-weight: 900;
}

.cred-strip span {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.split-section {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 64px;
}

.section-title {
  display: grid;
  align-content: start;
  gap: 14px;
}

.section-title span {
  width: fit-content;
  border: 3px solid var(--line);
  background: var(--fg);
  color: var(--bg);
  box-shadow: var(--shadow-sm);
  padding: 5px 10px;
}

.work-list,
.project-grid {
  display: grid;
  gap: 24px;
}

.work-item {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  padding: 26px;
}

.work-meta {
  display: grid;
  align-content: start;
  gap: 8px;
}

.company-heading {
  display: flex;
  align-items: center;
}

.company-logo {
  display: grid;
  width: 136px;
  height: 46px;
  place-items: center;
  border: 3px solid var(--line);
  background: #111;
  box-shadow: 3px 3px 0 var(--line);
  overflow: hidden;
  padding: 8px 10px;
}

.company-logo svg {
  display: block;
  width: 100%;
  height: auto;
}

.company-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.marmeto-logo {
  background: #000;
  padding: 9px 12px;
}

.work-meta p,
.work-meta time,
.work-item li,
.skill-columns li {
  color: var(--muted);
  font-weight: 750;
  line-height: 1.6;
}

.work-meta time {
  width: fit-content;
  border: 2px solid var(--line);
  background: var(--soft);
  color: var(--fg);
  padding: 5px 7px;
  font-size: 0.72rem;
}

.project-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 32px;
}

.project-carousel-shell {
  position: relative;
}

.project-carousel-controls {
  display: none;
}

.project-card {
  overflow: hidden;
}

.project-card[data-gallery-project] {
  cursor: pointer;
}

.project-card[data-gallery-project]:focus-visible {
  outline: 4px solid var(--accent);
  outline-offset: 5px;
}

.project-preview {
  position: relative;
  display: grid;
  min-height: 210px;
  border-bottom: 4px solid var(--line);
  background-color: var(--soft);
  background-image: linear-gradient(var(--dot) 1px, transparent 1px), linear-gradient(90deg, var(--dot) 1px, transparent 1px);
  background-size: 18px 18px;
  overflow: hidden;
}

.pepperball-preview {
  place-items: center;
  padding: 24px;
  background-color: #f4f1e9;
}

.pepperball-preview::before {
  position: absolute;
  inset: 24px;
  content: "";
  border: 3px solid var(--line);
  background: var(--card);
  transform: rotate(-1.5deg);
}

.pepperball-product {
  position: relative;
  z-index: 1;
  display: block;
  width: min(82%, 320px);
  max-height: 170px;
  object-fit: contain;
  filter: saturate(0.95) contrast(1.08);
}

.pepperball-logo-badge {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 2;
  border: 3px solid var(--line);
  background: #111;
  box-shadow: 4px 4px 0 var(--line);
  padding: 7px 9px;
}

.pepperball-logo-badge img {
  display: block;
  width: 118px;
  height: auto;
  object-fit: contain;
}

.fourvisions-preview {
  place-items: center;
  padding: 24px;
  background-color: #ece3d2;
}

.fourvisions-preview::before {
  position: absolute;
  inset: 24px;
  content: "";
  border: 3px solid var(--line);
  background: #f7f0e4;
  transform: rotate(1.5deg);
}

.fourvisions-product {
  position: relative;
  z-index: 1;
  display: block;
  width: min(74%, 260px);
  max-height: 178px;
  object-fit: contain;
  filter: saturate(0.9) contrast(1.05);
}

.fourvisions-logo-badge {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 2;
  border: 3px solid var(--line);
  background: #fffaf1;
  box-shadow: 4px 4px 0 var(--line);
  padding: 7px 9px;
}

.fourvisions-logo-badge img {
  display: block;
  width: 116px;
  height: auto;
  object-fit: contain;
}

.bannersolutions-preview {
  place-items: center;
  padding: 24px;
  background-color: #eeeaf7;
}

.bannersolutions-preview::before {
  position: absolute;
  inset: 24px;
  content: "";
  border: 3px solid var(--line);
  background: #fff;
  transform: rotate(-1deg);
}

.bannersolutions-product {
  position: relative;
  z-index: 1;
  display: block;
  width: min(64%, 220px);
  max-height: 170px;
  object-fit: contain;
  filter: saturate(0.92) contrast(1.08);
}

.bannersolutions-logo-badge {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 2;
  border: 3px solid var(--line);
  background: #fff;
  box-shadow: 4px 4px 0 var(--line);
  padding: 7px 9px;
}

.bannersolutions-logo-badge img {
  display: block;
  width: 120px;
  height: auto;
  object-fit: contain;
}

.berger-preview {
  place-items: center;
  padding: 24px;
  background-color: #f1eadb;
}

.berger-preview::before {
  position: absolute;
  inset: 24px;
  content: "";
  border: 3px solid var(--line);
  background: #fff8e8;
  transform: rotate(1deg);
}

.berger-product {
  position: relative;
  z-index: 1;
  display: block;
  width: min(82%, 310px);
  height: 150px;
  border: 3px solid var(--line);
  object-fit: cover;
  object-position: center;
  filter: saturate(0.95) contrast(1.05);
}

.berger-logo-badge {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 2;
  border: 3px solid var(--line);
  background: #fff;
  box-shadow: 4px 4px 0 var(--line);
  padding: 7px 9px;
}

.berger-logo-badge img {
  display: block;
  width: 118px;
  height: auto;
  object-fit: contain;
}

.analytics-preview {
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  gap: 14px;
  padding: 28px;
}

.analytics-preview div {
  position: relative;
  z-index: 1;
  border: 3px solid var(--line);
  border-bottom-width: 5px;
  background: var(--accent);
  transform-origin: bottom;
  animation: barLift 3.2s ease-in-out infinite;
}

.analytics-preview div:nth-child(1) {
  height: 42%;
}

.analytics-preview div:nth-child(2) {
  height: 72%;
  animation-delay: 160ms;
}

.analytics-preview div:nth-child(3) {
  height: 56%;
  animation-delay: 320ms;
}

.analytics-preview div:nth-child(4) {
  height: 84%;
  animation-delay: 480ms;
}

.analytics-preview span {
  position: absolute;
  right: 26px;
  left: 26px;
  bottom: 62%;
  z-index: 2;
  height: 4px;
  border: 2px solid var(--line);
  background: var(--accent-2);
  transform: scaleX(0.22);
  transform-origin: left;
  animation: signalLine 3.2s ease-in-out infinite;
}

.document-preview {
  padding: 28px;
}

.document-preview div {
  position: relative;
  z-index: 1;
  width: min(260px, 76%);
  height: 42px;
  border: 3px solid var(--line);
  background: var(--card);
  animation: documentBuild 3.6s ease-in-out infinite;
}

.document-preview div:nth-child(1) {
  height: 118px;
}

.document-preview div + div {
  margin-top: 12px;
}

.document-preview div:nth-child(2) {
  animation-delay: 160ms;
}

.document-preview div:nth-child(3) {
  animation-delay: 320ms;
}

.document-preview span {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 1;
  width: 108px;
  height: 38px;
  border: 3px solid var(--line);
  background: var(--accent);
  animation: stampIn 3.6s ease-in-out infinite;
}

.project-content {
  display: grid;
  gap: 16px;
  padding: 26px;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.tech-list li {
  margin: 0;
}

.skill-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.skill-columns > div {
  padding: 26px;
}

.skill-columns > div + div {
  border-left: 4px solid var(--line);
}

.skill-columns > div:nth-child(3n + 1) {
  border-left: 0;
}

.skill-columns > div:nth-child(n + 4) {
  border-top: 4px solid var(--line);
}

.skill-columns h3 {
  margin-bottom: 16px;
}

.skill-columns ul {
  display: grid;
  gap: 10px;
  padding-left: 0;
  list-style: none;
}

.skill-columns li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.skill-columns li > span:last-child {
  color: var(--muted);
  font-weight: 750;
  line-height: 1.45;
}

.skill-columns li + li {
  margin-top: 0;
}

.skill-mark {
  display: inline-grid;
  width: 38px;
  height: 34px;
  place-items: center;
  border: 3px solid var(--line);
  background: #fffaf0;
  box-shadow: 3px 3px 0 var(--line);
  color: #2d2923;
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.skill-mark img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.skill-mark img + span {
  display: none;
}

.skill-mark img:not([src]),
.skill-mark img[src=""] {
  display: none;
}

.skill-mark img:not([src]) + span,
.skill-mark img[src=""] + span {
  display: inline;
}

.skill-columns li:hover .skill-mark {
  box-shadow: 1px 1px 0 var(--line);
  transform: translate(2px, 2px);
}

.education-card .project-content {
  gap: 20px;
}

.education-heading {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.education-logo {
  display: grid;
  width: 104px;
  height: 104px;
  place-items: center;
  border: 4px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-sm);
  padding: 9px;
}

.education-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.certification-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.certification-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  border: 4px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 24px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.certification-card:hover {
  box-shadow: 12px 12px 0 var(--line);
  transform: translate(-4px, -4px);
}

.certification-logo {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 4px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-sm);
  padding: 14px;
}

.certification-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.certification-card h3 {
  margin-bottom: 10px;
}

.certification-card p {
  color: var(--muted);
  font-weight: 750;
  line-height: 1.6;
  margin-bottom: 16px;
}

.certification-link {
  width: fit-content;
  margin-top: 16px;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  padding: 34px;
}

.contact-section h2 {
  margin-bottom: 12px;
}

.site-footer {
  display: flex;
  width: min(1120px, calc(100% - 40px));
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  padding: 28px 0 40px;
  border-top: 4px solid var(--line);
  color: var(--muted);
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-weight: 900;
  text-transform: uppercase;
}

.project-gallery-modal,
.resume-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 28px;
}

.project-gallery-modal.is-open,
.resume-modal.is-open {
  display: grid;
}

.project-gallery-backdrop,
.resume-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle, var(--dot) 1px, transparent 1.5px),
    rgba(20, 17, 14, 0.72);
  background-size: 22px 22px, auto;
}

.project-gallery {
  position: relative;
  display: grid;
  width: min(1120px, 100%);
  max-height: min(820px, calc(100vh - 56px));
  grid-template-rows: auto minmax(0, 1fr);
  border: 5px solid var(--line);
  background: var(--card);
  box-shadow: 14px 14px 0 var(--line);
  color: var(--fg);
  overflow: hidden;
}

.project-gallery-toolbar {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px 12px 20px;
  border-bottom: 4px solid var(--line);
  background: var(--card);
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.project-gallery-body {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) 330px;
}

.project-gallery-stage {
  display: grid;
  min-height: 470px;
  place-items: center;
  margin: 0;
  padding: 28px;
  border-right: 5px solid var(--line);
  background-color: var(--soft);
  background-image: linear-gradient(var(--dot) 1px, transparent 1px), linear-gradient(90deg, var(--dot) 1px, transparent 1px);
  background-size: 18px 18px;
}

.project-gallery-stage img {
  display: block;
  width: 100%;
  max-height: 560px;
  border: 4px solid var(--line);
  background: var(--card);
  box-shadow: 8px 8px 0 var(--line);
  object-fit: contain;
}

.project-gallery-info {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
  padding: 24px;
  background: var(--card);
}

.project-gallery-info h2 {
  font-size: clamp(1.55rem, 3vw, 2.6rem);
  line-height: 0.95;
}

.project-gallery-info p {
  color: var(--muted);
  font-weight: 750;
  line-height: 1.65;
}

.project-gallery-link {
  width: fit-content;
}

.project-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.project-gallery-thumb {
  display: grid;
  height: 74px;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 0;
  background: var(--soft);
  box-shadow: 3px 3px 0 var(--line);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
}

.project-gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-gallery-thumb.is-active {
  background: var(--accent);
  box-shadow: 1px 1px 0 var(--line);
  transform: translate(2px, 2px);
}

.resume-book {
  position: relative;
  display: grid;
  width: min(1120px, 100%);
  height: min(820px, calc(100vh - 56px));
  grid-template-columns: 320px minmax(0, 1fr);
  border: 5px solid var(--line);
  background: var(--card);
  box-shadow: 14px 14px 0 var(--line);
  color: var(--fg);
  overflow: hidden;
}

.resume-book::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 318px;
  z-index: 2;
  width: 6px;
  content: "";
  border-inline: 2px solid var(--line);
  background: var(--accent);
}

.resume-cover {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 0;
  overflow-y: auto;
  padding: 24px;
  border-right: 5px solid var(--line);
  background: var(--soft);
}

.resume-cover .terminal-bar {
  padding-bottom: 0;
}

.resume-kicker,
.resume-toolbar,
.resume-cover dt,
.resume-cover dd {
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-weight: 900;
  text-transform: uppercase;
}

.resume-kicker {
  width: fit-content;
  border: 3px solid var(--line);
  background: var(--fg);
  color: var(--bg);
  box-shadow: var(--shadow-sm);
  padding: 6px 10px;
  font-size: 0.78rem;
}

.resume-cover h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.resume-cover p {
  color: var(--muted);
  font-weight: 750;
  line-height: 1.65;
}

.resume-cover dl {
  display: grid;
  border: 3px solid var(--line);
  background: var(--card);
}

.resume-cover dl > div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.resume-cover dl > div + div {
  border-top: 3px solid var(--line);
}

.resume-cover dt {
  color: var(--muted);
  font-size: 0.72rem;
}

.resume-cover dd {
  color: var(--fg);
  font-size: 0.82rem;
  line-height: 1.35;
}

.resume-download {
  align-self: end;
  justify-self: stretch;
  line-height: 1.2;
  margin-top: 6px;
  text-align: center;
}

.resume-pages {
  display: grid;
  min-width: 0;
  grid-template-rows: auto minmax(0, 1fr);
  background:
    linear-gradient(90deg, rgba(45, 41, 35, 0.09), transparent 18px),
    var(--card);
}

.resume-toolbar {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px 12px 28px;
  border-bottom: 4px solid var(--line);
  background: var(--card);
  font-size: 0.82rem;
}

.resume-close {
  border: 3px solid var(--line);
  border-radius: 0;
  background: var(--accent);
  box-shadow: 3px 3px 0 var(--line);
  color: #19130f;
  cursor: pointer;
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 7px 10px;
  text-transform: uppercase;
  transition: box-shadow 140ms ease, transform 140ms ease;
}

.resume-close:hover {
  box-shadow: 1px 1px 0 var(--line);
  transform: translate(2px, 2px);
}

.resume-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

body.resume-open,
body.project-gallery-open {
  overflow: hidden;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 100%;
  height: 5px;
  background: var(--accent);
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: left center;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
  transition-delay: var(--delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes heroRule {
  from {
    transform: translateX(-24px) scaleX(0.4);
    opacity: 0;
  }
  to {
    transform: translateX(0) scaleX(1);
    opacity: 1;
  }
}

@keyframes stampInHero {
  0% {
    transform: rotate(-2deg) translateY(14px);
    opacity: 0;
  }
  65% {
    transform: rotate(1deg) translateY(-2px);
    opacity: 1;
  }
  100% {
    transform: rotate(0) translateY(0);
    opacity: 1;
  }
}

@keyframes heroTitleIn {
  from {
    transform: translateY(28px);
    opacity: 0;
    filter: blur(8px);
  }
  to {
    transform: translateY(0);
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes heroTextIn {
  from {
    transform: translateY(18px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes buttonPunch {
  0% {
    transform: translateY(16px);
    opacity: 0;
  }
  70% {
    transform: translateY(-3px);
    opacity: 1;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes notePop {
  0% {
    transform: translateY(14px) rotate(-2deg);
    opacity: 0;
  }
  75% {
    transform: translateY(-2px) rotate(1deg);
    opacity: 1;
  }
  100% {
    transform: translateY(0) rotate(0);
    opacity: 1;
  }
}

@keyframes panelIn {
  from {
    transform: translate(22px, 28px) rotate(1.5deg);
    opacity: 0;
  }
  to {
    transform: translate(0, 0) rotate(0);
    opacity: 1;
  }
}

@keyframes profileItemIn {
  from {
    transform: translateY(14px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes profileTape {
  from {
    transform: translate(18px, 12px) rotate(-8deg);
    opacity: 0;
  }
  to {
    transform: translate(0, 0) rotate(-8deg);
    opacity: 1;
  }
}

@keyframes statusBlink {
  0%,
  60% {
    background: var(--card);
  }
  61%,
  100% {
    background: var(--fg);
  }
}

@keyframes terminalDot {
  0%,
  100% {
    transform: translateY(0);
  }
  45% {
    transform: translateY(-3px);
  }
}

@keyframes barLift {
  0%,
  100% {
    transform: scaleY(0.72);
  }

  50% {
    transform: scaleY(1);
  }
}

@keyframes signalLine {
  0%,
  100% {
    transform: scaleX(0.22);
  }

  50% {
    transform: scaleX(1);
  }
}

@keyframes documentBuild {
  0%,
  100% {
    transform: translateX(0);
  }

  45%,
  70% {
    transform: translateX(10px);
  }
}

@keyframes stampIn {
  0%,
  48% {
    opacity: 0;
    transform: translateY(12px);
  }

  64%,
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
    padding: 12px 18px;
  }

  .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .intro,
  .split-section,
  .contact-section,
  .work-item {
    grid-template-columns: 1fr;
  }

  .intro {
    min-height: auto;
    padding-top: 60px;
  }

  .intro::before {
    display: none;
  }

  .intro-role {
    position: relative;
    margin-bottom: 10px;
  }

  .intro-role::after {
    position: absolute;
    bottom: -13px;
    left: 0;
    width: 184px;
    max-width: calc(100vw - 64px);
    height: 7px;
    content: "";
    border: 2px solid var(--line);
    background: var(--accent);
    box-shadow: 4px 4px 0 var(--line);
  }

  .cred-strip,
  .project-grid,
  .skill-columns,
  .certification-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skill-columns > div:nth-child(2n + 1) {
    border-left: 0;
  }

  .skill-columns > div:nth-child(n + 3) {
    border-top: 4px solid var(--line);
  }

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: clamp(2.1rem, 12vw, 3.6rem);
  }

  .intro-copy {
    gap: 22px;
  }

  .intro-role {
    max-width: calc(100vw - 48px);
    font-size: 0.72rem;
    line-height: 1.32;
    padding: 8px 10px;
  }

  .intro-role::after {
    width: min(180px, 54vw);
  }

  .site-header {
    position: static;
  }

  .section-pad {
    width: min(100% - 28px, 1120px);
    padding: 56px 0;
  }

  .intro {
    padding-top: 44px;
  }

  .cred-strip {
    width: min(100% - 28px, 1120px);
  }

  .cred-strip,
  .project-grid,
  .skill-columns,
  .certification-grid {
    grid-template-columns: 1fr;
  }

  .project-carousel-controls {
    position: absolute;
    top: 24px;
    right: -6px;
    left: -6px;
    z-index: 8;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    height: 210px;
    gap: 12px;
    padding: 0 10px;
    pointer-events: none;
  }

  .project-carousel-button {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 3px solid var(--line);
    border-radius: 0;
    color: var(--fg);
    background: var(--card);
    box-shadow: 3px 3px 0 var(--line);
    cursor: pointer;
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1;
    pointer-events: auto;
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
  }

  .project-carousel-button:active {
    box-shadow: 1px 1px 0 var(--line);
    transform: translate(2px, 2px);
  }

  .project-carousel-button:disabled {
    cursor: default;
    opacity: 0.45;
  }

  .project-carousel-count {
    align-self: end;
    justify-self: center;
    min-width: 68px;
    border: 3px solid var(--line);
    background: var(--fg);
    color: var(--bg);
    box-shadow: 3px 3px 0 var(--line);
    padding: 7px 10px;
    text-align: center;
    font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
    font-size: 0.78rem;
    font-weight: 900;
    margin-bottom: 12px;
  }

  .project-grid {
    display: flex;
    align-items: stretch;
    grid-template-columns: none;
    gap: 16px;
    margin: 24px -14px 0;
    overflow-x: auto;
    padding: 0 14px 12px;
    scroll-padding-inline: 14px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .project-grid::-webkit-scrollbar {
    display: none;
  }

  .project-grid .project-card {
    display: grid;
    grid-template-rows: auto 1fr;
    flex: 0 0 100%;
    min-width: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .project-grid .project-card:hover {
    box-shadow: var(--shadow);
    transform: none;
  }

  .cred-strip div + div,
  .skill-columns > div + div {
    border-top: 4px solid var(--line);
    border-left: 0;
  }

  .button,
  .header-link,
  .theme-toggle {
    width: 100%;
  }

  .header-actions,
  .intro-actions,
  .contact-actions {
    width: 100%;
  }

  .profile-panel dl > div,
  .work-item,
  .project-content,
  .certification-card,
  .skill-columns > div,
  .contact-section {
    padding: 20px;
  }

  .hero-profile-card {
    padding: 20px;
  }

  .profile-card-head {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 14px;
  }

  .profile-cutout {
    width: 104px;
  }

  .profile-name {
    font-size: 1.18rem;
  }

  .profile-stats {
    grid-template-columns: 1fr;
  }

  .education-heading {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
  }

  .education-logo {
    width: 82px;
    height: 82px;
    padding: 7px;
  }

  .certification-card {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
  }

  .certification-logo {
    width: 72px;
    height: 72px;
    padding: 11px;
  }

  .site-footer {
    width: min(100% - 28px, 1120px);
    flex-direction: column;
  }

  .resume-modal {
    padding: 14px;
  }

  .project-gallery-modal {
    padding: 14px;
  }

  .project-gallery {
    max-height: calc(100vh - 28px);
    box-shadow: 7px 7px 0 var(--line);
    overflow-y: auto;
  }

  .project-gallery-body {
    grid-template-columns: 1fr;
  }

  .project-gallery-stage {
    min-height: 280px;
    padding: 16px;
    border-right: 0;
    border-bottom: 5px solid var(--line);
  }

  .project-gallery-stage img {
    max-height: 320px;
    box-shadow: 5px 5px 0 var(--line);
  }

  .project-gallery-info {
    padding: 20px;
  }

  .project-gallery-thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .resume-book {
    height: calc(100vh - 28px);
    grid-template-columns: 1fr;
    box-shadow: 7px 7px 0 var(--line);
  }

  .resume-book::before {
    display: none;
  }

  .resume-cover {
    display: none;
  }

  .resume-toolbar {
    padding-left: 16px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
