/* ─── Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;1,9..144,300;1,9..144,400&family=Inter:wght@300;400;500&display=swap');

/* ─── Variables ──────────────────────────────────────────── */
:root {
  --ivory:        #F6F8FA;
  --black:        #1A1A14;
  --black-soft:   #3D3D35;
  --gray:         #78776E;
  --gray-light:   #D4D4C8;
  --green-dark:   #1E4D73;
  --green:        #2E5F8A;
  --green-mid:    #5B9DC9;
  --green-light:  #C8DFF0;
  --white:        #FFFFFF;

  --font-serif: 'Fraunces', serif;
  --font-sans:  'Inter', sans-serif;

  --max-width: 1100px;
  --content-width: 720px;
  --gap: 2rem;
}

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

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  background: var(--ivory);
  color: var(--black);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.75;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ─── Layout ─────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.content-width {
  max-width: var(--content-width);
  margin: 0 auto;
}

/* ─── Nav ────────────────────────────────────────────────── */
nav {
  padding: 1.5rem 0;
  border-bottom: 0.5px solid var(--gray-light);
  position: sticky;
  top: 0;
  background: var(--ivory);
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.nav-wordmark {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--black);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  color: var(--gray);
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--black); }

.nav-links .nav-cta {
  font-weight: 400;
  color: var(--gray);
}

.nav-links .nav-cta:hover { color: var(--black); }

/* ─── Footer ─────────────────────────────────────────────── */
footer {
  border-top: 0.5px solid var(--gray-light);
  padding: 2.5rem 0;
  margin-top: 6rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-size: 13px;
  color: var(--gray);
}

.footer-email {
  font-size: 13px;
  color: var(--green);
  font-weight: 500;
}

.footer-email:hover { color: var(--green-dark); }

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  padding: 6rem 0 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.hero-text { max-width: 620px; }

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 1.5rem;
}

.hero-intro {
  font-size: 17px;
  font-weight: 300;
  color: var(--gray);
  line-height: 1.75;
  margin-bottom: 2rem;
  max-width: 540px;
}

.hero-cube {
  flex-shrink: 0;
  opacity: 0.9;
}

/* ─── Button ─────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 11px 22px;
  border-radius: 6px;
  background: var(--green);
  color: var(--white);
  transition: background 0.2s;
}

.btn:hover { background: var(--green-dark); }

.btn-outline {
  background: transparent;
  color: var(--green);
  border: 1px solid var(--green);
}

.btn-outline:hover {
  background: var(--green-light);
  color: var(--green-dark);
}

/* ─── Section ────────────────────────────────────────────── */
.section { padding: 5rem 0; }

.section + .section {
  border-top: 0.5px solid var(--gray-light);
}

.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 0.75rem;
}

.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 400;
  color: var(--black);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.section-body {
  font-size: 16px;
  font-weight: 300;
  color: var(--black-soft);
  line-height: 1.8;
  max-width: 640px;
}

/* ─── Case studies ───────────────────────────────────────── */
.case-studies { display: flex; flex-direction: column; gap: 3rem; }

.case-study {
  padding: 2.5rem;
  border: 0.5px solid var(--gray-light);
  border-radius: 12px;
  background: var(--white);
}

.case-study-meta {
  font-size: 12px;
  color: var(--gray);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.case-study h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--black);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.case-study p {
  font-size: 15px;
  font-weight: 300;
  color: var(--black-soft);
  line-height: 1.8;
  margin-bottom: 0.75rem;
}

.case-study p:last-child { margin-bottom: 0; }

/* ─── Articles ───────────────────────────────────────────── */
.article-list { display: flex; flex-direction: column; gap: 0; }

.article-item {
  padding: 2rem 0;
  border-bottom: 0.5px solid var(--gray-light);
}

.article-item:first-child { border-top: 0.5px solid var(--gray-light); }

.article-item h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--black);
  margin-bottom: 0.25rem;
  transition: color 0.2s;
}

.article-item:hover h3 { color: var(--green); }

.article-meta {
  font-size: 12px;
  color: var(--gray);
}

/* ─── Single article ─────────────────────────────────────── */
.article-header { padding: 4rem 0 2.5rem; }

.article-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 1rem;
}

.article-content {
  font-size: 16px;
  font-weight: 300;
  color: var(--black-soft);
  line-height: 1.85;
}

.article-content h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--black);
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
}

.article-content p { margin-bottom: 1.75rem; }

.article-content blockquote {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 300;
  font-style: italic;
  color: var(--green);
  border-left: 2px solid var(--green);
  padding-left: 1.25rem;
  margin: 2rem 0;
  line-height: 1.5;
}

/* ─── About ──────────────────────────────────────────────── */
.bio {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
}

.bio-photo {
  position: sticky;
  top: 7rem;
}

.bio-photo img {
  width: 100%;
  border-radius: 12px;
  border: 0.5px solid var(--gray-light);
}

.about-content {
  font-size: 16px;
  font-weight: 300;
  color: var(--black-soft);
  line-height: 1.85;
}

.about-content p { margin-bottom: 1.25rem; }

@media (max-width: 768px) {
  .bio {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .bio-photo {
    position: static;
    max-width: 240px;
  }
}

/* ─── Contact ────────────────────────────────────────────── */
.contact-wrap { padding: 5rem 0; max-width: 560px; }

.contact-wrap p {
  font-size: 16px;
  font-weight: 300;
  color: var(--black-soft);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.contact-email {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--green);
  font-weight: 400;
}

.contact-email:hover { color: var(--green-dark); }

/* ─── Home teasers ───────────────────────────────────────── */
.teasers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.teaser {
  padding: 1.75rem;
  border: 0.5px solid var(--gray-light);
  border-radius: 12px;
  background: var(--white);
  transition: border-color 0.2s;
}

.teaser:hover { border-color: var(--green-mid); }

.teaser-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.5rem;
}

.teaser h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--black);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.teaser p {
  font-size: 14px;
  font-weight: 300;
  color: var(--gray);
  line-height: 1.7;
}

.teaser-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--green);
}

.teaser-link:hover { color: var(--green-dark); }

/* ─── Utilities ──────────────────────────────────────────── */
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-4 { margin-top: 4rem; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero { flex-direction: column; padding: 3rem 0; }
  .hero-cube { display: none; }
  .nav-links { display: none; }
  .footer-inner { flex-direction: column; gap: 0.5rem; text-align: center; }
}

/* ─── Mobile nav ─────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--black);
  opacity: 1;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.nav-mobile {
  display: none;
  border-top: 0.5px solid var(--gray-light);
  background: var(--ivory);
}

.nav-mobile.open {
  display: block;
}

.nav-mobile-links {
  list-style: none;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nav-mobile-links li a {
  display: block;
  padding: 0.75rem 0;
  font-size: 16px;
  color: var(--gray);
  border-bottom: 0.5px solid var(--gray-light);
  transition: color 0.2s;
}

.nav-mobile-links li a:hover { color: var(--black); }

.nav-mobile-links .nav-cta {
  font-weight: 400;
  color: var(--gray);
}

/* Show the hamburger on mobile. Must come after the base
   `.nav-hamburger { display: none }` rule above, since the media query
   adds no specificity and would otherwise lose on source order. */
@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
}

/* ─── Prevent scrollbar layout shift ────────────────────── */
html {
  overflow-y: scroll;
}

/* ─── Article byline ─────────────────────────────────────── */
.article-byline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.article-author {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--black-soft);
}

.article-date {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 300;
  color: var(--gray);
}

.article-byline-sep {
  font-size: 14px;
  color: var(--gray-light);
}

/* ─── Article back link ──────────────────────────────────── */
.article-back {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 0.5px solid var(--gray-light);
}

.article-back-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--green);
  transition: color 0.2s;
}

.article-back-link:hover { color: var(--green-dark); }
