/* Dewa Kode — Dark GitHub-blue programmer portfolio */
/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d1117;
  --bg2: #161b22;
  --bg3: #21262d;
  --border: #30363d;
  --accent: #58a6ff;
  --accent2: #1f6feb;
  --green: #3fb950;
  --orange: #d29922;
  --purple: #bc8cff;
  --pink: #f778ba;
  --text: #e6edf3;
  --text2: #8b949e;
  --text3: #6e7681;
  --radius: 6px;
  --radius-lg: 12px;
  --font: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
}

/* Demo Bar */
.demo-bar {
  background: #1c2128;
  border-bottom: 1px solid #388bfd40;
  color: var(--text2);
  font-size: 13px;
  text-align: center;
  padding: 7px 16px;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.demo-bar a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.demo-bar a:hover { text-decoration: underline; }

/* Navigation */
nav {
  background: rgba(13,17,23,0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 37px;
  z-index: 999;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo .logo-bracket { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  color: var(--text2);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text);
  background: var(--bg3);
}

/* Mobile menu checkbox hack */
#menu-toggle { display: none; }
.menu-icon {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border-radius: var(--radius);
}
.menu-icon span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text2);
  border-radius: 2px;
  transition: all 0.3s;
}
#menu-toggle:checked ~ .nav-links {
  display: flex;
}

@media (max-width: 700px) {
  .menu-icon { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0; right: 0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px;
    gap: 2px;
  }
  .nav-links a { display: block; padding: 10px 14px; }
}

/* Layout */
main { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container { max-width: 860px; margin: 0 auto; }
section { padding: 64px 0; }

/* Hero */
.hero {
  padding: 80px 0 64px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.hero-content { }
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--accent);
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.hero h1 .highlight { color: var(--accent); }
.hero-sub {
  font-size: 17px;
  color: var(--text2);
  max-width: 540px;
  margin-bottom: 32px;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.avatar-ring {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 2px solid var(--border);
  padding: 4px;
  background: var(--bg2);
  position: relative;
}
.avatar-ring::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px dashed var(--accent2);
  opacity: 0.4;
  animation: spin 20s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.status-dot {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 16px;
  height: 16px;
  background: var(--green);
  border: 3px solid var(--bg);
  border-radius: 50%;
}

/* Stat bar */
.stat-row {
  display: flex;
  gap: 32px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-mono);
  display: block;
}
.stat-label { font-size: 13px; color: var(--text2); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}
.btn-primary {
  background: var(--accent);
  color: #0d1117;
  border-color: var(--accent);
}
.btn-primary:hover { background: #79c0ff; border-color: #79c0ff; }
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { background: var(--bg3); border-color: var(--text3); }
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: transparent;
  padding: 8px 12px;
}
.btn-ghost:hover { background: var(--bg3); }

/* Cards & Grid */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--accent2); transform: translateY(-2px); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; text-align: center; }
  .avatar-wrap { margin: 0 auto; }
  .hero-eyebrow { justify-content: center; }
  .hero-actions { justify-content: center; }
  .hero-sub { margin: 0 auto 32px; }
  .stat-row { justify-content: center; gap: 20px; }
}

/* Section headers */
.section-header { margin-bottom: 40px; }
.section-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  display: block;
}
.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.3px;
}
.section-header p {
  color: var(--text2);
  margin-top: 8px;
  font-size: 15px;
  max-width: 560px;
}

/* Tech stack pills */
.tech-stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pill {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
}
.pill-accent { background: #1c2d40; border-color: #388bfd60; color: var(--accent); }
.pill-green { background: #1a2d1f; border-color: #3fb95060; color: var(--green); }
.pill-purple { background: #251d3a; border-color: #bc8cff60; color: var(--purple); }
.pill-orange { background: #2d2008; border-color: #d2992260; color: var(--orange); }

/* Project cards */
.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.project-card:hover { border-color: var(--accent2); transform: translateY(-2px); }
.project-preview {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text3);
  position: relative;
  overflow: hidden;
}
.project-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.project-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--text);
}
.project-desc { font-size: 13px; color: var(--text2); line-height: 1.6; flex: 1; }
.project-footer { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; gap: 12px; align-items: center; }
.project-lang {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 5px;
}
.lang-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* Skill bars */
.skill-item { margin-bottom: 16px; }
.skill-header { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 14px; }
.skill-bar {
  height: 6px;
  background: var(--bg3);
  border-radius: 3px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
}

/* Service cards */
.service-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity 0.2s;
}
.service-card:hover { border-color: var(--accent2); }
.service-card:hover::before { opacity: 1; }
.service-card.s1::before { background: linear-gradient(90deg, var(--accent2), var(--accent)); }
.service-card.s2::before { background: linear-gradient(90deg, var(--green), #52e07c); }
.service-card.s3::before { background: linear-gradient(90deg, var(--purple), #d2a8ff); }
.service-card.s4::before { background: linear-gradient(90deg, var(--orange), #e3b341); }
.service-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: var(--bg3);
}
.service-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.service-desc { font-size: 14px; color: var(--text2); line-height: 1.65; margin-bottom: 16px; }
.service-price {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}
.service-price-note { font-size: 12px; color: var(--text3); }
.service-features { list-style: none; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.service-features li {
  font-size: 13px;
  color: var(--text2);
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.service-features li::before { content: '✓'; color: var(--green); font-weight: 700; }

/* Blog */
.blog-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: border-color 0.2s;
  text-decoration: none;
  color: inherit;
}
.blog-card:hover { border-color: var(--accent2); }
.blog-num {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 800;
  color: var(--bg3);
  line-height: 1;
  min-width: 36px;
  margin-top: 2px;
}
.blog-meta { font-size: 12px; color: var(--text3); margin-bottom: 6px; font-family: var(--font-mono); }
.blog-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.blog-excerpt { font-size: 13px; color: var(--text2); line-height: 1.6; }
.blog-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.blog-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text3);
}

.blog-featured {
  background: var(--bg2);
  border: 1px solid var(--accent2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
}
.blog-featured-header {
  background: linear-gradient(135deg, #1c2d40, #1f2937);
  padding: 40px;
  position: relative;
  overflow: hidden;
}
.blog-featured-body { padding: 28px 40px 32px; }

/* Timeline */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 10px; top: 0; bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 32px; }
.timeline-dot {
  position: absolute;
  left: -26px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent2);
}
.timeline-year {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 4px;
}
.timeline-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.timeline-desc { font-size: 13px; color: var(--text2); line-height: 1.6; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 700px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s;
}
.contact-info-item:hover { border-color: var(--accent); }
.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-label { font-size: 12px; color: var(--text3); margin-bottom: 2px; }
.contact-value { font-size: 14px; font-weight: 600; }

/* Form */
.form-group { margin-bottom: 18px; }
label {
  display: block;
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 6px;
  font-weight: 500;
}
input, textarea, select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--font);
  transition: border-color 0.2s;
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88,166,255,0.1);
}
textarea { resize: vertical; min-height: 120px; }
select option { background: var(--bg3); }

/* Terminal style block */
.terminal {
  background: #0a0d12;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.terminal-bar {
  background: var(--bg3);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}
.t-dot { width: 12px; height: 12px; border-radius: 50%; }
.t-red { background: #ff5f56; }
.t-yellow { background: #ffbd2e; }
.t-green { background: #27c93f; }
.terminal-title { font-family: var(--font-mono); font-size: 12px; color: var(--text3); margin-left: auto; margin-right: auto; }
.terminal-body { padding: 20px; font-family: var(--font-mono); font-size: 13px; line-height: 1.8; }
.t-prompt { color: var(--green); }
.t-cmd { color: var(--text); }
.t-out { color: var(--text2); }
.t-acc { color: var(--accent); }
.t-orange { color: var(--orange); }
.t-purple { color: var(--purple); }

/* Code block */
.code-block {
  background: #0a0d12;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  overflow-x: auto;
}
.c-keyword { color: #ff7b72; }
.c-string { color: #a5d6ff; }
.c-func { color: var(--purple); }
.c-comment { color: var(--text3); }
.c-num { color: var(--orange); }

/* Contribution grid (decorative) */
.contrib-grid {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.contrib-week { display: flex; flex-direction: column; gap: 3px; }
.contrib-day {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: var(--bg3);
}
.c0 { background: var(--bg3); }
.c1 { background: #0e4429; }
.c2 { background: #006d32; }
.c3 { background: #26a641; }
.c4 { background: #39d353; }

/* Testimonials */
.testimonial-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
}
.testimonial-card::before {
  content: '"';
  font-size: 64px;
  line-height: 1;
  color: var(--accent2);
  opacity: 0.3;
  position: absolute;
  top: 12px;
  left: 20px;
  font-family: Georgia, serif;
}
.testimonial-text { font-size: 14px; color: var(--text2); line-height: 1.7; margin-bottom: 16px; padding-top: 16px; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--accent);
}
.author-name { font-size: 14px; font-weight: 700; }
.author-role { font-size: 12px; color: var(--text3); }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 40px 24px;
  text-align: center;
  color: var(--text3);
  font-size: 13px;
}
footer a { color: var(--accent); text-decoration: none; }
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-social { display: flex; justify-content: center; gap: 12px; margin-bottom: 16px; }
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--bg2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  transition: all 0.2s;
}
.footer-social a:hover { background: var(--bg3); border-color: var(--accent); color: var(--accent); }

/* Utility */
.text-accent { color: var(--accent); }
.text-muted { color: var(--text2); }
.text-mono { font-family: var(--font-mono); }
.mt-0 { margin-top: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.gap-row { border-top: 1px solid var(--border); padding-top: 32px; margin-top: 32px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }

/* Divider */
hr.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

/* Alert / badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.badge-green { background: #1a2d1f; border: 1px solid #3fb95060; color: var(--green); }
.badge-blue { background: #1c2d40; border: 1px solid #388bfd60; color: var(--accent); }
.badge-orange { background: #2d2008; border: 1px solid #d2992260; color: var(--orange); }

/* About page specific */
.about-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; align-items: start; }
@media (max-width: 700px) { .about-grid { grid-template-columns: 1fr; } }
.about-sidebar {}
.about-avatar-wrap {
  text-align: center;
  margin-bottom: 24px;
}
.about-main {}

/* Scroll reveal placeholder */
.fade-in { opacity: 1; }
