/* Taciroglu Research Group
   Natural hazards engineering at regional scales */

:root {
  --ink:      #1a1d1b;
  --paper:    #fbfbf9;
  --muted:    #5c615e;
  --faint:    #8a8f8b;
  --rule:     #dfe0dc;
  --earth:    #b26b12;
  --wind:     #14806a;
  --fire:     #c6472a;
  --earth-bg: #f7efe2;
  --wind-bg:  #e6f2ee;
  --fire-bg:  #faece8;
  --earth-deep: #8a5106;
  --wind-deep:  #0d5f4e;
  --fire-deep:  #9c3418;
  --pine:       #1e2a26;
  --pine-text:  #c9d6d0;

  --measure: 62ch;
  --gap: 1.5rem;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  font-optical-sizing: auto;
}

h1, h2, h3, h4, nav, .sans {
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  letter-spacing: -0.01em;
}

a { color: inherit; }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--wind);
  outline-offset: 3px;
}

.wrap {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.narrow { max-width: var(--measure); }

/* ---------- header ---------- */

.masthead {
  padding: 1.5rem 0 1.25rem;
}

.masthead-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.wordmark {
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.015em;
  text-decoration: none;
  line-height: 1.3;
}

.wordmark span {
  display: block;
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--muted);
  letter-spacing: 0;
}

nav ul {
  display: flex;
  gap: 1.375rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  align-items: center;
}

nav a {
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--muted);
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
}

nav a:hover { color: var(--ink); }
nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

nav .ext {
  padding-left: 1.25rem;
  border-left: 1px solid var(--rule);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

nav .ext svg { width: 15px; height: 15px; fill: currentColor; }

.strata {
  display: flex;
  height: 3px;
}
.strata i { flex: 1; }
.strata i:nth-child(1) { background: var(--earth); }
.strata i:nth-child(2) { background: var(--wind); }
.strata i:nth-child(3) { background: var(--fire); }

/* ---------- hero ---------- */

.hero-band {
  background: linear-gradient(160deg, var(--earth-bg) 0%, var(--wind-bg) 55%, var(--fire-bg) 100%);
  border-bottom: 1px solid var(--rule);
}
.hero { padding: 3.5rem 0 2.5rem; }

.hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.125rem);
  line-height: 1.08;
  margin: 0;
  font-weight: 600;
}

.hero h1 .qual {
  display: block;
  font-weight: 400;
  color: var(--muted);
}

.hero .lede {
  margin: 1.75rem 0 0;
  font-size: 1.1875rem;
  line-height: 1.65;
  max-width: var(--measure);
}

.hero .lede + p {
  margin-top: 0.75rem;
  color: var(--muted);
  max-width: var(--measure);
}

.terrain {
  margin: 3rem 0 0;
}
.terrain svg { width: 100%; height: auto; display: block; }

/* ---------- generic section ---------- */

section { padding: 3.25rem 0; }
section + section { border-top: 1px solid var(--rule); }

.section-head {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 2rem;
  font-family: "Archivo", sans-serif;
  letter-spacing: 0.01em;
}

h2.big {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  line-height: 1.2;
  margin: 0 0 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

p { margin: 0 0 1rem; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

/* ---------- hazards ---------- */

.hazard {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 1.75rem;
  padding: 1.75rem;
  align-items: start;
  border-radius: 2px;
}
.hazard + .hazard { margin-top: 1.25rem; }
.hazard.earth { background: var(--earth-bg); }
.hazard.wind  { background: var(--wind-bg); }
.hazard.fire  { background: var(--fire-bg); }
.hazard svg { width: 92px; height: 46px; display: block; }

.hazard h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1875rem;
  font-weight: 600;
}
.hazard p { margin: 0; color: var(--muted); }

.hazard.earth h3 { color: var(--earth-deep); }
.hazard.wind  h3 { color: var(--wind-deep); }
.hazard.fire  h3 { color: var(--fire-deep); }

/* ---------- pipeline ---------- */

.chain { counter-reset: stage; margin: 0; padding: 0; list-style: none; }

.chain li {
  counter-increment: stage;
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  gap: 1.25rem;
  padding: 1.5rem 0;
}
.chain li + li { border-top: 1px solid var(--rule); }

.chain li::before {
  content: counter(stage);
  font-family: "Archivo", sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--faint);
  line-height: 1.9;
}

.chain h3 { margin: 0 0 0.35rem; font-size: 1.0625rem; font-weight: 600; }
.chain p { margin: 0; color: var(--muted); }

/* ---------- publications ---------- */

.pubs { margin: 0; padding: 0; list-style: none; }

.pubs li {
  padding: 1.125rem 0;
  max-width: 68ch;
}
.pubs li + li { border-top: 1px solid var(--rule); }

.pubs .authors { color: var(--muted); }
.pubs em { color: var(--ink); }
.pubs b { font-weight: 600; }

.codemark {
  font-family: "Archivo", sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--wind);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  margin-left: 0.5rem;
  white-space: nowrap;
}

.more {
  display: inline-block;
  margin-top: 1.75rem;
  font-family: "Archivo", sans-serif;
  font-size: 0.9375rem;
  text-decoration: none;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 1px;
}

/* ---------- repos ---------- */

.repo {
  padding: 1.375rem 0;
  max-width: 68ch;
}
.newsline { border-left: 3px solid var(--rule); padding-left: 1.25rem; }
.newsline.earth { border-left-color: var(--earth); }
.newsline.wind  { border-left-color: var(--wind); }
.newsline.fire  { border-left-color: var(--fire); }
.newsline + .newsline { border-top: 0; margin-top: 1.25rem; }
.repo + .repo { border-top: 1px solid var(--rule); }

.repo h3 {
  margin: 0 0 0.35rem;
  font-size: 1.0625rem;
  font-weight: 600;
}
.repo h3 a { text-decoration: none; border-bottom: 1.5px solid var(--rule); }
.repo h3 a:hover { border-bottom-color: currentColor; }
.repo p { margin: 0 0 0.5rem; color: var(--muted); }

.meta {
  font-family: "Archivo", sans-serif;
  font-size: 0.8125rem;
  color: var(--faint);
}
.meta a { color: var(--faint); }

.rail {
  background: #f1f1ed;
  padding: 1.25rem 1.5rem;
  border-radius: 2px;
}
.rail + .rail { margin-top: 1rem; }
.rail.earth { background: var(--earth-bg); }
.rail.wind  { background: var(--wind-bg); }
.rail.fire  { background: var(--fire-bg); }

/* ---------- people ---------- */

.pi {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 2.25rem;
  align-items: start;
}

.portrait {
  width: 168px; height: 168px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  background: var(--earth-bg);
  display: flex; align-items: center; justify-content: center;
  font-family: "Archivo", sans-serif;
  font-size: 2.75rem; font-weight: 500;
  color: var(--earth);
}
.portrait img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: grayscale(100%) contrast(1.08);
}
.portrait::after {
  content: ""; position: absolute; inset: 0;
  mix-blend-mode: color; pointer-events: none;
}
.portrait.has-photo.earth::after { background: var(--earth); }
.portrait.has-photo.wind::after  { background: var(--wind); }
.portrait.has-photo.fire::after  { background: var(--fire); }

.roster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.75rem 2rem;
  margin-top: 1.25rem;
}

.member { display: flex; gap: 1rem; align-items: center; }

.avatar {
  width: 60px; height: 60px; flex: 0 0 60px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: "Archivo", sans-serif;
  font-size: 1.0625rem; font-weight: 500;
  overflow: hidden; position: relative;
}
.avatar.earth   { background: var(--earth-bg); color: var(--earth); }
.avatar.wind    { background: var(--wind-bg);  color: var(--wind); }
.avatar.fire    { background: var(--fire-bg);  color: var(--fire); }
.avatar.neutral { background: #eeefec;         color: var(--muted); }

.member h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.member p  { margin: 0.1rem 0 0; font-size: 0.9375rem; color: var(--muted); line-height: 1.45; }

.group-label {
  font-family: "Archivo", sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  display: inline-block;
  margin: 2.5rem 0 0;
  padding: 0.3rem 0.8rem;
  border-radius: 2px;
}
.group-label.earth   { color: var(--earth-deep); background: var(--earth-bg); }
.group-label.wind    { color: var(--wind-deep);  background: var(--wind-bg); }
.group-label.fire    { color: var(--fire-deep);  background: var(--fire-bg); }
.group-label.neutral { color: var(--muted); background: #f1f1ed; }

/* ---------- alumni ---------- */

.alumni { margin: 0; padding: 0; list-style: none; max-width: 46rem; }

.alumni li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1.5rem;
  padding: 0.875rem 0;
  align-items: baseline;
}
.alumni li + li { border-top: 1px solid var(--rule); }

.alumni .who { font-weight: 600; }
.alumni .who a { text-decoration: none; border-bottom: 1.5px solid var(--rule); }
.alumni .who a:hover { border-bottom-color: currentColor; }
.alumni .where { color: var(--muted); font-size: 0.9375rem; display: block; }
.alumni .yr {
  font-family: "Archivo", sans-serif;
  font-size: 0.875rem;
  color: var(--faint);
  white-space: nowrap;
}

/* ---------- contact ---------- */

.card-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
  max-width: 52rem;
}

.addr { font-style: normal; line-height: 1.75; }
.addr a { color: var(--ink); }

.deflist { margin: 0; }
.deflist dt {
  font-family: "Archivo", sans-serif;
  font-size: 0.8125rem;
  color: var(--faint);
  margin-top: 1rem;
}
.deflist dt:first-child { margin-top: 0; }
.deflist dd { margin: 0.15rem 0 0; }

/* ---------- footer ---------- */

footer {
  background: var(--pine);
  margin-top: 3rem;
  padding: 2rem 0 2.5rem;
  font-size: 0.9375rem;
  color: var(--pine-text);
}
.foot-inner {
  display: flex; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; align-items: center;
}
.foot-inner ul {
  display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0;
}
.foot-inner a { color: var(--pine-text); }
.foot-inner a:hover { color: #fff; }

/* ---------- responsive ---------- */

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .hero { padding-top: 2.25rem; }
  .pi { grid-template-columns: 1fr; gap: 1.25rem; }
  .portrait { width: 128px; height: 128px; font-size: 2rem; }
  .hazard { grid-template-columns: 1fr; gap: 0.875rem; }
  .alumni li { grid-template-columns: 1fr; }
  .alumni .yr { order: -1; }
  nav ul { gap: 1rem; }
  nav .ext { padding-left: 0; border-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--paper);
  padding: 0.5rem 1rem; z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- grants header ---------- */

.grant-stats {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin: 1.75rem 0 0;
}
.grant-stats .stat .num {
  font-family: "Archivo", sans-serif;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  display: block;
  line-height: 1.15;
}
.grant-stats .stat .lbl {
  font-family: "Archivo", sans-serif;
  font-size: 0.8125rem;
  color: var(--faint);
}

.sponsor-strip {
  display: flex;
  gap: 1rem 2.25rem;
  flex-wrap: wrap;
  align-items: baseline;
  margin: 1.5rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--rule);
}
.sponsor-strip .mark {
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  color: var(--muted);
  white-space: nowrap;
}
.sponsor-strip .mark img { height: 34px; width: auto; display: block; filter: grayscale(100%); opacity: 0.75; }
.sponsor-strip .lbl {
  flex-basis: 100%;
  font-family: "Archivo", sans-serif;
  font-size: 0.8125rem;
  color: var(--faint);
  margin-bottom: -0.5rem;
}

/* illustrated portraits keep their own color */
.portrait.illustrated img { filter: none; }
.portrait.illustrated::after { content: none; }

/* roster photos: same grayscale + hazard tint as the PI treatment */
.avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: grayscale(100%) contrast(1.08);
}
.avatar.has-photo::after {
  content: ""; position: absolute; inset: 0;
  mix-blend-mode: color; pointer-events: none;
}
.avatar.has-photo.earth::after   { background: var(--earth); }
.avatar.has-photo.wind::after    { background: var(--wind); }
.avatar.has-photo.fire::after    { background: var(--fire); }
.avatar.has-photo.neutral::after { background: #7a7f7b; }

/* ---------- page-top graphics ---------- */
.pagegraph { margin: 2.25rem 0 0.5rem; }
.pagegraph svg { width: 100%; height: auto; display: block; }

/* alumni profile links */
.alumni .plinks {
  display: block;
  margin-top: 0.25rem;
  font-family: "Archivo", sans-serif;
  font-size: 0.75rem;
}
.alumni .plinks a {
  color: var(--wind);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.alumni .plinks .sep { color: var(--faint); margin: 0 0.5rem; }

/* pipeline step glyphs */
.chain li { grid-template-columns: 2.75rem 78px 1fr; }
.stepglyph { width: 64px; height: 44px; margin-top: 0.3rem; }
.stepglyph * { stroke: #7d827e; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.stepglyph .dot { fill: #7d827e; stroke: none; }
.stepglyph .faint { stroke: #c9cbc6; stroke-width: 1; }
@media (max-width: 640px) {
  .chain li { grid-template-columns: 2.75rem 1fr; }
  .stepglyph { display: none; }
}

/* page emblems */
.emblem { width: 36px; height: 36px; display: block; margin: 0 0 0.9rem; }
a.more svg.ic { width: 18px; height: 18px; vertical-align: -4px; margin-right: 0.45rem; }

/* site mark */
.wordmark { display: flex; align-items: center; gap: 0.9rem; }
.sitemark { width: 34px; height: 34px; flex: none; }
@media (max-width: 640px) { .sitemark { width: 28px; height: 28px; } }
.wm-text { display: block; }

/* stacked section links */
.morerow { margin-top: 0.85rem; }
.morerow a.more { display: inline-flex; align-items: center; }

/* tighten stacked links under paragraphs */
.morerow a.more { margin-top: 0; }

/* large section titles with icons (research page) */
.section-head-lg {
  display: flex; align-items: center; gap: 0.65rem;
  font-family: "Archivo", sans-serif;
  font-size: 1.375rem; font-weight: 600; letter-spacing: -0.015em;
  color: var(--ink); margin: 0 0 1.75rem;
}
.section-head-lg svg { width: 26px; height: 26px; flex: none; }
.section-head-lg svg * { stroke: #7d827e; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* member role line */
.member .role {
  margin: 0.05rem 0 0;
  font-family: "Archivo", sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--faint);
  letter-spacing: 0.02em;
}
