/* Slim, scoped CSS for your portfolio */
/* ——— Tokens ——— */
:root {
  --bg: #fff;
  --text: #111;
  --muted: #666;
  --line: #e6e6e6;
  --accent: #041028;
  --container: 1080px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  --step--1: clamp(0.9rem, 0.88rem + 0.1vw, 1rem);
  --step-0: clamp(1rem, 0.9rem + 0.6vw, 1.25rem);
  --step-1: clamp(1.25rem, 1.1rem + 1vw, 1.6rem);
  --step-2: clamp(1.6rem, 1.2rem + 2vw, 2.4rem);
  --step-3: clamp(2.2rem, 1.6rem + 3.5vw, 3.4rem);
}

/* ——— Base ——— */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
    Helvetica, Arial;
}
img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(var(--container), 92%);
  margin-inline: auto;
}

/* A11y */
.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: #ffd;
  padding: 0.5rem;
  border-radius: 0.25rem;
}

/* ——— Header & Nav ——— */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-weight: 500;
  font-size: 2rem;
  letter-spacing: -0.5px;
  text-decoration: none;
  color: var(--accent);
}
.brand:hover,
.brand:focus {
  opacity: 0.85;
}
.brand-pill {
  display: inline-block;
  padding: 1rem 1.85rem;
  border: 2px solid var(--accent);
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--accent);
  background: transparent;
  transition: 0.25s;
}
.brand-pill:hover,
.brand-pill:focus {
  background: var(--accent);
  color: #fff;
}
.primary-nav ul {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  color: inherit;
  text-decoration: none;
}
.primary-nav a:hover {
  border-bottom: 2px solid var(--accent);
}

/* ——— Hero ——— */
.hero {
  padding: 4rem 0 2rem;
}
.kicker {
  color: var(--muted);
  margin: 0 0 0.75rem;
}
.display {
  font-size: var(--step-3);
  line-height: 1.1;
  margin: 0.25rem 0 1rem;
  letter-spacing: -0.01em;
}
.lede {
  font-size: var(--step-0);
  color: var(--muted);
  max-width: 65ch;
}

/* ——— Work grid ——— */
.work-list {
  padding: 2rem 0;
  display: grid;
  gap: 2rem;
}
.work-card {
  display: grid;
  gap: 0.75rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.work-media {
  position: relative;
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.work-media img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
.work-meta .tags {
  font-size: var(--step--1);
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.h3 {
  font-size: var(--step-1);
  margin: 0.25rem 0;
}
.sub {
  color: var(--muted);
  margin: 0.25rem 0 0.75rem;
}
.link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link:hover {
  opacity: 0.7;
}

/* ——— CTA & Footer ——— */
.cta {
  border-top: 1px solid var(--line);
  padding: 3rem 0 5rem;
  text-align: center;
}
.cta-text {
  letter-spacing: -0.02em;
}
.ghost {
  opacity: 0.2;
}
.biglink {
  font-size: var(--step-1);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  color: inherit;
}
.biglink:hover {
  opacity: 0.7;
}
.small {
  color: var(--muted);
  font-size: var(--step--1);
}
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1rem 0;
  margin-top: 2rem;
}
.legal {
  display: flex;
  gap: 1rem;
}
.legal a {
  color: inherit;
  text-decoration: none;
}
.legal a:hover {
  border-bottom: 1px solid var(--accent);
}

/* ——— Case study ——— */
.case-study {
  display: grid;
  gap: 2rem;
  grid-template-columns: 260px 1fr;
  margin-top: 2rem;
}
.sidebar {
  position: sticky;
  top: 1rem;
  align-self: start;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  height: max-content;
}
.sidebar__section {
  margin-bottom: 1.5rem;
}
.sidebar__title {
  font-size: 1rem;
  margin: 0 0 0.25rem;
  color: var(--muted);
}
.content img {
  max-width: 100%;
  border-radius: 4px;
  margin: 1rem 0;
}
.cs-hero img {
  margin-top: 1rem;
  border-radius: var(--radius-sm);
}
.cs-summary {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 65ch;
}
blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
  color: var(--muted);
  font-style: italic;
}
h1,
h2,
h3 {
  line-height: 1.2;
}

/* ——— Cards & Bento ——— */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
}
.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px dashed var(--line);
}

.skills-bento,
.facts-bento {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  border-top: 1px solid var(--line);
}
.skills-bento {
  padding: 2rem 0;
}
.facts-bento {
  padding: 1rem 0 2rem;
}

/* Pills (single source of truth) */
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: var(--step--1);
  line-height: 1;
  background: #fafafa;
  white-space: nowrap;
}

/* Facts list */
.fact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fact-list li {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  column-gap: 0.5rem;
  align-items: start;
  margin-bottom: 0.5rem;
}
.fact-list .icon {
  line-height: 1.2;
}
.fact-list .txt {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Timeline */
.row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}
.scroll-controls {
  display: flex;
  gap: 0.5rem;
}
.scroll-btn {
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.4rem 0.6rem;
  border-radius: 0.5rem;
  cursor: pointer;
}
.timeline {
  margin-top: 1rem;
  overflow: visible;
}
.timeline-track {
  list-style: none;
  margin: 0;
  padding: 1rem 0 0;
  position: relative;
}
.timeline-track::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--line);
}
.timeline-item {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 2rem;
}
.timeline-item .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  position: absolute;
  left: 0.65rem;
  top: 0.8rem;
}
.t-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.t-year {
  font-weight: 700;
  color: var(--muted);
}
.t-role {
  margin: 0.1rem 0;
  font-size: var(--step-0);
}
.t-org {
  margin: 0 0 0.5rem;
  color: var(--muted);
}
.t-card details summary {
  cursor: pointer;
}

/* PDF button */
.pdf-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f0f8ff;
  cursor: pointer;
  font-size: var(--step--1);
  transition: background 0.2s ease;
}
.pdf-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* Badges & media states */
.work-media.is-coming::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.12);
}
.badge {
  --size: 100px;
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: var(--size);
  height: var(--size);
  background-size: contain;
  background-repeat: no-repeat;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
  transform: rotate(0);
  transition: transform 0.35s ease, opacity 0.2s ease;
}
.badge--nda {
  background-image: url("assets/badges/nda.svg");
}
.badge--soon {
  background-image: url("assets/badges/coming-soon.svg");
}
@media (prefers-reduced-motion: no-preference) {
  .work-card:hover .badge,
  .work-media:hover .badge {
    transform: rotate(12deg);
  }
}
.work-media[aria-disabled="true"] {
  pointer-events: none;
  cursor: not-allowed;
}
.badge--text {
  width: auto;
  min-width: 2ch;
  height: auto;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 0.75rem;
  line-height: 1;
}

/* Accent doodads */
.circled {
  position: relative;
  display: inline-block;
  z-index: 0;
}
.circled::before {
  content: "";
  position: absolute;
  inset: -12% -8% -18% -8%;
  z-index: -1;
  background: no-repeat center/contain url("assets/circle-pink.svg");
  pointer-events: none;
}
.circled.squiggle::before {
  background-image: url("assets/squiggle-green.svg");
}

/* Work Experience / Professional Development */

.work-exp, .prof-dev { justify-self: center; align-self: start; }

.work-exp,
.prof-dev {
  margin: 3rem 0;
}
.work-exp h2,
.prof-dev h2 {
  font-size: var(--step-2);
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
  text-align: left;
}
.work-exp .card,
.prof-dev .card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 1rem;
}
.org {
  color: var(--muted);
  margin: 0.25rem 0 1rem;
  font-size: var(--step--1);
}
.why {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.work-exp .fact-list,
.prof-dev .fact-list {
  list-style: disc;
  margin: 0;
  padding-left: 1.25rem;
}
.work-exp .fact-list li,
.prof-dev .fact-list li {
  display: list-item;
  margin-bottom: 0.35rem;
}

/* Utilities */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

/* ——— Responsive ——— */
@media (min-width: 800px) {
  .work-card {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
  }
}
@media (max-width: 900px) {
  .case-study {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    border: 3px solid var(--line);
  }
  .sidebar__section {
    margin-bottom: 2rem;
  }
  .sidebar__title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
    color: var(--muted);
  }
  .sidebar__section p,
  .sidebar__section ul {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
  }
  .sidebar__section ul {
    padding-left: 1rem;
  }
  .sidebar__section.highlight {
    background: #f0f6ff;
    padding: 1rem;
    border-radius: var(--radius-sm);
  }
}
@media (max-width: 600px) {
  .card {
    padding: 0.9rem;
  }
  .work-exp .pill,
  .prof-dev .pill {
    font-size: 0.85rem;
  }
  .pill-row {
    gap: 0.4rem;
  }
}
