/* ---- typewriter manuscript on paper ---- */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@500&family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Special+Elite&display=swap');

:root {
  --paper: #f2ebda;
  --ink: #2c2620;
  --dim: #6f6656;
  --red: #b3382c;      /* pen red: accents + glitch */
  --hairline: rgba(44, 38, 32, 0.25);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse at 18% 12%, rgba(140, 115, 70, 0.07), transparent 50%),
    radial-gradient(ellipse at 82% 75%, rgba(140, 115, 70, 0.08), transparent 45%),
    radial-gradient(ellipse at 45% 45%, rgba(255, 252, 244, 0.45), transparent 70%);
}

/* smudge canvas + paper vignette, both behind content */
#starfield { position: fixed; inset: 0; z-index: -1; }
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  box-shadow: inset 0 0 140px rgba(90, 70, 40, 0.14);
}

/* ---- layout: two columns, fills viewport ---- */
main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(28px, 6vw, 80px);
  padding: clamp(24px, 5vh, 52px) clamp(24px, 6vw, 72px) clamp(16px, 3vh, 36px) clamp(40px, 7vw, 88px);
  position: relative;
}
/* red manuscript margin line */
main::before {
  content: "";
  position: absolute;
  left: clamp(20px, 4.5vw, 58px);
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(179, 56, 44, 0.35);
}

/* ---- left column ---- */
.col-left { display: flex; flex-direction: column; }

h1 {
  font-family: "Special Elite", "Courier New", monospace;
  font-size: clamp(45px, 3vw, 38px);
  font-weight: 400;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 18px;
}

.tagline {
  color: var(--dim);
  font-style: italic;
  font-size: clamp(22px, 1.5vw, 19px);
}

/* photo print, slightly askew like taped to the page */
.portrait { margin-top: auto; transform: rotate(-1.5deg); }
.portrait img {
  display: block;
  width: clamp(96px, 16vh, 150px);
  height: clamp(96px, 16vh, 150px);
  object-fit: cover;
  border: 7px solid #fbf7ee;
  box-shadow: 0 2px 10px rgba(60, 45, 20, 0.25);
}

/* ---- right column ---- */
.col-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(18px, 3.2vh, 34px);
  min-height: 0;
}

/* stats: fields side by side, label above value */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px clamp(20px, 3vw, 48px);
}
.stat {
  display: flex;
  flex-direction: column;
  flex: 1 1 200px;
  gap: 4px;
  padding-top: 10px;
  border-top: 1px dashed var(--hairline);
}
.label {
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 20px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}
.glitch {
  font-family: "Caveat", cursive;
  font-size: 23px;
  line-height: 1.1;
  color: var(--red);
  font-weight: 500;
}

/* bio */
.bio { font-size: 20px; max-width: 62ch; }
.bio strong { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* skills: side by side, wrap on narrow screens */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(18px, 3vw, 48px);
}
.skill { flex: 1 1 280px; }
.skill h3 {
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--hairline);
}
.skill p { font-size: 18px; color: var(--dim); line-height: 1.7; }

/* contact */
.contact {
  border-top: 1px dashed var(--hairline);
  padding-top: clamp(14px, 2.5vh, 24px);
  font-size: 20px;
}
.key {
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 18px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-right: 14px;
}

/* ---- fit guards ---- */
@media (max-height: 680px) {
  main { gap: 24px; }
  .col-right { gap: 14px; }
  h1 { font-size: 20px; margin-bottom: 10px; }
  .skill p { font-size: 12.5px; line-height: 1.5; }
  .bio { font-size: 14px; }
  .portrait img { width: 90px; height: 90px; }
}

/* ---- small screens: stack, allow scroll ---- */
@media (max-width: 760px) {
  body { height: auto; min-height: 100vh; overflow: auto; }
  main { grid-template-columns: 1fr; padding-left: clamp(28px, 8vw, 48px); }
  main::before { left: clamp(12px, 4vw, 24px); }
  .portrait { margin-top: 24px; }
  .contact { margin-top: 8px; }
}
