:root {
  --ink: #151515;
  --paper: #f3f0e8;
  --paper-deep: #e3ddcf;
  --green: #33df91;
  --green-dark: #087a4a;
  --cyan: #22c9d6;
  --pink: #ff4f87;
  --amber: #f0b83e;
  --muted: #686962;
  --max: 1440px;

  color-scheme: light;
  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    Menlo,
    monospace;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(21, 21, 21, 0.045) 1px, transparent 1px),
    linear-gradient(
      90deg,
      rgba(21, 21, 21, 0.045) 1px,
      transparent 1px
    ),
    var(--paper);
  background-size: 20px 20px;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  background: radial-gradient(
    circle at 82% 13%,
    rgba(51, 223, 145, 0.14),
    transparent 28%
  );
}

::selection {
  color: var(--ink);
  background: var(--green);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: -80px;
  left: 12px;
  padding: 10px 14px;
  color: var(--paper);
  background: var(--ink);
  transition: top 0.15s;
}

.skip-link:focus {
  top: 12px;
}

.topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  min-height: 72px;
  padding: 10px clamp(18px, 4vw, 64px);
  border-bottom: 2px solid var(--ink);
  background: rgba(243, 240, 232, 0.94);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  border: 2px solid var(--ink);
  background: var(--green);
  box-shadow: 3px 3px 0 var(--ink);
  place-items: center;
}

.topbar nav {
  display: flex;
  gap: clamp(18px, 3vw, 42px);
  align-items: center;
  justify-content: center;
}

.topbar nav a {
  position: relative;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.topbar nav a::after {
  position: absolute;
  right: 100%;
  bottom: -7px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--green-dark);
  transition: right 0.16s;
}

.topbar nav a:hover::after,
.topbar nav a:focus-visible::after {
  right: 0;
}

.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-self: end;
  font-size: 9px;
  font-weight: 900;
}

.language-switcher {
  display: flex;
  margin-right: 9px;
  border: 1px solid var(--ink);
}

.language-switcher button {
  width: 34px;
  height: 28px;
  border: 0;
  border-right: 1px solid var(--ink);
  background: var(--paper);
  cursor: pointer;
}

.language-switcher button:last-child {
  border-right: 0;
}

.language-switcher button.is-active {
  color: var(--green);
  background: var(--ink);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-dark);
  box-shadow: 0 0 0 3px rgba(51, 223, 145, 0.24);
  animation: pulse 2s infinite;
}

.shell {
  width: min(var(--max), calc(100% - 36px));
  margin-inline: auto;
}

.hero {
  display: grid;
  grid-template-columns:
    minmax(0, 1.25fr)
    minmax(330px, 0.75fr);
  gap: clamp(36px, 7vw, 110px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding-block: clamp(58px, 8vw, 120px);
}

.eyebrow,
.section-title > p,
.contact-panel > div > p {
  margin: 0 0 18px;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.ascii-logo {
  margin: 0 0 32px;
  overflow: hidden;
  color: var(--ink);
  font: 900 clamp(8px, 1.3vw, 17px) / 1.15 monospace;
}

.hero h1 {
  max-width: 920px;
  margin: 0;
  font: 900 clamp(54px, 8vw, 118px) / 0.84 Arial, sans-serif;
  letter-spacing: -0.075em;
}

.hero h1 span,
.hero h1 strong {
  display: block;
}

.hero h1 strong {
  color: var(--green-dark);
}

.hero-lead {
  max-width: 800px;
  margin: 34px 0 0;
  color: #4e504a;
  font: 600 clamp(15px, 1.5vw, 19px) / 1.85 monospace;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 18px;
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 11px;
  font-weight: 900;
  transition:
    transform 0.12s,
    box-shadow 0.12s;
}

.button:hover,
.button:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--ink);
}

.button-primary {
  color: var(--green);
  background: var(--ink);
}

.profile-card {
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 9px 9px 0 var(--ink);
  transform: rotate(1.2deg);
}

.profile-photo-wrap {
  position: relative;
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
  background: var(--green);
}

.profile-photo-wrap img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.profile-photo-wrap::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent 0 5px,
    rgba(21, 21, 21, 0.07) 5px 6px
  );
}

.profile-photo-wrap > span {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  padding: 7px 9px;
  border: 2px solid var(--ink);
  background: var(--amber);
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 900;
}

.profile-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  border-bottom: 1px solid var(--ink);
}

.profile-heading p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 8px;
}

.profile-heading h2 {
  margin: 0;
  font: 900 36px / 1 Arial, sans-serif;
  letter-spacing: -0.05em;
}

.availability {
  padding: 7px 8px;
  border: 1px solid var(--ink);
  background: #d7f5e5;
  font-size: 9px;
  font-weight: 900;
}

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

.profile-stats div {
  min-width: 0;
  padding: 13px 16px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.profile-stats div:nth-child(2n) {
  border-right: 0;
}

.profile-stats dt {
  color: var(--muted);
  font-size: 8px;
}

.profile-stats dd {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  font-size: 10px;
  font-weight: 900;
}

.profile-quote {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  padding: 16px;
  color: var(--green-dark);
  background: var(--paper-deep);
  font-weight: 900;
}

.profile-quote p {
  margin: 0;
  color: var(--ink);
  font-size: 10px;
  line-height: 1.6;
}

.ticker {
  overflow: hidden;
  color: var(--paper);
  border-block: 2px solid var(--ink);
  background: var(--ink);
}

.ticker div {
  display: flex;
  width: max-content;
  gap: 24px;
  align-items: center;
  padding: 13px 0;
  animation: ticker 26s linear infinite;
}

.ticker span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.ticker b {
  color: var(--green);
}

.section-grid {
  display: grid;
  grid-template-columns: 0.48fr 1fr 0.68fr;
  gap: 22px;
  align-items: start;
  padding-block: clamp(90px, 12vw, 160px);
}

.section-title h2,
.contact-panel h2 {
  margin: 0;
  font: 900 clamp(42px, 5vw, 78px) / 0.91 Arial, sans-serif;
  letter-spacing: -0.065em;
}

.card {
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--ink);
}

.about-copy {
  padding: clamp(22px, 3vw, 38px);
}

.about-copy p {
  margin: 0;
  color: #43453f;
  font-size: 15px;
  line-height: 1.9;
}

.about-copy p + p {
  margin-top: 20px;
}

.about-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 27px;
}

.about-flags span {
  padding: 7px 9px;
  border: 1px solid var(--ink);
  background: var(--paper-deep);
  font-size: 9px;
  font-weight: 900;
}

.now-card {
  color: var(--paper);
  background: var(--ink);
  box-shadow: 6px 6px 0 var(--green-dark);
}

.now-card header {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 15px;
  color: var(--green);
  border-bottom: 1px solid #555;
  font-size: 10px;
}

.now-card ul {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.now-card li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 13px;
  padding: 16px;
  border-bottom: 1px solid #3c3c3c;
}

.now-card li:last-child {
  border-bottom: 0;
}

.now-card li span {
  color: var(--green);
  font-size: 8px;
}

.now-card li b {
  font-size: 10px;
  line-height: 1.6;
}

.blink {
  animation: blink 1.1s steps(2) infinite;
}

.projects,
.skills {
  padding-bottom: clamp(90px, 12vw, 160px);
}

.section-title-wide {
  display: flex;
  gap: 30px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 36px;
}

.section-title-wide > div > p {
  margin: 0 0 18px;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.section-title-wide h2 {
  margin: 0;
  font: 900 clamp(42px, 5vw, 78px) / 0.91 Arial, sans-serif;
  letter-spacing: -0.065em;
}

.section-title-wide > a {
  padding-bottom: 7px;
  border-bottom: 2px solid var(--ink);
  font-size: 10px;
  font-weight: 900;
}

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

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 430px;
  padding: clamp(20px, 3vw, 32px);
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--ink);
  transition:
    transform 0.14s,
    box-shadow 0.14s;
}

.project-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 10px 10px 0 var(--green-dark);
}

.project-card-featured {
  grid-row: span 2;
  min-height: 884px;
  background: #ece8dc;
}

.project-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-index {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.tag {
  padding: 6px 8px;
  border: 1px solid var(--ink);
  font-size: 8px;
  font-weight: 900;
}

.tag-green {
  background: #c8f5dd;
}

.tag-cyan {
  background: #cceff2;
}

.tag-pink {
  background: #ffd0df;
}

.tag-amber {
  background: #f8e0a7;
}

.project-terminal {
  display: grid;
  gap: 12px;
  margin: 52px 0 auto;
  padding: clamp(20px, 3vw, 34px);
  color: var(--paper);
  border: 2px solid var(--ink);
  background: var(--ink);
  box-shadow: inset 0 0 50px rgba(51, 223, 145, 0.08);
  font-size: clamp(10px, 1.2vw, 14px);
  line-height: 1.5;
}

.project-terminal b {
  color: var(--green);
}

.project-terminal i {
  color: var(--cyan);
  font-style: normal;
}

.project-icon {
  display: grid;
  width: 96px;
  height: 96px;
  margin: 48px 0 auto;
  border: 2px solid var(--ink);
  background: var(--paper-deep);
  box-shadow: 5px 5px 0 var(--ink);
  font: 900 24px / 1 Arial, sans-serif;
  place-items: center;
}

.project-card h3 {
  margin: 35px 0 14px;
  font: 900 clamp(34px, 4vw, 64px) / 0.92 Arial, sans-serif;
  letter-spacing: -0.055em;
}

.project-card:not(.project-card-featured) h3 {
  font-size: clamp(30px, 3vw, 48px);
}

.project-card p {
  margin: 0;
  color: #4f514b;
  line-height: 1.75;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
}

.project-tech span {
  padding: 6px 8px;
  border: 1px solid var(--ink);
  background: #fffdf7;
  font-size: 8px;
  font-weight: 900;
}

.project-card footer {
  display: flex;
  gap: 20px;
  margin-top: 28px;
  padding-top: 19px;
  border-top: 1px solid var(--ink);
  font-size: 9px;
  font-weight: 900;
}

.skills > .section-title {
  display: grid;
  grid-template-columns: 0.48fr 1.68fr;
  gap: 22px;
  align-items: end;
  margin-bottom: 36px;
}

.skills-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 8px 8px 0 var(--ink);
}

.skill-column {
  min-width: 0;
  padding: clamp(20px, 3vw, 32px);
  border-right: 2px solid var(--ink);
}

.skill-column:last-child {
  border-right: 0;
}

.skill-column header {
  display: flex;
  justify-content: space-between;
  color: var(--green-dark);
  font-size: 9px;
  font-weight: 900;
}

.skill-column h3 {
  min-height: 2.3em;
  margin: 42px 0 30px;
  font: 900 clamp(25px, 2.5vw, 40px) / 1 Arial, sans-serif;
}

.skill-column ul {
  display: grid;
  gap: 21px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-column li {
  display: grid;
  gap: 9px;
}

.skill-column li span {
  font-size: 9px;
  font-weight: 900;
}

meter {
  width: 100%;
  height: 13px;
  border: 1px solid var(--ink);
  background: var(--paper-deep);
}

meter::-webkit-meter-bar {
  border: 0;
  border-radius: 0;
  background: var(--paper-deep);
}

meter::-webkit-meter-optimum-value,
meter::-moz-meter-bar {
  background: var(--green-dark);
}

.skill-note {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.contact {
  padding-bottom: clamp(80px, 10vw, 130px);
}

.contact-panel {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  border: 2px solid var(--ink);
  background: var(--green);
  box-shadow: 9px 9px 0 var(--ink);
}

.contact-panel > div:first-child {
  padding: clamp(28px, 5vw, 68px);
  border-right: 2px solid var(--ink);
}

.contact-panel > div:first-child > p:last-child {
  max-width: 720px;
  margin: 28px 0 0;
  line-height: 1.8;
}

.contact-links {
  display: grid;
}

.contact-links a {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
  transition: background 0.13s;
}

.contact-links a:last-child {
  border-bottom: 0;
}

.contact-links a:hover {
  color: var(--green);
  background: var(--ink);
}

.contact-links span {
  font-size: 9px;
}

.contact-links strong {
  font-size: clamp(12px, 1.4vw, 17px);
  text-align: right;
}

.footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  min-height: 70px;
  padding: 16px clamp(18px, 4vw, 64px);
  color: var(--paper);
  border-top: 2px solid var(--ink);
  background: var(--ink);
  font-size: 9px;
  font-weight: 900;
}

.footer span:nth-child(2) {
  color: var(--green);
  text-align: center;
}

.footer a {
  justify-self: end;
}

@keyframes pulse {
  50% {
    opacity: 0.45;
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 1050px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .topbar nav {
    grid-row: 2;
    grid-column: 1 / -1;
    padding-top: 10px;
    border-top: 1px solid rgba(21, 21, 21, 0.18);
  }

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

  .profile-card {
    width: min(560px, 100%);
    transform: none;
  }

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

  .section-title {
    grid-column: 1 / -1;
  }

  .project-card-featured {
    grid-row: auto;
    min-height: 650px;
  }

  .skills-board {
    grid-template-columns: 1fr;
  }

  .skill-column {
    border-right: 0;
    border-bottom: 2px solid var(--ink);
  }

  .skill-column:last-child {
    border-bottom: 0;
  }

  .skill-column h3 {
    min-height: auto;
    margin-top: 28px;
  }
}

@media (max-width: 720px) {
  .status-copy,
  .brand > span:last-child {
    display: none;
  }

  .topbar {
    gap: 10px;
    padding-inline: 13px;
  }

  .topbar nav {
    justify-content: flex-start;
    gap: 17px;
    overflow-x: auto;
  }

  .topbar nav a {
    flex: 0 0 auto;
  }

  .shell {
    width: min(100% - 24px, var(--max));
  }

  .hero {
    min-height: auto;
    padding-block: 54px 70px;
  }

  .ascii-logo {
    font-size: 7.2px;
  }

  .hero h1 {
    font-size: clamp(50px, 16vw, 76px);
  }

  .section-grid,
  .project-grid,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .section-grid {
    padding-block: 90px;
  }

  .now-card {
    grid-column: 1;
  }

  .section-title-wide {
    flex-direction: column;
    align-items: start;
  }

  .project-card,
  .project-card-featured {
    min-height: auto;
  }

  .project-terminal {
    margin-top: 38px;
  }

  .skills > .section-title {
    grid-template-columns: 1fr;
  }

  .contact-panel > div:first-child {
    border-right: 0;
    border-bottom: 2px solid var(--ink);
  }

  .footer {
    grid-template-columns: 1fr auto;
  }

  .footer span:nth-child(2) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}