:root {
  --text: #1a1a1a;
  --text-muted: #555;
  --bg: #fdfcf8; /* Warm off-white characteristic of matte paper */
  --bg-alt: #f1f0ea;
  --primary: #2d5da1; /* Apartamento-inspired blue */
  --accent: #e94e33; /* Modern red accent */
  --border: #d1d1cf;
  --sans-serif: "Space Grotesk", sans-serif;
  --sans: "Inter", sans-serif;
  --mono: "Fira Code", monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 30px;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-family: var(--sans-serif);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(3.5rem, 9vw, 6.5rem);
  margin-bottom: 2rem;
  color: var(--primary);
}
h2 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1.5rem;
}
h3 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

p {
  font-size: 1.05rem;
  font-weight: 400;
  margin-bottom: 1.2rem;
}

.eyebrow {
  font-family: var(--sans-serif);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--accent);
  display: inline-block;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

/* Refined Editorial Side Labels */
.side-label {
  font-family: var(--sans-serif);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-top: 1px solid var(--text);
  padding-top: 0.5rem;
  width: fit-content;
  margin-bottom: 2rem;
}

/* Header */
header {
  padding: 40px 0;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-wrap {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 12px;
}

.header-logo {
  height: 32px;
  width: auto;
}

.logo-text {
  font-family: var(--sans-serif);
  font-weight: 700;
  font-size: 2rem;
  text-decoration: none;
  color: var(--primary);
  letter-spacing: -0.05em;
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
}
nav li {
  margin-left: 28px;
}
nav a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  transition: opacity 0.2s;
}
nav a:hover {
  opacity: 0.6;
}

.btn-outline {
  background: var(--primary);
  color: white !important;
  padding: 10px 22px;
  border-radius: 4px;
}

/* Sections */
section {
  padding: 120px 0;
  border-top: 1px solid var(--border);
}
#hero {
  padding: 80px 0 160px;
  border-top: none;
}

.editorial-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 60px;
}

/* Buttons */
.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 20px 44px;
  text-decoration: none;
  font-size: 1.2rem;
  font-family: var(--sans-serif);
  font-weight: 700;
  border-radius: 4px;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary:hover {
  transform: scale(1.05);
}

/* Content Blocks */
.content p {
  max-width: 680px;
  font-size: 1.3rem;
  color: var(--text);
  font-weight: 400;
}

/* Constraints List */
.constraint-list {
  list-style: none;
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.constraint-item h4 {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
  color: var(--primary);
}

/* Examples */
.ex-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-bottom: 120px;
  align-items: flex-start;
}

.ex-info {
  max-width: 800px;
}

.ex-code-container {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 8px 8px 0px var(--bg-alt);
}

pre {
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text);
  overflow-x: auto;
}

.ex-visual {
  background: var(--bg-alt);
  border-radius: 8px;
  padding: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 500px;
}

.ex-visual img {
  width: 100%;
  max-width: 1000px;
  height: auto;
  filter: drop-shadow(10px 10px 20px rgba(0, 0, 0, 0.1));
}

/* Bio */
.author-bio h3 {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: var(--accent);
}
.author-bio p {
  font-size: 1.6rem;
  margin-bottom: 2rem;
  line-height: 1.3;
}

.link-editorial {
  font-family: var(--sans-serif);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* Footer */
footer {
  padding: 80px 0;
  background: var(--primary);
  color: #fff;
}
.footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}
footer a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid #fff;
}

@media (max-width: 900px) {
  .editorial-row,
  .ex-card,
  .constraint-list {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  h1 {
    font-size: 4rem;
  }
  .ex-card {
    margin-bottom: 60px;
  }
  .side-label {
    border-top: 1px solid var(--text);
    padding-top: 0.25rem;
  }
}
