/* =========================================================================
   Cherljohn Neo Rondovio, portfolio
   Single stylesheet. No framework, no build step.
   ========================================================================= */

:root {
  --bg:        #0B0C0F;
  --bg-2:      #101218;
  --bg-3:      #15181F;
  --bg-4:      #1B1F27;
  --line:      #23272F;
  --line-soft: #191C23;

  --text:  #E9EAEC;
  --muted: #A0A7B2;
  --dim:   #6E7681;

  --accent:      #FFB01F;
  --accent-dim:  #C98A16;
  --accent-wash: rgba(255, 176, 31, 0.10);
  --accent-line: rgba(255, 176, 31, 0.30);

  --green:      #4ADE80;
  --green-wash: rgba(74, 222, 128, 0.10);
  --blue:       #7DA9FF;
  --blue-wash:  rgba(125, 169, 255, 0.10);

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;

  --wrap:   1180px;
  --gutter: clamp(20px, 5vw, 56px);
  --r:      14px;

  color-scheme: dark;
}

/* ------------------------------- reset -------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; line-height: 1.18; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

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

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--bg-4);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.1em 0.38em;
  color: #D6DAE1;
  white-space: nowrap;
}

::selection { background: var(--accent); color: #0B0C0F; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--accent);
  color: #0B0C0F;
  padding: 10px 18px;
  font-weight: 600;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* -------------------------------- nav --------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 12, 15, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }

.nav__inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav__brand { display: inline-flex; align-items: center; gap: 10px; }

.nav__mark {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-wash);
  flex: none;
}

.nav__name {
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: -0.01em;
}

.nav__links { display: flex; gap: clamp(14px, 3vw, 30px); }

.nav__links a {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.18s ease;
  position: relative;
  padding-block: 2px;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { transform: scaleX(1); }

/* -------------------------------- hero -------------------------------- */

.hero {
  position: relative;
  padding-block: clamp(72px, 13vw, 148px) clamp(60px, 9vw, 104px);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 720px;
  background:
    radial-gradient(52% 46% at 18% 8%, rgba(255, 176, 31, 0.09), transparent 68%),
    radial-gradient(44% 40% at 82% 0%, rgba(125, 169, 255, 0.07), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero > .wrap { position: relative; z-index: 1; }

.hero__eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}

.hero__name {
  font-size: clamp(2.9rem, 10.5vw, 6.6rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.95;
  margin-bottom: clamp(24px, 4vw, 38px);
  background: linear-gradient(170deg, #FFFFFF 8%, #A8AEB9 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lede {
  max-width: 62ch;
  font-size: clamp(1.02rem, 2.1vw, 1.28rem);
  line-height: 1.62;
  color: var(--muted);
  margin-bottom: 34px;
}
.hero__lede em { color: var(--text); font-style: italic; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: clamp(48px, 8vw, 82px); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.btn:hover { border-color: #333944; background: var(--bg-3); transform: translateY(-1px); }

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0B0C0F;
  font-weight: 600;
}
.btn--primary:hover { background: #FFC04E; border-color: #FFC04E; }

/* stats */

/* Individually bordered cells rather than a 1px-gap seam: an incomplete
   final row would otherwise leave lit empty cells at some widths. */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(172px, 1fr));
  gap: 10px;
  margin: 0;
}

.stat {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 18px 20px;
}

.stat dt {
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 8px;
}

.stat dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 1.32rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* ------------------------------ sections ------------------------------ */

.section__kicker {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 500;
  padding-bottom: 18px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.section__note {
  max-width: 66ch;
  color: var(--muted);
  font-size: 1.02rem;
  margin-bottom: clamp(50px, 8vw, 84px);
}

/* -------------------------------- about ------------------------------- */

.about { padding-block: clamp(56px, 8vw, 96px); }

.about__lead {
  font-size: clamp(1.14rem, 2.4vw, 1.5rem);
  line-height: 1.5;
  color: var(--text);
  letter-spacing: -0.015em;
  margin-bottom: 26px;
}

.about__body {
  max-width: 68ch;
  color: var(--muted);
  font-size: 1.02rem;
}
.about__body p:last-child { margin-bottom: 0; }

.creds {
  margin: 34px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
}

.cred {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 4px 18px;
  align-items: baseline;
}

.cred dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dim);
}

.cred dd {
  margin: 0;
  color: var(--text);
  font-size: 0.94rem;
}

@media (max-width: 560px) {
  .cred { grid-template-columns: minmax(0, 1fr); }
}

/* -------------------------------- work -------------------------------- */

.work { padding-block: clamp(48px, 7vw, 80px) clamp(60px, 9vw, 100px); }

.group-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 18px;
  row-gap: 6px;
  padding-top: clamp(40px, 7vw, 76px);
  margin-bottom: clamp(34px, 5vw, 52px);
  border-top: 1px solid var(--line-soft);
}
.work > .wrap:first-of-type + .wrap .group-head { border-top: 0; padding-top: 0; }

.group-head__num {
  font-family: var(--mono);
  font-size: 0.86rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  padding-top: 4px;
}

.group-head__title {
  font-size: clamp(1.5rem, 3.6vw, 2.15rem);
  letter-spacing: -0.03em;
}

.group-head__desc {
  grid-column: 2;
  margin: 0;
  color: var(--dim);
  font-size: 0.95rem;
}

/* ------------------------------ project ------------------------------- */

.project { padding-block: clamp(28px, 4vw, 44px) clamp(44px, 7vw, 80px); }

.project__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
}

@media (min-width: 940px) {
  .project__grid { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); }
  .project__media { position: sticky; top: 92px; }
  .project--alt .project__media { order: 2; }
  .project--alt .project__body  { order: 1; }
}

.project__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.project__title {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  letter-spacing: -0.035em;
}

.project__role {
  font-family: var(--mono);
  font-size: 0.79rem;
  color: var(--dim);
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}

.project__lede {
  font-size: clamp(1.02rem, 2vw, 1.14rem);
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 28px;
  max-width: 56ch;
}

/* badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--bg-2);
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.badge--live    { color: var(--green);  background: var(--green-wash);  border-color: rgba(74,222,128,0.26); }
.badge--wip     { color: var(--accent); background: var(--accent-wash); border-color: var(--accent-line); }

/* detail blocks */

.detail { border-left: 1px solid var(--line); padding-left: clamp(18px, 3vw, 28px); margin-bottom: 26px; }

.detail h5 {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dim);
  font-weight: 500;
  margin-bottom: 10px;
}
.detail h5 + p, .detail h5 + ul { margin-top: 0; }
.detail p { color: var(--muted); margin-bottom: 26px; max-width: 60ch; }
.detail > *:last-child { margin-bottom: 0; }

.bullets li {
  position: relative;
  padding-left: 20px;
  color: var(--muted);
  margin-bottom: 14px;
  max-width: 60ch;
}
.bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 1px;
  background: var(--dim);
}
.bullets li:last-child { margin-bottom: 0; }
.bullets strong { color: var(--text); font-weight: 600; }
.bullets em { color: #CBD1DA; font-style: italic; }

/* tags */

.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; }

.tags li {
  font-family: var(--mono);
  font-size: 0.73rem;
  color: var(--muted);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 9px;
  letter-spacing: 0.01em;
}
.tags--sm { margin-bottom: 0; margin-top: 16px; }

/* links */

.links { display: flex; flex-wrap: wrap; gap: 10px 22px; }

.link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.link span { transition: transform 0.2s ease; }
.link:hover { color: var(--text); border-bottom-color: var(--line); }
.link:hover span { transform: translateX(3px); }
.link--strong { color: var(--accent); }
.link--strong:hover { color: #FFC04E; border-bottom-color: var(--accent-line); }

/* ------------------------- project media: shots ------------------------ */

.shot {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg-2);
  box-shadow: 0 22px 48px -26px rgba(0, 0, 0, 0.9);
}
.shot img { width: 100%; }

.shot--app { margin-bottom: 12px; }

.shot-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.brandcard {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background:
    radial-gradient(62% 62% at 50% 34%, rgba(255, 176, 31, 0.07), transparent 72%),
    var(--bg-2);
  padding: clamp(34px, 6vw, 62px) clamp(24px, 4vw, 44px) 26px;
  text-align: center;
}
.brandcard img {
  width: clamp(112px, 22vw, 168px);
  margin-inline: auto;
  border-radius: 26%;
  box-shadow: 0 20px 44px -20px rgba(0, 0, 0, 0.95);
}
.brandcard figcaption {
  margin-top: 26px;
  font-size: 0.82rem;
  color: var(--dim);
  line-height: 1.55;
  max-width: 34ch;
  margin-inline: auto;
}

/* ----------------------- project media: diagrams ----------------------- */

.diagram {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 40%),
    var(--bg-2);
  padding: clamp(16px, 2.6vw, 26px);
}
.diagram svg { width: 100%; height: auto; display: block; }

.dg-box {
  fill: var(--bg-3);
  stroke: var(--line);
  stroke-width: 1;
}
.dg-box--hero { fill: var(--accent-wash); stroke: var(--accent-line); }
.dg-box--a    { fill: var(--blue-wash);   stroke: rgba(125, 169, 255, 0.28); }
.dg-box--b    { fill: var(--green-wash);  stroke: rgba(74, 222, 128, 0.24); }
.dg-box--gate { fill: var(--bg-4);        stroke: #2E3540; stroke-dasharray: 4 3; }
.dg-box--cfg  { fill: var(--bg-3);        stroke: #2C323C; }

.dg-t {
  fill: var(--text);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  text-anchor: middle;
}
.dg-t--hero { fill: var(--accent); }

.dg-s {
  fill: var(--dim);
  font-family: var(--mono);
  font-size: 9px;
  text-anchor: middle;
}
.dg-s--hero { fill: var(--accent-dim); }
.dg-s--ok   { fill: var(--green); }

.dg-line { fill: none; stroke: #333A45; stroke-width: 1.25; }
.dg-line--dash { stroke-dasharray: 4 4; }
.dg-arrow { fill: #333A45; }

.dg-lbl {
  fill: var(--dim);
  font-family: var(--mono);
  font-size: 8.5px;
  text-anchor: middle;
}
.dg-lbl--warn { fill: var(--accent-dim); text-anchor: middle; }

.dg-note { fill: rgba(255, 176, 31, 0.05); stroke: var(--accent-line); stroke-width: 1; }

.dg-nt {
  fill: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
}
.dg-ns {
  fill: var(--muted);
  font-family: var(--sans);
  font-size: 10px;
  text-anchor: middle;
}
/* must follow .dg-ns: same specificity, later wins */
.dg-ns--left { text-anchor: start; }

/* -------------------------------- minis -------------------------------- */

.minis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 16px;
}

.mini {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px 24px;
  transition: border-color 0.22s ease, transform 0.22s ease, background 0.22s ease;
}
.mini:hover { border-color: #2F3540; background: var(--bg-3); transform: translateY(-2px); }

.mini__title { font-size: 1.14rem; letter-spacing: -0.02em; margin-bottom: 4px; }

.mini__role {
  font-family: var(--mono);
  font-size: 0.73rem;
  color: var(--accent-dim);
  margin-bottom: 14px;
}

.mini p:not(.mini__role) { color: var(--muted); font-size: 0.93rem; margin-bottom: 0; }

/* -------------------------------- skills ------------------------------- */

.skills { padding-block: clamp(56px, 8vw, 96px); }

.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: clamp(24px, 3.4vw, 40px);
}

.skillset h3 {
  font-size: 0.98rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 9px;
}
.skillset h3::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.skillset li {
  color: var(--muted);
  font-size: 0.92rem;
  padding-block: 4px;
}

/* ------------------------------- contact ------------------------------- */

.contact { padding-block: clamp(56px, 8vw, 96px) clamp(64px, 9vw, 110px); }

.contact__lead {
  max-width: 60ch;
  font-size: clamp(1.08rem, 2.2vw, 1.34rem);
  line-height: 1.5;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 40px;
}

.contact__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(252px, 1fr));
  gap: 10px;
}

.contact__list a {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 20px 22px;
  height: 100%;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.contact__list a:hover { background: var(--bg-3); border-color: #2F3540; }
.contact__list a:hover .contact__value { color: var(--accent); }

.contact__label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.contact__value {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s ease;
  overflow-wrap: anywhere;
}

/* -------------------------------- footer ------------------------------- */

.foot { border-top: 1px solid var(--line); padding-block: 30px 40px; }

.foot__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  align-items: center;
}
.foot p { margin: 0; font-size: 0.85rem; color: var(--dim); }
.foot__note { font-family: var(--mono); font-size: 0.78rem !important; }

/* ------------------------------- reveal -------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

/* JS off: never leave content hidden */
.no-js .reveal { opacity: 1; transform: none; }

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

/* ------------------------------- narrow -------------------------------- */

@media (max-width: 560px) {
  .shot-row { grid-template-columns: 1fr; }
  .nav__name { display: none; }
  .stat { padding: 16px 18px; }
  .detail { padding-left: 16px; }
}

/* -------------------------------- print -------------------------------- */

@media print {
  .nav, .hero__actions, .skip-link { display: none; }
  body { background: #fff; color: #111; }
  .reveal { opacity: 1; transform: none; }
  .project__media { display: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.75em; color: #555; }
}
