:root {
  color-scheme: light dark;
  --bg: #faf9f6;
  --card: #ffffff;
  --text: #222222;
  --muted: #666666;
  --line: #dedbd2;
  --accent: #2f4f4f;
  --accent-soft: #edf3f3;
  --lead: #333333;
  --shadow: rgba(0,0,0,.04);
  --photo-shadow: rgba(0,0,0,0.16);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111312;
    --card: #1b1f1e;
    --text: #f2f0eb;
    --muted: #c8c2b8;
    --line: #343a38;
    --accent: #9fc7c1;
    --accent-soft: #172320;
    --lead: #e2ded6;
    --shadow: rgba(0,0,0,.28);
    --photo-shadow: rgba(0,0,0,.45);
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }
.site-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { font-size: 1.35rem; font-weight: 700; letter-spacing: .02em; color: var(--text); }
.nav-links { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.nav-links a { color: var(--text); font-size: .98rem; }
.hero { padding: 80px 0 60px; }
.hero-card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: clamp(28px, 5vw, 56px); box-shadow: 0 10px 30px var(--shadow); }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; color: var(--muted); font-weight: 700; }
h1 { font-size: clamp(2.4rem, 6vw, 5rem); line-height: .95; margin: 12px 0 24px; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.1; margin: 0 0 18px; }
h3 { margin-top: 0; }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 850px; color: var(--lead); }
.section { padding: 54px 0; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px; min-height: 210px; }
.card p { color: var(--muted); }
.button { display: inline-block; margin-top: 12px; padding: 11px 16px; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font-weight: 700; }
.button:hover { background: var(--accent); color: var(--card); text-decoration: none; }
.banner { background: var(--accent-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; overflow: hidden; }
.banner p { margin: 0; text-align: center; font-weight: 700; letter-spacing: .08em; color: var(--accent); }
.content { max-width: 850px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: clamp(24px, 4vw, 44px); }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.site-footer { margin-top: 60px; padding: 34px 0; border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; }
.socials { display: flex; gap: 14px; flex-wrap: wrap; }
@media (max-width: 780px) {
  .nav { align-items: flex-start; flex-direction: column; padding: 18px 0; }
  .grid { grid-template-columns: 1fr; }
  .hero { padding-top: 42px; }
}

.hero-card-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
  justify-items: center;
  text-align: center;
}

.hero-card-split .lead {
  margin-left: auto;
  margin-right: auto;
}

.hero-photo img,
.profile-photo {
  width: min(300px, 78vw);
  height: auto;
  max-height: min(420px, 88vw);
  object-fit: contain;
  object-position: center center;
  border-radius: 24px;
  display: block;
  box-shadow: 0 10px 30px var(--photo-shadow);
}

.profile-photo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

@media (max-width: 760px) {
  .hero-card-split {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-photo img {
    margin: 0 auto;
  }
}

.portfolio-item h3 {
  margin-bottom: 0.75rem;
}

.portfolio-item .button {
  margin-top: 0.75rem;
}

.document-view {
  max-width: 920px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(24px, 4vw, 44px);
}

.document-view h2 {
  margin-top: 2rem;
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
}

.document-view h3 {
  margin-top: 1.4rem;
  margin-bottom: 0.2rem;
}

.document-view .doc-heading {
  text-align: center;
  margin-bottom: 2rem;
}

.document-view .doc-heading h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 0.5rem;
}

.document-view ul {
  margin-top: 0.4rem;
}

.document-view li {
  margin-bottom: 0.45rem;
}

.reference-card {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}

.reference-card:last-child {
  border-bottom: 0;
}

.reference-card p {
  margin: 0.2rem 0;
}
