/* =========================================================
   Portfolio — Wijaya Saputra
   ========================================================= */

:root {
  --bg:        #f7f9fc;
  --surface:   #ffffff;
  --border:    #e5eaf1;
  --text:      #1a2333;
  --muted:     #5b6577;
  --accent:    #4f46e5;
  --accent-dk: #4338ca;
  --accent-soft: #eef2ff;
  --nav-bg:    rgba(255, 255, 255, .85);
  --radius:    16px;
  --radius-sm: 10px;
  --shadow:    0 1px 2px rgba(16,24,40,.05), 0 12px 32px rgba(16,24,40,.07);
  --maxw:      960px;
}

/* ---------------- dark theme ---------------- */

[data-theme="dark"] {
  --bg:          #0b1220;
  --surface:     #101827;
  --border:      #1f2937;
  --text:        #e5e7eb;
  --muted:       #94a3b8;
  --accent:      #818cf8;
  --accent-dk:   #6366f1;
  --accent-soft: rgba(129, 140, 248, .14);
  --nav-bg:      rgba(16, 24, 39, .85);
  --shadow:      0 1px 2px rgba(0,0,0,.5), 0 12px 32px rgba(0,0,0,.45);
}
[data-theme="dark"] .btn-primary { color: #0b1220; }
[data-theme="dark"] .skip-link { color: #0b1220; }

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; }

a { color: inherit; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -.02em;
  text-decoration: none;
}
.logo span { color: var(--accent); }

.nav { display: flex; gap: 4px; }

.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
  color: var(--muted);
  transition: .15s ease;
}
.nav-link:hover { color: var(--text); background: var(--accent-soft); }
.nav-link.active { color: var(--accent); background: var(--accent-soft); }

.nav-actions { display: flex; align-items: center; gap: 8px; }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: .15s ease;
}
.theme-toggle:hover { background: var(--accent-soft); color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }

.icon-sun  { display: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-moon { display: block; fill: currentColor; }
[data-theme="dark"] .icon-sun  { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: .2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

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

.hero {
  padding: 72px 0 56px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}

.hero-inner { text-align: center; }

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
}

.hero-name {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: 6px;
}

.hero-role {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 16px;
}

.hero-summary {
  max-width: 620px;
  margin: 0 auto 26px;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: .15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dk); }
.btn-ghost { border-color: var(--border); background: var(--surface); color: var(--text); }
.btn-ghost:hover { border-color: #cfd6e2; }

.hero-contact {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: .9rem;
  color: var(--muted);
}
.hero-contact li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-contact svg { width: 17px; height: 17px; fill: var(--accent); flex: none; }
.hero-contact a { text-decoration: none; color: var(--muted); }
.hero-contact a:hover { color: var(--accent); }

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

.section { padding: 64px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 24px;
  position: relative;
}
.section-title::after {
  content: "";
  display: block;
  width: 44px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 10px;
}

/* profil */

.profil-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 28px;
}
.profil-card p { margin: 0 0 14px; }
.profil-card p:last-child { margin-bottom: 0; }

/* timeline (pendidikan) */

.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
}

.timeline-item { position: relative; margin-bottom: 28px; }
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 7px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-body h3 { margin-bottom: 2px; }
.timeline-meta { color: var(--accent); font-weight: 600; margin: 0; }
.timeline-note { color: var(--muted); margin: 4px 0 0; }

/* skills */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.skill-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 26px;
}

.skill-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
}

.skill-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.skill-list li {
  position: relative;
  padding: 8px 0 8px 24px;
  border-bottom: 1px dashed var(--border);
  color: var(--muted);
}
.skill-list li:last-child { border-bottom: 0; }
.skill-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 16px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
}
.skill-list strong { color: var(--text); }

/* jobs / experience */

.jobs { display: flex; flex-direction: column; gap: 20px; }

.job-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 28px;
}

.job-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 16px;
  margin-bottom: 14px;
}
.job-head h3 { margin: 0; }
.job-role { color: var(--accent); font-weight: 600; }
.job-date { color: var(--muted); font-size: .88rem; text-align: right; }

.job-list { margin: 0; padding-left: 20px; }
.job-list li { margin-bottom: 8px; color: var(--muted); }
.job-list li::marker { color: var(--accent); }

/* contact */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  text-decoration: none;
  transition: .15s ease;
}
a.contact-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.contact-icon { font-size: 1.5rem; }
.contact-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.contact-value { font-weight: 600; }

/* footer */

.site-footer {
  background: #111827;
  color: #cbd5e1;
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-inner p { margin: 0; font-size: .9rem; }
.back-top { color: #fff; text-decoration: none; font-size: .9rem; }
.back-top:hover { color: var(--accent); }

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

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------------- responsive ---------------- */

@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .nav {
    position: fixed;
    inset: 64px 0 auto 0;
    flex-direction: column;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: .2s ease;
  }
  .nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-link { padding: 12px 14px; border-radius: 10px; }

  .job-head { grid-template-columns: 1fr; }
  .job-date { text-align: left; }

  .hero { padding: 48px 0 40px; }
  .section { padding: 48px 0; }
}
