/* Dr. Sari Hamoud — Times New Roman throughout, green and red scheme, one type scale */

:root {
  --green: #0f4d32;
  --green-dark: #0a3724;
  --green-tint: #eef3ee;
  --red: #a61e22;
  --red-dark: #82171a;
  --red-pale: #f3c4c2;
  --ink: #17231c;
  --muted: #46554b;
  --line: #cfd9d1;
  --white: #ffffff;
  --paper: #fafbf9;
  --max: 1100px;

  /* Type scale: five sizes, nothing else */
  --fs-small: 1rem;
  --fs-body: 1.125rem;
  --fs-h3: 1.375rem;
  --fs-h2: clamp(1.75rem, 3.6vw, 2.375rem);
  --fs-h1: clamp(2.5rem, 6vw, 3.5rem);

  --font: "Times New Roman", Times, "Liberation Serif", "Noto Serif", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-tap-highlight-color: rgba(166,30,34,.15);
}

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

a {
  color: var(--green);
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

h1,
h2,
h3,
p,
ul,
dl,
dd,
figure {
  margin: 0;
}

h1 {
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.1;
  color: var(--green);
}

h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.2;
  color: var(--green);
  margin-bottom: 16px;
}

h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  background: var(--red);
  margin-top: 14px;
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.3;
  color: var(--green);
  margin-bottom: 8px;
}

figcaption {
  font-size: var(--fs-small);
}

.container {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}

/* Header */

.top-bar {
  height: 5px;
  background: linear-gradient(
    90deg,
    var(--green) 0 50%,
    var(--red) 50% 100%
  );
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  color: var(--green);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--fs-h3);
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.brand .ar {
  color: var(--red);
  font-size: var(--fs-h3);
}

nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: var(--fs-small);
  font-weight: 700;
}

nav .nav-contact {
  background: var(--red);
  color: var(--white);
  padding: 9px 20px;
  border-radius: 3px;
}

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  font: inherit;
  font-size: var(--fs-h3);
  color: var(--green);
  width: 48px;
  height: 48px;
  margin-right: -10px;
  cursor: pointer;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 26px;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 700;
  font-size: var(--fs-small);
  border: 2px solid transparent;
}

.button.primary {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.button.secondary {
  border-color: var(--green);
  color: var(--green);
  background: transparent;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* Hero */

.hero {
  padding: 72px 0 80px;
  background: var(--white);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 64px;
  align-items: center;
}

.hero .ar-name {
  font-size: var(--fs-h2);
  font-weight: 700;
  color: var(--red);
  margin: 6px 0 22px;
  direction: rtl;
  text-align: left;
}

.hero .role {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 14px;
}

.hero .intro {
  color: var(--muted);
  max-width: 560px;
}

/* Hero profile and social links */

.hero-profile {
  width: 100%;
  max-width: 460px;
  margin-left: auto;
}

.hero-photo {
  margin: 0;
}

.hero-photo img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 3px;
  border-bottom: 5px solid var(--red);
}

.hero-photo figcaption {
  margin-top: 10px;
  color: var(--muted);
}

.hero-social {
  text-align: center;
  padding-top: 18px;
}

.hero-social > p {
  color: var(--muted);
  font-size: var(--fs-small);
  font-weight: 700;
  margin-bottom: 10px;
}

.hero-social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--green);
  text-decoration: none;
  font-size: var(--fs-small);
  font-weight: 700;
  transition:
    background .2s ease,
    color .2s ease,
    border-color .2s ease,
    transform .2s ease;
}

.hero-social-links a:hover {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
  transform: translateY(-2px);
}

.hero-social-links svg {
  width: 19px;
  height: 19px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.hero-social-links a:last-child svg {
  fill: currentColor;
  stroke: none;
}

/* Facts */

.facts {
  background: var(--green);
  color: var(--white);
  border-bottom: 5px solid var(--red);
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.fact {
  padding: 28px 24px;
  border-left: 1px solid rgba(255,255,255,.22);
}

.fact:first-child {
  border-left: 0;
  padding-left: 0;
}

.fact strong {
  display: block;
  font-size: var(--fs-h2);
  line-height: 1.2;
}

.fact span {
  font-size: var(--fs-small);
  color: #d3e3d8;
}

/* Sections */

.section {
  padding: 88px 0;
}

.section.tint {
  background: var(--green-tint);
}

.section.dark {
  background: var(--green);
  color: var(--white);
}

.section.dark h2,
.section.dark h3 {
  color: var(--white);
}

.section.dark h2::after {
  background: var(--red-pale);
}

.section-head {
  max-width: 720px;
  margin-bottom: 40px;
}

.section-head p {
  color: var(--muted);
}

.dark .section-head p {
  color: #d3e3d8;
}

.two-col {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 64px;
  align-items: center;
}

.prose p {
  color: var(--muted);
  margin-bottom: 16px;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* Timeline */

.timeline {
  border-top: 1px solid rgba(255,255,255,.28);
}

.year-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 28px;
  padding: 26px 0;
  border-bottom: 1px solid rgba(255,255,255,.28);
}

.year {
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--red-pale);
}

.events {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 40px;
}

.events strong {
  display: block;
  font-size: var(--fs-body);
  color: var(--white);
  line-height: 1.35;
}

.events span {
  font-size: var(--fs-small);
  color: #d3e3d8;
}

.note-dark {
  font-size: var(--fs-small);
  color: #d3e3d8;
  margin-top: 24px;
  max-width: 760px;
}

/* Cards */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: var(--white);
  padding: 28px;
  border-top: 4px solid var(--green);
}

.card p {
  color: var(--muted);
}

/* Education */

.edu-title {
  margin-top: 56px;
}

.edu {
  list-style: none;
  padding: 0;
}

.edu li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.edu .when {
  color: var(--red);
  font-weight: 700;
}

.edu strong {
  display: block;
  color: var(--green);
}

.edu span {
  color: var(--muted);
}

.pubs {
  margin-top: 40px;
}

.pubs p {
  color: var(--muted);
  margin-bottom: 12px;
  padding-left: 16px;
  border-left: 3px solid var(--red);
}

/* Photos */

.photo {
  margin: 0;
}

.photo img {
  width: 100%;
  object-fit: cover;
  border-radius: 3px;
}

.photo figcaption {
  margin-top: 8px;
  color: var(--muted);
}

.r34 img {
  aspect-ratio: 3/4;
}

.r32 img {
  aspect-ratio: 3/2;
}

.pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 44px;
  max-width: 760px;
}

.trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 8px;
}

.duo {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.dark .photo figcaption {
  color: #d3e3d8;
}

.pos-right img {
  object-position: 70% center;
}

/* Languages */

.lang-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.lang-grid dt {
  font-weight: 700;
  color: var(--green);
}

.lang-grid dd {
  color: var(--muted);
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 64px;
  align-items: start;
}

.contact-card {
  background: var(--white);
  padding: 32px;
  border-top: 4px solid var(--red);
}

.contact-card dt {
  font-size: var(--fs-small);
  color: var(--muted);
  margin-top: 18px;
}

.contact-card dt:first-child {
  margin-top: 0;
}

.contact-card dd {
  font-weight: 700;
}

.contact-card a {
  color: var(--green);
}

.social {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.social a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 700;
  text-decoration: none;
}

.social svg {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

/* Footer */

footer {
  background: var(--green-dark);
  color: #d3e3d8;
  padding: 26px 0;
  font-size: var(--fs-small);
  border-top: 5px solid var(--red);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px 28px;
  flex-wrap: wrap;
  align-items: center;
}

footer ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

footer a {
  color: var(--white);
}

/* Hover */

@media (hover: hover) {

  a:hover {
    color: var(--red);
  }

  nav a:hover {
    color: var(--red);
  }

  nav .nav-contact:hover,
  .button.primary:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
    color: var(--white);
  }

  .button.secondary:hover {
    background: var(--green);
    color: var(--white);
  }

  footer a:hover {
    color: var(--red-pale);
  }
}

/* Tablet and mobile */

@media (max-width: 900px) {

  html {
    scroll-padding-top: 76px;
  }

  .hero {
    padding: 44px 0 56px;
  }

  .hero-grid,
  .two-col,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-profile {
    max-width: 460px;
    margin-left: 0;
  }

  .hero-photo img {
    aspect-ratio: 1/1;
    object-position: center 15%;
  }

  .hero-social {
    padding-top: 16px;
  }

  .facts-grid {
    grid-template-columns: 1fr 1fr;
  }

  .fact {
    padding: 22px 16px;
  }

  .fact:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }

  .fact:nth-child(n+3) {
    border-top: 1px solid rgba(255,255,255,.22);
  }

  .section {
    padding: 60px 0;
  }

  .cards,
  .trio {
    grid-template-columns: 1fr;
  }

  .lang-grid {
    grid-template-columns: 1fr 1fr;
  }

  .duo,
  .pair {
    grid-template-columns: 1fr;
  }

  .events {
    grid-template-columns: 1fr;
  }

  .year-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .edu li {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .trio .photo,
  .pair .photo {
    max-width: 480px;
  }

  .menu-toggle {
    display: block;
  }

  nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 77px;
    background: var(--white);
    padding: 14px 20px 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    border-bottom: 1px solid var(--line);
  }

  nav.open {
    display: flex;
  }

  nav a {
    padding: 12px 4px;
  }

  nav .nav-contact {
    text-align: center;
    margin-top: 8px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Small phones */

@media (max-width: 380px) {

  .container {
    width: calc(100% - 32px);
  }

  .lang-grid {
    grid-template-columns: 1fr;
  }

  .hero-social-links {
    gap: 7px;
  }

  .hero-social-links a {
    padding: 8px 11px;
  }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-social-links a {
    transition: none;
  }
}