/* =====================
   CSS CUSTOM PROPERTIES
   ===================== */
:root {
  --bg: #FAF7F2;
  --bg-alt: #EDE8DF;
  --accent: #C4714F;
  --accent-light: #E8A98A;
  --text: #2C2C2C;
  --text-muted: #6B6560;
  --white: #FFFFFF;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(44, 44, 44, 0.08);
  --shadow-hover: 0 8px 32px rgba(44, 44, 44, 0.14);
  --max-width: 1100px;
  --section-padding: 5rem 1.5rem;
  --accent-dark: #a85c3d;
  --pill-accent-bg: #F5E8E2;
}

/* =====================
   RESET
   ===================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

/* =====================
   TYPOGRAPHY
   ===================== */
h1, h2, h3 {
  font-family: var(--font-serif);
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }

p { margin-bottom: 0.75rem; }
p:last-child { margin-bottom: 0; }

/* =====================
   LAYOUT UTILITIES
   ===================== */
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section {
  padding: var(--section-padding);
}

.section:nth-child(even) {
  background: var(--bg-alt);
}

.section-title {
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin-top: 0.5rem;
  border-radius: 2px;
}

.subsection-title {
  font-family: var(--font-serif);
  color: var(--text-muted);
  margin: 2.5rem 0 1.25rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

/* =====================
   FADE-IN ON SCROLL
   ===================== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* =====================
   NAV
   ===================== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 1.5rem;
  background: rgba(250, 247, 242, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.3s, box-shadow 0.3s;
}

#navbar.scrolled {
  background: var(--bg);
  box-shadow: 0 2px 12px rgba(44, 44, 44, 0.08);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* =====================
   HERO
   ===================== */
.hero {
  padding: 7rem 1.5rem 5rem;
  background: var(--bg);
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-photo img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
}

.hero-content h1 {
  margin-bottom: 0.5rem;
}

.tagline {
  color: var(--accent);
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 1.25rem;
  letter-spacing: 0.01em;
}

.bio {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 1.75rem;
  max-width: 520px;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  border: 1.5px solid var(--bg-alt);
  border-radius: 6px;
  padding: 0.45rem 0.9rem;
  background: var(--white);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.hero-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cv-button {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.cv-button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--white);
}

/* =====================
   RESEARCH & PATENTS
   ===================== */
.featured-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.featured-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
}

.featured-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.card-accent {
  width: 5px;
  background: var(--accent);
  flex-shrink: 0;
}

.featured-card .card-body {
  padding: 1.75rem;
}

.card-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.featured-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.card-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.research-roles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.research-role {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

.role-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.role-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.role-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.role-org {
  display: block;
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.research-role p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* =====================
   EXPERIENCE
   ===================== */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--bg-alt);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-content {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.timeline-header-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.company-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--white);
}

.edu-header-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.edu-header-main .company-logo {
  width: 48px;
  height: 48px;
}

.job-title {
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.job-org {
  display: block;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

.job-date {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.timeline-content ul {
  list-style: disc;
  padding-left: 1.25rem;
}

.timeline-content li {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 0.4rem;
}

.timeline-content li:last-child { margin-bottom: 0; }

/* =====================
   EDUCATION
   ===================== */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.edu-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.edu-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.edu-header h3 { font-size: 1.05rem; }

.edu-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.edu-degree {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.edu-detail {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.edu-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.edu-courses {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.6;
}

/* =====================
   LEADERSHIP
   ===================== */
.leadership-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.leadership-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.leadership-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.leadership-header h3 { font-size: 1rem; }

.leadership-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.leadership-org {
  display: block;
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.leadership-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* =====================
   HONORS & AWARDS
   ===================== */
.honors-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.honor-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--accent-light);
}

.honor-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.honor-header h3 { font-size: 1.05rem; }

.honor-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.honor-org {
  display: block;
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.honor-item p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* =====================
   SKILLS & INTERESTS
   ===================== */
.skills-block {
  margin-bottom: 1.75rem;
}

.skills-block:last-child { margin-bottom: 0; }

.skills-label {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
}

.pills-accent .pill {
  background: var(--pill-accent-bg);
  color: var(--accent);
}

.pills-sand .pill {
  background: var(--bg-alt);
  color: var(--text);
}

.interests-text {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* =====================
   FOOTER
   ===================== */
#footer {
  background: var(--text);
  color: rgba(255,255,255,0.6);
  padding: 3rem 1.5rem;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.footer-links a {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent-light);
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 768px) {
  :root {
    --section-padding: 3rem 1.25rem;
  }

  /* Nav hamburger */
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.25rem;
    box-shadow: 0 8px 24px rgba(44,44,44,0.1);
    border-top: 1px solid var(--bg-alt);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1rem;
  }

  /* Hero stacks */
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero-photo img {
    max-width: 260px;
    margin: 0 auto;
    aspect-ratio: 1/1;
  }

  .bio {
    margin: 0 auto 1.75rem;
  }

  .hero-links {
    justify-content: center;
  }

  /* Research */
  .featured-cards,
  .research-roles {
    grid-template-columns: 1fr;
  }

  /* Education */
  .edu-grid {
    grid-template-columns: 1fr;
  }

  /* Leadership */
  .leadership-grid {
    grid-template-columns: 1fr;
  }

  /* Timeline */
  .timeline-header {
    flex-direction: column;
    gap: 0.25rem;
  }
}

/* =====================
   FOCUS STATES (Accessibility)
   ===================== */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}
