section {
  position: relative;
  padding: 96px 0;
}
section#about,
section#projects {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--ink-raised);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
}
.eyebrow {
  display: flex;
  gap: 8px;
  align-items: center;

  margin-bottom: 18px;

  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.eyebrow::before {
  content: "\2192";
}

/* ---- HERO ---- */
.hero {
  /* background-image:
    linear-gradient(var(--line-hero-art-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-hero-art-grid) 1px, transparent 1px); */
  background-size: 20px 20px;
}
.hero::before {
  pointer-events: none;
  content: "";

  position: absolute;
  z-index: -1;
  inset: 0;

  opacity: 0.2;
  background: url("../img/hero_bg_pen.webp") center / cover no-repeat;
  filter: invert(1);
  mix-blend-mode: screen;
}
[data-theme="light"] .hero::before {
  filter: none;
  mix-blend-mode: multiply;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}
.hero h1 {
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.hero h1 .hl {
  color: var(--accent);
}
.hero .lede {
  max-width: 46ch;
  margin: 24px 0 32px;
  font-size: 18px;
  color: var(--paper-dim);
}
.hero .greeting {
  max-width: 46ch;
  margin: 10px 0 15px;
  font-size: 18px;
  color: var(--paper-dim);
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;

  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);

  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
  letter-spacing: 0.04em;

  transition: all 0.2s ease;
}
.btn.primary {
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent-btn);
}
.btn.primary:hover {
  transform: translateY(-1px);
  background: #d4b76e;
}
.btn.ghost {
  border-color: var(--line);
  color: var(--paper);
}
.btn.ghost:hover {
  border-color: var(--steel);
  background: var(--ink-raised);
}

.icon-row {
  display: flex;
  gap: 16px;
  margin-top: 36px;
}
.icon-row a {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);

  color: var(--steel);

  transition: all 0.2s ease;
}
.icon-row a:hover {
  border-color: var(--steel);
  color: var(--paper);
}
.icon-row svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* hero tube-layout art */
.hero-art {
  position: relative;

  aspect-ratio: 1/1;
  border: 1px solid var(--line);

  background:
    linear-gradient(var(--line-hero-art-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-hero-art-grid) 1px, transparent 1px);
  background-color: var(--hero-art-bg);
  background-size: 20px 20px;
}
.hero-art svg {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-art .otl {
  fill: none;
  stroke: var(--steel);
  stroke-width: 1;
}
.hero-art .tube {
  opacity: 0.85;

  fill: none;
  stroke: var(--paper-dim);
  stroke-width: 1.1;

  transition:
    stroke 0.6s ease,
    opacity 0.6s ease;
}
.hero-art .tube.live {
  opacity: 1;
  stroke: var(--accent);
}
.hero-art .crosshair {
  stroke: var(--line);
  stroke-dasharray: 3 4;
  stroke-width: 1;
}
.hero-art .tag {
  position: absolute;

  font-family: var(--mono);
  font-size: 11px;
  color: var(--steel);
  letter-spacing: 0.04em;
}
.hero-art .tag.a {
  top: 10px;
  left: 12px;
}
.hero-art .tag.b {
  right: 12px;
  bottom: 10px;
  text-align: right;
}

/* ---- ABOUT ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 56px;
  align-items: start;
}

@media (max-width: 860px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}
.about-grid h2 {
  margin-bottom: 22px;
  font-size: clamp(28px, 4vw, 36px);
}
.about-grid p {
  max-width: 60ch;
  margin: 0 0 18px;
  color: var(--paper-dim);
}
.about-grid a.inline {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-color: #5fd0e055;
  text-underline-offset: 3px;
}
.about-grid a.inline:hover {
  text-decoration-color: var(--cyan);
}

.plate {
  position: relative;

  overflow: hidden;

  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);

  background: var(--ink);
}

.plate::after {
  pointer-events: none;
  content: "";

  position: absolute;
  top: 0;
  left: 0;

  width: 100%;
  height: 100%;

  opacity: 0.5;

  /* Inline SVG Noise Texture */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");

  /* Realistic blend mode & subtle opacity */
  mix-blend-mode: overlay;
}

.plate img {
  display: block;
  width: 100%;
  background-color: rgb(176, 176, 176);
  filter: grayscale(1) contrast(1.05);
}
.plate-cap {
  display: flex;
  justify-content: space-between;

  padding: 10px 14px;
  border-top: 1px solid var(--line);

  font-family: var(--mono);
  font-size: 11px;
  color: var(--steel);
  letter-spacing: 0.05em;
}

.stack-title {
  margin: 36px 0 14px;

  font-family: var(--mono);
  font-size: 12px;
  color: var(--steel);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);

  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--paper-dim);

  transition: all 0.25s ease;
}
.chip:hover {
  border-color: var(--steel);
  color: var(--paper);
}

/* ---- WORK ---- */
.work-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 860px) {
  .work-block {
    grid-template-columns: 1fr;
  }
}
.work-block h2 {
  margin-bottom: 20px;
  font-size: clamp(28px, 4vw, 36px);
}
.work-block p {
  max-width: 56ch;
  margin: 0 0 16px;
  color: var(--paper-dim);
}
.work-block .tooltip {
  cursor: help;
  border-bottom: 1px dotted var(--cyan);
  color: var(--cyan);
}
.callout {
  margin-top: 24px;
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--accent);

  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--paper);
}

.p-and-id {
  overflow: visible;
  width: 100%;
  height: auto;
}
.p-and-id .pid-shapes {
  stroke: var(--line);
}
.p-and-id .pid-lines {
  stroke: var(--steel);
}
.p-and-id .pid-labels {
  fill: var(--steel);
}
.p-and-id .pid-arrow {
  fill: var(--steel);
}

/* ---- PROJECTS ---- */
#projects .dim {
  color: var(--paper-dim);
}
#projects .dim .rule {
  background: var(--line);
}
.proj-intro {
  margin: -30px 0 40px;
  color: var(--paper-dim);
}
.proj-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.proj-grid .sheet.span2 {
  grid-column: 1 / -1;
}

@media (max-width: 860px) {
  .proj-grid {
    grid-template-columns: 1fr;
  }
}
.sheet {
  position: relative;
  border: 1px solid var(--line);
  background: var(--ink);
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.sheet:hover {
  border-color: var(--steel-hover);
  box-shadow: 0 8px 10px rgba(0, 0, 0, 0.1);
}
.sheet-viewport {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.sheet-viewport img {
  display: block;
  width: 100%;
}
.sheet-viewport.code {
  background: var(--ink);
}
.code-bar {
  display: flex;
  gap: 6px;
  align-items: center;

  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.code-bar span:not(.lbl) {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
}
.code-bar .lbl {
  margin-left: 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--steel);
}
.code-body {
  overflow-x: auto;

  padding: 20px 22px 26px;

  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
  color: var(--paper-dim);
  white-space: pre;
}
.code-body .c1 {
  color: var(--steel);
}
.code-body .c2 {
  color: var(--cyan);
}
.code-body .c3 {
  color: var(--accent);
}
.code-body .c4 {
  color: var(--paper);
}
.sheet-viewport .vp-mark {
  position: absolute;
  z-index: 2;
  width: 14px;
  height: 14px;
}
.sheet-viewport .vp-mark::before,
.sheet-viewport .vp-mark::after {
  content: "";
  position: absolute;
  background: var(--accent);
}
.sheet-viewport .vp-mark::before {
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 2px;
}
.sheet-viewport .vp-mark::after {
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
}
.sheet-viewport .vp-mark.tl {
  top: 8px;
  left: 8px;
}
.sheet-viewport .vp-mark.br {
  right: 8px;
  bottom: 8px;
}
.sheet-body {
  padding: 22px 24px 20px;
}
.sheet-tag {
  margin-bottom: 8px;

  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.sheet h3 {
  margin-bottom: 10px;
  font-size: 21px;
}
.sheet p {
  margin: 0 0 18px;
  font-size: 14.5px;
  color: var(--paper-dim);
}
.sheet-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;

  padding: 14px 24px;
  border-top: 1px solid var(--line);
}
.sheet-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.sheet-tags span {
  padding: 3px 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);

  font-family: var(--mono);
  font-size: 11px;
  color: var(--steel);

  transition: all 0.2s ease;
}

.sheet-tags span:hover {
  border-color: var(--steel);
}
.sheet-links {
  display: flex;
  gap: 10px;
}
.sheet-links a {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);

  color: var(--steel);

  transition: all 0.2s ease;
}
.sheet-links a:hover {
  border-color: var(--steel);
  color: var(--paper);
}
.sheet-links svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.sheet.pending {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 100%;
  padding: 40px 24px;
  border-style: dashed;

  text-align: center;
}
.sheet.pending .inner {
  color: var(--steel);
}
.sheet.pending .plus {
  display: block;

  margin-bottom: 10px;

  font-family: var(--mono);
  font-size: 28px;
  color: var(--line);
}
.sheet.pending p {
  margin: 0;
  font-size: 13.5px;
  color: var(--steel);
}

/* ---- CONTACT ---- */
#contact {
  text-align: left;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: end;
}

@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}
#contact h2 {
  margin-bottom: 20px;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.1;
}
#contact p {
  max-width: 50ch;
  margin: 0 0 28px;
  color: var(--paper-dim);
}

.fields {
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12.5px;
}
.field {
  display: flex;
  gap: 16px;
  justify-content: space-between;

  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.field:last-child {
  border-bottom: none;
}
.field .k {
  color: var(--steel);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.field .v {
  color: var(--paper);
  text-align: right;
}
.field .v a {
  color: var(--cyan);
  text-decoration: none;
}
.field .v a:hover {
  text-decoration: underline;
}

footer {
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;

  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--line);
  letter-spacing: 0.04em;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero-art .tube {
    transition: none;
  }
}
