/* ===========================================================
   Meg Fryling, Ph.D. - personal site
   =========================================================== */

:root {
  --navy: #1c2b45;
  --navy-deep: #131f33;
  --gold: #c9a24b;
  --gold-deep: #a9802f;
  --ink: #1e2430;
  --slate: #55606e;
  --slate-light: #7c8793;
  --line: #e4e7ec;
  --paper: #ffffff;
  --paper-alt: #f6f7f9;
  --tag-industry-bg: #eaf0fb;
  --tag-industry-fg: #1c3f84;
  --tag-academic-bg: #faf2e2;
  --tag-academic-fg: #8a6412;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(20, 28, 46, 0.08), 0 8px 24px rgba(20, 28, 46, 0.06);
  --max: 1080px;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-head: "Lora", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold-deep); }

h1, h2, h3 { font-family: var(--font-head); color: var(--navy); line-height: 1.2; margin: 0 0 .5em; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--navy);
  color: var(--gold);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
}
.brand-text { font-family: var(--font-head); font-size: 18px; }
.brand-suffix { color: var(--slate); font-weight: 500; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav a {
  color: var(--slate);
  font-weight: 500;
  font-size: 15px;
}
.site-nav a:hover { color: var(--navy); }
.nav-cta {
  background: var(--navy);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px !important;
}
.nav-cta:hover { background: var(--navy-deep); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  padding: 88px 0 72px;
}
.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}
.hero-copy { max-width: 640px; }
.hero-photo { flex: none; }
.hero-photo img {
  width: 176px;
  height: 192px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid rgba(201, 162, 75, 0.55);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  margin: 0 0 16px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(32px, 5vw, 52px);
  margin-bottom: 18px;
}
.hero-lede {
  font-size: 19px;
  color: #d8dee9;
  max-width: 640px;
  margin: 0 0 32px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--gold);
  color: var(--navy-deep) !important;
}
.btn-primary:hover { background: #d8b566; }
.btn-ghost {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff !important;
  background: transparent;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255,255,255,.6); }

/* Light-background contexts (e.g. contact section) use dark ghost buttons */
.section-alt .btn-ghost {
  border-color: var(--line);
  color: var(--navy) !important;
}
.section-alt .btn-ghost:hover { background: #eceff3; }

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section-alt { background: var(--paper-alt); }

.section-title {
  font-size: clamp(24px, 3.4vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 28px;
}
.section-kicker {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-deep);
}
.section-intro {
  color: var(--slate);
  max-width: 640px;
  margin: -10px 0 32px;
}
.subhead {
  font-size: 19px;
  margin-top: 40px;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 48px;
  align-items: start;
}
.about-copy p { color: var(--slate); margin: 0 0 16px; }
.about-copy strong { color: var(--ink); }

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.stat {
  background: var(--paper-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.stat-num {
  display: block;
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
}
.stat-label {
  display: block;
  font-size: 13px;
  color: var(--slate);
  margin-top: 6px;
}

/* ---------- Timeline ---------- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 28px;
  border-left: 2px solid var(--line);
}
.tl-item {
  position: relative;
  padding: 0 0 36px 24px;
}
.tl-item::before {
  content: "";
  position: absolute;
  left: -33px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 2px var(--gold);
}
.tl-item h3 {
  font-size: 19px;
  margin-bottom: 2px;
}
.tl-org { margin: 0; color: var(--ink); font-weight: 500; }
.tl-note { color: var(--slate-light); font-weight: 400; font-size: 14px; }
.tl-dates {
  margin: 2px 0 10px;
  color: var(--slate-light);
  font-size: 14px;
}
.tl-item ul { margin: 0; padding-left: 20px; color: var(--slate); }
.tl-item li { margin-bottom: 4px; }

.tl-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.tag-industry { background: var(--tag-industry-bg); color: var(--tag-industry-fg); }
.tag-academic { background: var(--tag-academic-bg); color: var(--tag-academic-fg); }

.service-block {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.service-list { color: var(--slate); padding-left: 20px; margin: 0; }
.service-list li { margin-bottom: 10px; }
.service-list strong { color: var(--ink); }

/* ---------- Education ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.edu-item {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.edu-item h3 { font-size: 16px; margin-bottom: 4px; }
.edu-item p { margin: 0; color: var(--slate); font-size: 14px; }

/* ---------- Pills / lists ---------- */
.pill-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 14px 0 0;
}
.pill-list li {
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13.5px;
  padding: 7px 14px;
  border-radius: 999px;
}
.section-alt .pill-list li { background: #fff; }

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 36px;
}
.skill-group h3 { font-size: 16px; }

.plain-list {
  color: var(--slate);
  padding-left: 20px;
  margin: 14px 0 0;
}
.plain-list li { margin-bottom: 12px; }
.plain-list strong { color: var(--ink); }

.fine-print {
  color: var(--slate-light);
  font-size: 14px;
  margin-top: 16px;
}

/* ---------- Contact ---------- */
.contact-wrap { text-align: center; }
.contact-wrap .section-title { align-items: center; }
.contact-wrap .section-intro { margin-left: auto; margin-right: auto; }
.contact-wrap .hero-actions { justify-content: center; }
.contact-wrap .btn-primary { background: var(--navy); color: #fff !important; }
.contact-wrap .btn-primary:hover { background: var(--navy-deep); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  color: var(--slate-light);
  font-size: 14px;
}
.site-footer a { color: var(--slate-light); }
.site-footer a:hover { color: var(--navy); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { flex-direction: column-reverse; text-align: center; gap: 28px; }
  .hero-copy { max-width: 100%; }
  .hero-actions { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .skills-grid { grid-template-columns: 1fr; gap: 28px; }
  .edu-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 16px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 10px 0; width: 100%; }
  .nav-cta { margin-top: 8px; text-align: center; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 56px 0; }
  .edu-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr; }
}
