:root {
  --ink: #08111f;
  --navy: #071a33;
  --navy-deep: #04101f;
  --paper: #eaf3ff;
  --panel: #f7fbff;
  --blue: #2f6bff;
  --blue-dark: #183b8f;
  --cyan: #8ce8ff;
  --muted: #385274;
  --border: 3px solid var(--ink);
  --shadow: 5px 5px 0 var(--ink);
  --max: 620px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--paper);
  background:
    linear-gradient(rgba(140, 232, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 232, 255, 0.04) 1px, transparent 1px),
    var(--navy);
  background-size: 30px 30px, 30px 30px, auto;
  font-family: "VT323", "Courier New", monospace;
  font-size: 1.25rem;
  line-height: 1.3;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.045;
  background: repeating-linear-gradient(0deg, transparent 0 3px, #fff 3px 4px);
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

::selection {
  color: #fff;
  background: var(--blue);
}

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0.65rem 0.9rem;
  transform: translateY(-160%);
  color: var(--ink);
  background: var(--cyan);
  border: var(--border);
  box-shadow: 4px 4px 0 var(--ink);
  font-family: "Silkscreen", monospace;
  font-size: 0.68rem;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.page {
  width: min(var(--max), calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.profile-card {
  color: var(--ink);
  background: var(--paper);
  border: 4px solid var(--ink);
  box-shadow: 7px 7px 0 var(--ink);
}

.terminal-bar {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.48rem 0.65rem;
  color: var(--paper);
  background: repeating-linear-gradient(90deg, var(--blue) 0 22px, #4f83ff 22px 44px);
  border-bottom: 4px solid var(--ink);
  font-family: "Silkscreen", monospace;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.profile-content {
  display: grid;
  justify-items: center;
  gap: 1rem;
  padding: 1.25rem 1rem 1.35rem;
  text-align: center;
  background:
    linear-gradient(rgba(47, 107, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 107, 255, 0.07) 1px, transparent 1px),
    var(--panel);
  background-size: 20px 20px;
}

.portrait-frame {
  position: relative;
  width: 168px;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--navy);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--blue);
}

.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.1;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 4px, #fff 4px 5px);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 49% 14%;
}

.identity-line,
.section-kicker {
  margin: 0;
  color: var(--blue-dark);
  font-family: "Silkscreen", monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

h1,
h2 {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  letter-spacing: -0.035em;
}

h1 {
  margin-top: 0.45rem;
  color: var(--ink);
  font-size: clamp(1.05rem, 5vw, 1.55rem);
  line-height: 1.2;
  text-shadow: 2px 2px 0 #9ab8ff;
}

.bio {
  max-width: 40ch;
  margin: 0.7rem auto 0;
  color: #203657;
  font-size: 1.22rem;
  line-height: 1.22;
}

.priority {
  margin: 1.35rem 0 1.6rem;
}

.priority .section-kicker {
  margin: 0 0 0.55rem 0.15rem;
  color: var(--cyan);
}

.priority-link,
.link-row {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 34px;
  gap: 0.75rem;
  align-items: center;
  min-height: 72px;
  padding: 0.72rem;
  color: var(--ink);
  background: var(--panel);
  border: var(--border);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.priority-link {
  min-height: 88px;
  background: var(--cyan);
  border-width: 4px;
  box-shadow: 7px 7px 0 var(--ink);
}

.priority-link:hover,
.priority-link:focus-visible,
.link-row:hover,
.link-row:focus-visible {
  background: #dceaff;
}

.priority-link:hover,
.priority-link:focus-visible {
  background: #b9f2ff;
}

.priority-link:active,
.link-row:active,
.contact-link:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--ink);
}

.link-icon,
.link-arrow {
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  font-family: "Silkscreen", monospace;
  font-size: 0.62rem;
  font-weight: 700;
}

.link-icon {
  width: 44px;
  height: 44px;
  color: var(--paper);
  background: var(--blue);
}

.priority-link .link-icon {
  font-size: 1.1rem;
}

.link-arrow {
  width: 32px;
  height: 32px;
  color: var(--paper);
  background: var(--navy);
}

.link-copy {
  display: grid;
  min-width: 0;
  gap: 0.22rem;
}

.link-copy strong {
  font-family: "Silkscreen", monospace;
  font-size: 0.8rem;
  line-height: 1.25;
}

.link-copy small {
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.16;
}

.priority-link .link-copy strong {
  font-family: "Press Start 2P", monospace;
  font-size: 0.8rem;
  text-shadow: 2px 2px 0 #8fdcf2;
}

.link-group + .link-group {
  margin-top: 1.6rem;
}

.group-heading {
  margin: 0 0 0.7rem 0.15rem;
}

.group-heading h2,
.contact h2 {
  margin-top: 0.38rem;
  font-size: 1rem;
  line-height: 1.35;
}

.link-list {
  display: grid;
  gap: 0.7rem;
}

.contact {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.7rem;
  padding: 1rem;
  color: var(--ink);
  background: var(--cyan);
  border: 4px solid var(--ink);
  box-shadow: 7px 7px 0 var(--ink);
}

.contact-link {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0.65rem;
  overflow-wrap: anywhere;
  color: var(--paper);
  background: var(--navy-deep);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-family: "Silkscreen", monospace;
  font-size: 0.6rem;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
}

.site-footer {
  display: flex;
  width: min(var(--max), calc(100% - 28px));
  margin: 0 auto;
  padding: 0.2rem 0 1.5rem;
  justify-content: space-between;
  gap: 1rem;
  color: #d8e8ff;
  font-family: "Silkscreen", monospace;
  font-size: 0.48rem;
  letter-spacing: 0.06em;
  line-height: 1.5;
}

@media (min-width: 560px) {
  .page {
    padding-top: 30px;
  }

  .profile-content {
    padding: 1.5rem 1.25rem 1.65rem;
  }

  .portrait-frame {
    width: 190px;
  }

  .priority-link,
  .link-row {
    padding: 0.82rem 0.9rem;
  }

  .contact {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 0.95fr);
    align-items: center;
  }
}

@media (max-width: 370px) {
  .page,
  .site-footer {
    width: min(var(--max), calc(100% - 20px));
  }

  .profile-content {
    gap: 0.85rem;
    padding: 1rem 0.75rem 1.15rem;
  }

  .portrait-frame {
    width: 142px;
  }

  .identity-line,
  .section-kicker {
    font-size: 0.56rem;
  }

  .priority-link,
  .link-row {
    grid-template-columns: 40px minmax(0, 1fr) 30px;
    gap: 0.55rem;
    padding: 0.62rem;
  }

  .link-icon {
    width: 40px;
    height: 40px;
  }

  .link-copy strong {
    font-size: 0.7rem;
  }

  .link-copy small {
    font-size: 1.04rem;
  }
}

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

  body::before,
  .portrait-frame::after {
    display: none;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
