/* ---------------------------------------------------------
   Design tokens
--------------------------------------------------------- */
:root {
  --color-bg: #F3EDE2;
  --color-bg-raised: #FBF7EF;
  --color-text: #26261F;
  --color-text-muted: #5C5648;
  --color-border: #DDD3BE;
  --color-accent: #3F5D4F;
  --color-accent-strong: #2E4740;
  --color-accent-tint: #E4E9E1;

  --font-serif: "Lora", Georgia, "Times New Roman", serif;
  --font-sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 46rem;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
}

/* ---------------------------------------------------------
   Reset & base
--------------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  color: var(--color-text);
}

p { margin: 0; }

ul { margin: 0; padding: 0; list-style: none; }

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* ---------------------------------------------------------
   Header
--------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(243, 237, 226, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.wordmark {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
  margin-right: auto;
}

.nav {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.nav a {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav a:hover {
  color: var(--color-accent-strong);
  border-color: var(--color-accent-strong);
}

/* ---------------------------------------------------------
   Buttons
--------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7em 1.3em;
  border-radius: 5px;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-bg-raised);
}
.btn--primary:hover { background: var(--color-accent-strong); }

.btn--ghost {
  background: transparent;
  color: var(--color-accent-strong);
  border-color: var(--color-accent);
}
.btn--ghost:hover {
  background: var(--color-accent-tint);
}

.btn--small {
  font-size: 0.85rem;
  padding: 0.5em 1em;
  flex-shrink: 0;
}

/* ---------------------------------------------------------
   Hero
--------------------------------------------------------- */
.hero {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  padding-top: var(--space-5);
  padding-bottom: var(--space-4);
}

.hero__intro { flex: 1; min-width: 0; }

.eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent-strong);
  margin-bottom: var(--space-1);
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 2.75rem);
  margin-bottom: var(--space-1);
}

.hero__location {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-3);
}

.hero__summary {
  max-width: 40em;
  margin-bottom: var(--space-3);
  color: var(--color-text);
}

.hero__cta {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.hero__portrait {
  flex-shrink: 0;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: var(--color-accent-tint);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__portrait span {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--color-accent-strong);
}

/* ---------------------------------------------------------
   Stats
--------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-5);
  gap: var(--space-2);
}

.stat {
  text-align: center;
  padding: 0 var(--space-1);
  border-left: 1px solid var(--color-border);
}
.stat:first-child { border-left: none; }

.stat__figure {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 600;
  color: var(--color-accent-strong);
  margin-bottom: 0.2em;
}

.stat__label {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  line-height: 1.35;
}

/* ---------------------------------------------------------
   Sections
--------------------------------------------------------- */
.section {
  padding-top: var(--space-4);
  padding-bottom: var(--space-5);
}

.section__heading {
  font-size: 1.6rem;
  margin-bottom: var(--space-1);
}

.section__hint {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-3);
}

/* ---------------------------------------------------------
   Experience — click-to-expand roles
--------------------------------------------------------- */
.role-list {
  border-top: 1px solid var(--color-border);
}

.role {
  border-bottom: 1px solid var(--color-border);
}

.role__summary {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  cursor: pointer;
  list-style: none;
}

.role__summary::-webkit-details-marker { display: none; }

.role__chevron {
  flex-shrink: 0;
  width: 0.6em;
  height: 0.6em;
  margin-top: 0.5em;
  border-right: 2px solid var(--color-accent);
  border-bottom: 2px solid var(--color-accent);
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}

.role[open] .role__chevron {
  transform: rotate(45deg);
  margin-top: 0.3em;
}

.role__head {
  flex: 1;
  min-width: 0;
}

.role__title-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.role__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.15rem;
}

.role__dates {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.role__company {
  display: block;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 0.15em;
}

.role__oneliner {
  display: block;
  margin-top: 0.5em;
  font-size: 0.95rem;
}

.role__bullets {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
  padding-left: calc(0.6em + var(--space-2));
}

.role[open] .role__bullets {
  max-height: var(--bullets-height, 1000px);
}

.role__bullets li {
  position: relative;
  padding: 0.35em 0 0.35em 1em;
  font-size: 0.95rem;
  color: var(--color-text);
}

.role__bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent);
}

.role__bullets { padding-bottom: var(--space-2); }

/* ---------------------------------------------------------
   Skills
--------------------------------------------------------- */
.skill-groups {
  display: grid;
  gap: var(--space-3);
}

.skill-group h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-accent-strong);
  margin-bottom: var(--space-1);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}

.tag-list li {
  font-size: 0.85rem;
  padding: 0.35em 0.8em;
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: 5px;
  color: var(--color-text);
}

/* ---------------------------------------------------------
   Education
--------------------------------------------------------- */
.edu-list {
  border-top: 1px solid var(--color-border);
  margin-bottom: var(--space-4);
}

.edu {
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-2) 0;
}

.edu__title-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.edu__school {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
}

.edu__dates {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.edu__detail {
  margin-top: 0.3em;
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

.languages h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-accent-strong);
  margin-bottom: var(--space-1);
}

/* ---------------------------------------------------------
   Footer
--------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-4) 0;
  background: var(--color-bg-raised);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
}

.site-footer__name {
  font-family: var(--font-serif);
  font-weight: 600;
}

.site-footer__location {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.site-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  font-size: 0.9rem;
}

.site-footer__contact a:hover { color: var(--color-accent-strong); }

.site-footer__copy {
  width: 100%;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border);
}

/* ---------------------------------------------------------
   Responsive
--------------------------------------------------------- */
@media (max-width: 700px) {
  .hero {
    flex-direction: column-reverse;
    gap: var(--space-3);
  }

  .hero__portrait {
    width: 88px;
    height: 88px;
  }
  .hero__portrait span { font-size: 1.7rem; }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    row-gap: var(--space-3);
  }
  .stat:nth-child(2n+1) { border-left: none; }
  .stat:nth-child(-n+2) { padding-top: 0; }

  .site-header__inner { gap: var(--space-2); }
  .nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .role__chevron, .role__bullets { transition: none; }
}
