/* ============================================================
   Sashree Seepersad — Portfolio
   Small layer on top of Tailwind (CDN). Palette: slate-900 / sky-600.
   ============================================================ */

html {
  /* keep anchored sections clear of the fixed header */
  scroll-padding-top: 5.5rem;
}

body {
  background-color: #0f172a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(2, 132, 199, 0.45);
  color: #fff;
}

/* Form fields */
input::placeholder,
textarea::placeholder {
  color: #64748b;
}
input:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}
input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: #f43f5e;
}
textarea {
  resize: vertical;
}

/* Form status variants (set by script.js) */
#formStatus.is-error {
  color: #fda4af;
}

/* Subtle lift on cards */
.card-hover {
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card-hover:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.45);
}

/* Experience bullets */
.xp-list {
  display: grid;
  gap: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #94a3b8;
}
.xp-list li {
  position: relative;
  padding-left: 1.2rem;
}
.xp-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 9999px;
  background: #0284c7;
}

/* Training chips */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid #334155;
}

/* ---------- Case studies ---------- */
.case-card {
  cursor: pointer;
}
.case-card:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}
.case-link {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #38bdf8;
  transition: gap 0.2s ease;
}
.case-card:hover .case-link {
  gap: 0.6rem;
}

.case-dialog {
  width: min(44rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 1px solid #1e293b;
  border-radius: 1rem;
  background: #0f172a;
  color: #cbd5e1;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}
.case-dialog::backdrop {
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.case-dialog[open] {
  animation: caseIn 0.22s ease-out;
}
@keyframes caseIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.case-dialog-inner {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 2rem);
}
.case-dialog-bar {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #1e293b;
  background: rgba(15, 23, 42, 0.9);
}
.case-counter {
  margin-right: auto;
  padding-left: 0.25rem;
  font-variant-numeric: tabular-nums;
}
.case-nav,
.case-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  color: #94a3b8;
  transition: background 0.15s ease, color 0.15s ease;
}
.case-nav:hover,
.case-close:hover {
  background: #1e293b;
  color: #fff;
}
.case-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.case-close {
  margin-left: 0.5rem;
}
.case-dialog-content {
  overflow-y: auto;
  padding: 1.75rem 1.75rem 1.25rem;
  overscroll-behavior: contain;
}
@media (max-width: 640px) {
  .case-dialog-content {
    padding: 1.25rem 1.25rem 1rem;
  }
}
.case-dialog-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.75rem;
  border-top: 1px solid #1e293b;
  background: rgba(15, 23, 42, 0.9);
}

/* Write-up typography */
.case-kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #38bdf8;
}
.case-title {
  margin-top: 0.5rem;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #fff;
}
.case-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0 0.5rem;
}
@media (max-width: 480px) {
  .case-metrics {
    grid-template-columns: 1fr 1fr;
  }
}
.case-metrics li {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0.9rem;
  border-radius: 0.6rem;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid #1e293b;
}
.case-metrics strong {
  font-size: 1.25rem;
  font-weight: 800;
  color: #38bdf8;
}
.case-metrics span {
  font-size: 0.72rem;
  color: #94a3b8;
}
.case-dialog-content h3,
.prose-dark h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e2e8f0;
}
.case-dialog-content p,
.prose-dark p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #94a3b8;
}
.case-dialog-content ul:not(.case-metrics),
.prose-dark ul:not(.case-metrics) {
  display: grid;
  gap: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #94a3b8;
}
.case-dialog-content ul:not(.case-metrics) li,
.prose-dark ul:not(.case-metrics) li {
  position: relative;
  padding-left: 1.2rem;
}
.case-dialog-content ul:not(.case-metrics) li::before,
.prose-dark ul:not(.case-metrics) li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 9999px;
  background: #0284c7;
}
.case-dialog-content li strong,
.prose-dark li strong {
  color: #fff;
  font-weight: 600;
}
.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.5rem;
}
.case-tags span {
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid #334155;
}
/* ---------- Articles ---------- */
.article-lede {
  font-size: 1.05rem;
  color: #cbd5e1 !important;
  border-left: 3px solid #0284c7;
  padding-left: 1rem;
  margin: 1.25rem 0 1.5rem !important;
}
.article-pull {
  margin-top: 1.5rem !important;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(2, 132, 199, 0.3);
  color: #e2e8f0 !important;
  font-weight: 600;
}
.article-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
  margin: 1rem 0 1.25rem;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.article-flow li {
  flex: 1 1 10rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid #334155;
  font-weight: 600;
  color: #f1f5f9;
  position: relative;
}
.article-flow li span {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #38bdf8;
}
.article-flow li + li::before {
  content: "➔";
  position: absolute;
  left: -0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #475569;
  font-size: 0.85rem;
}
@media (max-width: 640px) {
  .article-flow li + li::before { display: none; }
}

body.case-open {
  overflow: hidden;
}

/* Scrollbar (WebKit) */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #020617;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 9999px;
  border: 2px solid #020617;
}
::-webkit-scrollbar-thumb:hover {
  background: #0369a1;
}

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

/* Standalone article / case-study pages */
.prose-dark .case-title { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
.prose-dark p { font-size: 1.02rem; }
.prose-dark ul:not(.case-metrics) { font-size: 1.02rem; }
.page-breadcrumb { font-size: 0.8rem; color: #64748b; }
.page-breadcrumb a { color: #94a3b8; }
.page-breadcrumb a:hover { color: #38bdf8; }
