/* Léo Fitouchi — personal site */

:root {
  --bg: #fbfaf7;
  --text: #1a1a1a;
  --muted: #6f6d66;
  --accent: #3f5a6b;
  --rule: #e3dfd7;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  font-size: 13px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(63, 90, 107, 0.3); }
a:hover { border-bottom-color: var(--accent); }

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

.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.wrap--wide { max-width: 1200px; }

/* Section tabs (liquid glass) */

.tabs {
  background: #eef0f1;
  padding: 28px 0 0;
}

.tabs .wrap {
  display: flex;
  justify-content: center;
}

.tabs ul {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 6px;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.25));
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    0 14px 34px rgba(28, 41, 51, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.tabs__thumb {
  position: absolute;
  top: 6px;
  left: 0;
  height: calc(100% - 12px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 5px 16px rgba(28, 41, 51, 0.2),
    inset 0 1px 0 #ffffff;
  z-index: 0;
  will-change: transform, width;
}

.tabs ul.ready .tabs__thumb {
  transition:
    transform 0.35s cubic-bezier(0.3, 0.8, 0.3, 1),
    width 0.35s cubic-bezier(0.3, 0.8, 0.3, 1);
}

.tabs a {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 8px 26px;
  border-radius: 999px;
  font-size: 1.42rem;
  font-weight: 600;
  color: var(--muted);
  border: 0;
  transition: color 0.2s ease;
}

.tabs a:hover { color: var(--text); }

.tabs a[aria-current="page"] { color: #1c2933; }

/* About (home) */

.about {
  display: grid;
  grid-template-columns: 355px 1fr;
  gap: 44px;
  align-items: stretch;
}

.about__portrait {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  object-fit: cover;
}

.about__name {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 3.7rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}

.about__role {
  margin: 14px 0 0;
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.4;
}

.about__affil {
  margin: 4px 0 0;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.about__labs {
  margin: 8px 0 0;
  font-size: 1.65rem;
  color: var(--text);
}

.about__labs a {
  color: var(--text);
  border-bottom-color: rgba(26, 26, 26, 0.3);
}

.about__labs a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.profile-buttons {
  margin: 24px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 44px;
  padding: 0 13px;
  border: 2px solid #33495a;
  border-radius: 10px;
  color: #33495a;
  background: transparent;
  font-size: 1.1rem;
  font-weight: 600;
}

.icon-btn:hover {
  background: #33495a;
  color: #ffffff;
}

.icon-btn svg { width: 20px; height: 20px; }

.cv-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  margin-right: 8px;
  border: 2px solid #33495a;
  border-radius: 10px;
  color: #33495a;
  background: transparent;
  font-size: 1.2rem;
  font-weight: 600;
}

.cv-btn:hover {
  background: #33495a;
  color: #ffffff;
}

.about__email {
  margin: 12px 0 0;
  font-size: 1.15rem;
}

.about__email a {
  color: var(--muted);
  border-bottom-color: transparent;
}

.about__email a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.about__text > p:not([class]) {
  margin: 1.25em 0 0;
  font-size: 1.45rem;
  line-height: 1.55;
}

.about__text > p:not([class]) a {
  border-bottom-color: transparent;
  font-weight: 500;
}

.about__text > p:not([class]) a:hover {
  border-bottom-color: var(--accent);
}

.about__text > p:not([class]) a.lab-link {
  color: inherit;
  font-weight: 400;
}

.about__text > p:not([class]) a.lab-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.about__text strong { font-weight: 650; }

/* Layout */

header.wrap { padding-top: 38px; padding-bottom: 34px; }

main {
  background: #eef0f1;
  padding: 42px 0 90px;
}


.tab-panel > .pubs:first-child { margin-top: 8px; }

.tab-panel > h3:first-child { margin-top: 8px; }

.tab-panel > .media-grid:first-child { margin-top: 8px; }

.profile-links {
  margin: 22px 0 0;
  font-size: 1.2rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 26px;
}

.profile-links a {
  color: #33495a;
  font-weight: 500;
}

.profile-links a:hover { border-bottom-color: #33495a; }

.profile-links a { border-bottom-color: transparent; }
.profile-links a:hover { border-bottom-color: var(--accent); }
.profile-links span[aria-hidden] { color: var(--rule); }

/* Sections */

h2 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 2.3rem;
  letter-spacing: -0.01em;
  margin: 64px 0 0;
  padding: 56px 0 0;
  border-top: 1px solid var(--rule);
}

h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.75rem;
  color: var(--muted);
  margin: 52px 0 0;
}

main .wrap > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

h2 + .pubs, h3 + .pubs { margin-top: 32px; }

/* Publications */

.pubs {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 860px;
}

.pubs li {
  margin: 0 0 32px;
  font-size: 1.45rem;
  line-height: 1.65;
}

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

a.pub-title {
  color: var(--accent);
  border-bottom: 1px solid transparent;
}

a.pub-title:hover {
  border-bottom-color: var(--accent);
}

.pubs cite {
  font-style: italic;
  font-weight: 600;
}

.note { color: var(--muted); }

.refs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: 4px;
  vertical-align: baseline;
}

.ref {
  display: inline-block;
  border: 1.5px solid var(--accent);
  border-radius: 5px;
  padding: 3px 15px;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(63, 90, 107, 0.06);
}

.ref:hover {
  background: var(--accent);
  color: #ffffff;
}

/* Media grid */

.media-grid {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 52px 40px;
}

.media-grid a {
  border: 0;
  color: inherit;
  display: block;
  text-align: center;
}

.media-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  background: #f1efe9;
  box-shadow: 0 1px 2px rgba(26, 26, 26, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.media-grid a:hover img {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(26, 26, 26, 0.14);
}

.media-grid h3 {
  font-family: var(--sans);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text);
  margin: 20px 0 0;
  line-height: 1.32;
}

.media-grid a:hover h3 { color: var(--accent); }

.media-grid .outlet {
  margin: 10px 0 0;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text);
}

.media-grid .meta {
  margin: 3px 0 0;
  font-size: 1.25rem;
  color: var(--muted);
}

/* Small screens */

@media (max-width: 800px) {
  .about { grid-template-columns: 1fr; gap: 36px; }
  .about__photo { order: -1; max-width: 280px; }
  .about__portrait { height: auto; }
}

@media (max-width: 900px) {
  .tabs .wrap { padding: 0 16px; }
  .tabs ul {
    display: flex;
    width: 100%;
    flex-direction: column;
    border-radius: 22px;
    gap: 3px;
  }
  .tabs a { display: block; text-align: center; }
  .tabs a { padding: 10px 16px; font-size: 1.15rem; }
  .tabs__thumb { display: none; }
  .tabs a[aria-current="page"] {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    box-shadow: 0 3px 10px rgba(28, 41, 51, 0.15);
  }
}

@media (max-width: 640px) {
  body { font-size: 18px; }
  .about__name { font-size: 2.9rem; }
  main { padding-top: 36px; }
  h2 { margin-top: 56px; }
  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 32px 20px;
  }
}
