/* ═══════════════════════════════════════════════════
   Dr Shaban Sulejman — personal site
   ═══════════════════════════════════════════════════ */

/* ---------- tokens ---------- */
:root {
  --paper:      #fcfbf9;
  --paper-alt:  #f5f3ee;
  --ink:        #16161a;
  --ink-soft:   #4d4d55;
  --ink-mute:   #8a8a93;
  --line:       #e4e0d8;
  --line-soft:  #edeae3;
  --accent:     #b0511f;
  --accent-dim: #b0511f1f;

  --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, sans-serif;

  --max:  1080px;
  --gut:  clamp(1.375rem, 5vw, 5.5rem);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

:root[data-theme="dark"] {
  --paper:      #0e0e10;
  --paper-alt:  #16161a;
  --ink:        #f2f0ec;
  --ink-soft:   #b0aeaa;
  --ink-mute:   #76747c;
  --line:       #27272d;
  --line-soft:  #1d1d22;
  --accent:     #f08b52;
  --accent-dim: #f08b5222;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #0e0e10;
    --paper-alt:  #16161a;
    --ink:        #f2f0ec;
    --ink-soft:   #b0aeaa;
    --ink-mute:   #76747c;
    --line:       #27272d;
    --line-soft:  #1d1d22;
    --accent:     #f08b52;
    --accent-dim: #f08b5222;
  }
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(.9688rem, .93rem + .18vw, 1.0313rem);
  font-weight: 300;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .4s var(--ease), color .4s var(--ease);
}

ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
strong { font-weight: 500; }
em { font-style: italic; }
sup { font-size: .7em; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--accent); color: #fff; }

.dot { color: var(--ink-mute); margin-inline: .5rem; }

.skip {
  position: absolute; left: -9999px; z-index: 100;
  padding: .75rem 1.25rem; background: var(--ink); color: var(--paper);
}
.skip:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 2rem;
  padding: 1rem var(--gut);
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color .35s var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--line); }

.nav__mark {
  font-family: var(--font-display);
  font-size: 1.3125rem; letter-spacing: .06em;
  margin-right: auto;
  transition: color .25s;
}
.nav__mark:hover { color: var(--accent); }

.nav__links {
  display: flex; gap: 1.625rem;
  font-size: .8125rem; letter-spacing: .015em;
  color: var(--ink-soft);
}
.nav__links a { position: relative; padding-block: .3rem; transition: color .25s; }
.nav__links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: .05rem;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); }

@media (max-width: 860px) { .nav__links { display: none; } }

/* burger — mobile only */
.nav__burger {
  display: none;
  position: relative;
  width: 2.125rem; height: 2.125rem;
}
.nav__burger span {
  position: absolute;
  left: 50%; top: 50%;
  width: 18px; height: 1.5px; margin-left: -9px;
  background: var(--ink); border-radius: 2px;
  transition: transform .35s var(--ease);
}
.nav__burger span:first-child { transform: translateY(-4px); }
.nav__burger span:last-child  { transform: translateY(3px); }
.nav__burger[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child  { transform: rotate(-45deg); }

@media (max-width: 860px) { .nav__burger { display: block; } }

/* slide-down sheet */
.sheet {
  position: fixed; inset: 0; z-index: 45;
  background: var(--paper);
  display: grid; place-items: center;
  opacity: 0; transition: opacity .3s var(--ease);
}
.sheet.is-open { opacity: 1; }
.sheet ul { display: grid; gap: .25rem; text-align: center; }
.sheet a {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 8vw, 2.5rem);
  line-height: 1.35;
  display: block; padding: .25rem 1rem;
  transition: color .2s;
}
.sheet a:hover, .sheet a:active { color: var(--accent); }

.nav__theme {
  display: grid; place-items: center;
  width: 2.125rem; height: 2.125rem;
  border: 1px solid var(--line); border-radius: 50%;
  transition: border-color .25s, transform .4s var(--ease), color .25s;
}
.nav__theme:hover { border-color: var(--accent); color: var(--accent); transform: rotate(-18deg); }
.nav__theme svg {
  width: 1rem; height: 1rem;
  fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun  { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun  { display: none; }
  :root:not([data-theme="light"]) .icon-moon { display: block; }
}
:root[data-theme="light"] .icon-sun  { display: block; }
:root[data-theme="light"] .icon-moon { display: none; }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: grid; align-items: center;
  padding: 7.5rem var(--gut) 6rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute;
  top: -22%; right: -8%;
  width: min(55vw, 640px); aspect-ratio: 1;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 66%);
  pointer-events: none;
}
.hero__inner {
  max-width: var(--max); margin-inline: auto; width: 100%; position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(15rem, 24vw, 19.5rem);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

/* portrait */
.hero__portrait { position: relative; }
.hero__portrait img {
  display: block; position: relative; z-index: 1;
  width: 100%; height: auto;
  border: 1px solid var(--line);
  filter: saturate(.96);
}
.hero__portrait::after {
  content: ''; position: absolute;
  inset: 1.125rem -1.125rem -1.125rem 1.125rem;
  border: 1px solid var(--accent);
  opacity: .38;
}

@media (max-width: 880px) {
  .hero__inner { grid-template-columns: 1fr; gap: 0; }
  .hero__portrait { order: -1; width: 5.75rem; margin-bottom: 1.75rem; }
  .hero__portrait::after { display: none; }
  .hero__portrait img { border-radius: 50%; aspect-ratio: 1; object-fit: cover; object-position: 50% 22%; }
}

.hero__eyebrow {
  display: flex; align-items: center; gap: .8125rem;
  font-size: .6875rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: 1.625rem;
}
.hero__eyebrow::before { content: ''; width: 2.25rem; height: 1px; background: var(--accent); }

.hero__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.25rem, 11.5vw, 8.75rem);
  line-height: .9;
  letter-spacing: -.022em;
}
.hero__name em { color: var(--accent); }

.hero__rule {
  width: 4.5rem; height: 2px; margin: 1.75rem 0 1.5rem;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.hero__role {
  font-size: clamp(1rem, 1.9vw, 1.1875rem);
  font-weight: 400; color: var(--ink);
  max-width: 33rem; margin-bottom: 1.25rem;
}

.hero__bio {
  max-width: 35rem; color: var(--ink-soft);
  margin-bottom: 2.5rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: .8125rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .8125rem 1.75rem;
  font-size: .8438rem; font-weight: 500; letter-spacing: .012em;
  border-radius: 100px; border: 1px solid transparent;
  transition: transform .35s var(--ease), background .25s, color .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--accent); color: #fff; }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero__scroll {
  position: absolute; left: 50%; bottom: 2.25rem;
  transform: translateX(-50%);
  width: 1px; height: 3.25rem;
  background: var(--line); overflow: hidden;
}
.hero__scroll span { position: absolute; inset: 0; background: var(--accent); animation: trickle 2.6s var(--ease) infinite; }
@keyframes trickle {
  0%        { transform: translateY(-100%); }
  55%, 100% { transform: translateY(100%); }
}
@media (max-width: 700px) { .hero__scroll { display: none; } }

/* ---------- stats ---------- */
.stats {
  max-width: var(--max); margin-inline: auto;
  padding-inline: var(--gut);
}
.stats ul {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line);
}
.stats li {
  background: var(--paper);
  padding: 1.75rem 1.5rem;
  display: flex; flex-direction: column; gap: .375rem;
}
.stats__n {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.125rem, 5vw, 2.875rem); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stats__n em { color: var(--accent); font-style: normal; }
.stats__l {
  font-size: .75rem; letter-spacing: .05em;
  color: var(--ink-mute);
}

/* ---------- sections ---------- */
.section {
  max-width: var(--max); margin-inline: auto;
  padding: clamp(4.25rem, 9vw, 7.5rem) var(--gut);
}
.section + .section { border-top: 1px solid var(--line-soft); }

.section__head {
  display: flex; align-items: baseline; gap: 1rem;
  margin-bottom: 2.25rem;
}
.section__num {
  font-size: .6875rem; letter-spacing: .14em;
  color: var(--accent); font-variant-numeric: tabular-nums;
}
.section__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.875rem, 4.5vw, 2.875rem);
  line-height: 1.04; letter-spacing: -.012em;
}
.section__lead {
  max-width: 36rem; color: var(--ink-soft);
  margin-bottom: 2.75rem;
}
.section__lead a { color: var(--accent); white-space: nowrap; }
.section__lead a:hover { text-decoration: underline; text-underline-offset: 3px; }

.prose { max-width: 38rem; color: var(--ink-soft); }
.prose p + p { margin-top: 1.0625rem; }
.prose strong { color: var(--ink); }
.prose a {
  color: var(--ink); text-decoration: underline;
  text-decoration-color: var(--accent); text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.prose a:hover { color: var(--accent); }

/* ---------- about split ---------- */
.split {
  display: grid; grid-template-columns: 1fr minmax(230px, 17rem);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }

.meta dl { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.meta div { background: var(--paper); padding: .9375rem 1.125rem; }
.meta dt {
  font-size: .625rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: .3125rem;
}
.meta dd { font-size: .875rem; line-height: 1.5; }
.meta dd a { color: var(--accent); }
.meta dd a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- cards ---------- */
.cards {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 700px) { .cards { grid-template-columns: 1fr; } }
.card {
  position: relative;
  padding: 1.875rem 1.75rem 1.75rem;
  background: var(--paper-alt);
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
  transition: transform .45s var(--ease), border-color .3s;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); }
.card__idx {
  position: absolute; top: 1.5rem; right: 1.625rem;
  font-size: .6875rem; letter-spacing: .1em;
  color: var(--ink-mute); font-variant-numeric: tabular-nums;
}
.card__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: 1.4375rem; line-height: 1.14;
  margin-bottom: .75rem; padding-right: 2rem;
}
.card__desc { font-size: .9063rem; color: var(--ink-soft); }
.card .tags { margin-top: 1.25rem; }

/* ---------- tags ---------- */
.tags { display: flex; flex-wrap: wrap; gap: .375rem; margin-top: 1.125rem; }
.tags li {
  font-size: .6875rem; letter-spacing: .025em;
  padding: .3125rem .6875rem;
  border: 1px solid var(--line); border-radius: 100px;
  color: var(--ink-soft);
}

/* ---------- timeline ---------- */
.timeline { position: relative; }
.timeline::before {
  content: ''; position: absolute;
  left: 0; top: .6rem; bottom: .6rem;
  width: 1px; background: var(--line);
}
@media (max-width: 800px) { .timeline::before { display: none; } }

.role {
  display: grid; grid-template-columns: 10rem 1fr;
  gap: 2.25rem;
  padding: 0 0 2.875rem 1.875rem;
  position: relative;
}
.role:last-child { padding-bottom: 0; }
.role::before {
  content: ''; position: absolute;
  left: -3.5px; top: .6rem;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--ink-mute);
  transition: background .3s, border-color .3s, transform .35s var(--ease);
}
.role:hover::before { background: var(--accent); border-color: var(--accent); transform: scale(1.4); }

@media (max-width: 800px) {
  .role { grid-template-columns: 1fr; gap: .625rem; padding-left: 0; }
  .role::before { display: none; }
}

.role__when {
  font-size: .8125rem; color: var(--ink-mute);
  font-variant-numeric: tabular-nums; letter-spacing: .015em;
  padding-top: .15rem;
}
.role__when .now { color: var(--accent); }

.role__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.1875rem, 2.3vw, 1.5rem);
  line-height: 1.18; margin-bottom: .3125rem;
}
.role__org { font-size: .9063rem; color: var(--ink-soft); margin-bottom: .9375rem; }
.role__sep { color: var(--ink-mute); margin-inline: .375rem; }
.role__note { font-size: .9063rem; color: var(--ink-soft); }

.role__points { display: grid; gap: .5rem; color: var(--ink-soft); font-size: .9063rem; }
.role__points li { position: relative; padding-left: 1.0625rem; }
.role__points li::before {
  content: ''; position: absolute; left: 0; top: .72em;
  width: 6px; height: 1px; background: var(--accent);
}

/* ---------- publications ---------- */
.pubs { display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }

.pub {
  background: var(--paper);
  padding: 1.625rem .25rem 1.5rem;
  transition: background .35s, padding-left .35s var(--ease);
}
.pub:hover { background: var(--paper-alt); padding-left: 1.125rem; }

.pub__venue {
  display: flex; align-items: baseline; gap: .75rem;
  margin-bottom: .625rem;
}
.pub__journal {
  font-size: .6875rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--accent); font-weight: 500;
}
.pub__year {
  font-size: .6875rem; color: var(--ink-mute);
  font-variant-numeric: tabular-nums; letter-spacing: .04em;
}

.pub__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.125rem, 2.4vw, 1.4375rem);
  line-height: 1.2; margin-bottom: .5rem;
  max-width: 44rem;
}
.pub--feature .pub__title { font-size: clamp(1.25rem, 2.8vw, 1.625rem); }

.pub__authors {
  font-size: .8125rem; color: var(--ink-mute);
  line-height: 1.55; max-width: 46rem;
}
.pub__authors strong { color: var(--ink); font-weight: 500; }

.pub__note {
  font-size: .875rem; color: var(--ink-soft);
  margin-top: .625rem; max-width: 42rem;
}

.pub__foot {
  display: flex; align-items: center; gap: 1.25rem;
  margin-top: .875rem;
}
.pub__cite {
  font-size: .75rem; color: var(--ink-mute);
  padding: .1875rem .625rem;
  border: 1px solid var(--line); border-radius: 100px;
}
.pub__link {
  font-size: .8125rem; font-weight: 500; color: var(--accent);
  display: inline-flex; align-items: center; gap: .375rem;
}
.pub__link span { transition: transform .3s var(--ease); display: inline-block; }
.pub__link:hover span { transform: translate(2px, -2px); }

.pubs__key { font-size: .75rem; color: var(--ink-mute); margin-top: 1rem; }

/* ---------- awards ---------- */
.awards { display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.awards li {
  background: var(--paper);
  padding: 1.0625rem .25rem;
  display: grid; grid-template-columns: 3.75rem 1fr auto;
  gap: 1.25rem; align-items: baseline;
  transition: background .3s, padding-left .3s var(--ease);
}
.awards li:hover { background: var(--paper-alt); padding-left: 1rem; }
.awards__y {
  font-size: .75rem; color: var(--accent);
  font-variant-numeric: tabular-nums; letter-spacing: .04em;
}
.awards__t { font-size: .9375rem; line-height: 1.45; }
.awards__o { font-size: .75rem; color: var(--ink-mute); text-align: right; }

@media (max-width: 720px) {
  .awards li { grid-template-columns: 3.25rem 1fr; gap: .875rem .875rem; }
  .awards__o { grid-column: 2; text-align: left; }
}

.invited {
  margin-top: 2.5rem; padding: 1.375rem 1.5rem;
  border: 1px solid var(--line); background: var(--paper-alt);
}
.invited h3 {
  font-size: .625rem; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 500; color: var(--ink-mute); margin-bottom: .4375rem;
}
.invited p { font-family: var(--font-display); font-size: 1.25rem; }

/* ---------- contact ---------- */
.contact__lead { max-width: 34rem; color: var(--ink-soft); margin-bottom: 2.5rem; }
.contact__links { display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.contact__link {
  background: var(--paper);
  padding: 1.25rem .25rem;
  display: flex; align-items: baseline; gap: 1.5rem; flex-wrap: wrap;
  transition: padding-left .35s var(--ease), background .3s;
}
.contact__link:hover { padding-left: 1.125rem; background: var(--paper-alt); }
.contact__k {
  font-size: .625rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-mute); min-width: 5.25rem;
}
.contact__v {
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 2.2vw, 1.375rem);
  transition: color .25s;
  word-break: break-word;
}
.contact__link:hover .contact__v { color: var(--accent); }

/* ---------- footer ---------- */
.footer {
  max-width: var(--max); margin-inline: auto;
  padding: 2.25rem var(--gut) 2.75rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  font-size: .75rem; letter-spacing: .03em; color: var(--ink-mute);
  border-top: 1px solid var(--line-soft);
}

/* ---------- reveal ---------- */
.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll span { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* ---------- print ---------- */
@media print {
  :root {
    --paper: #fff; --paper-alt: #fff; --ink: #000;
    --ink-soft: #1f1f1f; --ink-mute: #555;
    --line: #ccc; --line-soft: #ddd; --accent: #000;
  }
  .nav, .hero__scroll, .hero__actions, .skip, .footer__loc { display: none !important; }
  .hero { min-height: auto; padding: 0 0 1.25rem; }
  .hero::before { display: none; }
  .hero__name { font-size: 2.375rem; }
  .hero__rule { display: none; }
  .section { padding: 1.125rem 0; }
  .section + .section { border-top: 1px solid #ddd; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .card, .role, .pub, .awards li { break-inside: avoid; }
  .cards { grid-template-columns: 1fr 1fr; }
  body { font-size: 10pt; }
}
