/* ===========================================================
   Caroline's Project Hub — shared styles (index.html + cv.html)
   =========================================================== */

/* ---------- Theme tokens ---------- */
:root {
  --bg: #0d0d10;
  --card: #16161a;
  --card-hover: #1c1c21;
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.16);
  --text: #ededf0;
  --text-dim: #8c8c96;
  --text-faint: #5e5e68;
  --accent: #9aff5e; /* single subtle accent for "live" */
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Entrance animation ---------- */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0;
  animation: riseIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--delay, 0s);
}

/* ---------- Layout ---------- */
.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(40px, 9vw, 72px) 24px 80px;
}

/* ---------- Top nav tabs ---------- */
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 48px;
}
.tab {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-faint);
  text-decoration: none;
  border: 1px solid transparent;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}
.tab:hover { color: var(--text-dim); background: var(--card); }
.tab.active {
  color: var(--text);
  background: var(--card);
  border-color: var(--border);
}

/* ---------- Header / bio ---------- */
header { margin-bottom: 56px; }

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  margin-bottom: 24px;
  background: var(--card);
}

h1 {
  font-size: clamp(1.6rem, 4.5vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 12px;
}

.tagline {
  font-size: 1rem;
  color: var(--text-dim);
  max-width: 50ch;
}

/* ---------- Section label ---------- */
.section-label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 18px;
}

/* ---------- Project list (index) ---------- */
.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.22s, border-color 0.22s, box-shadow 0.22s;
}
/* Cursor-following light (desktop) */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(180px 180px at var(--mx, 50%) var(--my, 50%),
              rgba(255, 255, 255, 0.06), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.card:hover {
  background: var(--card-hover);
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.6);
}
.card:hover::before { opacity: 1; }
.card:active { transform: translateY(-1px); }
.card > * { position: relative; }

.card-body { flex: 1; min-width: 0; }

.card-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.card-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.tag {
  font-size: 0.74rem;
  color: var(--text-faint);
  white-space: nowrap;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
  box-shadow: 0 0 0 0 rgba(154, 255, 94, 0.5);
  animation: livePulse 2.4s ease-out infinite;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(154, 255, 94, 0.45); }
  70%  { box-shadow: 0 0 0 6px rgba(154, 255, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(154, 255, 94, 0); }
}

.arrow {
  color: var(--text-faint);
  flex: none;
  transition: transform 0.18s, color 0.18s;
}
.card:hover .arrow {
  transform: translateX(2px);
  color: var(--text-dim);
}

/* ===========================================================
   CV page
   =========================================================== */
.cv-role {
  font-size: 1rem;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 14px;
}
.cv-summary {
  font-size: 0.95rem;
  color: var(--text-dim);
  max-width: 58ch;
  margin-bottom: 20px;
}
.cv-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.9rem;
}
.cv-contact a {
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--border-hover);
  padding-bottom: 1px;
  transition: color 0.18s;
}
.cv-contact a:hover { color: var(--text); }

.cv-section { margin-top: 44px; }
.cv-section > h2 {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 18px;
}

/* Experience / project entries */
.entry {
  padding: 18px 0;
  border-top: 1px solid var(--border);
}
.entry:first-of-type { border-top: none; padding-top: 4px; }
.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.entry-title { font-weight: 600; font-size: 1rem; }
.entry-org { color: var(--text-dim); font-size: 0.9rem; margin-top: 1px; }
.entry-meta {
  color: var(--text-faint);
  font-size: 0.8rem;
  white-space: nowrap;
  flex: none;
}
.entry-desc { color: var(--text-dim); font-size: 0.9rem; margin-top: 8px; }
.entry-tech {
  color: var(--text-faint);
  font-size: 0.8rem;
  margin-top: 8px;
}
.entry-tech b { color: var(--text-dim); font-weight: 500; }

/* Chips (expertise, certifications) */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}
.chip {
  padding: 7px 13px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--text-dim);
  transition: border-color 0.18s, color 0.18s;
}
.chip:hover { border-color: var(--border-hover); color: var(--text); }

/* Bulleted list (Areas of Expertise) */
.bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* ---------- Career Space: wide desktop layout ---------- */
.wrap-wide { max-width: 1040px; }

/* Cards grid for Experience & Selected Engagements */
.entries-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}
.entries-grid .entry {
  border-top: none;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.18s, background 0.18s;
}
.entries-grid .entry:hover {
  border-color: var(--border-hover);
  background: var(--card-hover);
}

@media (min-width: 740px) {
  .entries-grid { grid-template-columns: 1fr 1fr; }
  .bullets-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 36px;
  }
}

/* ---------- Career Space: sub-navigation ---------- */
.layout-switch {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-bottom: 22px;
}
.layout-switch a {
  color: var(--text-faint);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.layout-switch a:hover { color: var(--text-dim); }
.layout-switch a.active {
  color: var(--text-dim);
  border-bottom-color: var(--border-hover);
}

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 28px 0 34px;
}
.subnav-item {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-faint);
  background: transparent;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}
.subnav-item:hover { color: var(--text-dim); background: var(--card); }
.subnav-item.active {
  color: var(--text);
  background: var(--card);
  border-color: var(--border);
}

/* Tab panels (career-tabs.html) */
.panel { display: none; }
.panel.active { display: block; }

/* ---------- "Coming soon" placeholders ---------- */
.coming-soon-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(154, 255, 94, 0.3);
  border-radius: 999px;
  padding: 4px 11px;
  margin-bottom: 16px;
}
.placeholder-text {
  color: var(--text-dim);
  font-size: 0.95rem;
  max-width: 56ch;
}
.preview-faded {
  opacity: 0.38;
  margin-top: 20px;
  pointer-events: none;
  user-select: none;
}

/* ---------- Footer ---------- */
footer {
  margin-top: 56px;
  font-size: 0.82rem;
  color: var(--text-faint);
}
footer a { color: var(--text-dim); text-decoration: none; }
footer a:hover { color: var(--text); }

/* ---------- Respect reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; animation: none; }
  .dot { animation: none; }
  .card, .arrow, .tab, .chip { transition: none; }
  html { scroll-behavior: auto; }
}
