/* ═══════════════════════════════════════════════════════
   Thomas Pontoizeau — Portfolio
   ═══════════════════════════════════════════════════════ */

/* ── Variables ──────────────────────────────────────── */
:root {
  --navy:       #1a3550;
  --navy-light: #2a4a70;
  --orange:     #c8521a;
  --orange-bg:  #fff4ee;
  --white:      #ffffff;
  --light:      #f5f6f8;
  --text:       #2c3e50;
  --muted:      #64748b;
  --border:     #e2e8f0;
  --shadow:     0 2px 8px rgba(0, 0, 0, .08);
  --shadow-md:  0 4px 16px rgba(0, 0, 0, .12);
  --radius:     6px;
  --max-w:      1080px;
  --nav-h:      64px;
  --ease:       .2s ease;
}

/* ── Reset & Base ───────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--light);
}

h1, h2, h3, h4 {
  font-family: 'Crimson Pro', Georgia, 'Times New Roman', serif;
  line-height: 1.2;
  color: var(--navy);
}

a {
  color: var(--orange);
  text-decoration: none;
  transition: color var(--ease);
}
a:hover { text-decoration: underline; }

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

ul { list-style: none; }

/* ── Layout ─────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: 4.5rem 0; }
section:nth-child(even) { background: var(--white); }

.subsection { margin-bottom: 3rem; }
.subsection:last-child { margin-bottom: 0; }

.subsection h3 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* ── Navigation ─────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--navy);
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .2);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav-brand {
  font-family: 'Crimson Pro', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: .02em;
}
.nav-brand:hover { color: #ffd9c0; text-decoration: none; }

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

.nav-links a {
  color: rgba(255, 255, 255, .8);
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .03em;
  transition: color var(--ease);
}
.nav-links a:hover,
.nav-links a.active { color: var(--white); text-decoration: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero ───────────────────────────────────────────── */
#home {
  padding-top: calc(var(--nav-h) + 4rem);
  padding-bottom: 4rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
}

.hero-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3rem;
  align-items: flex-start;
}

.hero-photo img {
  width: 240px;
  height: auto;
  border-radius: 10px;
  display: block;
  border: 4px solid rgba(255, 255, 255, .2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .35);
}

.hero-info h1 {
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: .2rem;
}

.hero-title {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, .85);
  font-weight: 300;
  margin-bottom: .15rem;
}

.hero-institution {
  font-size: .95rem;
  color: rgba(255, 255, 255, .65);
  margin-bottom: 1.5rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 1.4rem;
}

.hero-bio {
  color: rgba(255, 255, 255, .75);
  font-size: .93rem;
  max-width: 580px;
  line-height: 1.75;
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem 1.1rem;
  border-radius: var(--radius);
  font-size: .855rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
  text-decoration: none;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
  border-color: var(--orange);
}
.btn-primary:hover {
  background: #a83f12;
  border-color: #a83f12;
  color: var(--white);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, .5);
}
.btn-ghost:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, .1);
  color: var(--white);
  text-decoration: none;
}

.btn-dark {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-dark:hover {
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
}

/* ── Section Titles ─────────────────────────────────── */
.section-title {
  font-size: 1.9rem;
  font-weight: 600;
  margin-bottom: 2.5rem;
  padding-bottom: .5rem;
  border-bottom: 3px solid var(--orange);
  display: inline-block;
}

.section-intro {
  color: var(--muted);
  margin-top: -.5rem;
  margin-bottom: 2rem;
  font-size: .95rem;
}

/* ── Tags / Topics ──────────────────────────────────── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.tag {
  display: inline-block;
  padding: .3rem .85rem;
  background: #e8eef5;
  color: var(--navy);
  border-radius: 20px;
  font-size: .84rem;
  font-weight: 500;
}

/* ── Timeline ───────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: .45rem;
  top: .6rem;
  bottom: .6rem;
  width: 2px;
  background: var(--border);
}

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

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

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.65rem;
  top: .45rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--orange);
}

section:nth-child(even) .timeline-item::before {
  border-color: var(--white);
}

.timeline-period {
  font-size: .82rem;
  font-weight: 700;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: .25rem;
}

.timeline-header {
  font-family: 'Crimson Pro', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: .1rem;
}

.timeline-sub {
  font-size: .88rem;
  color: var(--muted);
  margin-bottom: .5rem;
}

.timeline-desc {
  font-size: .91rem;
  color: var(--text);
  line-height: 1.65;
}

.timeline-link {
  display: inline-block;
  margin-top: .5rem;
  font-size: .85rem;
}

/* ── Publication Tabs ───────────────────────────────── */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: .6rem;
}

.tab-btn {
  background: none;
  border: none;
  padding: .4rem .9rem;
  font-size: .865rem;
  font-family: 'Inter', sans-serif;
  color: var(--muted);
  cursor: pointer;
  border-radius: var(--radius);
  font-weight: 500;
  transition: background var(--ease), color var(--ease);
}
.tab-btn:hover { background: var(--light); color: var(--text); }
.tab-btn.active { background: var(--navy); color: var(--white); }

/* ── Publication List ───────────────────────────────── */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pub-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 3px solid var(--orange);
}

section:nth-child(even) .pub-item { background: var(--light); }

.pub-id {
  font-weight: 700;
  color: var(--orange);
  font-size: .88rem;
  white-space: nowrap;
  min-width: 2.5rem;
  padding-top: .1rem;
}

.pub-body { font-size: .91rem; line-height: 1.65; }

.pub-title {
  display: block;
  font-style: italic;
  font-weight: 500;
  color: var(--navy);
  margin: .15rem 0;
}

.pub-venue {
  display: block;
  color: var(--muted);
  font-size: .87rem;
}

.pub-inprep {
  display: inline-block;
  margin-top: .4rem;
  padding: .1rem .5rem;
  background: var(--orange-bg);
  color: var(--orange);
  border-radius: 4px;
  font-size: .78rem;
  font-weight: 600;
}

.empty {
  color: var(--muted);
  font-style: italic;
  padding: .5rem 0;
}

/* ── Conference / Service List ──────────────────────── */
.conf-list {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

.conf-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: .7rem 1rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: .91rem;
}

section:nth-child(even) .conf-item { background: var(--light); }

.conf-year {
  font-weight: 700;
  color: var(--orange);
  min-width: 3.5rem;
  white-space: nowrap;
  padding-top: .05rem;
}

.conf-event { font-weight: 600; color: var(--navy); }
.conf-role  { color: var(--muted); font-size: .87rem; margin-top: .1rem; }

/* ── Filter Buttons ─────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.75rem;
}

.filter-btn {
  padding: .4rem 1rem;
  border: 2px solid var(--border);
  border-radius: 20px;
  background: none;
  font-size: .865rem;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  cursor: pointer;
  font-weight: 500;
  transition: all var(--ease);
}
.filter-btn:hover { border-color: var(--navy); color: var(--navy); }
.filter-btn.active { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* ── Teaching Grid ──────────────────────────────────── */
.teaching-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.1rem;
}

.course-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--navy);
  transition: transform var(--ease), box-shadow var(--ease);
}
.course-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

section:nth-child(odd) .course-card { background: var(--white); }

.course-name {
  font-family: 'Crimson Pro', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: .35rem;
  line-height: 1.3;
}

.course-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: .6rem;
}

.course-tag {
  display: inline-block;
  padding: .1rem .5rem;
  border-radius: 4px;
  font-size: .78rem;
  font-weight: 600;
}
.course-tag.inst { background: #e8eef5; color: var(--navy); }
.course-tag.hours { background: var(--orange-bg); color: var(--orange); }
.course-tag.type { background: #f0f0f0; color: var(--muted); }

.course-level {
  font-size: .84rem;
  color: var(--muted);
  margin-bottom: .6rem;
}

.course-desc {
  font-size: .87rem;
  color: var(--text);
  line-height: 1.6;
  border-top: 1px solid var(--border);
  padding-top: .6rem;
}

/* ── Activities ─────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: .15rem .5rem;
  background: var(--orange);
  color: var(--white);
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  vertical-align: middle;
  font-family: 'Inter', sans-serif;
}

.camp-organizer {
  font-weight: 700;
  color: var(--navy);
}
.camp-meta {
  font-size: .86rem;
  color: var(--muted);
  margin-bottom: .3rem;
}

/* ── Arts Grid ──────────────────────────────────────── */
.arts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.art-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--orange);
}
section:nth-child(even) .art-card { background: var(--light); }

.art-title {
  font-family: 'Crimson Pro', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: .9rem;
}

.art-list {
  padding-left: 1.2rem;
  list-style: disc;
  font-size: .91rem;
  line-height: 1.7;
  color: var(--text);
}
.art-list li { margin-bottom: .2rem; }

.instagram-cta {
  text-align: center;
  margin-top: .5rem;
}

/* ── Contact ────────────────────────────────────────── */
#contact {
  background: var(--navy);
  color: var(--white);
}

#contact .section-title {
  color: var(--white);
  border-color: var(--orange);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.contact-list li {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.contact-label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255, 255, 255, .5);
  font-weight: 600;
}

.contact-list a {
  color: #ffd4b2;
  font-size: 1rem;
}
.contact-list a:hover { color: var(--white); }

.contact-list span {
  color: rgba(255, 255, 255, .85);
  font-size: 1rem;
}

/* ── Footer ─────────────────────────────────────────── */
footer {
  background: #111e2b;
  padding: 1.5rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .85rem;
  color: rgba(255, 255, 255, .4);
}

.footer-link {
  color: rgba(255, 255, 255, .4);
  transition: color var(--ease);
}
.footer-link:hover { color: rgba(255, 255, 255, .85); text-decoration: none; }

/* ── Loading state ──────────────────────────────────── */
.loading {
  color: var(--muted);
  font-style: italic;
  padding: 1rem 0;
  font-size: .9rem;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.75rem;
  }

  .hero-photo { display: flex; justify-content: center; }
  .hero-links { justify-content: center; }
  .hero-info h1 { font-size: 1.85rem; }

  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--navy);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem 1.5rem;
    gap: 1rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1rem; }

  section { padding: 3rem 0; }
  .section-title { font-size: 1.6rem; }

  .teaching-grid { grid-template-columns: 1fr; }
  .arts-grid { grid-template-columns: 1fr; }

  .tabs { gap: .25rem; }
  .tab-btn { font-size: .8rem; padding: .35rem .65rem; }

  .timeline { padding-left: 1.5rem; }
}

@media (max-width: 480px) {
  .hero-info h1 { font-size: 1.6rem; }
  .pub-item { flex-direction: column; gap: .4rem; }
  .conf-item { flex-direction: column; gap: .25rem; }
  .conf-year { min-width: unset; }
}
