/* ============================================================
   Shila Aghdami — portfolio
   Palette : pale sage paper, deep ink, one teal accent
   Type    : Newsreader (display) / IBM Plex Sans (body)
             IBM Plex Mono (spec labels)
   ============================================================ */

:root {
  --paper:      #e9eae5;
  --paper-deep: #dfe1da;
  --ink:        #16191a;
  --ink-soft:   #525a57;
  --ink-faint:  #7b827e;
  --rule:       #c7cac2;
  --accent:     #0e5f52;
  --accent-tint:#dbe5e1;

  --measure: 63ch;
  --wide:    1080px;

  --step-xl: clamp(2.5rem, 6.2vw, 4.6rem);
  --step-l:  clamp(1.9rem, 3.8vw, 2.9rem);
  --step-m:  clamp(1.3rem, 2.1vw, 1.6rem);
  --step-s:  1.0625rem;

  --space:   clamp(3.5rem, 7vw, 6rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: var(--step-s);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

/* ---------- shared primitives ---------- */

.wrap {
  width: min(100% - 2.5rem, var(--wide));
  margin-inline: auto;
}

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

.label {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
}

.label--quiet { color: var(--ink-faint); }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

hr.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--rule);
}

.masthead__name {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

.masthead__nav {
  display: flex;
  gap: 1.5rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.masthead__nav a { color: var(--ink-soft); text-decoration: none; }
.masthead__nav a:hover { color: var(--accent); text-decoration: underline; }

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

.hero { padding: clamp(3.5rem, 9vw, 7rem) 0 var(--space); }

.hero__thesis {
  font-family: "Newsreader", Georgia, serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: var(--step-xl);
  line-height: 1.06;
  letter-spacing: -0.018em;
  margin: 1.6rem 0 0;
  max-width: 19ch;
}

.hero__thesis em {
  font-style: italic;
  color: var(--accent);
}

.hero__sub {
  margin: 2rem 0 0;
  max-width: 52ch;
  color: var(--ink-soft);
  font-size: 1.125rem;
}

.hero__meta {
  margin-top: 2.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

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

.section { padding: var(--space) 0; border-top: 1px solid var(--rule); }

.section__head {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 2.6rem;
}

.section__title {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 400;
  font-size: var(--step-l);
  line-height: 1.1;
  letter-spacing: -0.012em;
  margin: 0;
}

.section > p,
.section__head p { max-width: var(--measure); }

/* ---------- work index (spec table) ---------- */

.work { display: grid; }

.work__row {
  display: grid;
  grid-template-columns: 15rem 1fr;
  gap: 0.4rem 2.5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: background-color 140ms ease, padding-left 140ms ease;
}

.work__row:last-child { border-bottom: 1px solid var(--rule); }

.work__row:hover,
.work__row:focus-visible {
  background: var(--accent-tint);
  padding-left: 1rem;
}

.work__constraint {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 0.45rem;
}

.work__title {
  display: block;
  font-family: "Newsreader", Georgia, serif;
  font-weight: 400;
  font-size: var(--step-m);
  line-height: 1.22;
  margin: 0 0 0.5rem;
  letter-spacing: -0.008em;
}

.work__blurb {
  display: block;
  margin: 0;
  color: var(--ink-soft);
  max-width: 54ch;
}

/* ---------- experience table ---------- */

.exp { width: 100%; border-collapse: collapse; text-align: left; }

.exp th {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 0 1.5rem 0.8rem 0;
  border-bottom: 1px solid var(--rule);
}

.exp td {
  padding: 0.95rem 1.5rem 0.95rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: baseline;
}

.exp td:last-child,
.exp th:last-child {
  padding-right: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.exp tr:first-child td { font-weight: 600; }

/* ---------- craft ---------- */

.craft { display: grid; gap: 1.8rem; }

.craft__group { display: grid; gap: 0.5rem; }

.craft__items { margin: 0; color: var(--ink-soft); max-width: 60ch; }

/* ---------- list reset for education / contact ---------- */

.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.65rem; }

.plain strong { font-weight: 600; }

.plain .meta {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

/* ---------- case study ---------- */

.case { padding: clamp(3rem, 7vw, 5rem) 0 0; }

.case__constraint { margin-bottom: 1.1rem; display: block; }

.case__title {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 400;
  font-size: var(--step-l);
  line-height: 1.1;
  letter-spacing: -0.014em;
  margin: 0;
  max-width: 22ch;
}

.spec {
  margin: 2.8rem 0 0;
  padding: 1.4rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1.2rem 2rem;
}

.spec div { display: grid; gap: 0.35rem; align-content: start; }

.spec dt {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.spec dd { margin: 0; font-size: 0.95rem; line-height: 1.45; }

.case__body { padding: var(--space) 0 0; }

.case__body h2 {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 400;
  font-size: var(--step-m);
  line-height: 1.2;
  letter-spacing: -0.008em;
  margin: 3rem 0 0.9rem;
  max-width: var(--measure);
}

.case__body h2:first-child { margin-top: 0; }

.case__body h3 {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 2rem 0 0.6rem;
}

.case__body p,
.case__body ul { max-width: var(--measure); }

.case__body p { margin: 0 0 1.1rem; }

.case__body ul { padding-left: 1.1rem; margin: 0 0 1.1rem; }

.case__body li { margin-bottom: 0.6rem; }

.case__body strong { font-weight: 600; }

.pull {
  margin: 2rem 0;
  padding: 1.3rem 0 1.3rem 1.5rem;
  border-left: 2px solid var(--accent);
  max-width: var(--measure);
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.3rem;
  line-height: 1.4;
  color: var(--ink);
}

/* ---------- pager ---------- */

.pager {
  margin-top: var(--space);
  border-top: 1px solid var(--rule);
  padding: 1.8rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
}

.pager a { text-decoration: none; }
.pager a:hover .pager__title { text-decoration: underline; }

.pager__title {
  display: block;
  margin-top: 0.3rem;
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.1rem;
  color: var(--ink);
  max-width: 26ch;
}

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

.foot {
  border-top: 1px solid var(--rule);
  padding: 2.2rem 0 3.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
  justify-content: space-between;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.foot a { color: var(--ink-soft); text-decoration: none; }
.foot a:hover { color: var(--accent); text-decoration: underline; }

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

@media (max-width: 46rem) {
  .work__row { grid-template-columns: 1fr; gap: 0.7rem; }
  .work__constraint { padding-top: 0; }

  .exp thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .exp tr { display: grid; gap: 0.15rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
  .exp td { border: 0; padding: 0; }
  .exp td:last-child { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
