@font-face {
  font-family: 'je';
  src: url('montserrat-regular.ttf') format('truetype');
  font-display: swap;
}
:root {
  --bg: #2b2b2b;
  --bg-alt: #363636;
  --panel: #333;
  --text: #e2e2e2;
  --muted: #9a9a9a;
  --pink: #C23C8F;
  --green: #46B47C;
  --yellow: #F1E731;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'je', 'Montserrat', system-ui, sans-serif;
  line-height: 1.7;
}
a { color: var(--pink); text-decoration: none; }
a:hover { text-decoration: underline; }
strong, b { color: var(--green); }
img { display: block; max-width: 100%; height: auto; margin: 1rem auto; border-radius: 6px; }
hr { border: 0; border-top: 1px solid #444; margin: 2rem 0; }

/* header
   Two images, no classes to target - so they're addressed by position:
   first paragraph = the wide blockout banner, second = the arkode logo. */
.site-header { background: var(--bg-alt); text-align: center; border-bottom: 2px solid var(--green); }
.site-header p { margin: 0; }
.site-header p:first-child img {          /* banner: a strip, not a wall */
  width: 100%; height: 150px; object-fit: cover;
  margin: 0; border-radius: 0;
}
.site-header p:nth-child(2) img {         /* logo: sized, and lifted to overlap */
  width: 96px; height: auto;
  margin: -48px auto .1rem; position: relative;
}
@media (max-width: 640px) {
  .site-header p:first-child img { height: 96px; }
  .site-header p:nth-child(2) img { width: 68px; margin-top: -34px; }
}
.site-header a {
  display: inline-block; margin: 0 .5rem; padding: .9rem .2rem; color: var(--text);
  text-transform: uppercase; letter-spacing: .05em; font-size: .85rem;
}
.site-header a:hover { color: var(--green); text-decoration: none; }

/* content */
.content { max-width: 820px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.content h1 { font-size: 2rem; margin: .2rem 0 1rem; color: #fff; }
.content h2 { font-size: 1.5rem; margin: 2.4rem 0 .8rem; padding-bottom: .3rem; border-bottom: 1px solid #444; color: #fff; }
.content h3 { font-size: 1.2rem; margin: 1.8rem 0 .6rem; color: var(--green); }
.content h4 { font-size: 1.05rem; margin: 1.4rem 0 .5rem; color: var(--yellow); }
blockquote { margin: 1.2rem 0; padding: .6rem 1.2rem; border-left: 3px solid var(--pink); background: var(--panel); color: #cfcfcf; font-style: italic; }
code { background: #1f1f1f; padding: .1rem .35rem; border-radius: 4px; font-family: Consolas, monospace; font-size: .9em; }
pre { background: #1f1f1f; padding: 1rem; border-radius: 6px; overflow-x: auto; border: 1px solid #444; }
pre code { background: none; padding: 0; }
table { border-collapse: collapse; margin: 1rem 0; width: 100%; }
th, td { border: 1px solid #555; padding: .5rem .8rem; text-align: left; }
th { background: var(--panel); color: var(--green); }
ul, ol { padding-left: 1.4rem; }
li { margin: .3rem 0; }
iframe { display: block; width: 100%; aspect-ratio: 16/9; border: 0; margin: 1.2rem auto; border-radius: 6px; }

/* portfolio cards - no JavaScript anywhere; the movement is all CSS */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.1rem;
  margin: 1.2rem 0 2.6rem;
}
.card {
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid #444; border-radius: 8px;
  overflow: hidden;
  color: var(--text); text-decoration: none;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  animation: card-in .45s ease-out both;
}
.card:hover, .card:focus-visible {
  text-decoration: none; transform: translateY(-6px);
  box-shadow: 0 10px 26px rgba(0,0,0,.45);
}
/* the three brand colours cycle across the grid, so no two neighbours match */
.card:nth-child(3n+1):hover, .card:nth-child(3n+1):focus-visible { border-color: var(--pink); }
.card:nth-child(3n+2):hover, .card:nth-child(3n+2):focus-visible { border-color: var(--green); }
.card:nth-child(3n+3):hover, .card:nth-child(3n+3):focus-visible { border-color: var(--yellow); }

.card-img { display: block; overflow: hidden; aspect-ratio: 16 / 10; background: #1f1f1f; }
.card-img img {
  width: 100%; height: 100%; object-fit: cover;
  margin: 0; border-radius: 0;
  transition: transform .5s ease;
}
.card:hover .card-img img, .card:focus-visible .card-img img { transform: scale(1.07); }

.card-body { display: block; padding: .85rem 1rem 1rem; }
.card-title { display: block; color: #fff; font-size: 1.05rem; line-height: 1.35; }
.card-role {
  display: block; color: var(--green);
  font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; margin-top: .2rem;
}
.card-desc {                                  /* clamped so cards stay level */
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted); font-size: .85rem; line-height: 1.5; margin-top: .55rem;
}
.card-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .75rem; }
.card-tags b {
  color: var(--muted); font-weight: normal; font-size: .7rem;
  background: #2a2a2a; border: 1px solid #4a4a4a; border-radius: 999px;
  padding: .05rem .55rem;
  transition: border-color .25s ease, color .25s ease;
}
.card:hover .card-tags b { border-color: #5f5f5f; color: #c4c4c4; }

/* Article rows - the same card laid on its side. One column, image left,
   text right, and it collapses back to a stacked card on a narrow screen. */
.cards.rows { grid-template-columns: 1fr; gap: .9rem; }
.cards.rows .card { flex-direction: row; align-items: stretch; }
.cards.rows .card-img { flex: 0 0 30%; max-width: 260px; aspect-ratio: 16 / 9; }
.cards.rows .card-body { flex: 1 1 auto; padding: 1rem 1.2rem; }
.cards.rows .card-desc { -webkit-line-clamp: 2; }
.cards.rows .card:hover, .cards.rows .card:focus-visible { transform: translateX(6px); }

@media (max-width: 620px) {
  .cards.rows .card { flex-direction: column; }
  .cards.rows .card-img { flex-basis: auto; max-width: none; }
}

/* cards arrive in sequence rather than all at once */
@keyframes card-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.card:nth-child(1) { animation-delay: 0s }
.card:nth-child(2) { animation-delay: .07s }
.card:nth-child(3) { animation-delay: .14s }
.card:nth-child(4) { animation-delay: .21s }
.card:nth-child(5) { animation-delay: .28s }
.card:nth-child(6) { animation-delay: .35s }
.card:nth-child(7) { animation-delay: .42s }
.card:nth-child(8) { animation-delay: .49s }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .card-img img, .card-tags b { animation: none; transition: none; }
}

/* footer */
.site-footer { background: var(--bg-alt); text-align: center; padding: 1.5rem 1rem; border-top: 2px solid var(--green); color: var(--muted); font-size: .9rem; margin-top: 2rem; }
.site-footer a { color: var(--muted); margin: 0 .4rem; }
.site-footer a:hover { color: var(--green); }
