/* =========================================================
   Shaikha Alkhadhr — personal site
   Theme: KU navy/gold × PSU navy × Apple typography & whitespace
   ========================================================= */

:root {
  /* Palette */
  --navy:        #0A2240;   /* unified KU/PSU navy */
  --navy-deep:   #061633;
  --navy-soft:   #1B3A66;
  --gold:        #C9A227;   /* KU gold */
  --gold-soft:   #E8C766;
  --ink:         #1D1D1F;   /* Apple primary text */
  --ink-mute:    #6E6E73;   /* Apple secondary text */
  --line:        #E5E5EA;   /* Apple hairline */
  --surface:     #FFFFFF;
  --bg:          #FBFBFD;   /* Apple page bg */
  --bg-tint:     #F2F4F8;

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
               "Helvetica Neue", Helvetica, Arial, "Segoe UI", Roboto, sans-serif;
  --font-serif: "New York", "Iowan Old Style", "Apple Garamond", Georgia, "Times New Roman", serif;

  /* Layout */
  --maxw: 1080px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 14px;
  --radius-lg: 22px;

  /* Motion */
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a {
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
a:hover { color: var(--navy-soft); border-bottom-color: var(--gold); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.025em; line-height: 1.08; font-weight: 500; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; font-family: var(--font-sans); font-weight: 600; letter-spacing: -0.005em; }
p  { margin: 0 0 1.1em; color: var(--ink); }
.muted { color: var(--ink-mute); }

/* ---------- Layout ---------- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
section {
  padding: clamp(64px, 9vw, 120px) 0;
  border-top: 1px solid var(--line);
}
section:first-of-type { border-top: none; }
.eyebrow {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: rgba(251, 251, 253, 0.78);
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-brand {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  border: none;
}
.nav-brand:hover { color: var(--navy); border: none; }
.nav-links {
  display: flex;
  gap: 22px;
  font-size: .92rem;
  font-weight: 500;
}
.nav-links a {
  color: var(--ink-mute);
  border: none;
}
.nav-links a:hover { color: var(--navy); }
@media (max-width: 560px) {
  .nav-links { gap: 14px; font-size: .85rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(80px, 14vw, 160px) 0 clamp(60px, 10vw, 120px);
  overflow: hidden;
  border-top: none;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 90%;
  background:
    radial-gradient(60% 60% at 20% 20%, rgba(10,34,64,.07) 0%, rgba(10,34,64,0) 70%),
    radial-gradient(50% 50% at 85% 30%, rgba(201,162,39,.08) 0%, rgba(201,162,39,0) 70%);
  pointer-events: none;
  z-index: 0;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero-name {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
  color: var(--ink);
}
.hero-name .accent { color: var(--navy); }
.hero-title {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--ink-mute);
  margin: 0 0 28px;
  max-width: 36ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  transition: transform .15s var(--ease), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  cursor: pointer;
}
.btn-primary {
  background: var(--navy);
  color: #fff;
}
.btn-primary:hover { background: var(--navy-deep); color: #fff; transform: translateY(-1px); border: none; }
.btn-secondary {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-secondary:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Headshot */
.hero-photo {
  justify-self: center;
  width: clamp(220px, 28vw, 320px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background:
    linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 30px 60px -20px rgba(10,34,64,.35),
    0 0 0 8px rgba(255,255,255,.6),
    0 0 0 9px rgba(10,34,64,.08);
}
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 20%;
}
.hero-photo-initials {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(3.5rem, 7vw, 5rem);
  color: var(--gold-soft);
  letter-spacing: -0.04em;
}

/* ---------- Affiliations strip ----------
   Designed as two stacked blocks per column: logo on top in a fixed-
   height "mark zone" so both logos share a baseline; role text below.
   Two-column grid on desktop, single column on narrow screens.        */
.affiliations {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 32px;
  row-gap: 26px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.affiliation {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.affiliation .affil-mark {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.affiliation .affil-logo {
  max-height: 56px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left center;
}
.affiliation .affil-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.4;
}
.affiliation .affil-text .role {
  color: var(--ink);
  font-weight: 600;
  font-size: .94rem;
  letter-spacing: -0.005em;
}
.affiliation .affil-text .meta {
  color: var(--ink-mute);
  font-size: .84rem;
}
@media (max-width: 540px) {
  .affiliations { grid-template-columns: 1fr; row-gap: 22px; column-gap: 0; }
  .affiliation .affil-mark { height: 50px; }
  .affiliation .affil-logo { max-height: 46px; }
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  margin-top: 28px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--navy), var(--gold));
  opacity: 0; transition: opacity .25s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  border-color: transparent;
  box-shadow: 0 24px 48px -24px rgba(10,34,64,.25);
}
.card:hover::after { opacity: 1; }
.card h3 { margin-bottom: 8px; }
.card .kicker {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.card p { color: var(--ink-mute); font-size: .95rem; flex: 1; }
.card .tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 14px;
}
.tag {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-tint);
  color: var(--navy);
}
.card-link {
  margin-top: 16px;
  font-weight: 600;
  font-size: .92rem;
  color: var(--navy);
  border: none;
  display: inline-flex; align-items: center; gap: 4px;
}
.card-link:hover { color: var(--navy-deep); border: none; }
.card-link::after {
  content: "→";
  transition: transform .2s var(--ease);
}
.card:hover .card-link::after { transform: translateX(3px); }
.card .team {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: .85rem;
  color: var(--ink-mute);
  line-height: 1.55;
}
.card .team strong { color: var(--navy); font-weight: 600; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(28px, 5vw, 60px);
}
@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; }
}
.about-grid h2 { margin-bottom: 0; }
.about-body p:last-child { margin-bottom: 0; }

/* ---------- Contact ---------- */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.contact-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex; flex-direction: column;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.contact-list li:hover { border-color: var(--gold); transform: translateY(-2px); }
.contact-list .label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 4px;
}
.contact-list a {
  font-weight: 500;
  color: var(--ink);
  border: none;
  word-break: break-word;
}
.contact-list a:hover { color: var(--navy); border: none; }

/* ---------- Education list ---------- */
.edu-list {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}
.edu-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 22px;
  align-items: baseline;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.edu-item:hover { border-color: var(--gold); transform: translateY(-2px); }
.edu-year {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.6rem;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.edu-body h3 { margin-bottom: 2px; }
.edu-body .inst {
  font-size: .95rem;
  color: var(--ink-mute);
  margin-bottom: 8px;
}
.edu-body .thesis {
  font-size: .9rem;
  color: var(--ink);
  border-left: 2px solid var(--gold);
  padding-left: 12px;
  margin: 0;
  font-style: italic;
}
@media (max-width: 520px) {
  .edu-item { grid-template-columns: 1fr; gap: 6px; }
  .edu-year { font-size: 1.2rem; }
}

/* ---------- Publications ---------- */
.pubs {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  counter-reset: pub;
}
.pubs li {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.pubs li:last-child { border-bottom: none; }
.pubs .pub-year {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--gold);
  padding-top: 2px;
}
.pubs .pub-title {
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px;
  line-height: 1.35;
}
.pubs .pub-title a {
  color: var(--ink);
  border: none;
  background-image: linear-gradient(var(--gold), var(--gold));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .25s var(--ease), color .2s var(--ease);
}
.pubs .pub-title a:hover {
  color: var(--navy);
  background-size: 100% 1px;
  border: none;
}
.pubs .pub-authors {
  font-size: .9rem;
  color: var(--ink-mute);
  margin: 0 0 4px;
}
.pubs .pub-venue {
  font-size: .9rem;
  color: var(--ink);
  font-style: italic;
  margin: 0;
}
@media (max-width: 520px) {
  .pubs li { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- Timeline (experience) ---------- */
.tl {
  position: relative;
  margin: 28px 0 0;
  padding-left: 22px;
}
.tl::before {
  content: "";
  position: absolute;
  left: 5px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--navy), var(--gold));
  border-radius: 2px;
}
.tl-item {
  position: relative;
  padding: 4px 0 22px 16px;
}
.tl-item::before {
  content: "";
  position: absolute;
  left: -22px; top: 8px;
  width: 12px; height: 12px;
  background: var(--surface);
  border: 2px solid var(--navy);
  border-radius: 50%;
}
.tl-item:hover::before { border-color: var(--gold); }
.tl-when {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 4px;
}
.tl-role {
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 3px;
}
.tl-org {
  font-size: .92rem;
  color: var(--ink-mute);
  margin: 0;
}

/* ---------- Subject pills ---------- */
.subjects {
  display: flex; flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.subjects li {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: .88rem;
  color: var(--ink);
  font-weight: 500;
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.subjects li:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: rgba(10, 34, 64, .03);
}

/* ---------- Certifications grid ---------- */
.creds {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
}
.creds li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.creds li:hover { border-color: var(--gold); transform: translateY(-2px); }
.creds .cred-name {
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 4px;
  line-height: 1.3;
}
.creds .cred-meta {
  font-size: .82rem;
  color: var(--ink-mute);
  margin: 0;
}

/* ---------- Courses ---------- */
.courses {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.courses li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.courses li:hover { border-color: var(--gold); transform: translateY(-1px); }
.courses .code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .78rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: .03em;
  flex: none;
}
.courses .title {
  font-size: .94rem;
  color: var(--ink);
  line-height: 1.35;
}

/* ---------- Advisees ---------- */
.advisee {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 30px 26px 32px;
  margin-top: 28px;
  position: relative;
  overflow: hidden;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.advisee:hover {
  border-color: transparent;
  box-shadow: 0 24px 48px -24px rgba(10,34,64,.22);
}
.advisee::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--navy), var(--gold));
}
.advisee .role-tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.advisee h3 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}
.advisee .topic {
  color: var(--ink);
  margin: 0 0 6px;
  font-size: .98rem;
}
.advisee .topic .label {
  font-weight: 600;
  color: var(--navy);
}
.advisee .co {
  font-size: .9rem;
  color: var(--ink-mute);
  margin: 0;
}

/* ---------- Service callout ---------- */
.service {
  margin-top: 28px;
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(10,34,64,.04), rgba(201,162,39,.06));
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.service p { margin: 0; color: var(--ink); }
.service strong { color: var(--navy); }

/* ---------- Footer ---------- */
footer {
  padding: 36px var(--gutter);
  text-align: center;
  font-size: .85rem;
  color: var(--ink-mute);
  border-top: 1px solid var(--line);
}
footer .footer-rule {
  width: 40px; height: 2px;
  background: var(--gold);
  margin: 0 auto 18px;
  border-radius: 2px;
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.in {
  opacity: 1; transform: none;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
