:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #131313;
  --muted: #64686d;
  --border: #e8e8e3;
  --chip: #f3f3ef;
  --shadow: 0 20px 45px rgba(17, 17, 17, 0.06);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #0b0b0b;
  --text: #f5f5f1;
  --muted: #b3b3ab;
  --border: #252525;
  --chip: #121212;
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.page {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 72px;
}

.page--narrow {
  width: min(760px, calc(100% - 40px));
}

.page-top {
  display: flex;
  justify-content: flex-end;
}

.page-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.control-button,
.card-link,
.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 0.95rem;
  font-weight: 600;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease,
    transform 140ms ease;
}

.control-button {
  border-radius: 999px;
}

.card-link,
.contact-link {
  border-radius: 14px;
}

.control-button--primary {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

[data-theme-toggle] {
  min-width: 46px;
  padding-inline: 0.85rem;
  font-size: 1.15rem;
  line-height: 1;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: start;
  padding: 46px 0 84px;
}

.hero-copy h1,
.page-title {
  margin: 0 0 16px;
  font-size: clamp(2.8rem, 6vw, 4.25rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-copy p,
.lede {
  margin: 0;
  max-width: 46rem;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.4rem);
}

.profile-frame {
  width: clamp(124px, 19vw, 166px);
  aspect-ratio: 1;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.profile-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.section {
  padding: 56px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 24px;
}

.section h2 {
  margin: 0 0 24px;
  font-size: clamp(2rem, 4vw, 2.65rem);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.entry-list {
  display: grid;
  gap: 40px;
}

.entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
}

.entry-logo {
  width: 72px;
  height: 72px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  display: grid;
  place-items: center;
}

.entry-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.entry-logo--team {
  width: 86px;
  height: 74px;
  padding: 8px;
}

.entry-logo--malto {
  height: 86px;
  padding: 6px;
}

.entry-logo--icon {
  border-radius: 999px;
}

.entry-copy {
  min-width: 0;
}

.entry-title {
  margin: 0 0 2px;
  font-size: 1.55rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.entry-role {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 1.02rem;
}

.entry-date {
  margin: 0;
  padding-top: 5px;
  color: var(--muted);
  font-size: 0.98rem;
  white-space: nowrap;
}

.detail-list {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.detail-list li {
  position: relative;
  padding-left: 16px;
}

.detail-list li + li {
  margin-top: 7px;
}

.detail-list li::before {
  content: "-";
  position: absolute;
  left: 0;
  top: 0;
}

.detail-list strong,
.grade-list strong {
  color: var(--text);
}

.lede--compact {
  margin-bottom: 18px;
  font-size: 1.04rem;
}

.grade-list p {
  margin: 0;
  color: var(--muted);
}

.grade-list p + p {
  margin-top: 4px;
}

.card-grid,
.article-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.card,
.article-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
}

.card h3,
.article-card h2,
.article-card h3 {
  margin: 0 0 14px;
  font-size: 1.95rem;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.card p,
.article-card p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1.02rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  background: var(--chip);
  color: var(--text);
  font-size: 0.82rem;
}

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.blog-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.text-link {
  color: var(--text);
  font-weight: 600;
}

.text-link::after {
  content: " →";
}

.icon {
  width: 1rem;
  height: 1rem;
  flex: none;
  fill: currentColor;
}

.icon--large {
  width: 1.2rem;
  height: 1.2rem;
}

.articles-shell,
.article-shell {
  padding-top: 46px;
}

.article-list--full {
  margin-top: 36px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 0.92rem;
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--chip);
}

.article-content {
  color: var(--muted);
  font-size: 1.05rem;
}

.article-content p {
  margin: 0 0 1.2rem;
}

.article-content ul {
  margin: 0 0 1.2rem;
  padding-left: 1.35rem;
}

.article-content li + li {
  margin-top: 0.55rem;
}

.article-content h2 {
  margin: 2.2rem 0 0.85rem;
  color: var(--text);
  font-size: 1.75rem;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.article-content a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

@media (hover: hover) {
  .control-button:hover,
  .card-link:hover,
  .contact-link:hover {
    transform: translateY(-1px);
  }

  .text-link:hover {
    opacity: 0.75;
  }
}

@media (max-width: 900px) {
  .card-grid,
  .article-list {
    grid-template-columns: 1fr;
  }

  .blog-header {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 34px 0 56px;
  }

  .profile-frame {
    justify-self: start;
  }

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

  .entry-date {
    grid-column: 2;
    padding-top: 0;
  }
}

@media (max-width: 540px) {
  .page,
  .page--narrow {
    width: calc(100% - 24px);
    padding-top: 20px;
    padding-bottom: 56px;
  }

  .section {
    padding: 42px 0;
  }

  .entry {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .entry-date {
    grid-column: auto;
  }

  .entry-logo {
    width: 64px;
    height: 64px;
  }

  .entry-logo--team {
    width: 80px;
    height: 68px;
    padding: 7px;
  }

  .entry-logo--malto {
    height: 80px;
    padding: 5px;
  }

  .contact-grid {
    flex-direction: column;
  }

  .control-button,
  .card-link,
  .contact-link {
    min-width: min(100%, 280px);
  }

  .card h3,
  .article-card h3 {
    font-size: 1.65rem;
  }
}
