/* ============================================================
   Indra Bayu — Resume site
   ============================================================ */

:root {
  --bg: #0b1120;
  --bg-alt: #0f1729;
  --surface: #121c33;
  --surface-2: #16223d;
  --border: #233150;
  --text: #e8eef9;
  --text-muted: #9fb0cc;
  --text-dim: #6b7c9c;
  --accent: #38bdf8;
  --accent-2: #818cf8;
  --accent-glow: rgba(56, 189, 248, 0.22);
  --ring: rgba(56, 189, 248, 0.4);
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
  --maxw: 1080px;
  --radius: 16px;
}

:root[data-theme="light"] {
  --bg: #f6f8fc;
  --bg-alt: #eef2f9;
  --surface: #ffffff;
  --surface-2: #f3f6fb;
  --border: #dde5f0;
  --text: #101a2e;
  --text-muted: #495a76;
  --text-dim: #7587a3;
  --accent: #0284c7;
  --accent-2: #4f46e5;
  --accent-glow: rgba(2, 132, 199, 0.14);
  --ring: rgba(2, 132, 199, 0.35);
  --shadow: 0 18px 40px -22px rgba(15, 23, 42, 0.25);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

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

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 200;
  background: var(--accent); color: #001018; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { left: 12px; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.nav.is-scrolled { border-color: var(--border); }
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav__brand { font-family: "Sora", sans-serif; font-weight: 800; font-size: 1.4rem; letter-spacing: -0.02em; }
.nav__brand span { color: var(--accent); }
.nav__links { display: flex; gap: 28px; }
.nav__links a {
  font-size: 0.92rem; font-weight: 500; color: var(--text-muted);
  position: relative; padding: 4px 0; transition: color 0.2s ease;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--accent); transition: width 0.25s ease;
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { width: 100%; }

.theme-toggle {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); cursor: pointer; transition: transform 0.2s ease, border-color 0.2s ease;
}
.theme-toggle:hover { transform: translateY(-1px); border-color: var(--accent); }
.theme-toggle__moon { display: none; }
:root[data-theme="light"] .theme-toggle__sun { display: none; }
:root[data-theme="light"] .theme-toggle__moon { display: block; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 92px 0 72px; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 50% at 18% 12%, var(--accent-glow), transparent 70%),
    radial-gradient(50% 45% at 88% 8%, color-mix(in srgb, var(--accent-2) 30%, transparent), transparent 70%);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; }
.hero__eyebrow {
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.hero__name {
  font-family: "Sora", sans-serif; font-weight: 800; letter-spacing: -0.03em;
  font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1.02; margin-bottom: 10px;
}
.hero__title {
  font-size: clamp(1.15rem, 2.6vw, 1.6rem); font-weight: 700;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 4px;
}
.hero__sub { color: var(--text-muted); font-weight: 500; margin-bottom: 22px; }
.hero__lede { max-width: 640px; color: var(--text-muted); font-size: 1.08rem; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 12px; font-weight: 600; font-size: 0.95rem;
  cursor: pointer; transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  border: 1px solid transparent;
}
.btn--primary { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #00121f; box-shadow: 0 10px 30px -10px var(--accent-glow); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -10px var(--accent-glow); }
.btn--ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn--ghost:hover { transform: translateY(-2px); border-color: var(--accent); }

.hero__stats {
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  margin-top: 52px; max-width: 760px;
}
.hero__stats li {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 18px; text-align: left;
}
.stat__num {
  display: block; font-family: "Sora", sans-serif; font-weight: 800;
  font-size: clamp(1.6rem, 3.5vw, 2.3rem); color: var(--accent); line-height: 1;
}
.stat__label { display: block; margin-top: 8px; font-size: 0.82rem; color: var(--text-dim); }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section--alt { background: var(--bg-alt); }
.section__head { margin-bottom: 44px; }
.section__kicker {
  display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
.section__title {
  font-family: "Sora", sans-serif; font-weight: 700; letter-spacing: -0.02em;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.prose { max-width: 760px; }
.prose p { color: var(--text-muted); font-size: 1.06rem; margin-bottom: 18px; }
.prose__highlight {
  color: var(--text) !important; font-weight: 600;
  border-left: 3px solid var(--accent); padding-left: 18px; margin-top: 8px;
}

/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.skill {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px; display: flex; align-items: center; gap: 12px;
  font-weight: 500; font-size: 0.95rem; color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.skill:hover { transform: translateY(-3px); border-color: var(--accent); background: var(--surface-2); }
.skill__dot {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 4px var(--accent-glow);
}

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(var(--accent), transparent);
}
.job { position: relative; padding: 0 0 40px 28px; }
.job:last-child { padding-bottom: 0; }
.job::before {
  content: ""; position: absolute; left: -28px; top: 6px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--bg); border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}
.job__period {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 6px;
}
.job__role { font-family: "Sora", sans-serif; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.job__org { color: var(--text); font-weight: 600; margin-top: 2px; }
.job__context { color: var(--text-dim); font-size: 0.92rem; margin: 8px 0 14px; }
.job__points { list-style: none; display: grid; gap: 10px; }
.job__points li { position: relative; padding-left: 20px; color: var(--text-muted); font-size: 0.98rem; }
.job__points li::before {
  content: ""; position: absolute; left: 0; top: 10px; width: 6px; height: 6px;
  border-radius: 2px; background: var(--accent-2);
}

/* ---------- Cards / grid ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.card__title { font-family: "Sora", sans-serif; font-size: 1.15rem; font-weight: 700; }
.card__title--mt { margin-top: 26px; }
.card__lead { margin-top: 10px; font-weight: 600; }
.card__meta { color: var(--text-dim); font-size: 0.9rem; margin-top: 2px; }
.card__list { list-style: none; margin-top: 12px; display: grid; gap: 8px; }
.card__list li { position: relative; padding-left: 18px; color: var(--text-muted); font-size: 0.96rem; }
.card__list li::before { content: "›"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

.lang { margin-bottom: 18px; }
.lang:last-child { margin-bottom: 0; }
.lang__row { display: flex; justify-content: space-between; font-size: 0.96rem; margin-bottom: 8px; }
.lang__row span:first-child { font-weight: 600; }
.lang__level { color: var(--text-dim); font-size: 0.86rem; }
.lang__bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.lang__bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 1s ease; }

/* ---------- Contact ---------- */
.contact { max-width: 820px; }
.contact__lead { font-size: 1.1rem; color: var(--text-muted); max-width: 620px; margin-bottom: 30px; }
.contact__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.contact__item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; display: flex; flex-direction: column; gap: 4px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
a.contact__item:hover { transform: translateY(-3px); border-color: var(--accent); }
.contact__label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); }
.contact__value { font-weight: 600; word-break: break-word; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--text-dim); font-size: 0.9rem; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav__links { display: none; }
  .hero__stats { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}
