/* =========================================================
   Gayu Gumelar — Portfolio & Blog
   Tema: Light / White + Blue accent
   ========================================================= */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff4ff;
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --bg-soft-2: #eef2f9;
  --text: #1f2937;
  --heading: #0f172a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1140px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--heading); line-height: 1.25; font-weight: 700; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }

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

.section { padding: 90px 0; }
.section--soft { background: var(--bg-soft); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 50px; }
.section-head .eyebrow {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .8rem;
}
.section-head h2 { font-size: 2.1rem; margin: 10px 0 12px; }
.section-head p { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .2s;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-light { background: #fff; color: var(--primary); }
.btn-light:hover { background: var(--primary-soft); color: var(--primary-dark); }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s;
}
.navbar.scrolled { box-shadow: var(--shadow-sm); }
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--heading); }
.brand span { color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-links a {
  color: var(--text);
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: .95rem;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); background: var(--primary-soft); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.4rem; color: var(--heading); cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  padding: 150px 0 90px;
  background: radial-gradient(1200px 500px at 50% -10%, var(--primary-soft), transparent 70%);
}
.hero .container { display: grid; grid-template-columns: 1fr; place-items: center; text-align: center; gap: 24px; }
.hero-avatar {
  width: 150px; height: 150px; border-radius: 50%;
  object-fit: cover; border: 5px solid #fff; box-shadow: var(--shadow);
}
.hero h1 { font-size: 2.8rem; }
.hero .role { color: var(--primary); font-weight: 600; font-size: 1.15rem; }
.hero .lead { color: var(--muted); max-width: 620px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-social { display: flex; gap: 10px; margin-top: 6px; }
.hero-social a {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: var(--text);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.hero-social a:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-2px); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.stat { text-align: center; }
.stat .num { font-size: 2rem; font-weight: 800; color: var(--primary); }
.stat .lbl { color: var(--muted); font-size: .9rem; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.about-grid p { margin-bottom: 16px; color: var(--text); }
.about-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow-sm);
}

/* ---------- Portfolio / Certificates ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 36px; }
.filter-btn {
  padding: 8px 18px; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; color: var(--text); cursor: pointer; font-weight: 500; font-size: .9rem;
  transition: all .2s;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

.cert-card { cursor: pointer; }
.cert-thumb { aspect-ratio: 4/3; overflow: hidden; background: var(--bg-soft); }
.cert-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.cert-card:hover .cert-thumb img { transform: scale(1.06); }
.cert-body { padding: 18px; }
.cert-body .badge {
  display: inline-block; font-size: .72rem; font-weight: 600; color: var(--primary);
  background: var(--primary-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 8px;
}
.cert-body h3 { font-size: 1rem; margin-bottom: 4px; }
.cert-body .year { color: var(--muted); font-size: .85rem; }

/* ---------- Article cards ---------- */
.article-card { cursor: pointer; }
.article-cover { aspect-ratio: 16/9; overflow: hidden; background: var(--bg-soft); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.article-card:hover .article-cover img { transform: scale(1.05); }
.article-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.article-meta { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--muted); margin-bottom: 10px; flex-wrap: wrap; }
.article-cat { color: var(--primary); font-weight: 600; }
.article-body h3 { font-size: 1.15rem; margin-bottom: 8px; }
.article-body p { color: var(--muted); font-size: .92rem; flex: 1; }
.article-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag { font-size: .72rem; background: var(--bg-soft-2); color: var(--muted); padding: 3px 10px; border-radius: 999px; }
.read-more { margin-top: 14px; font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Search ---------- */
.search-wrap { max-width: 460px; margin: 0 auto 36px; position: relative; }
.search-wrap input {
  width: 100%; padding: 14px 18px 14px 44px; border-radius: 999px;
  border: 1px solid var(--border); font-size: .95rem; font-family: var(--font); outline: none;
  transition: border .2s, box-shadow .2s;
}
.search-wrap input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.search-wrap i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.empty-state { text-align: center; color: var(--muted); padding: 40px 0; grid-column: 1/-1; }

/* ---------- Lightbox modal (certificates) ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(15,23,42,.8); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox-content {
  background: #fff; border-radius: var(--radius); max-width: 860px; width: 100%;
  max-height: 92vh; overflow: auto; padding: 28px; text-align: center; position: relative;
}
.lightbox-content h3 { margin-bottom: 6px; }
.lightbox-content .badge {
  display: inline-block; font-size: .72rem; font-weight: 600; color: var(--primary);
  background: var(--primary-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 14px;
}
.lightbox-content img { border-radius: var(--radius-sm); margin: 0 auto 16px; border: 1px solid var(--border); }
.lightbox-content p { color: var(--muted); margin-bottom: 18px; }
.lightbox-close {
  position: absolute; top: 14px; right: 16px; background: var(--bg-soft); border: 0;
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; color: var(--text);
}
.lightbox-close:hover { background: var(--primary); color: #fff; }

/* ---------- Article reading page ---------- */
.article-hero { padding: 120px 0 30px; }
.article-hero .container { max-width: 800px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .9rem; margin-bottom: 20px; }
.article-hero h1 { font-size: 2.4rem; margin-bottom: 14px; }
.article-hero .article-meta { font-size: .9rem; }
.article-cover-full { max-width: 800px; margin: 0 auto 30px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.article-content { max-width: 760px; margin: 0 auto; padding: 0 20px 90px; font-size: 1.06rem; }
.article-content h1 { font-size: 1.9rem; margin: 32px 0 14px; }
.article-content h2 { font-size: 1.5rem; margin: 30px 0 12px; padding-top: 6px; }
.article-content h3 { font-size: 1.2rem; margin: 24px 0 10px; }
.article-content p { margin-bottom: 18px; }
.article-content ul, .article-content ol { margin: 0 0 18px 24px; }
.article-content li { margin-bottom: 6px; }
.article-content img { border-radius: var(--radius-sm); margin: 20px 0; }
.article-content a { text-decoration: underline; }
.article-content blockquote {
  border-left: 4px solid var(--primary); background: var(--primary-soft);
  padding: 14px 20px; margin: 0 0 18px; border-radius: 0 8px 8px 0; color: var(--heading); font-style: italic;
}
.article-content code {
  background: var(--bg-soft-2); color: #b91c1c; padding: 2px 6px; border-radius: 6px;
  font-family: "SFMono-Regular", Consolas, monospace; font-size: .9em;
}
.article-content pre {
  background: #0f172a; color: #e2e8f0; padding: 18px; border-radius: var(--radius-sm);
  overflow-x: auto; margin: 0 0 20px;
}
.article-content pre code { background: none; color: inherit; padding: 0; }
.article-content table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: .95rem; }
.article-content th, .article-content td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.article-content th { background: var(--bg-soft); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 760px; margin: 0 auto; }
.contact-item {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow-sm);
}
.contact-item i { font-size: 1.4rem; color: var(--primary); width: 48px; height: 48px; display: grid; place-items: center; background: var(--primary-soft); border-radius: 12px; }
.contact-item .label { font-size: .8rem; color: var(--muted); }
.contact-item .value { font-weight: 600; color: var(--heading); }

/* ---------- Footer ---------- */
.footer { background: #0f172a; color: #cbd5e1; padding: 50px 0 24px; text-align: center; }
.footer .brand { color: #fff; font-size: 1.3rem; display: inline-block; margin-bottom: 10px; }
.footer .brand span { color: #60a5fa; }
.footer-social { display: flex; gap: 12px; justify-content: center; margin: 18px 0; }
.footer-social a {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: #cbd5e1;
}
.footer-social a:hover { background: var(--primary); color: #fff; }
.footer p { color: #94a3b8; font-size: .9rem; }
.footer .copyright { border-top: 1px solid rgba(255,255,255,.1); margin-top: 24px; padding-top: 18px; font-size: .85rem; }

/* ---------- Admin / Editor ---------- */
.admin-wrap { max-width: 900px; margin: 0 auto; padding: 120px 20px 80px; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.admin-tab { padding: 12px 20px; cursor: pointer; border: 0; background: none; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; }
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .9rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font); font-size: .95rem; outline: none; transition: border .2s, box-shadow .2s;
}
.form-group textarea { resize: vertical; min-height: 240px; font-family: "SFMono-Regular", Consolas, monospace; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.output-box {
  background: #0f172a; color: #e2e8f0; padding: 18px; border-radius: var(--radius-sm);
  white-space: pre-wrap; word-break: break-word; font-family: "SFMono-Regular", Consolas, monospace;
  font-size: .85rem; max-height: 360px; overflow: auto; margin-top: 10px;
}
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: .9rem; }
.alert-info { background: var(--primary-soft); color: var(--primary-dark); }

/* ---------- Animations ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: 68px; right: 0; left: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 10px 16px; box-shadow: var(--shadow); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; border-radius: 8px; }
  .hero h1 { font-size: 2.1rem; }
  .section { padding: 64px 0; }
  .grid { grid-template-columns: 1fr; }
  .stats { gap: 10px; }
  .stat .num { font-size: 1.5rem; }
  .contact-grid, .form-row { grid-template-columns: 1fr; }
  .article-hero h1 { font-size: 1.8rem; }
}
