/* =========================================================
   MB Piraga — CV site
   Palette: forest green, cream, lime accent.
   Type: Bricolage Grotesque (display) + Instrument Sans (body).
   ========================================================= */

:root {
  --forest: #102A22;
  --forest-deep: #0A1D17;
  --forest-soft: #1B3B31;
  --lime: #DCF56B;
  --lime-deep: #C6E44F;
  --cream: #FAF6EA;
  --cream-card: #FFFDF5;
  --cream-2: #F1EAD7;
  --ink: #101C17;
  --ink-soft: #3C4A43;
  --muted: #5E6B64;
  --line: #DCD4C1;
  --line-dark: rgba(250, 246, 234, 0.16);

  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1180px;
  --pad: clamp(20px, 5vw, 64px);
  --radius: 22px;
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }
img { max-width: 100%; display: block; }

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

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

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

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  background: var(--lime);
  color: var(--ink);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  transition: top 0.2s ease;
}
.skip:focus { top: 16px; }

/* =================== NAV =================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px var(--pad);
  background: var(--forest);
  border-bottom: 1px solid var(--line-dark);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-right: auto;
  white-space: nowrap;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--cream);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--lime);
  color: var(--forest-deep);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 26px;
  font-size: 0.93rem;
  color: rgba(250, 246, 234, 0.76);
}

.nav-links a {
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--lime);
  border-bottom-color: var(--lime);
}

/* =================== BUTTONS =================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
  padding: 15px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--body);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.btn-lime {
  background: var(--lime);
  color: var(--forest-deep);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.28);
}

.btn-lime:hover {
  background: var(--lime-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.28);
}

.btn-lime:active {
  transform: translateY(2px);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.28);
}

.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(250, 246, 234, 0.32);
}

.btn-ghost:hover {
  border-color: var(--cream);
  background: rgba(250, 246, 234, 0.08);
}

.btn-sm {
  padding: 11px 20px;
  font-size: 0.9rem;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.28);
}

/* =================== HERO =================== */

.hero {
  position: relative;
  background: var(--forest);
  color: var(--cream);
  padding: clamp(48px, 7vw, 88px) 0 clamp(56px, 8vw, 104px);
  overflow: hidden;
}

.grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(to right, rgba(250, 246, 234, 0.055) 0 1px, transparent 1px 58px),
    repeating-linear-gradient(to bottom, rgba(250, 246, 234, 0.055) 0 1px, transparent 1px 58px);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 30%, #000 0%, transparent 85%);
  mask-image: radial-gradient(120% 90% at 50% 30%, #000 0%, transparent 85%);
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--lime);
  margin-bottom: 26px;
}

.kicker-line {
  width: 44px;
  height: 2px;
  background: var(--lime);
}

.hero h1 {
  font-size: clamp(2.5rem, 4.6vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  color: #FBF8EE;
}

.mark {
  display: inline-block;
  background: var(--lime);
  color: var(--forest-deep);
  padding: 0.02em 0.16em 0.1em;
  border-radius: 14px;
  transform: rotate(-1.5deg);
  margin-top: 0.06em;
}

.lede {
  max-width: 44ch;
  margin-top: 26px;
  font-size: 1.08rem;
  line-height: 1.62;
  color: rgba(250, 246, 234, 0.78);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 26px;
  margin-top: 34px;
}

.link-arrow {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--cream);
  border-bottom: 1.5px solid rgba(250, 246, 234, 0.45);
  padding-bottom: 3px;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.link-arrow:hover {
  color: var(--lime);
  border-bottom-color: var(--lime);
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 4vw, 52px);
  margin-top: 46px;
  padding-top: 22px;
  border-top: 1px solid var(--line-dark);
}

.hero-facts dt {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: rgba(250, 246, 234, 0.55);
  margin-bottom: 5px;
}

.hero-facts dd {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cream);
}

/* photo */

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 18px 0 44px;
}

.photo-card {
  position: relative;
  width: min(var(--photo-w, 368px), 100%);
  background: var(--cream-card);
  padding: 12px 12px 0;
  border-radius: var(--radius);
  transform: rotate(2.4deg);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.7), 0 2px 0 rgba(255, 255, 255, 0.5) inset;
}

.sticker {
  position: absolute;
  top: -18px;
  left: -16px;
  z-index: 2;
  transform: rotate(-6deg);
  background: var(--lime);
  color: var(--forest-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 9px 16px;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
}

.photo-frame {
  position: relative;
  aspect-ratio: var(--photo-ratio, 4 / 5);
  overflow: hidden;
  border-radius: 14px;
  background: #D7D4CB;
}

.photo-frame img {
  position: absolute;
  width: var(--photo-zoom, 152%);
  max-width: none;
  height: auto;
  left: calc(-1 * var(--photo-x, 21%));
  top: var(--photo-y, 7%);
}

.photo-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 4px 14px;
  font-size: 0.76rem;
  letter-spacing: 0.01em;
  color: #6C7A72;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #B9C3B9;
}

.float-card {
  position: absolute;
  right: -34px;
  bottom: -34px;
  width: 196px;
  background: var(--cream);
  color: var(--ink);
  padding: 14px 16px;
  border-radius: 16px;
  transform: rotate(-3.5deg);
  box-shadow: 0 20px 36px -18px rgba(0, 0, 0, 0.65);
}

.float-label {
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: #7C8880;
  margin-bottom: 6px;
}

.float-title {
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.float-meta {
  margin-top: 6px;
  font-size: 0.74rem;
  color: #5E6B64;
}

/* =================== SECTION SHELL =================== */

.section {
  position: relative;
  padding: clamp(64px, 9vw, 112px) 0;
}

.section-dark {
  background: var(--forest);
  color: var(--cream);
}

.section-dark h2 { color: var(--cream); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(30px, 4vw, 48px);
}

.section h2 {
  font-size: clamp(1.95rem, 4.2vw, 3.1rem);
}

.section-note {
  max-width: 34ch;
  font-size: 0.95rem;
  color: var(--muted);
}

.section-dark .section-note { color: rgba(250, 246, 234, 0.62); }

/* =================== TENTANG =================== */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: start;
}

.about-main p {
  max-width: 56ch;
  margin-top: 18px;
  color: var(--ink-soft);
}

.about-main p + p { margin-top: 14px; }

.fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.fact:last-child { border-bottom: 1px solid var(--line); }

.fact-label {
  font-size: 0.78rem;
  color: var(--muted);
}

.fact-value {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--ink);
}

/* =================== PENGALAMAN =================== */

.timeline {
  border-top: 1px solid var(--line);
}

.job {
  display: grid;
  grid-template-columns: 186px minmax(0, 1fr);
  gap: clamp(16px, 4vw, 48px);
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.job-when {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  padding-top: 4px;
}

.job-year {
  font-family: var(--display);
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.job-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--forest);
  background: rgba(16, 42, 34, 0.07);
  border-radius: 999px;
  padding: 3px 10px;
}

.job-body h3 {
  font-size: 1.32rem;
  letter-spacing: -0.025em;
}

.job-co {
  margin-top: 5px;
  font-size: 0.92rem;
  color: var(--muted);
}

.job-body ul { margin-top: 12px; }

.job-body li {
  position: relative;
  padding-left: 18px;
  max-width: 62ch;
  font-size: 0.98rem;
  color: var(--ink-soft);
}

.job-body li + li { margin-top: 6px; }

.job-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--lime-deep);
}

/* =================== KEAHLIAN =================== */

.skills {
  position: relative;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
}

.skill-col h3 {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--lime);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-dark);
}

.plain li {
  padding: 9px 0;
  border-bottom: 1px solid var(--line-dark);
  font-size: 0.95rem;
  color: rgba(250, 246, 234, 0.88);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips li {
  border: 1px solid rgba(250, 246, 234, 0.26);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 0.86rem;
  color: rgba(250, 246, 234, 0.9);
}

/* =================== PENDIDIKAN =================== */

.edu {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 88px);
}

.edu-item {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.edu-year {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.edu-item h3,
.cert-item h3 {
  font-size: 1.14rem;
  letter-spacing: -0.02em;
}

.edu-place {
  margin-top: 5px;
  font-size: 0.94rem;
  color: var(--ink-soft);
}

.edu-meta {
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--muted);
}

.cert-item {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* =================== KONTAK =================== */

.closing {
  padding-bottom: 0;
  overflow: hidden;
}

.closing .wrap { position: relative; }

.closing-title {
  font-size: clamp(2.2rem, 5.6vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.closing-lede {
  max-width: 46ch;
  margin-top: 22px;
  font-size: 1.05rem;
  color: rgba(250, 246, 234, 0.76);
}

.closing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

.closing-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
  max-width: 720px;
  margin-top: 56px;
  border-top: 1px solid var(--line-dark);
}

.closing-links li { border-bottom: 1px solid var(--line-dark); }

.closing-links a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  padding: 15px 0;
  font-weight: 600;
  font-size: 0.98rem;
  transition: color 0.18s ease;
}

.closing-links a:hover { color: var(--lime); }

.closing-links span {
  font-weight: 400;
  font-size: 0.88rem;
  color: rgba(250, 246, 234, 0.55);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: clamp(56px, 8vw, 96px);
  padding-block: 24px;
  border-top: 1px solid var(--line-dark);
  font-size: 0.82rem;
  color: rgba(250, 246, 234, 0.5);
}

/* =================== TOAST =================== */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 24px);
  z-index: 80;
  background: var(--lime);
  color: var(--forest-deep);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* =================== MOTION =================== */

.hero-copy > * {
  animation: rise 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-copy > :nth-child(1) { animation-delay: 0.04s; }
.hero-copy > :nth-child(2) { animation-delay: 0.1s; }
.hero-copy > :nth-child(3) { animation-delay: 0.18s; }
.hero-copy > :nth-child(4) { animation-delay: 0.26s; }
.hero-copy > :nth-child(5) { animation-delay: 0.34s; }

.hero-visual {
  animation: settle 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

@keyframes settle {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy > *,
  .hero-visual { animation: none; }
  .btn, .nav-links a, .link-arrow, .closing-links a, .toast { transition: none; }
}

/* =================== RESPONSIVE =================== */

@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-visual {
    order: 2;
    justify-content: flex-start;
    align-items: flex-end;
    gap: 22px;
    padding: 26px 0 10px;
  }

  .photo-card { transform: rotate(1.6deg); }

  .float-card {
    position: relative;
    right: auto;
    bottom: auto;
    margin-bottom: 26px;
    flex: 0 0 auto;
  }

  .about,
  .edu { grid-template-columns: 1fr; }

  .skills-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }

  .job { grid-template-columns: 140px minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .nav { gap: 18px; }
  .nav-links { display: none; }
}

@media (max-width: 720px) {
  body { font-size: 1rem; }

  .nav { gap: 14px; padding-block: 12px; }

  .brand-name { display: none; }

  .hero { padding-top: 40px; }

  .hero h1 { font-size: clamp(2.5rem, 10.5vw, 3.4rem); }

  .hero-facts { gap: 22px; }

  .hero-facts > div { min-width: 42%; }

  .photo-card { width: min(var(--photo-w, 320px), 92%); }

  .float-card {
    position: relative;
    left: auto;
    right: auto;
    margin: 18px 0 0;
    transform: rotate(-2deg);
    width: min(240px, 76%);
  }

  .hero-visual {
    flex-direction: column;
    align-items: flex-start;
  }

  .job {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .job-when {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .skills-grid { grid-template-columns: 1fr; gap: 30px; }

  .closing-links { grid-template-columns: 1fr; margin-top: 40px; }

  .footer { flex-direction: column; }
}
