:root {
  --bg: #f5f3ee;
  --surface: #ffffff;
  --text: #171717;
  --muted: #66635d;
  --line: #d8d4cc;
  --accent: #c8102e;
  --max: 1180px;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.site-header {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; justify-content: center; }
.profile-thumb {
  width: 38px;
  height: 38px;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
}
.profile-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.site-nav { display: flex; gap: 24px; }
.site-nav a { color: var(--muted); font-size: .92rem; }
.site-nav a:hover, .site-nav a.active { color: var(--text); }
.nav-toggle { display: none; }

.section {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 100px 0;
}
.section.bordered { border-top: 1px solid var(--line); }
.hero { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; }
.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
h1, h2, h3 { line-height: 1.05; letter-spacing: -.04em; margin: 0; }
h1 { max-width: 760px; font-size: clamp(3.2rem, 9vw, 7.4rem); }
h2 { font-size: clamp(2rem, 4vw, 3.7rem); }
h3 { font-size: 1.25rem; }
.hero-copy { max-width: 680px; margin: 28px 0; font-size: clamp(1.1rem, 2vw, 1.45rem); color: var(--muted); }
.hero-links { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.button { background: var(--text); color: white; padding: 13px 19px; border-radius: 999px; }
.text-link { text-decoration: underline; text-underline-offset: 4px; }

.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 46px; }
.section-intro { max-width: 400px; margin: 0; color: var(--muted); }

.glance-grid, .capability-grid, .project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.glance-card, .project-card, .tool-groups article {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.glance-card { display: flex; flex-direction: column; gap: 10px; }
.glance-card strong { font-size: 1.2rem; }
.label, .status { color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.timeline { position: relative; padding-left: 160px; }
.timeline::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 127px;
  width: 1px; background: var(--line);
}
.timeline-item { position: relative; padding-bottom: 20px; }
.timeline-marker {
  position: absolute;
  left: -39px; top: 24px;
  width: 13px; height: 13px;
  border: 2px solid var(--text);
  background: var(--bg);
  border-radius: 50%;
}
.timeline-item.is-current .timeline-marker { background: var(--accent); border-color: var(--accent); }
.timeline-date {
  position: absolute;
  left: -160px; top: 18px;
  width: 105px;
  color: var(--muted);
  font-size: .78rem;
}
.timeline-trigger {
  width: 100%;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  text-align: left;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.timeline-role, .timeline-company { display: block; }
.timeline-role { font-weight: 700; }
.timeline-company { color: var(--muted); font-size: .92rem; margin-top: 3px; }
.trigger-icon { font-size: 1.6rem; font-weight: 300; transition: transform .2s ease; }
.timeline-item.open .trigger-icon { transform: rotate(45deg); }
.timeline-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .25s ease;
}
.timeline-item.open .timeline-panel { grid-template-rows: 1fr; }
.timeline-panel-inner { overflow: hidden; }
.timeline-panel-inner > *:first-child { margin-top: 18px; }
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 18px; }
.tag {
  padding: 7px 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.capability-grid { grid-template-columns: repeat(2, 1fr); }
.capability-card {
  min-height: 120px;
  padding: 24px;
  text-align: left;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 700;
}
.capability-card span { display: block; margin-bottom: 18px; color: var(--accent); font-size: .72rem; letter-spacing: .08em; }

.tool-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tool-groups p { color: var(--muted); }

details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { padding: 22px 0; cursor: pointer; font-weight: 700; }
.details-content { padding: 0 0 24px; color: var(--muted); }

.project-card { min-height: 180px; }
.project-card h3 { margin-top: 22px; }
.project-card p { color: var(--muted); }
.content-list { border-top: 1px solid var(--line); }
.content-list a {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 22px 0; border-bottom: 1px solid var(--line);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}
.content-list a span { color: var(--accent); }

.definition-dialog {
  width: min(92vw, 560px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
  background: var(--surface);
  color: var(--text);
}
.definition-dialog::backdrop { background: rgba(0,0,0,.35); }
.dialog-close {
  position: absolute; right: 16px; top: 10px;
  border: 0; background: transparent; font-size: 2rem; cursor: pointer;
}
.dialog-note { color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; margin-top: 26px; }

.site-footer {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 28px 0 40px;
  display: flex; justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: .85rem;
}

.page-shell { min-height: 65vh; }
.page-placeholder { max-width: 760px; }
.page-placeholder p { color: var(--muted); font-size: 1.1rem; }

@media (max-width: 760px) {
  .site-header { min-height: 64px; position: relative; }
  .nav-toggle { display: block; border: 0; background: transparent; cursor: pointer; }
  .site-nav {
    display: none; position: absolute; z-index: 5; top: 64px; left: 0; right: 0;
    padding: 20px; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  }
  .site-nav.open { display: flex; }
  .section { padding: 72px 0; }
  .section-heading { display: block; }
  .section-intro { margin-top: 18px; }
  .glance-grid, .capability-grid, .project-grid, .tool-groups { grid-template-columns: 1fr; }
  .timeline { padding-left: 0; }
  .timeline::before, .timeline-marker, .timeline-date { display: none; }
  .timeline-item { padding-bottom: 8px; }
  .site-footer { gap: 16px; flex-direction: column; }
}


/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.contact-card {
  min-height: 180px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.contact-card strong { font-size: clamp(1.05rem, 2vw, 1.35rem); }
.contact-card span:last-child { margin-top: auto; color: var(--accent); }

/* Footer + sitemap */
.site-footer { display: block; }
.footer-top, .footer-bottom {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}
.footer-name { margin: 0; font-weight: 800; }
.footer-copy { margin: 6px 0 0; max-width: 420px; }
.footer-sitemap {
  margin: 34px 0;
  padding: 22px 0;
  display: flex;
  gap: 16px 24px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.footer-sitemap .label { width: 100%; }
.footer-sitemap a:hover { color: var(--accent); }
.compact-footer { padding-top: 40px; }

/* Responsive: intentional small-screen behaviour */
@media (max-width: 760px) {
  .profile-thumb { width: 34px; height: 34px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-top, .footer-bottom { align-items: flex-start; flex-direction: column; }
  .footer-sitemap { gap: 14px 18px; }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .site-header, .section, .site-footer { width: min(calc(100% - 28px), var(--max)); }
  .hero { min-height: 66vh; }
  .hero-links { align-items: flex-start; flex-direction: column; }
  .button { width: 100%; text-align: center; }
  .timeline-trigger { align-items: flex-start; }
  .trigger-icon { line-height: 1; }
  .capability-card { min-height: 100px; }
}
