:root {
    --bg: #0C2D4D;            /* Abyssal Navy — Bahari brand */
    --bg-deep: #081f37;
    --card: rgba(43, 163, 155, 0.07);
    --card-border: rgba(43, 163, 155, 0.18);
    --text: #c9d6e3;
    --text-bright: #eef4f9;
    --text-dim: #7f96ab;
    --accent: #2BA39B;        /* Seafoam Teal — Bahari brand */
    --accent-bright: #5eded5;
    --tag-bg: rgba(43, 163, 155, 0.12);
    --tag-text: #6fd8cf;
    font-size: 16px;
  }

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

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

  body {
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }

  /* Spotlight that follows the cursor — signature of the reference site */
  #spotlight {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(600px at 50% 50%, rgba(43, 163, 155, 0.10), transparent 80%);
    transition: background 0.15s ease;
  }

  .layout {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    gap: 2rem;
  }

  /* ---------- Left column (sticky) ---------- */
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 46%;
    max-width: 540px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 6rem 0;
  }

  .sidebar h1 {
    color: var(--text-bright);
    font-size: clamp(2.4rem, 5vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
  }
  .sidebar h1 a { color: inherit; text-decoration: none; }

  .sidebar .role {
    margin-top: 1rem;
    color: var(--text-bright);
    font-size: 1.25rem;
    font-weight: 500;
  }

  .sidebar .tagline {
    margin-top: 1rem;
    max-width: 22rem;
    color: var(--text-dim);
  }

  nav.section-nav { margin-top: 4rem; }
  nav.section-nav ul { list-style: none; }
  nav.section-nav a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.65rem 0;
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    transition: color 0.2s;
  }
  nav.section-nav a::before {
    content: "";
    width: 2rem;
    height: 1px;
    background: var(--text-dim);
    transition: width 0.25s ease, background 0.25s ease;
  }
  nav.section-nav a:hover,
  nav.section-nav a.active { color: var(--text-bright); }
  nav.section-nav a:hover::before,
  nav.section-nav a.active::before { width: 4rem; background: var(--accent-bright); }

  .socials {
    display: flex;
    gap: 1.25rem;
    list-style: none;
    align-items: center;
  }
  .socials a {
    color: var(--text-dim);
    transition: color 0.2s, transform 0.2s;
    display: inline-flex;
  }
  .socials a:hover { color: var(--accent-bright); transform: translateY(-2px); }
  .socials svg { width: 22px; height: 22px; fill: currentColor; }

  /* ---------- Right column (scrolls) ---------- */
  main {
    width: 54%;
    padding: 6rem 0;
  }

  section { margin-bottom: 7rem; scroll-margin-top: 5rem; }

  .section-label {
    display: none;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-bright);
    margin-bottom: 1.5rem;
  }

  #about p { margin-bottom: 1rem; }
  #about a, .card a.inline {
    color: var(--text-bright);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
  }
  #about a:hover { color: var(--accent-bright); }
  #about strong { color: var(--text-bright); font-weight: 500; }

  /* ---------- Cards (experience + projects) ---------- */
  .card-list { list-style: none; display: flex; flex-direction: column; }

  .card {
    display: grid;
    grid-template-columns: 8.5rem 1fr;
    gap: 1.25rem;
    padding: 1.4rem;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
    position: relative;
    cursor: default;
  }

  /* dim siblings on group hover, like the reference */
  .card-list:hover .card { opacity: 0.55; }
  .card-list:hover .card:hover {
    opacity: 1;
    background: var(--card);
    border-color: var(--card-border);
    box-shadow: 0 8px 24px rgba(4, 16, 28, 0.4), inset 0 1px 0 rgba(94, 222, 213, 0.06);
  }

  .card .when {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding-top: 0.2rem;
  }

  .card h3 {
    color: var(--text-bright);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.35;
  }
  .card h3 .arrow {
    display: inline-block;
    transition: transform 0.2s;
    color: var(--accent-bright);
  }
  .card:hover h3 .arrow { transform: translate(3px, -3px); }
  .card h3 a { color: inherit; text-decoration: none; }
  .card:hover h3, .card:hover h3 a { color: var(--accent-bright); }

  .card .org { color: var(--text-dim); font-weight: 400; }

  .card p.desc {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text);
  }

  .tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.9rem;
  }
  .tags li {
    background: var(--tag-bg);
    color: var(--tag-text);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
  }

  .view-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    margin-left: 1.4rem;
    color: var(--text-bright);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s, color 0.2s;
  }
  .view-more:hover { color: var(--accent-bright); border-color: var(--accent-bright); }

  /* ---------- Credentials strip ---------- */
  .cred-list { list-style: none; display: grid; gap: 0.75rem; }
  .cred-list li {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.85rem 1.4rem;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: background 0.25s, border-color 0.25s;
  }
  .cred-list li:hover { background: var(--card); border-color: var(--card-border); }
  .cred-list .year {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    min-width: 4.5rem;
  }
  .cred-list .name { color: var(--text-bright); font-weight: 500; font-size: 0.95rem; }
  .cred-list .status {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tag-text);
    background: var(--tag-bg);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    white-space: nowrap;
  }

  footer {
    color: var(--text-dim);
    font-size: 0.85rem;
    max-width: 32rem;
    padding-bottom: 4rem;
  }
  footer a { color: var(--text); text-decoration: none; }
  footer a:hover { color: var(--accent-bright); }

  /* ---------- Responsive ---------- */
  @media (max-width: 900px) {
    .layout { flex-direction: column; gap: 0; }
    .sidebar {
      position: static;
      height: auto;
      width: 100%;
      max-width: none;
      padding: 4rem 0 1rem;
    }
    nav.section-nav { display: none; }
    .socials { margin-top: 2rem; }
    main { width: 100%; padding: 2rem 0 4rem; }
    .section-label { display: block; position: sticky; top: 0; background: rgba(12,45,77,0.85); backdrop-filter: blur(8px); padding: 1rem 0; z-index: 2; }
    section { margin-bottom: 4.5rem; }
    .card { grid-template-columns: 1fr; gap: 0.4rem; padding: 1.1rem 0; }
    .card-list:hover .card { opacity: 1; }
    .card-list:hover .card:hover { background: transparent; border-color: transparent; box-shadow: none; }
    .view-more { margin-left: 0; }
    .cred-list li { padding: 0.85rem 0; }
  }

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