:root {
  --background: #f7faf3;
  --surface: #ffffff;
  --surface-muted: #ddebc8;
  --text: #1e261c;
  --text-muted: #535f4d;
  --forest: #24351f;
  --green: #6f9235;
  --green-dark: #4f6f26;
  --navy: #1f2e46;
  --border: rgba(36, 53, 31, 0.14);
  --shadow: 0 24px 60px rgba(36, 53, 31, 0.10);
  --max-width: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(111, 146, 53, 0.13), transparent 34rem),
    var(--background);
  color: var(--text);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: 18px;
  line-height: 1.62;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--green-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus-visible {
  color: var(--forest);
}


.intro-text a,
.section-body a,
.cv-item a,
.card a {
  color: var(--green-dark);
  font-weight: 700;
  text-decoration-color: rgba(111, 146, 53, 0.45);
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.2em;
}
.item-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.item-link:hover h3,
.item-link:focus h3 {
  text-decoration: underline;
  text-decoration-color: rgba(111, 146, 53, 0.55);
  text-underline-offset: 0.2em;
}

.intro-text a:hover,
.intro-text a:focus-visible,
.section-body a:hover,
.section-body a:focus-visible,
.cv-item a:hover,
.cv-item a:focus-visible,
.card a:hover,
.card a:focus-visible {
  color: var(--forest);
  text-decoration-color: var(--green);
}

.site-header {
  background: linear-gradient(135deg, var(--forest), #365426);
  color: #f8fbf2;
  padding: 3rem 1.5rem 4rem;
}

.header-inner,
main,
.site-footer > p {
  width: min(var(--max-width), calc(100% - 3rem));
  margin-inline: auto;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.15rem, 4.8vw, 3.9rem);
  letter-spacing: -0.055em;
}

h2 {
  color: var(--forest);
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  letter-spacing: -0.04em;
}

h3 {
  color: var(--forest);
  font-size: 1.08rem;
}

p {
  margin: 0;
}

p + p {
  margin-top: 1rem;
}

.tagline {
  margin-top: 0.6rem;
  color: #e8efd9;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(0.96rem, 1.7vw, 1.12rem);
}

main {
  margin-top: -2.5rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(460px, 1.18fr);
  gap: clamp(2.4rem, 5vw, 4.25rem);
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.65rem;
  padding: clamp(1.6rem, 3.8vw, 3rem);
  box-shadow: var(--shadow);
}

.hero-copy {
  grid-column: 1;
}

.hero-copy h2 {
  margin-bottom: 2rem;
}

.intro-text {
  max-width: 72ch;
}

.hero-copy p {
  color: var(--text-muted);
}

.hero-image-wrap {
  grid-column: 2;
  position: relative;
}

.hero-image-wrap::before {
  content: "";
  position: absolute;
  inset: 1rem -1rem -1rem 1rem;
  z-index: 0;
  border-radius: 1.35rem;
  background: var(--surface-muted);
}

.profile-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center;
  border-radius: 1.35rem;
  border: 5px solid #fff;
  box-shadow: 0 18px 42px rgba(31, 46, 70, 0.20);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.7rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 24px rgba(111, 146, 53, 0.26);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--green-dark);
}

.button.secondary {
  color: var(--navy);
  border: 1px solid rgba(31, 46, 70, 0.25);
  background: #fff;
}

.content-section {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  margin-top: 1.8rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--border);
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, 0.82);
}

.content-section.muted {
  background: rgba(221, 235, 200, 0.52);
}

.section-heading h2 {
  font-size: clamp(1.28rem, 2vw, 1.72rem);
}

.section-body {
  max-width: 76ch;
  color: var(--text-muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card,
.cv-item {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  border-radius: 0.95rem;
  padding: 1.05rem;
}

.card p,
.cv-item p {
  margin-top: 0.45rem;
  color: var(--text-muted);
  font-size: 0.96rem;
}

.cv-list {
  display: grid;
  gap: 0.85rem;
}

.site-footer {
  margin-top: 3rem;
  padding: 2rem 1.5rem;
  background: var(--forest);
  color: #e8efd9;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-image-wrap {
    grid-column: auto;
  }

  .hero-image-wrap {
    max-width: 680px;
  }
}

@media (max-width: 820px) {
  body {
    font-size: 17px;
  }

  .content-section {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .site-header {
    padding-top: 2.7rem;
  }

  .header-inner,
  main,
  .site-footer > p {
    width: min(100% - 2rem, var(--max-width));
  }

  .hero,
  .content-section {
    border-radius: 1.1rem;
  }

  .profile-photo,
  .hero-image-wrap::before {
    border-radius: 0.9rem;
  }
}

/* v6: card hover highlight */
.card,
.cv-item {
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.card:hover,
.card:focus-within,
.cv-item:hover,
.cv-item:focus-within {
  background: #f0f6e5;
  border-color: rgba(111, 146, 53, 0.45);
  box-shadow: 0 14px 30px rgba(36, 53, 31, 0.12);
  transform: translateY(-2px);
}
