/* ============================================================
   Variables
   ============================================================ */

:root {
  --bg:         #f7f4ef;
  --bg2:        #ece7e0;
  --fg:         #1e1a16;
  --bright:     #0e0a08;
  --dim:        #6a6058;
  --accent:     #9e4820;
  --accent-bg:  #fdf4ee;
  --accent-dim: #b06030;
  --border:     #cdc8c0;
  --red:        #b02a1a;

  --font:    'Fira Code', 'Courier New', Courier, monospace;
  --size:    14px;
  --measure: 900px;
  --pad:     1.5rem;
}

/* ============================================================
   Reset
   ============================================================ */

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

html {
  font-size: var(--size);
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

p {
  margin-bottom: 0.85rem;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================================
   Utilities
   ============================================================ */

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

/* ============================================================
   Layout
   ============================================================ */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ============================================================
   Topbar
   ============================================================ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.topbar__inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0.65rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar__name {
  color: var(--fg);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.topbar__name:hover {
  color: var(--accent);
  text-decoration: none;
}

.topbar__nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.topbar__nav a {
  color: var(--dim);
  font-size: 0.85rem;
  text-decoration: none;
}

.topbar__nav a:hover {
  color: var(--fg);
  text-decoration: none;
}

.topbar__cta {
  color: var(--accent) !important;
}

/* ============================================================
   Block structure
   ============================================================ */

.block {
  padding: 2.75rem 0;
}

.section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--dim);
  margin-bottom: 1.5rem;
}

.block__out {
  padding-left: 1.25rem;
  border-left: 1px solid var(--border);
}

.rule {
  border-top: 1px solid var(--border);
}

/* ============================================================
   Hero
   ============================================================ */

.big-name {
  font-size: clamp(2.75rem, 7vw, 5rem);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.025em;
  color: var(--bright);
  margin-bottom: 1.5rem;
  font-family: var(--font);
}

.hero-meta {
  color: var(--dim);
  font-size: 0.8rem;
  margin-bottom: 1.5rem;
  letter-spacing: 0.03em;
}

.hero-bio {
  line-height: 2;
  margin-bottom: 1.75rem;
}

.hero-links {
  font-size: 0.9rem;
}

/* ============================================================
   Services
   ============================================================ */

.svc-block {
  margin-bottom: 2.25rem;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--border);
}

.svc-block:last-of-type {
  border-bottom: none;
  margin-bottom: 1.25rem;
}

.svc-title {
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--bright);
  margin-bottom: 1rem;
}

.svc-tags {
  font-size: 0.8rem;
  color: var(--dim);
  margin-top: 0.25rem;
}

.svc-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
}

.svc-list li {
  padding: 0.25rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.svc-list li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--dim);
}

/* ============================================================
   Legal advisory teaser
   ============================================================ */

.legal-teaser {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 1.75rem;
}

.legal-teaser__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.legal-teaser__cta {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--accent);
}

/* ============================================================
   File listing (projects)
   ============================================================ */

.block-lead {
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
}

.file-list {
  border: 1px solid var(--border);
}

.file-row {
  border-bottom: 1px solid var(--border);
}

.file-row:last-child {
  border-bottom: none;
}

.file-row__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  flex-wrap: wrap;
}

.file-row__head:hover {
  background: var(--bg2);
}

.file-row__head:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: -1px;
}

.file-status {
  font-size: 0.7rem;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--accent-dim);
  flex-shrink: 0;
  letter-spacing: 0.05em;
}

.file-name {
  color: var(--bright);
  font-weight: 500;
  text-decoration: none;
}

.file-name:hover {
  color: var(--accent);
  text-decoration: underline;
}

.file-tech {
  font-size: 0.8rem;
  flex: 1;
}

.file-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
  font-family: var(--font);
}

.file-chevron {
  font-size: 0.65rem;
  transition: transform 0.1s;
  color: var(--dim);
  display: inline-block;
}

.file-row--open .file-chevron {
  transform: rotate(90deg);
}

.file-row__detail {
  display: none;
  padding: 0.65rem 0.9rem 0.85rem;
  font-size: 0.85rem;
  line-height: 1.9;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  color: var(--dim);
}

.file-row--open .file-row__detail {
  display: block;
}

.label {
  display: inline-block;
  color: var(--accent);
  min-width: 5.5rem;
  -webkit-user-select: none;
  user-select: none;
}

/* ============================================================
   Logo strip
   ============================================================ */

.logo-strip {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.75rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.logo-link {
  display: block;
  width: 110px;
  height: 32px;
  text-decoration: none;
  flex-shrink: 0;
}

.co-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  filter: grayscale(100%) opacity(0.4);
  transition: filter 0.2s;
  display: block;
}

.logo-link:hover .co-logo {
  filter: grayscale(100%) opacity(0.65);
}

/* ============================================================
   About
   ============================================================ */

.about-out p {
  margin-bottom: 0.9rem;
}

/* ============================================================
   Footer
   ============================================================ */

.foot {
  border-top: 1px solid var(--border);
}

.foot__inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.1rem var(--pad);
  font-size: 0.8rem;
}

/* ============================================================
   Mobile
   ============================================================ */

@media (max-width: 640px) {
  :root {
    --size: 13px;
    --pad:  1rem;
  }

  .topbar__nav a:not(.topbar__cta) {
    display: none;
  }

  .big-name {
    font-size: 2.75rem;
  }

  .logo-strip {
    gap: 1.75rem;
  }

  .file-tech {
    width: 100%;
    flex: none;
  }
}
