/* site.css — no framework, no build step. */

/* 01 Tokens */

:root {
  --paper:        #f2f0e6;
  --paper-2:      #ebe8da;
  --paper-3:      #e0dcc9;

  --ink:          #14140f;
  --ink-2:        #45443a;
  --ink-3:        #63614f;   /* 5.4:1 on --paper */

  --rule:         #a8a48e;
  --rule-soft:    #c6c2ac;
  --bevel-light:  #fbfaf4;
  --bevel-dark:   #8f8b76;

  --screen:       #111827;
  --screen-ink:   #dfe4ea;
  --screen-ink-2: #9aa4b4;

  --link:         #0000ee;
  --link-visited: #551a8b;
  --crt:          #00aa66;   /* dark bg only */
  --crt-ink:      #006644;   /* 6.2:1 on paper */
  --crt-bright:   #35e39b;   /* dark panels only, 10.6:1 */
  --crt-amber:    #ffb000;   /* dark panels only */
  --crt-cyan:     #38f0e8;   /* dark panels only */
  --warn:         #e6d85c;
  --focus:        #0000ee;
  --focus-dark:   #ffe14d;

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "DejaVu Sans Mono", "Liberation Mono", monospace;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", "Liberation Serif", serif;

  --gap:      clamp(1.5rem, 4vw, 3rem);
  --pad:      clamp(1rem, 3vw, 1.75rem);
  --measure:  68ch;
  --shell:    1120px;
}

/* 02 Reset + base */

*, *::before, *::after { box-sizing: border-box; }

body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
  padding: 0;
}

html {
    scroll-behavior: auto;
  background: var(--paper);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background-color: var(--paper);
    background-image:
    repeating-linear-gradient(0deg,   rgba(20,20,15,.014) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg,  rgba(20,20,15,.014) 0 1px, transparent 1px 4px);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
    min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--mono);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 0;
  color: var(--ink);
  text-transform: none;
}

h1 { font-size: clamp(1.75rem, 4.2vw, 2.9rem); }
h2 { font-size: clamp(1.1rem, 2vw, 1.35rem); }
h3 { font-size: 1rem; }

p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

a:visited { color: var(--link-visited); }

a:hover,
a:focus-visible {
  text-decoration-thickness: 3px;
  background: var(--warn);
  color: var(--ink);
}

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

hr {
  border: 0;
  height: 0;
  border-top: 1px dashed var(--rule);
  margin: 1.5rem 0;
}

ul, ol { margin: 0 0 1.1rem; padding-left: 1.25rem; }
li { margin-bottom: .35rem; }

code, kbd, samp, pre { font-family: var(--mono); font-size: .92em; }

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

.main-content { flex: 1; }
.container { max-width: var(--shell); margin: 0 auto; padding: 0 var(--pad); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: .8rem;
  padding: .6rem 1rem;
  text-decoration: none;
  border: 2px solid var(--warn);
}
.skip-link:focus {
  left: .5rem;
  top: .5rem;
}

/* a11y only */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* 03 Shared furniture */

.panel {
  background: var(--paper-2);
  border: 1px solid var(--ink);
  box-shadow:
    inset 1px 1px 0 var(--bevel-light),
    inset -1px -1px 0 var(--bevel-dark),
    3px 3px 0 rgba(20, 20, 15, .18);
}

/* one lit screen only — everything else is paper */

.win {
  background: var(--screen);
  border: 1px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(20, 20, 15, .35);
}

.win__bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .3rem .5rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.win__title { flex: 1; }
.win__bar { border-bottom: 1px solid var(--crt-bright); }
.win__dots { display: flex; gap: 6px; align-items: center; }
.win__dots i {
  width: 11px; height: 11px;
  border-radius: 50%;
  display: block;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35);
}
.win__dots i:nth-child(1) { background: #ff5f57; }
.win__dots i:nth-child(2) { background: #febc2e; }
.win__dots i:nth-child(3) { background: #28c840; }
.win__body {
  padding: var(--pad);
  color: var(--screen-ink);
  background-image: repeating-linear-gradient(
    180deg, rgba(255,255,255,.030) 0 1px, transparent 1px 3px
  );
  box-shadow: inset 0 0 26px rgba(0, 0, 0, .55);
}
.win__body a { color: var(--crt-bright); }
.win__body a:hover,
.win__body a:focus-visible { background: var(--crt-bright); color: var(--screen); }
.win__body a:focus-visible { outline-color: var(--focus-dark); }

.section { padding: clamp(2.25rem, 5vw, 3.5rem) 0 0; }
.section:first-of-type { padding-top: clamp(1.5rem, 4vw, 2.5rem); }

.section__head {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  flex-wrap: wrap;
}

.section__title {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* looks like a filename */
.section__meta {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .12em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.section__meta::before { content: "[ "; }
.section__meta::after  { content: " ]"; }

/* checkerboard, not a border */
.rule {
  height: 4px;
  border: 0;
  margin: .6rem 0 1.4rem;
  background: repeating-conic-gradient(var(--rule) 0% 25%, transparent 0% 50%) 0 0 / 4px 4px;
}
.rule--dotted { height: 0; background: none; border-top: 1px dotted var(--rule); }

.prose { font-family: var(--serif); max-width: var(--measure); }
.prose h3 {
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 1.6rem 0 .5rem;
}
.prose ul { list-style: none; padding-left: 1.1rem; }
.prose ul li { position: relative; }
.prose ul li::before {
  content: "\25AA";              /* ▪ */
  position: absolute;
  left: -1.1rem;
  color: var(--crt-ink);
}
.prose blockquote {
  margin: 1.2rem 0;
  padding: .2rem 0 .2rem 1rem;
  border-left: 4px solid var(--rule);
  color: var(--ink-2);
  font-style: italic;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .3rem .55rem;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  color: var(--ink-2);
  white-space: nowrap;
}

/* text carries the meaning */
.dot {
  width: 8px; height: 8px;
  background: var(--crt);
  border: 1px solid rgba(0,0,0,.35);
  flex: none;
}

.cursor {
  display: inline-block;
  width: .55em;
  height: 1.05em;
  margin-left: .15em;
  background: var(--ink);
  vertical-align: -.18em;
}
@media (prefers-reduced-motion: no-preference) {
  .cursor { animation: blink 1.06s steps(1, end) infinite; }
}
@keyframes blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* 04 Masthead + navigation */

.site-header {
  position: static;
  background: var(--paper);
  border-bottom: 3px double var(--rule);
}

.masthead {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 1rem var(--pad) .75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.masthead__id {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  color: var(--ink);
}
.masthead__id:hover,
.masthead__id:focus-visible { background: none; }
.masthead__id:hover .masthead__name { background: var(--warn); }

.pixlogo { display: block; width: 34px; height: 34px; flex: none; }

.masthead__text { display: flex; flex-direction: column; line-height: 1.2; }
.masthead__name {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .02em;
}
.masthead__path {
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--ink-3);
  letter-spacing: .06em;
}

.nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__item { margin: 0; }
.nav__item + .nav__item::before {
  content: "|";
  color: var(--ink-3);
  padding: 0 .5rem;
}
.nav__link {
  display: inline-block;
  padding: .3rem 0;   /* 24px hit target */
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  color: var(--ink);
}
.nav__link:hover,
.nav__link:focus-visible {
  background: none;
  color: var(--link);
  border-bottom-color: var(--link);
}

/* 05 Hero */

.nameplate {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
  padding: clamp(1.75rem, 5vw, 3rem) 0 0;
}

.nameplate__greeting {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--crt-amber);
  margin-bottom: .6rem;
}

.nameplate__name {
  margin-bottom: 1.25rem;
  color: var(--screen-ink);
    text-shadow: 2px 2px 0 rgba(53, 227, 155, .28);
}

.idlist ul {
  list-style: none;
  counter-reset: idnum;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  gap: .1rem;
}
.idlist li {
  counter-increment: idnum;
  display: flex;
  align-items: baseline;
  gap: .6rem;
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(.9rem, 1.6vw, 1.05rem);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .22rem 0;
  color: var(--screen-ink);
  border-bottom: 1px dotted rgba(223, 228, 234, .22);
}
.idlist li::before {
  content: counter(idnum, decimal-leading-zero) " /";
  color: var(--crt-bright);
  font-weight: 400;
  flex: none;
}

.nameplate__tagline {
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--screen-ink-2);
  margin: 0;
}
.nameplate__tagline .cursor { background: var(--crt-bright); }

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

.frame {
  margin: 0;
  padding: 8px;
  background: var(--paper-2);
  border: 1px solid var(--ink);
  box-shadow:
    inset 1px 1px 0 var(--bevel-light),
    inset -1px -1px 0 var(--bevel-dark),
    4px 4px 0 rgba(20,20,15,.2);
}
.frame__img {
  width: 100%;
  height: 24rem;
  object-fit: cover;
  border: 1px solid var(--bevel-dark);
  background: var(--paper-3);
}
.frame__cap {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .08em;
  color: var(--ink-3);
  padding-top: .5rem;
  text-transform: uppercase;
}

.specs {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .1rem .75rem;
  font-family: var(--mono);
  font-size: .7rem;
  border: 1px solid var(--rule);
  padding: .6rem .7rem;
  background: var(--paper-2);
}
.specs dt { color: var(--ink-3); letter-spacing: .1em; text-transform: uppercase; }
.specs dd { margin: 0; color: var(--ink); }
.specs dd.status-online { color: var(--crt-ink); font-weight: 700; }

/* 06 About */

.about__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); }

.about__lede {
  font-family: var(--mono);
  font-size: clamp(.95rem, 1.8vw, 1.1rem);
  line-height: 1.5;
  border-left: 4px solid var(--crt-ink);
  padding-left: 1rem;
  margin-bottom: 1.4rem;
  max-width: var(--measure);
    white-space: pre-line;
}

/* 07 Experience (CV) */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
}

.cv { list-style: none; margin: 0; padding: 0; }

.cv__entry {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0 1.1rem;
  margin: 0;
  padding: .9rem 0;
  border-top: 1px dotted var(--rule);
  position: relative;
}
.cv__entry:first-child { border-top: 3px double var(--rule); }
.cv__entry:last-child { border-bottom: 1px dotted var(--rule); }

.cv__period {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .06em;
  color: var(--ink-2);
  display: block;
  padding-top: .15rem;
}
.cv__when::after {
  content: "";
  display: block;
  margin-top: .35rem;
  border-top: 1px solid var(--rule-soft);
}

.cv__role { margin: 0 0 .15rem; font-size: .95rem; letter-spacing: .02em; }
.cv__role a { color: var(--ink); text-decoration-color: var(--rule); }
.cv__role a:hover, .cv__role a:focus-visible { color: var(--ink); }

.cv__org {
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--crt-ink);
  margin: 0 0 .4rem;
  letter-spacing: .04em;
}
.cv__desc { font-size: .95rem; margin: 0 0 .4rem; max-width: 54ch; }
.cv__tech {
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--ink-3);
  margin: 0;
  letter-spacing: .04em;
}
.cv__tech::before { content: "> "; color: var(--ink-3); }

/* 08 Systems (skills) */

.profile { padding: var(--pad); }
.profile h3 {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--crt-ink);
  margin: 1.25rem 0 .5rem;
}
.profile h3:first-child { margin-top: 0; }
.profile h3:last-of-type { color: var(--link-visited); }

.profile ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
}
.profile li {
  margin: 0;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .04em;
  padding: .22rem .5rem;
  border: 1px solid var(--rule);
  background: var(--paper-3);
  color: var(--ink);
}
.profile p { font-size: .8rem; color: var(--ink-3); font-family: var(--mono); }

/* 09 Photography */

.gallery {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-flow: row dense;
  gap: .9rem;
}

.shot {
  margin: 0;
  grid-column: span 2;
  background: var(--paper-2);
  border: 1px solid var(--ink);
  padding: 6px;
  box-shadow: 3px 3px 0 rgba(20,20,15,.15);
}
.shot:nth-of-type(6n + 2),
.shot:nth-of-type(6n + 3) { grid-column: span 3; }
.shot--featured { grid-column: span 6; }

.shot__link { display: block; text-decoration: none; }
.shot__link:hover, .shot__link:focus-visible { background: none; }

.shot__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--paper-3);
  border: 1px solid var(--bevel-dark);
  filter: saturate(.92) contrast(1.02);
}
.shot:nth-of-type(6n + 2) .shot__img,
.shot:nth-of-type(6n + 3) .shot__img { aspect-ratio: 4 / 3; }
.shot--featured .shot__img { aspect-ratio: 21 / 9; }

.shot__link:hover .shot__img,
.shot__link:focus-visible .shot__img { filter: none; }

.shot__cap {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  padding-top: .45rem;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.shot__title { color: var(--ink); }
.shot__loc { color: var(--ink-3); white-space: nowrap; }

/* 10 Currently */

.currently { padding: var(--pad); }
.currently ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.currently li {
  margin: 0;
  font-family: var(--mono);
  font-size: .82rem;
  line-height: 1.55;
  position: relative;
  padding-left: 2.4rem;
}
.currently li::before {
  content: "[+]";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--crt-ink);
}
.currently strong {
  color: var(--ink-3);
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  display: block;
}
.currently p { margin: 0; }

/* 11 Contact */

.contacts ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  max-width: 46rem;
}
.contacts li {
  margin: 0;
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: .75rem;
  align-items: baseline;
  padding: .5rem 0;
  border-bottom: 1px dotted var(--rule);
  font-family: var(--mono);
  font-size: .84rem;
}
.contacts li:first-child { border-top: 1px dotted var(--rule); }
.contacts a { display: inline-block; padding: .1rem 0; }
.contacts strong {
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* 12 Colophon (footer) */

.main-footer {
  background: none;
  border-top: 3px double var(--rule);
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding: 1.5rem 0 2.5rem;
  text-align: left;
}
.main-footer .container { display: grid; gap: .9rem; }
.main-footer p { color: var(--ink-2); margin: 0; }

.colophon__top {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
  justify-content: space-between;
  align-items: baseline;
}
.colophon__copy {
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .06em;
}
.colophon__motto {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .1em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.badges { display: flex; flex-wrap: wrap; gap: .5rem; }

.counter {
  font-family: var(--mono);
  letter-spacing: .22em;
  background: var(--ink);
  color: var(--crt-bright);
  padding: .2rem .45rem;
  border: 1px solid var(--ink);
}


.colophon__fine {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
/* 13 Responsive */

@media (max-width: 900px) {
  .nameplate { grid-template-columns: minmax(0, 1fr); }
  .nameplate__aside { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .shot,
  .shot:nth-of-type(6n + 2),
  .shot:nth-of-type(6n + 3) { grid-column: span 2; }
  .shot--featured { grid-column: span 4; }
  .shot:nth-of-type(6n + 2) .shot__img,
  .shot:nth-of-type(6n + 3) .shot__img { aspect-ratio: 1 / 1; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }

  .masthead { align-items: flex-start; flex-direction: column; gap: .75rem; padding-bottom: .5rem; }
  /* pipes orphan on wrap */
  .nav__list { gap: .35rem 1rem; }
  .nav__item + .nav__item::before { content: none; }
  .nav__link { font-size: .72rem; }

  .nameplate__aside { grid-template-columns: minmax(0, 1fr); }
  .frame__img { height: 18rem; }

  .cv__entry { grid-template-columns: minmax(0, 1fr); gap: .3rem; }
  .cv__when::after { display: none; }
  .cv__period {
    padding-top: 0;
    color: var(--ink);
    background: var(--paper-3);
    display: inline-block;
    padding: .1rem .4rem;
  }

  .gallery { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .shot,
  .shot:nth-of-type(6n + 2),
  .shot:nth-of-type(6n + 3),
  .shot--featured { grid-column: span 1; }
  .shot__img,
  .shot:nth-of-type(6n + 2) .shot__img,
  .shot:nth-of-type(6n + 3) .shot__img { aspect-ratio: 4 / 3; }
  .shot--featured .shot__img { aspect-ratio: 3 / 2; }

  .contacts li { grid-template-columns: minmax(0, 1fr); gap: .1rem; padding: .6rem 0; }
  .currently li { padding-left: 2.1rem; }

  .colophon__top { flex-direction: column; gap: .4rem; }
}

/* 14 Motion, focus, print */

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.win__body a:focus-visible { outline-color: var(--focus-dark); }

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

@media print {
  :root { --paper: #fff; }
  body { background: #fff; font-size: 11pt; }
  .site-header, .main-footer, .nameplate__aside, .gallery, .skip-link { display: none; }
  .panel, .win, .frame { box-shadow: none; }
  .profile { background: #fff; color: #000; border: 1px solid #000; }
  .profile h3, .cv__org { color: #000; }
  .profile li { background: #fff; color: #000; border-color: #666; }
  .section { padding-top: 1.2rem; break-inside: avoid; }
  .cv__entry { break-inside: avoid; }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #444; }
}
