/* noobcrafts.dev portfolio
   Concept: an industrial control panel. Anodized graphite, crisp 1px grid,
   amber as the single highlight (status light, links, focus). */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --base: #1d2125;      /* anodized graphite, page */
  --surface: #262b30;   /* panel cells */
  --line: #3a4148;      /* grid lines */
  --text: #e4e7ea;
  --muted: #9aa3ab;
  --amber: #f2a93b;     /* the only highlight */

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(1.25rem, 3.5vw, 2rem);
  --measure: 62ch;

  color-scheme: dark;
}

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

body {
  margin: 0;
  background: var(--base);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;  /* 17px */
  line-height: 1.6;
  font-kerning: normal;
  font-variant-numeric: tabular-nums;
  -webkit-text-size-adjust: 100%;
  padding-inline: 1rem;
  padding-block: clamp(1rem, 5vw, 4rem);
}

p {
  margin-block: 0 1em;
}

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

a {
  color: var(--amber);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- The console: cells separated by 1px lines ---------- */
/* The console's background is the line color; cells sit on top with a 1px gap. */

.console {
  max-width: 60rem;
  margin-inline: auto;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.console > *,
.readouts > div,
.row > * {
  background: var(--surface);
}

/* ---------- Top and bottom bars ---------- */

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 0.85rem var(--pad);
  font-size: 0.9375rem;
}

.bar p {
  margin: 0;
}

.brand {
  font-weight: 700;
  font-stretch: 125%;
  letter-spacing: 0.02em;
}

.bar-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
}

.lang {
  padding: 0.1rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--text);
  text-decoration: none;
}

.lang:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
}

/* Status light: powers on once at page load */
.led {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgb(242 169 59 / 0.18), 0 0 12px rgb(242 169 59 / 0.55);
  animation: power-on 1.2s ease-out 0.3s both;
}

@keyframes power-on {
  0%   { background: #4a4031; box-shadow: none; }
  30%  { background: var(--amber); box-shadow: 0 0 0 3px rgb(242 169 59 / 0.25), 0 0 18px rgb(242 169 59 / 0.8); }
  45%  { background: #6b5634; box-shadow: none; }
  60%  { background: var(--amber); box-shadow: 0 0 0 3px rgb(242 169 59 / 0.25), 0 0 18px rgb(242 169 59 / 0.8); }
}

@media (prefers-reduced-motion: reduce) {
  .led { animation: none; }
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(2.5rem, 9vw, 5.5rem) var(--pad) clamp(2rem, 6vw, 3.5rem);
}

.name {
  margin: 0;
  font-size: clamp(2.5rem, 9vw, 5.5rem);
  line-height: 0.95;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.role {
  margin: 1rem 0 0;
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  color: var(--muted);
}

/* ---------- Readouts ---------- */

.readouts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--line);
}

.readouts > div {
  padding: 1rem var(--pad) 1.1rem;
}

.readouts dt {
  font-size: 0.875rem;
  color: var(--muted);
}

.readouts dd {
  margin: 0.15rem 0 0;
  font-size: 1.125rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* ---------- Label | content rows ---------- */

.rows {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.row {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: 1px;
  background: var(--line);
}

.row > * {
  padding: 1.5rem var(--pad);
}

.row h2 {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.7;
  font-weight: 600;
  color: var(--muted);
}

.row-body > * {
  max-width: var(--measure);
}

.stack {
  display: grid;
  gap: 1.25rem;
}

.stack h3 {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 0.9375rem;
  background: var(--base);
}

.company {
  margin-bottom: 0.1rem;
  font-size: 1.375rem;
  line-height: 1.3;
  font-weight: 700;
  font-stretch: 112%;
}

.muted {
  color: var(--muted);
}

/* ---------- Footer ---------- */

.footer {
  color: var(--muted);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

/* ---------- Narrow screens ---------- */

@media (max-width: 44rem) {
  .readouts {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .row h2 {
    padding-bottom: 0;
  }

  .row-body {
    padding-top: 0.5rem;
  }
}
