/* ================================================================
   Marc Abboud — style.css
   ================================================================ */

/* ── Variables ── */
:root {
  --ink:        #1a1714;
  --paper:      #f5f0e8;
  --cream:      #ede8dc;
  --rust:       #b5451b;
  --rust-light: #d4622a;
  --gold:       #c8922a;
  --muted:      #7a7268;
  --line:       #d4cfc4;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
em, i { font-style: normal; }

/* ── Base ── */
body {
  font-family: 'EB Garamond', Georgia, serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 40px;
  line-height: 1.75;
  min-height: 100vh;
}

/* Paper noise texture */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 100;
  opacity: 0.4;
}

/* ── Page layout ── */
.layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 100vh;
}

/* ================================================================
   Sidebar
   ================================================================ */
aside {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  padding: 3rem 2rem;
  overflow: hidden;
}

/* Decorative ∞ watermark */
aside::before {
  content: '∞';
  position: absolute;
  font-size: 28rem;
  color: rgba(255,255,255,0.03);
  right: -6rem; bottom: -8rem;
  line-height: 1;
  pointer-events: none;
  font-family: 'EB Garamond', serif;
}

.lang-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.lang-toggle a            { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.lang-toggle a.active,
.lang-toggle a:hover      { color: var(--gold); }
.lang-toggle span         { color: #3a3530; }

.sidebar-name {
  font-size: 2.5rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 0.4rem;
  color: #fff;
}
.sidebar-name a { color: inherit; text-decoration: none; }

.sidebar-title {
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2.5rem;
}

nav { flex: 1; }
nav ul { list-style: none; display: flex; flex-direction: column; }

nav ul li a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: #a09a92;
  font-size: 1.5rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid #2a2520;
  transition: color 0.2s, padding-left 0.2s;
}
nav ul li a:hover           { color: #fff; padding-left: 0.4rem; }
nav ul li a.active          { color: #fff; padding-left: 0.6rem; border-left: 2px solid var(--rust); }

.sidebar-contact {
  margin-top: auto;
  padding-top: 3rem;
}
.sidebar-contact p {
  font-family: 'DM Mono', monospace;
  font-size: 1.1rem;
  color: #6a6460;
  line-height: 2;
}
.sidebar-contact a          { color: var(--gold); text-decoration: none; }
.sidebar-contact a:hover    { text-decoration: underline; }

/* ================================================================
   Main content
   ================================================================ */
main {
  padding: 5rem 6rem 6rem;
  font-size: 1.5rem;
}

h1 {
  font-size: 5.5rem;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
h1 em { color: var(--rust); }

.page-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 1rem;
}

.page-header {
  margin-bottom: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
}

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 1.5rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.8rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.content-section                   { margin-bottom: 5rem; opacity: 0; animation: fadeUp 0.8s ease forwards; }
.content-section:nth-child(2)      { animation-delay: 0.1s; }
.content-section:nth-child(3)      { animation-delay: 0.2s; }
.content-section:nth-child(4)      { animation-delay: 0.3s; }

footer {
  margin-top: 6rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s ease forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   index.html
   ================================================================ */
.hero {
  display: grid;
  grid-template-columns: 1fr 30%;
  gap: 5rem;
  align-items: start;
  margin-bottom: 5rem;
  padding-bottom: 5rem;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
}

.hero-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 1.2rem;
}

.hero-institution               { font-size: 1.65rem; color: var(--muted); margin-bottom: 2rem; }
.hero-institution strong        { color: var(--ink); }
.hero-institution a,
.hero-bio a {
  color: var(--rust);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.hero-institution a:hover,
.hero-bio a:hover               { border-bottom-color: var(--rust); }
.hero-bio                       { font-size: 1.5rem; color: #4a4540; line-height: 1.85; }

.hero-photo-wrap                { width: 100%; }
.hero-photo-wrap img            { width: 100%; display: block; filter: sepia(15%) contrast(1.05); }

.interests                      { margin-bottom: 5rem; opacity: 0; animation: fadeUp 0.8s 0.2s ease forwards; }
.interest-list                  { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.interest-tag {
  display: inline-block;
  padding: 0.6rem 1.6rem;
  border: 1px solid var(--line);
  font-size: 1.35rem;
  color: var(--muted);
  background: var(--cream);
  transition: all 0.2s;
}
.interest-tag:hover             { border-color: var(--rust); color: var(--rust); background: #fff; }

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-bottom: 5rem;
  background: var(--line);
  border: 2px solid var(--line);
  opacity: 0;
  animation: fadeUp 0.8s 0.35s ease forwards;
}
.info-cell                      { background: var(--paper); padding: 2.5rem 3rem; }
.info-cell-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.info-cell-value                { font-size: 1.5rem; color: var(--ink); }
.info-cell-value a              { color: var(--rust); text-decoration: none; }
.info-cell-value a:hover        { text-decoration: underline; }

.cta-row                        { display: flex; gap: 1rem; flex-wrap: wrap; opacity: 0; animation: fadeUp 0.8s 0.5s ease forwards; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1.2rem 2.8rem;
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-primary                    { background: var(--rust); color: #fff; }
.btn-primary:hover              { background: var(--rust-light); }
.btn-secondary                  { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-secondary:hover            { border-color: var(--ink); background: var(--cream); }
.btn svg                        { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* ================================================================
   research.html
   ================================================================ */
.pub-list                       { list-style: none; }
.pub-item {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}
.pub-item:first-child           { border-top: 1px solid var(--line); }
.pub-num {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--rust);
  padding-top: 0.3rem;
  text-align: right;
}
.pub-title                      { font-size: 1.5rem; color: var(--ink); line-height: 1.5; }
.pub-meta                       { font-size: 1.3rem; color: var(--muted); margin-top: 0.25rem; }
.pub-links                      { display: flex; gap: 0.8rem; margin-top: 0.5rem; }
.pub-link {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rust);
  text-decoration: none;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--rust);
  transition: all 0.15s;
}
.pub-link:hover                 { background: var(--rust); color: #fff; }

.talk-list                      { list-style: none; }
.talk-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 0 1.5rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.65rem;
}
.talk-item:first-child          { border-top: 1px solid var(--line); }
.talk-date {
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
  color: var(--muted);
  padding-top: 0.2rem;
}
.talk-body a                    { color: var(--rust); text-decoration: none; }
.talk-body a:hover              { text-decoration: underline; }

.callout {
  background: var(--cream);
  border-left: 3px solid var(--rust);
  padding: 1.4rem 1.8rem;
  font-size: 1.65rem;
  color: #4a4540;
}
.callout a                      { color: var(--rust); text-decoration: none; }
.callout a:hover                { text-decoration: underline; }

/* ================================================================
   teaching.html
   ================================================================ */
.course-card                    { border: 1px solid var(--line); margin-bottom: 2.5rem; }
.course-header {
  padding: 1.4rem 1.8rem;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.course-year {
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--rust);
  text-transform: uppercase;
}
.course-title                   { font-size: 1.5rem; font-weight: 500; color: var(--ink); }
.course-body                    { padding: 1.8rem 2rem; }
.course-notes                   { font-size: 1.3rem; color: var(--muted); margin-bottom: 1rem; }
.course-notes a                 { color: var(--rust); text-decoration: none; }
.course-notes a:hover           { text-decoration: underline; }
.sub-label {
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1.2rem;
  margin-bottom: 0.8rem;
}
.exercise-grid                  { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.ex-link {
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
  letter-spacing: 0.08em;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
  transition: all 0.15s;
}
.ex-link:hover                  { border-color: var(--rust); color: var(--rust); background: #fff; }

/* ================================================================
   other.html
   ================================================================ */
.prose                          { font-size: 1.5rem; color: #4a4540; line-height: 1.85; margin-bottom: 1.5rem; }
.prose a                        { color: var(--rust); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.prose a:hover                  { border-bottom-color: var(--rust); }

.activity-list                  { list-style: none; }
.activity-item {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 0 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.65rem;
}
.activity-item:first-child      { border-top: 1px solid var(--line); }
.activity-bullet                { color: var(--rust); }
.activity-body a                { color: var(--rust); text-decoration: none; }
.activity-body a:hover          { text-decoration: underline; }

.video-wrap {
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 1.8rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.video-icon                     { font-size: 2.5rem; }
.video-title                    { font-size: 1.5rem; font-weight: 500; margin-bottom: 0.3rem; }
.video-desc                     { font-size: 0.95rem; color: #4a4540; }

.event-block                    { border: 1px solid var(--line); margin-bottom: 1.5rem; }
.event-header                   { padding: 1.2rem 1.8rem; background: var(--cream); border-bottom: 1px solid var(--line); }
.event-title                    { font-size: 1.65rem; font-weight: 500; }
.event-body                     { padding: 1.2rem 1.8rem; font-size: 1.65rem; color: #4a4540; line-height: 1.8; }
.event-body a                   { color: var(--rust); text-decoration: none; }
.event-body a:hover             { text-decoration: underline; }

/* ================================================================
   seminar.html
   ================================================================ */
.info-banner {
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 1.2rem 1.8rem;
  margin-bottom: 3rem;
  font-size: 1.35rem;
  color: #4a4540;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.info-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rust);
  white-space: nowrap;
}
.info-banner a                  { color: var(--rust); text-decoration: none; margin-left: auto; }
.info-banner a:hover            { text-decoration: underline; }

.talk-entry                     { border-top: 1px solid var(--line); padding: 2rem 0; }
.talk-entry:last-child          { border-bottom: 1px solid var(--line); }
.talk-meta                      { display: flex; align-items: baseline; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.talk-date-badge {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rust);
  white-space: nowrap;
}
.talk-speaker                   { font-size: 1.5rem; font-weight: 500; color: var(--ink); }
.talk-affil                     { font-size: 0.95rem; color: var(--muted); }
.talk-title-line                { font-size: 1.35rem; color: #4a4540; margin-bottom: 0.8rem; }
.talk-abstract {
  font-size: 1.1rem;
  color: #5a5550;
  line-height: 1.75;
  padding-left: 1.2rem;
  border-left: 2px solid var(--line);
}
.abstract-toggle {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rust);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin-top: 0.4rem;
}
.abstract-toggle:hover          { text-decoration: underline; }
.abstract-body                  { display: none; margin-top: 0.8rem; }
.abstract-body.open             { display: block; }
.no-talk                        { font-size: 0.95rem; color: var(--muted); }
.no-talk a                      { color: var(--rust); text-decoration: none; }
.no-talk a:hover                { text-decoration: underline; }

/* ================================================================
   Responsive — Tablet  (≤ 860px)
   ================================================================ */
@media (max-width: 860px) {

  /* Base */
  body                          { font-size: 22px; }

  /* Layout: sidebar stacks above content */
  .layout                       { grid-template-columns: 1fr; }

  /* Sidebar becomes a horizontal top bar */
  aside {
    position: relative;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 1.2rem 1.5rem;
    gap: 0.6rem;
  }
  aside::before                 { display: none; }
  .sidebar-title,
  .sidebar-contact              { display: none; }
  .sidebar-name                 { font-size: 1.4rem; margin: 0; }
  .lang-toggle                  { margin-bottom: 0; margin-left: auto; }

  /* Nav links in a horizontal row */
  nav                           { width: 100%; flex: none; }
  nav ul                        { flex-direction: row; flex-wrap: wrap; gap: 0; }
  nav ul li a {
    font-size: 0.9rem;
    padding: 0.4rem 0.7rem;
    border-bottom: none;
  }
  nav ul li a:hover             { padding-left: 0.7rem; }
  nav ul li a.active            { border-left: none; padding-left: 0.7rem; color: var(--gold); }

  /* Main content */
  main                          { padding: 2.5rem 1.5rem 3rem; font-size: 1rem; }
  h1                            { font-size: 3rem; }
  .page-header                  { margin-bottom: 2.5rem; padding-bottom: 2rem; }
  .content-section              { margin-bottom: 3rem; }
  .section-label                { font-size: 0.75rem; margin-bottom: 1.2rem; }
  footer                        { margin-top: 3rem; }

  /* Hero */
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    padding-bottom: 3rem;
  }
  .hero-photo-wrap              { max-width: 160px; }
  .hero-institution             { font-size: 1rem; margin-bottom: 1rem; }
  .hero-bio                     { font-size: 1rem; }

  /* Info grid (index page) */
  .info-grid                    { grid-template-columns: 1fr; margin-bottom: 3rem; }
  .info-cell                    { padding: 1.2rem 1.5rem; }
  .info-cell-value              { font-size: 1rem; }

  /* CTA buttons */
  .cta-row                      { flex-direction: column; }
  .btn                          { width: 100%; justify-content: center; padding: 1rem 1.5rem; }

  /* Publications */
  .pub-item                     { grid-template-columns: 2rem 1fr; gap: 0 0.8rem; padding: 1.2rem 0; }
  .pub-title                    { font-size: 1rem; }
  .pub-meta                     { font-size: 0.9rem; }

  /* Talks list (research page) */
  .talk-item {
    grid-template-columns: 1fr;
    gap: 0.2rem;
    padding: 0.8rem 0;
    font-size: 1rem;
  }
  .talk-date                    { font-size: 0.75rem; }
  .callout                      { font-size: 1rem; padding: 1rem 1.2rem; }

  /* Teaching — course cards */
  .course-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    padding: 1rem 1.2rem;
  }
  .course-title                 { font-size: 1rem; }
  .course-body                  { padding: 1.2rem; }
  .course-notes                 { font-size: 0.9rem; }
  .exercise-grid                { gap: 0.4rem; }
  .ex-link                      { font-size: 0.78rem; padding: 0.4rem 0.7rem; }

  /* Seminar */
  .info-banner {
    font-size: 0.9rem;
    padding: 1rem 1.2rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  .info-banner a                { margin-left: 0; }
  .talk-entry                   { padding: 1.5rem 0; }
  .talk-meta                    { gap: 0.6rem; }
  .talk-speaker                 { font-size: 1rem; }
  .talk-title-line              { font-size: 0.95rem; }
  .talk-abstract                { font-size: 0.88rem; padding-left: 0.8rem; }

  /* Popularisation */
  .prose                        { font-size: 1rem; }
  .activity-item                { font-size: 1rem; gap: 0 0.7rem; padding: 0.7rem 0; }
  .video-wrap                   { flex-direction: column; padding: 1.2rem; gap: 1rem; }
  .video-wrap iframe            { width: 100%; height: auto; aspect-ratio: 16/9; }
  .video-title                  { font-size: 1rem; }
  .event-title                  { font-size: 1rem; }
  .event-body                   { font-size: 1rem; padding: 1rem 1.2rem; }
  .event-header                 { padding: 0.8rem 1.2rem; }
}

/* ================================================================
   Responsive — Phone  (≤ 480px)
   ================================================================ */
@media (max-width: 480px) {

  /* Base */
  body                          { font-size: 18px; }

  /* Tighter top bar */
  aside                         { padding: 0.9rem 1rem; gap: 0.4rem; }
  .sidebar-name                 { font-size: 1.1rem; }
  .lang-toggle                  { font-size: 0.85rem; }
  nav ul li a                   { font-size: 0.78rem; padding: 0.3rem 0.45rem; }

  /* Main */
  main                          { padding: 1.5rem 1rem 2rem; }
  h1                            { font-size: 2.2rem; }
  .page-header                  { margin-bottom: 1.8rem; padding-bottom: 1.5rem; }

  /* Hero photo sits below text and is centred */
  .hero-photo-wrap              { max-width: 120px; }

  /* Exercise links go full-width for easy tapping */
  .exercise-grid                { flex-direction: column; }
  .ex-link                      { width: 100%; text-align: center; box-sizing: border-box; }

  /* Publication number column narrower */
  .pub-item                     { grid-template-columns: 1.5rem 1fr; }

  /* Seminar entries more compact */
  .talk-entry                   { padding: 1rem 0; }
  .talk-date-badge              { font-size: 0.6rem; }
  .talk-speaker                 { font-size: 0.95rem; }
  .abstract-toggle              { font-size: 0.6rem; }

  /* Course year label smaller */
  .course-year                  { font-size: 0.75rem; }
}
