/* --- Variables (natural / wellness palette from photography) --- */
:root {
  --color-bg: #F5F2EB;
  --color-bg-alt: #E8E4DC;
  --color-text: #1A2B27;
  --color-text-muted: #5C6B62;
  --color-accent: #2D6B69;
  --color-accent-hover: #1A4A48;
  --color-border: #C7BCA3;
  --color-terracotta: #8C4233;
  --color-sky: #A7D3EB;
  --color-white: #fff;
  --color-black: #1A2B27;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-serif: 'Fraunces', Georgia, serif;
  --container: min(90vw, 720px);
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(26, 43, 39, .08);
  --shadow-lg: 0 4px 20px rgba(26, 43, 39, .12);
}

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-hover); text-decoration: underline; }
ul { margin: 0 0 var(--space-md); padding-left: 1.25rem; }
li { margin-bottom: var(--space-xs); }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

@media (max-width: 700px) {
  .container { padding: 0 1.25rem; }
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 242, 235, .97);
  border-bottom: 2px solid var(--color-accent);
  backdrop-filter: blur(8px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.logo {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--color-text);
  text-decoration: none;
}

.logo:hover { text-decoration: none; color: var(--color-accent); }

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav a {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.nav a:hover { color: var(--color-accent); text-decoration: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 12px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  min-height: 44px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background .2s, color .2s;
  line-height: 1.3;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  color: var(--color-white);
}

.btn-secondary {
  background: var(--color-bg-alt);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-border);
  color: var(--color-text);
}

.btn-resume {
  background: var(--color-black);
  color: var(--color-white);
}

.btn-resume:hover {
  background: var(--color-accent-hover);
  color: var(--color-white);
}

/* --- Floral / nature decorations --- */
.hero-with-floral {
  position: relative;
}

.floral-deco {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 200px;
  margin: 0 auto;
  color: var(--color-accent);
  pointer-events: none;
}

.floral-deco svg {
  width: 100%;
  height: auto;
  display: block;
}

.floral-deco--top {
  top: var(--space-md);
}

.floral-deco--bottom {
  bottom: var(--space-md);
}

.floral-deco--top .floral-deco-dot { opacity: 0.5; }
.floral-deco--bottom .floral-deco-dot { opacity: 0.5; }

.section-alt .container { padding-top: var(--space-sm); }
.section-alt::before {
  content: '';
  display: block;
  height: 40px;
  margin-bottom: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40' fill='none'%3E%3Cpath d='M0 20 C12 8 28 8 40 20 S68 32 80 20 S108 8 120 20 S148 32 160 20 S188 8 200 20' stroke='%232D6B69' stroke-width='1.8' fill='none' opacity='0.4' stroke-linecap='round'/%3E%3Cpath d='M10 28 C22 14 38 14 50 28 C62 42 78 42 90 28 C102 14 118 14 130 28 C142 42 158 42 170 28 C182 14 190 20 200 26' stroke='%231A4A48' stroke-width='1.4' fill='none' opacity='0.32' stroke-linecap='round'/%3E%3Cpath d='M-5 12 C8 24 22 24 35 12 C48 0 62 0 75 12 C88 24 102 24 115 12 C128 0 142 0 155 12 C168 24 182 24 200 14' stroke='%232D6B69' stroke-width='1.2' fill='none' opacity='0.28' stroke-linecap='round'/%3E%3Ccircle cx='25' cy='20' r='2.5' fill='%232D6B69' opacity='0.45'/%3E%3Ccircle cx='75' cy='20' r='2.5' fill='%232D6B69' opacity='0.45'/%3E%3Ccircle cx='125' cy='20' r='2.5' fill='%232D6B69' opacity='0.45'/%3E%3Ccircle cx='175' cy='20' r='2.5' fill='%232D6B69' opacity='0.45'/%3E%3C/svg%3E") repeat-x center top;
  background-size: 200px 40px;
}

.footer-floral {
  padding-top: var(--space-md);
  color: var(--color-accent);
  text-align: center;
}

.footer-floral svg {
  width: 120px;
  height: 24px;
  margin: 0 auto;
  display: block;
  opacity: 0.7;
}

/* --- Hero --- */
.hero {
  padding: var(--space-2xl) 0;
  text-align: center;
  background: var(--color-bg) linear-gradient(180deg, rgba(45, 107, 105, 0.03) 0%, transparent 40%) no-repeat;
}

.hero-with-floral .floral-deco--top svg { width: 100%; max-width: 220px; margin: 0 auto; }
.hero-with-floral .floral-deco--top { max-width: 220px; }
.hero-with-floral .floral-deco--bottom { max-width: 220px; }
.hero-with-floral .floral-deco--bottom svg { width: 100%; max-width: 220px; margin: 0 auto; }

.hero-headshot {
  display: block;
  width: 160px;
  height: 160px;
  margin: 0 auto var(--space-lg);
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-accent);
  box-shadow: var(--shadow-lg);
}

.hero-label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  font-weight: 600;
  margin: 0 0 var(--space-sm);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 var(--space-sm);
  color: var(--color-text);
}

.hero-tagline {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 32ch;
  margin: 0 auto var(--space-lg);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

/* --- Sections --- */
.section {
  padding: var(--space-2xl) 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 var(--space-lg);
  color: var(--color-text);
  padding-bottom: var(--space-xs);
  border-bottom: 3px solid var(--color-accent);
  display: inline-block;
}

/* --- About --- */
.about-grid {
  display: grid;
  gap: var(--space-xl);
  align-items: start;
}
@media (min-width: 600px) {
  .about-grid { grid-template-columns: 1fr 280px; }
}
.about-photo {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: var(--radius);
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  justify-self: center;
}
@media (min-width: 600px) {
  .about-photo { justify-self: end; }
}
.about-content p {
  margin: 0 0 var(--space-md);
  color: var(--color-text-muted);
  max-width: 60ch;
}

.about-content p:last-child { margin-bottom: 0; }

.about-content--work-intro { margin-bottom: 1.5rem; }

/* --- Cards (education, experience) --- */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow);
}

.card:last-child { margin-bottom: 0; }

.card h3 {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 var(--space-xs);
  color: var(--color-text);
}

.card .meta {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-sm);
}

.meta--spaced { margin-top: 0.75rem; }

.card p:last-of-type { margin-bottom: 0; }
.card ul { margin-bottom: 0; }

/* --- Honors --- */
.honors-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.honors-list li {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
  margin: 0;
}

.honors-list li:last-child { border-bottom: none; }

/* --- Contact --- */
.contact-section .section-title { margin-bottom: var(--space-sm); }

.contact-intro {
  color: var(--color-text-muted);
  margin: 0 0 var(--space-lg);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
}

.contact-link {
  font-weight: 500;
  font-size: 1.0625rem;
}

@media (max-width: 700px) {
  .contact-link {
    display: inline-block;
    padding: 0.5rem 0;
    min-height: 44px;
    line-height: 44px;
  }
}

/* --- Footer --- */
.site-footer {
  padding: var(--space-lg) 0;
  border-top: 2px solid var(--color-accent);
  background: var(--color-bg-alt);
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* --- Mobile-first improvements --- */
@media (max-width: 700px) {
  .hero-with-floral .floral-deco--top,
  .hero-with-floral .floral-deco--bottom {
    display: none;
  }

  .site-header .container { min-height: 56px; }

  .logo { font-size: 1.125rem; }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(300px, 88vw);
    height: 100vh;
    height: 100dvh;
    background: var(--color-white);
    border-left: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    padding: 4.5rem 1.25rem 1.5rem;
    gap: 0;
    transform: translateX(100%);
    transition: transform .25s ease;
    box-shadow: -4px 0 24px rgba(0,0,0,.12);
    overflow-y: auto;
  }

  .nav.is-open { transform: translateX(0); }

  .nav a {
    padding: 1rem 0;
    min-height: 48px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    font-size: 1rem;
  }

  .nav .btn-resume {
    margin-top: 1rem;
    border: none;
    min-height: 48px;
    justify-content: center;
  }

  .nav-toggle { display: flex; }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .nav-toggle span { transition: transform .2s, opacity .2s; }

  /* Hero: tighter spacing, readable tagline */
  .hero {
    padding: 1.75rem 0 2rem;
  }

  .hero-headshot {
    width: 140px;
    height: 140px;
    margin-bottom: 1.25rem;
  }

  .hero-label { font-size: 0.8125rem; }

  .hero-title {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
    margin-bottom: 0.5rem;
    line-height: 1.25;
  }

  .hero-tagline {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0 auto 1.5rem;
    max-width: none;
    padding: 0 0.5rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
  }

  /* Sections: balanced padding */
  .section { padding: 2rem 0; }
  .section-alt { padding: 2rem 0; }

  .section-title {
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
  }

  /* Cards: comfortable reading */
  .card {
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-radius: 10px;
  }

  .card h3 {
    font-size: 1.0625rem;
    line-height: 1.35;
    word-wrap: break-word;
  }

  .card .meta { font-size: 0.8125rem; }

  .card ul {
    padding-left: 1.125rem;
    font-size: 0.9375rem;
    line-height: 1.6;
  }

  .card li { margin-bottom: 0.375rem; }

  /* About text */
  .about-content p {
    font-size: 0.9375rem;
    line-height: 1.65;
  }

  /* Honors list */
  .honors-list li {
    padding: 0.875rem 0;
    font-size: 0.9375rem;
  }

  /* Contact */
  .contact-intro { margin-bottom: 1.25rem; font-size: 0.9375rem; }

  .contact-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .contact-links .btn {
    width: 100%;
    min-height: 48px;
    margin-top: 0.25rem;
  }

  /* Footer */
  .site-footer { padding: 1.25rem 0; }
  .site-footer p { font-size: 0.8125rem; }
}

/* Very small phones */
@media (max-width: 380px) {
  .container { padding: 0 1rem; }
  .hero-title { font-size: 1.6rem; }
  .hero-headshot { width: 120px; height: 120px; }
}
