/* ================================================================
   style.css  —  Academic Website Styles
   You should rarely need to edit this file.
   ================================================================ */

/* ── Variables ────────────────────────────────────────────────── */
:root {
  --green:      #2f5c47;
  --green-dark: #1e3d30;
  --green-pale: #deeae3;
  --text:       #1a1a1a;
  --muted:      #4a4a4a;
  --faint:      #888;
  --rule:       #d8d8d8;
  --bg:         #ffffff;
  --ff:         'EB Garamond', Georgia, serif;
  --ff2:        'Source Serif 4', Georgia, serif;
  --max:        860px;
}

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--ff2);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.78;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
p { color: var(--muted); margin-bottom: .85rem; }
p:last-child { margin-bottom: 0; }

/* ── Wrapper ──────────────────────────────────────────────────── */
.site-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem 2.5rem 6rem;
}

/* ── Site name ────────────────────────────────────────────────── */
.site-name {
  font-family: var(--ff);
  font-size: 2.1rem;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 2.2rem;
  letter-spacing: -.01em;
}

/* ── Tab row ──────────────────────────────────────────────────── */
.tab-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2.6rem;
}
.tab-btn {
  font-family: var(--ff2);
  font-size: .97rem;
  font-weight: 300;
  color: var(--muted);
  background: none;
  border: none;
  padding: .5rem 1.35rem;
  cursor: pointer;
  transition: background .15s, color .15s;
  letter-spacing: .01em;
}
.tab-btn:hover  { color: var(--text); }
.tab-btn.active { background: var(--green); color: #fff; }

/* ── Panels ───────────────────────────────────────────────────── */
.tab-panel          { display: none; }
.tab-panel.active   { display: block; }

/* ── ABOUT ────────────────────────────────────────────────────── */
.about-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 3rem;
  align-items: start;
}
.about-photo .photo-placeholder {
  width: 100%;
  background: transparent;
  display: block;
  padding: 0;
  overflow: hidden;
}

.about-photo .photo-placeholder img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
}
.about-photo img   { width: 100%; display: block; }
.about-body h2     {
  font-family: var(--ff);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}
.about-body hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 1.5rem 0;
}
.contact-block strong {
  display: block;
  font-family: var(--ff);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .4rem;
}
.contact-block p { font-size: .95rem; color: var(--muted); margin-bottom: .15rem; }

/* ── RESEARCH ─────────────────────────────────────────────────── */
.research-section        { margin-bottom: 2.5rem; }
.research-section h2     {
  font-family: var(--ff);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.4rem;
}
.paper                   { margin-bottom: 1.9rem; }
.paper-title             {
  font-family: var(--ff2);
  font-weight: 400;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: .2rem;
}
.paper-meta              { font-style: italic; font-size: .93rem; color: var(--muted); margin-bottom: .35rem; }
.paper-presentations     { font-size: .88rem; color: var(--faint); margin-bottom: .45rem; }

.abstract-toggle {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  font-size: .9rem;
  color: var(--green);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--ff2);
  padding: 0;
}
.abstract-toggle:hover       { text-decoration: underline; }
.abstract-toggle .arrow      { display: inline-block; font-size: .65rem; transition: transform .18s; line-height: 1; }
.abstract-toggle.open .arrow { transform: rotate(90deg); }
.abstract-body {
  display: none;
  margin-top: .55rem;
  padding: .75rem 1rem;
  border-left: 3px solid var(--green-pale);
  font-size: .93rem;
  color: var(--muted);
  line-height: 1.72;
}
.abstract-body.open { display: block; }
.section-divider    { border: none; border-top: 1px solid var(--rule); margin: 2.2rem 0 2rem; }

/* ── TEACHING ─────────────────────────────────────────────────── */
.teaching-wrap h2 {
  font-family: var(--ff);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.4rem;
}
.teaching-wrap h3 {
  font-family: var(--ff);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin: 2rem 0 .5rem;
}
.course-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: .5rem 0;
  border-bottom: 1px solid var(--rule);
  gap: 1rem;
}
.course-name   { font-size: .97rem; color: var(--muted); }
.course-detail { font-size: .88rem; color: var(--faint); white-space: nowrap; }

/* ── CV ───────────────────────────────────────────────────────── */
.cv-wrap h2 {
  font-family: var(--ff);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}
.cv-note  { font-size: .94rem; color: var(--muted); margin-bottom: 1.4rem; }
.cv-download {
  display: inline-block;
  background: var(--green);
  color: #fff !important;
  padding: .48rem 1.3rem;
  font-size: .9rem;
  text-decoration: none !important;
  transition: background .2s;
}
.cv-download:hover   { background: var(--green-dark); }
.cv-section          { margin-top: 2.5rem; }
.cv-section-title    {
  font-size: .7rem;
  font-family: var(--ff2);
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
  border-bottom: 1px solid var(--rule);
  padding-bottom: .4rem;
  margin-bottom: 1.1rem;
}
.cv-row  { display: grid; grid-template-columns: 115px 1fr; gap: 1rem; padding: .45rem 0; }
.cv-year { font-size: .9rem; color: var(--faint); }
.cv-desc { font-size: .95rem; color: var(--muted); }
.cv-desc strong { color: var(--text); font-weight: 400; }

/* ── Responsive ───────────────────────────────────────────────── */

/* Tablet (600px–860px) */
@media (max-width: 860px) {
  .about-layout {
    grid-template-columns: 200px 1fr;
    gap: 2rem;
  }
}

/* Mobile (under 600px) */
@media (max-width: 600px) {

  /* General */
  .site-wrap {
    padding: 2rem 1.2rem 4rem;
  }
  body {
    font-size: 16px;
  }

  /* Name */
  .site-name {
    font-size: 1.7rem;
    margin-bottom: 1.4rem;
  }

  /* Tabs — full width, easy to tap */
  .tab-row {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--rule);
  }
  .tab-btn {
    flex: 1 1 auto;
    text-align: center;
    padding: .65rem .5rem;
    font-size: .9rem;
    border-bottom: 2px solid transparent;
  }
  .tab-btn.active {
    background: none;
    color: var(--green);
    border-bottom-color: var(--green);
  }

  /* About — stack photo above bio */
  .about-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .about-photo {
    max-width: 160px;   /* smaller headshot on mobile */
  }
  .about-body h2 {
    font-size: 1.3rem;
  }

  /* Research */
  .research-section h2,
  .teaching-wrap h2,
  .cv-wrap h2 {
    font-size: 1.3rem;
  }
  .paper-title {
    font-size: .97rem;
  }

  /* Teaching — stack name above date */
  .course-row {
    flex-direction: column;
    align-items: flex-start;
    gap: .1rem;
    padding: .6rem 0;
  }
  .course-detail {
    font-size: .82rem;
    color: var(--faint);
  }

  /* CV — stack year above description */
  .cv-row {
    grid-template-columns: 1fr;
    gap: .1rem;
    padding: .6rem 0;
    border-bottom: 1px solid var(--rule);
  }
  .cv-year {
    font-size: .78rem;
  }

  /* Abstract toggle easier to tap */
  .abstract-toggle {
    padding: .3rem 0;
    font-size: .92rem;
  }
}