:root {
  --ink: #17130f;
  --muted: #5f5a52;
  --paper: #f4f4ef;
  --sheet: #fffdf3;
  --cyan: #00a6b2;
  --red: #d23f31;
  --blue: #243c8f;
  --green: #24714f;
  --yellow: #f3c74f;
  --line: #17130f;
  --shadow: 7px 7px 0 #17130f;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(23, 19, 15, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(rgba(23, 19, 15, 0.03) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--paper);
  font-family: Georgia, "Times New Roman", Times, serif;
  line-height: 1.58;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(23, 19, 15, 0.08) 0.7px, transparent 0.7px);
  background-size: 5px 5px;
  opacity: 0.45;
}

a {
  color: var(--blue);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus-visible {
  color: var(--red);
}

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

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  padding: 0.55rem 0.8rem;
  color: var(--sheet);
  background: var(--ink);
  transform: translateY(-180%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 3px solid var(--line);
  background: rgba(255, 253, 243, 0.94);
  backdrop-filter: blur(8px);
}

.header-inner {
  width: min(1140px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0;
}

.brand img {
  border: 2px solid var(--line);
  image-rendering: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a,
.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line);
  padding: 0.48rem 0.72rem;
  color: var(--ink);
  background: var(--sheet);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--line);
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.button:hover,
.button:focus-visible {
  color: var(--ink);
  background: var(--yellow);
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--line);
}

.button.primary {
  color: var(--sheet);
  background: var(--red);
}

.button.primary:hover,
.button.primary:focus-visible {
  color: var(--sheet);
  background: var(--blue);
}

main,
.footer {
  width: min(1140px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 410px);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(2rem, 6vw, 5rem) 0;
}

.hero-copy {
  position: relative;
  padding: clamp(1.1rem, 3vw, 2rem);
  border: 3px double var(--line);
  background: var(--sheet);
  box-shadow: var(--shadow);
}

.eyebrow,
.section-kicker,
.project-date,
.role,
.tech-line,
.entry-meta,
.last-updated {
  font-family: "Courier New", Courier, monospace;
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.8rem;
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.8rem;
  font-size: clamp(3.4rem, 10vw, 7.5rem);
  line-height: 0.88;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.35rem;
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.lede {
  max-width: 62ch;
  color: #2f2a24;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.portrait-frame {
  margin: 0;
  border: 3px solid var(--line);
  background: var(--sheet);
  box-shadow: var(--shadow);
  transform: rotate(1.2deg);
}

.portrait-frame img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: contrast(1.08);
  border-bottom: 3px solid var(--line);
}

.portrait-frame figcaption {
  padding: 0.75rem 0.9rem;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--green);
  background: #f9f0ca;
}

.ticker {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.85rem;
  border: 3px solid var(--line);
  color: var(--sheet);
  background: var(--ink);
  box-shadow: var(--shadow);
}

.ticker span {
  padding: 0.28rem 0.55rem;
  border: 1px solid rgba(255, 253, 243, 0.5);
  color: var(--sheet);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.8rem;
  font-weight: 700;
}

.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  border-bottom: 3px solid var(--line);
}

.intro {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.intro > p {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.entry {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  border: 3px solid var(--line);
  background: var(--sheet);
  box-shadow: 5px 5px 0 var(--line);
}

.entry-meta {
  padding: 1rem;
  border-right: 3px solid var(--line);
  background: #d7eef0;
  font-size: 0.84rem;
  font-weight: 700;
}

.entry-meta span,
.entry-meta strong {
  display: block;
}

.entry-body {
  padding: 1.1rem;
}

.role {
  margin-bottom: 0.8rem;
  color: var(--red);
  font-size: 0.9rem;
  font-weight: 700;
}

ul {
  margin: 0;
  padding-left: 1.15rem;
}

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

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

.project-card {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1rem;
  border: 3px solid var(--line);
  background: var(--sheet);
  box-shadow: 5px 5px 0 var(--line);
}

.project-card.accent {
  background: #ecf6dd;
}

.project-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.project-topline a,
.project-topline span {
  flex: 0 0 auto;
  max-width: 100%;
  padding: 0.2rem 0.4rem;
  border: 2px solid var(--line);
  color: var(--ink);
  background: var(--yellow);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.project-date {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.tech-line {
  margin-top: auto;
  margin-bottom: 0;
  color: var(--blue);
  font-size: 0.84rem;
  font-weight: 700;
}

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

.skill-columns > div,
.notice-board article {
  padding: 1rem;
  border: 3px solid var(--line);
  background: var(--sheet);
  box-shadow: 5px 5px 0 var(--line);
}

.skill-columns > div:nth-child(2) {
  background: #d7eef0;
}

.skill-columns > div:nth-child(3) {
  background: #f9f0ca;
}

.skill-columns p,
.notice-board p,
.project-card p:last-child {
  margin-bottom: 0;
}

.notice-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.notice-board article:nth-child(1) {
  background: #d7eef0;
}

.notice-board article:nth-child(2) {
  background: #f9f0ca;
}

.notice-board article:nth-child(3) {
  background: #ecf6dd;
}

.notice-board article:nth-child(4) {
  background: #fff7f4;
}

.footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: end;
  padding: 2.4rem 0 3rem;
}

.footer-title {
  margin-bottom: 0.25rem;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
}

.footer p {
  margin-bottom: 0;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.social-links a {
  border: 2px solid var(--line);
  padding: 0.3rem 0.55rem;
  color: var(--ink);
  background: var(--sheet);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--line);
}

.social-links a:hover,
.social-links a:focus-visible {
  background: var(--yellow);
}

.last-updated {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 930px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.85rem 0;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
  }

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

  .hero {
    min-height: 0;
  }

  .portrait-frame {
    width: min(460px, 100%);
    justify-self: center;
    transform: none;
  }

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

  .entry-meta {
    border-right: 0;
    border-bottom: 3px solid var(--line);
  }

  .project-grid,
  .skill-columns,
  .notice-board {
    grid-template-columns: 1fr 1fr;
  }

}

@media (max-width: 620px) {
  main,
  .footer,
  .header-inner {
    width: min(100% - 24px, 1140px);
  }

  .nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-links a,
  .button {
    width: 100%;
  }

  .hero-copy,
  .portrait-frame,
  .ticker,
  .entry,
  .project-card,
  .skill-columns > div,
  .notice-board article {
    box-shadow: 4px 4px 0 var(--line);
  }

  .hero-actions,
  .project-grid,
  .skill-columns,
  .notice-board,
  .footer {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }

  .section-heading,
  .footer {
    display: block;
  }

  .social-links {
    justify-content: flex-start;
    margin-top: 1rem;
  }

  .project-topline {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  h1 {
    font-size: clamp(3rem, 18vw, 4.6rem);
  }

  h2 {
    font-size: clamp(1.8rem, 11vw, 2.8rem);
  }
}
