/* ============================================================
   SAFRUDDIN SETIA BUDI — Soft Slate Portfolio
   Low-contrast · calm slate palette · Inter + JetBrains Mono
   ============================================================ */

:root {
  --bg:          #1b2430;
  --surface:     #222e3d;
  --panel:       #161e28;
  --fg:          #d9dbd6;
  --heading:     #edebe6;
  --muted:       #97a1af;
  --faint:       #67717f;
  --accent:      #e0a458;
  --accent-deep: #cf9040;
  --accent-soft: rgba(224,164,88,0.12);
  --line:        rgba(237,235,230,0.09);
  --line-strong: rgba(237,235,230,0.18);
  --ok:          #6bbf94;
  --radius:      6px;
  --radius-sm:   4px;
  --maxw:        1080px;
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --font:        'Inter', system-ui, -apple-system, sans-serif;
  --mono:        'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
  font-size: 15px;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
::selection { background: var(--accent); color: var(--bg); }

/* Very faint vertical guides — engineered feel, gentle */
.grid-lines {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  max-width: var(--maxw);
  margin: 0 auto;
  background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 25% 100%;
  opacity: 0.35;
}

/* Blinking cursor */
.cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--accent);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 0%,50% { opacity: 1; } 50.01%,100% { opacity: 0; } }

.c-dollar, .nav-dollar { color: var(--accent); font-family: var(--mono); }
.stat-suffix, .hl-unit { color: var(--accent); }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  background: rgba(27,36,48,0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.navbar.scrolled { border-bottom-color: var(--line); background: rgba(27,36,48,0.95); }
.nav-container {
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.nav-logo {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--heading);
}
.nav-sep, .nav-path { color: var(--faint); }
.nav-dollar { margin-left: 2px; }

.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s var(--ease);
  position: relative;
  padding: 4px 0;
}
.nav-idx { font-family: var(--mono); color: var(--faint); font-size: 0.7rem; }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.25s var(--ease);
}
.nav-link:hover, .nav-link.active-link { color: var(--heading); }
.nav-link:hover::after, .nav-link.active-link::after { width: 100%; }

.nav-tools { display: flex; align-items: center; gap: 14px; }
.lang-toggle {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--fg);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.lang-toggle:hover { border-color: var(--accent); color: var(--accent); }
.lang-slash { color: var(--faint); margin: 0 2px; }
.lang-opt { opacity: 0.4; transition: opacity 0.2s var(--ease); }
.lang-opt.active { opacity: 1; color: var(--accent); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  width: 22px; height: 2px;
  background: var(--fg);
  border-radius: 2px;
  display: block;
  transition: 0.25s var(--ease);
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(4px,-4px); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  z-index: 1;
  padding: 104px 24px 64px;
}
.hero-inner { max-width: var(--maxw); width: 100%; margin: 0 auto; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(107,191,148,0.12);
  border: 1px solid rgba(107,191,148,0.5);
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #bdead1;
  letter-spacing: 0.02em;
  margin-bottom: 32px;
  animation: badgeGlow 2.4s ease-in-out infinite;
}
@keyframes badgeGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(107,191,148,0.0), 0 0 18px rgba(107,191,148,0.15); }
  50%      { box-shadow: 0 0 0 4px rgba(107,191,148,0.08), 0 0 28px rgba(107,191,148,0.32); }
}
.badge-dot {
  width: 9px; height: 9px;
  background: var(--ok);
  border-radius: 50%;
  box-shadow: 0 0 8px 1px var(--ok), 0 0 0 4px rgba(107,191,148,0.22);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 8px 1px var(--ok), 0 0 0 3px rgba(107,191,148,0.28); }
  50%      { transform: scale(1.18); box-shadow: 0 0 12px 2px var(--ok), 0 0 0 7px rgba(107,191,148,0.0); }
}

.hero-cmd {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 14px;
}
.hero-cmd .c-dollar { margin-right: 8px; }

.hero-name {
  font-size: clamp(2.6rem, 8vw, 5.8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--heading);
  margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 20px;
}
.hero-tagline {
  font-size: 0.98rem;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  border: 1px solid transparent;
}
.btn .arr { transition: transform 0.2s var(--ease); }
.btn-primary { background: var(--accent); color: #1b2430; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn-primary:hover .arr { transform: translateX(4px); }
.btn-outline { background: var(--surface); color: var(--fg); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-outline:hover .arr { transform: translateY(3px); }
.btn-ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn-ghost:hover { color: var(--accent); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat {
  padding: 20px 18px;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: none; }
.stat-num { font-size: 2.1rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; color: var(--heading); }
.stat-suffix { font-size: 1.3rem; font-weight: 700; }
.stat-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--muted);
  letter-spacing: 0.01em;
  margin-top: 10px;
}

/* ============================================================
   SECTIONS (shared)
   ============================================================ */
.section { position: relative; z-index: 1; padding: 68px 24px; }
.section-alt { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.container { max-width: var(--maxw); margin: 0 auto; }

.section-header { margin-bottom: 48px; }
.section-idx {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 10px;
}
.section-idx.small { margin-top: 60px; margin-bottom: 20px; color: var(--faint); }
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--heading);
}
.section-sub {
  margin-top: 14px;
  font-size: 0.92rem;
  color: var(--muted);
  max-width: 560px;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: start;
}
.about-text .lead-text {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--heading);
  margin-bottom: 18px;
  line-height: 1.55;
}
.about-text p { color: var(--muted); margin-bottom: 16px; font-size: 0.95rem; }
.about-text strong { color: var(--fg); font-weight: 700; }

.about-meta {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.meta-row {
  display: flex;
  gap: 16px;
  padding: 8px 0;
  font-size: 0.82rem;
  border-bottom: 1px dashed var(--line);
}
.meta-key {
  font-family: var(--mono);
  color: var(--accent);
  min-width: 82px;
}
.meta-key::before { content: '> '; color: var(--faint); }
.meta-val { color: var(--fg); }

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.hl-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 18px;
  transition: all 0.2s var(--ease);
}
.hl-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.hl-num { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; color: var(--heading); display: block; }
.hl-unit { font-size: 1.2rem; }
.hl-label {
  display: block;
  margin-top: 8px;
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.45;
}

/* ============================================================
   APPROACH
   ============================================================ */
.approach-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.approach-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 20px 30px;
  transition: all 0.2s var(--ease);
}
.approach-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.4);
}
.ap-step {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.08em;
}
.ap-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--heading);
  margin: 14px 0 12px;
  letter-spacing: -0.01em;
}
.ap-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }

/* ============================================================
   SKILLS
   ============================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
  margin-bottom: 56px;
}
.skill-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px dashed var(--line);
  flex-wrap: wrap;
}
.sk-bullet { color: var(--accent); font-size: 0.85rem; }
.sk-name { font-weight: 600; font-size: 0.92rem; color: var(--fg); }
.sk-tag {
  font-family: var(--mono);
  color: var(--faint);
  font-size: 0.7rem;
  margin-left: auto;
}

.tools-section { border-top: 1px solid var(--line); padding-top: 32px; }
.tools-label { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); margin-bottom: 20px; }
.tools-label .c-dollar { margin-right: 8px; }
.tools-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tool-badge {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--fg);
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s var(--ease);
}
.tool-badge:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ============================================================
   TIMELINE / EXPERIENCE
   ============================================================ */
.timeline { border-left: 2px solid var(--line); }
.timeline-item {
  position: relative;
  padding: 2px 0 40px 32px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -7px; top: 6px;
  width: 12px; height: 12px;
  background: var(--bg);
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  transition: all 0.3s var(--ease);
}
.timeline-item.reveal.visible::before { border-color: var(--accent); background: var(--accent); }
.timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.tl-role { font-size: 1.08rem; font-weight: 700; color: var(--heading); letter-spacing: -0.01em; }
.tl-company { color: var(--accent); font-size: 0.85rem; font-weight: 500; margin-top: 2px; }
.tl-period {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.tl-period.current { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.tl-list li {
  position: relative;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
  padding: 5px 0 5px 20px;
}
.tl-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--faint);
}
.tl-list li strong { color: var(--fg); font-weight: 700; }

/* ============================================================
   CERTIFICATIONS + EDUCATION
   ============================================================ */
.cert-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  transition: all 0.2s var(--ease);
}
.cert-card:hover { border-color: var(--accent); box-shadow: 0 10px 28px rgba(0,0,0,0.35); }
.cert-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.cert-name { font-size: 1.2rem; font-weight: 700; color: var(--heading); letter-spacing: -0.01em; }
.cert-year {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--accent);
  border: 1px solid var(--line-strong);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.cert-issuer { color: var(--muted); font-size: 0.85rem; margin-top: 6px; margin-bottom: 20px; }
.cert-list { border-top: 1px dashed var(--line); }
.cert-list li {
  position: relative;
  padding: 11px 0 11px 24px;
  font-size: 0.88rem;
  color: var(--fg);
  border-bottom: 1px dashed var(--line);
}
.cert-list li::before { content: '✓'; position: absolute; left: 0; color: var(--ok); font-weight: 700; }

.edu-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 30px;
  transition: all 0.2s var(--ease);
}
.edu-card:hover { border-color: var(--accent); box-shadow: 0 10px 28px rgba(0,0,0,0.35); }
.edu-degree { font-size: 1.1rem; font-weight: 700; color: var(--heading); }
.edu-school { color: var(--accent); font-size: 0.88rem; margin-top: 6px; }
.edu-year { font-family: var(--mono); color: var(--faint); font-size: 0.76rem; margin-top: 6px; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.contact-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s var(--ease);
}
.contact-card:not(.static):hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.4);
}
.contact-card:not(.static):hover .cc-arrow { transform: translateX(5px); color: var(--accent); }
.cc-key {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.cc-key::before { content: '# '; color: var(--faint); }
.cc-val { font-size: 0.95rem; font-weight: 600; color: var(--heading); word-break: break-word; }
.cc-arrow {
  position: absolute;
  top: 24px; right: 22px;
  font-size: 1rem;
  color: var(--faint);
  transition: transform 0.2s var(--ease), color 0.2s var(--ease);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  position: relative;
  z-index: 1;
  background: var(--panel);
  border-top: 1px solid var(--line);
  padding: 32px 24px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-text { font-size: 0.82rem; color: var(--muted); }
.footer-sub { font-family: var(--mono); font-size: 0.8rem; color: var(--faint); }
.footer-sub .c-dollar { margin-right: 6px; }

/* ============================================================
   REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .cursor, .badge-dot { animation: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .approach-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .grid-lines { display: none; }
  .hero { padding: 88px 20px 40px; }
  .section { padding: 48px 20px; }
  .nav-links {
    position: fixed;
    top: 60px; left: 0; right: 0;
    background: var(--surface);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0,0,0,0.45);
    transform: translateY(-130%);
    transition: transform 0.3s var(--ease);
  }
  .nav-links.open { transform: translateY(0); }
  .hamburger { display: flex; }
  .skills-grid { grid-template-columns: 1fr; gap: 0; }
  .approach-grid { grid-template-columns: 1fr; }
  .about-highlights { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .timeline-head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 380px) {
  .hero-stats, .about-highlights { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--line); }
}
