/* ============================================================
   jcrihani.com — professional CV / portfolio
   ============================================================ */

/* Soul palette — green↔pink brand spine, near-black green-undertone ink. */
:root {
  --bg: #F0FDF4;             /* green-50 */
  --bg-elev: #FFFFFF;
  --ink: #0A0F0C;            /* ink-900 */
  --ink-soft: #33413A;       /* green-gray */
  --ink-faint: #5B6B62;
  --line: rgba(20, 83, 45, 0.14);
  --accent: #16A34A;         /* green-600 */
  --accent-strong: #15803D;  /* green-700 */
  --accent-2: #EC4899;       /* pink-500 — secondary spine */
  --on-accent: #FFFFFF;      /* text on filled accent */
  --accent-soft: rgba(34, 197, 94, 0.14);
  --gold: 216, 168, 38;      /* #D8A826 — cursor splash */
  --gold-strength: 0.48;
  --veil: rgba(240, 253, 244, 0.64);
  --shadow: 0 1px 2px rgba(15, 61, 36, .06), 0 8px 24px rgba(15, 61, 36, .10);
  --radius: 14px;
  --maxw: 1080px;
  --serif: "Georgia", "Times New Roman", serif;
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Night mode — Soul's "warm forest" (not black). */
:root[data-theme="dark"] {
  --bg: #16221A;
  --bg-elev: #1F2E24;
  --ink: #ECFDF5;            /* mint-white */
  --ink-soft: #BBF7D0;
  --ink-faint: #7FA391;
  --line: rgba(249, 168, 212, 0.18);   /* pink divider */
  --accent: #86EFAC;         /* bright mint */
  --accent-strong: #4ADE80;
  --accent-2: #F472B6;
  --on-accent: #06120B;      /* dark text on mint */
  --accent-soft: rgba(134, 239, 172, 0.16);
  --gold-strength: 0.5;
  --veil: rgba(22, 34, 26, 0.58);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 30px rgba(0,0,0,.45);
}

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

html { scroll-behavior: smooth; background: var(--bg); }

body {
  font-family: var(--sans);
  background: transparent;   /* ambient gold-field shows through */
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: color .3s ease;
}

::selection { background: rgba(236, 72, 153, 0.25); color: var(--accent-strong); }

/* ===== Ambient background — soul mesh + gold cursor splash ===== */
#ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--bg); }
/* Green ↔ pink blobs that wander and cross — the mesh "dances". */
#ambient .blob { position: absolute; border-radius: 50%; filter: blur(95px); will-change: transform; }
:root[data-theme="dark"] #ambient .blob { mix-blend-mode: screen; }
/* Greens hug the left, pinks the right — they drift and meet at a soft central seam. */
#ambient .b1 { width: 50vw; height: 50vw; left: -14vw;  top: -12vw;    opacity: .62; background: radial-gradient(circle, #22C55E, transparent 64%); animation: dance1 26s ease-in-out infinite; }
#ambient .b2 { width: 50vw; height: 50vw; right: -14vw; top: -10vw;    opacity: .70; background: radial-gradient(circle, #EC4899, transparent 64%); animation: dance2 31s ease-in-out infinite; }
#ambient .b3 { width: 46vw; height: 46vw; left: -12vw;  bottom: -14vw; opacity: .60; background: radial-gradient(circle, #4ADE80, transparent 64%); animation: dance3 24s ease-in-out infinite; }
#ambient .b4 { width: 48vw; height: 48vw; right: -12vw; bottom: -12vw; opacity: .70; background: radial-gradient(circle, #F472B6, transparent 64%); animation: dance4 33s ease-in-out infinite; }
#ambient .b5 { width: 40vw; height: 40vw; left: 4vw;    top: 34vw;     opacity: .50; background: radial-gradient(circle, #16A34A, transparent 64%); animation: dance5 28s ease-in-out infinite; }
#ambient .b6 { width: 42vw; height: 42vw; right: 2vw;   top: 30vw;     opacity: .60; background: radial-gradient(circle, #EC4899, transparent 64%); animation: dance6 36s ease-in-out infinite; }
#gold-field {
  position: absolute; left: 0; top: 0; width: 60vw; height: 60vw; border-radius: 50%;
  filter: blur(100px); will-change: transform; mix-blend-mode: normal;
  background: radial-gradient(circle,
    rgba(var(--gold), var(--gold-strength)),
    rgba(var(--gold), calc(var(--gold-strength) * 0.45)) 45%,
    transparent 72%);
}
#ambient .veil { position: absolute; inset: 0; background: var(--veil); transition: background .3s ease; }
/* Graph view has no long text — let the mesh run vivid there; keep the CV calm.
   Neutral (not green-tinted) veil in graph mode so pink reads true, not muddy. */
body.graph-mode { --veil: rgba(252, 252, 251, 0.34); }
:root[data-theme="dark"] body.graph-mode { --veil: rgba(20, 30, 24, 0.42); }
@keyframes dance1 { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(11vw,8vw) scale(1.12); } 66% { transform: translate(5vw,15vw) scale(1.04); } }
@keyframes dance2 { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(-10vw,7vw) scale(1.08); } 66% { transform: translate(-3vw,14vw) scale(1.15); } }
@keyframes dance3 { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(10vw,-7vw) scale(1.1); } 66% { transform: translate(4vw,-13vw) scale(1.03); } }
@keyframes dance4 { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(-9vw,-8vw) scale(1.12); } 66% { transform: translate(-14vw,-3vw) scale(1.05); } }
@keyframes dance5 { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(-13vw,9vw) scale(1.16); } 66% { transform: translate(9vw,11vw) scale(1.02); } }
@keyframes dance6 { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(11vw,-9vw) scale(1.1); } 66% { transform: translate(-7vw,-11vw) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { #ambient .blob { animation: none; } }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

a { color: inherit; text-decoration: none; }

/* ---- Top nav ------------------------------------------------ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 18px; height: 62px; }
.nav .brand { font-family: var(--serif); font-weight: 700; font-size: 18px; letter-spacing: .2px; }
.nav .brand span { color: var(--accent); }
.nav ul { list-style: none; display: flex; gap: 22px; margin-left: auto; }
.nav ul a {
  font-size: 14px; color: var(--ink-soft); font-weight: 500;
  padding: 6px 2px; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.nav ul a:hover, .nav ul a.active { color: var(--ink); border-color: var(--accent); }
.theme-btn {
  background: none; border: 1px solid var(--line); color: var(--ink-soft);
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 15px;
  display: grid; place-items: center; transition: border-color .2s, color .2s;
}
.theme-btn:hover { color: var(--ink); border-color: var(--accent); }
.nav-toggle { display: none; }

@media (max-width: 720px) {
  .nav ul {
    position: absolute; top: 62px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg-elev);
    border-bottom: 1px solid var(--line); max-height: 0; overflow: hidden;
    transition: max-height .3s ease;
  }
  .nav ul.open { max-height: 340px; }
  .nav ul a { padding: 14px 28px; border-bottom: 1px solid var(--line); }
  .nav-toggle {
    display: grid; place-items: center; margin-left: auto;
    background: none; border: none; color: var(--ink); font-size: 22px; cursor: pointer;
  }
  .nav .theme-btn { margin-left: 0; }
}

/* ---- Section scaffolding ------------------------------------ */
section { padding: 78px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: none; }
.eyebrow {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin-bottom: 14px;
}
h2.section-title { font-family: var(--serif); font-size: clamp(26px, 4vw, 36px); font-weight: 700; margin-bottom: 8px; }
.section-sub { color: var(--ink-faint); margin-bottom: 40px; max-width: 60ch; }

/* ---- Hero --------------------------------------------------- */
.hero { padding: clamp(56px, 10vw, 118px) 0 84px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 56px; align-items: center; }
.hero-photo { justify-self: end; }
.hero-photo img {
  width: clamp(180px, 22vw, 260px); height: clamp(180px, 22vw, 260px);
  object-fit: cover; border-radius: 24px; box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.hero-photo .mono {
  display: grid; place-items: center; width: clamp(180px, 22vw, 260px); height: clamp(180px, 22vw, 260px);
  border-radius: 24px; background: var(--accent-soft); color: var(--accent);
  font-family: var(--serif); font-size: 72px; font-weight: 700; box-shadow: var(--shadow);
}
@media (max-width: 780px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-photo { justify-self: start; order: -1; }
  .hero-photo img, .hero-photo .mono { width: 140px; height: 140px; border-radius: 20px; font-size: 52px; }
}
.hero .eyebrow { margin-bottom: 18px; }
.badge {
  display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(40px, 8vw, 76px); line-height: 1.02; letter-spacing: -0.02em;
}
.hero .role { font-size: clamp(18px, 3vw, 24px); color: var(--accent); font-weight: 600; margin-top: 14px; }
.hero .tagline { font-size: clamp(17px, 2.4vw, 20px); color: var(--ink-soft); margin-top: 20px; max-width: 56ch; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 12px 26px; margin-top: 34px; font-size: 15px; color: var(--ink-soft); }
.hero-meta a { display: inline-flex; align-items: center; gap: 8px; border-bottom: 1px solid transparent; }
.hero-meta a:hover { border-color: var(--accent); color: var(--ink); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid var(--line); background: var(--bg-elev); transition: transform .15s, border-color .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, black); }

/* ---- About -------------------------------------------------- */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.about-lead { font-family: var(--serif); font-size: clamp(19px, 2.6vw, 24px); line-height: 1.55; color: var(--ink); }

/* ---- Experience timeline ------------------------------------ */
.timeline { display: grid; gap: 4px; }
.xp {
  display: grid; grid-template-columns: 200px 1fr; gap: 28px;
  padding: 26px 0; border-top: 1px solid var(--line);
}
.xp:first-child { border-top: none; }
.xp .when { color: var(--ink-faint); font-size: 14px; font-weight: 600; padding-top: 3px; }
.xp .when .loc { display: block; color: var(--ink-faint); font-weight: 400; margin-top: 4px; }
.xp .role { font-size: 19px; font-weight: 700; }
.xp .org { color: var(--accent); font-weight: 600; }
.xp ul { margin: 12px 0 0; padding-left: 18px; color: var(--ink-soft); }
.xp ul li { margin: 6px 0; }
@media (max-width: 640px) { .xp { grid-template-columns: 1fr; gap: 8px; } }

/* ---- Projects ----------------------------------------------- */
.project-group { margin-top: 40px; }
.project-group:first-child { margin-top: 8px; }
.group-title {
  font-family: var(--sans); font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 700; margin-bottom: 20px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.card-title { font-family: var(--serif); font-size: 22px; margin: 8px 0 4px; }
.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px;
}
.card {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .18s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card .cat { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.card h3 { font-family: var(--serif); font-size: 22px; margin: 8px 0 4px; }
.card .blurb { color: var(--ink-soft); font-size: 15px; margin: 8px 0 14px; }
.card ul.hl { list-style: none; margin: 0 0 16px; padding: 0; }
.card ul.hl li { position: relative; padding-left: 18px; font-size: 14px; color: var(--ink-soft); margin: 5px 0; }
.card ul.hl li::before { content: "›"; position: absolute; left: 2px; color: var(--accent); font-weight: 700; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tag { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.status { font-size: 12px; font-weight: 700; color: var(--ink-faint); }
.status.live { color: #2e8b57; }
.card-link { font-size: 14px; font-weight: 600; color: var(--accent); display: inline-flex; gap: 6px; align-items: center; }
.card-link:hover { text-decoration: underline; }

/* ---- Education & Skills ------------------------------------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; gap: 48px; } }
.edu-item { padding: 18px 0; border-top: 1px solid var(--line); }
.edu-item:first-child { border-top: none; }
.edu-item .school { font-weight: 700; font-size: 17px; }
.edu-item .cred { color: var(--accent); font-weight: 600; font-size: 15px; }
.edu-item .meta { color: var(--ink-faint); font-size: 14px; }
.skill-group { margin-bottom: 22px; }
.skill-group h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); margin-bottom: 10px; }
.skill-group .chips, .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); }

/* ---- Coursework --------------------------------------------- */
.coursework { margin-top: 30px; }
.coursework h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); margin-bottom: 12px; }

/* ---- Activities / Other experience -------------------------- */
.other-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.other-item {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow);
}
.other-item .other-title { font-weight: 700; font-size: 16px; }
.other-item .other-role { color: var(--accent); font-weight: 600; font-size: 14px; margin-top: 2px; }
.other-item .other-note { color: var(--ink-faint); font-size: 13px; margin-top: 4px; }

/* ---- Languages ---------------------------------------------- */
.lang-list { display: flex; flex-direction: column; gap: 2px; }
.lang { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.lang:first-child { border-top: none; }
.lang-name { font-weight: 600; font-size: 16px; }
.lang-level { color: var(--ink-faint); font-size: 14px; }

/* ---- Contact ------------------------------------------------ */
.contact { text-align: center; }
.contact h2 { margin-bottom: 12px; }
.contact-lines { display: flex; flex-direction: column; gap: 10px; align-items: center; margin-top: 26px; font-size: 18px; }
.contact-lines a { color: var(--accent); font-weight: 600; }
.contact-lines a:hover { text-decoration: underline; }

/* ---- Footer ------------------------------------------------- */
footer { padding: 34px 0; text-align: center; color: var(--ink-faint); font-size: 13px; }

/* ---- Reveal animation -------------------------------------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

.empty-hint {
  border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 20px; color: var(--ink-faint); font-size: 14px; text-align: center;
}
