/* ===============================
  THEME & GLOBAL
================================= */
:root{
  --bg: #09122C;
  --accent: #872341;
  --accent-2: #BE3144;
  --card-bg: rgba(70, 75, 98, 0.55);
  --text: #d0d7e0;
  --muted: #9aa6b8;
  --sidebar-w: 350px;
}

*{box-sizing:border-box}
html,body{height:100%; margin:0; padding:0; background:var(--bg); color:var(--text); font-family:"Alegreya", serif; -webkit-font-smoothing:antialiased}

/* ROOT LAYOUT: two-column */
.app-root{
  min-height:100vh;
  display:grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: 1fr;
}

/* SIDEBAR (left) */
.sidebar{
  padding:20px;
  border-right: 3px solid rgba(255, 255, 255, 0.14);
  display:flex;
  flex-direction:column;
  justify-content:space-evenly;
  gap:30px;
  background:linear-gradient(180deg, rgba(9,18,44,0.98), rgba(9,18,44,0.95));
}
#btn-linkedin {
  background-color: #0077B5;
  color: white;
}
#btn-linkedin:hover {
  background-color: #ffffff;
  color: black;
}
#btn-github {
  background-color: #333;
  color: white;
}
#btn-github:hover {
  background-color: #ffffff;
  color: black;
}
#btn-cv {
  background-color: #872341;
  color: white;
}
#btn-cv:hover {
  background-color: #ffffff;
  color: black;
}


/* NAV icons (top) */
.sidebar-nav ul{display:flex; gap:10px; align-items:center; padding:0; margin:0; flex-wrap:wrap}
.sidebar-nav li{list-style:none}
.sidebar-nav a{display:inline-flex; align-items:center; justify-content:center; padding:6px; border-radius:8px; transition:transform .15s, background .15s}
.sidebar-nav img{width:26px; height:26px; filter: brightness(0) invert(1); display:block}
.sidebar-nav a:hover{transform:translateY(-3px); background: rgba(135,35,65,0.06)}

/* PROFILE area */
.profile{ text-align:center; padding-top:6px }
.profile-avatar{ width:160px; height:200px; border-radius:50%; object-fit:cover; border:4px solid rgba(249, 0, 75, 0.12); box-shadow: 10px 0px 20px rgba(241, 94, 94, 0.6)}
.profile h1{ color:var(--accent-2); font-size:18px; margin:10px 0 4px 0;}
.profile .role{ color:var(--accent-2); margin:0 0 6px 0; font-weight:600}
.profile .location{ color:var(--accent-2); font-size:18px; margin-bottom:12px}

/* sidebar buttons */
.sidebar-buttons{ display:flex; gap:8px; justify-content:center; flex-wrap:wrap}
.btn{ background:var(--accent); color:white; padding:8px 12px; border-radius:8px; text-decoration:none; font-weight:600; font-size:13px }
.btn.small{ padding:6px 10px; font-size:13px }
.btn:hover{ background:var(--accent-2) }

/* contact compact bottom */
.sidebar-bottom{ display:flex; flex-direction:column; gap:10px; align-items:center; text-align:center }
.contact-compact h3{ margin:0; color:var(--accent-2) }
.contact-compact p{ margin:4px 0; color:var(--muted); font-size:15px }
.sidebar-footer{ color:var(--muted); font-size:15px }

/* CONTACT LINKS (sidebar) – sama seperti #connect */
.contact-compact a {
  color: #BE3144;
  text-decoration: none;
  font-weight: bold;
  transition: 0.2s ease;
}
.contact-compact a:hover {
  text-decoration: underline;
  color: whitesmoke;
  font-size: 20px; /* sama efek 'large' tapi stabil */
}

/* RIGHT CONTENT */
.content{
  height:100vh;
  overflow:auto;
  padding:28px;
}

/* SECTION base */
.section{
  margin-bottom:28px;
  scroll-margin-top:28px;
}
.section-inner{ background:transparent; border-radius:8px; padding:10px 6px; }
.section h2{ color:var(--accent-2); margin:0 0 8px 0; font-size:22px }
.section h3{ color:var(--accent); margin:12px 0 6px 0; font-size:18px }
.section p{ color:var(--text); line-height:1.6 }

/* EXPERIENCE */
.exp{ margin:12px 0 }
.exp h4{ margin:6px 0; color:var(--accent); font-size:16px }
.exp .meta{ color:var(--muted); font-size:12px; margin-left:8px }

/* SKILLS GRID */
.skills-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
  text-align: center;
}
.skill-block{ background: var(--card-bg); padding:10px; border-radius:8px; border:2px solid rgba(255, 255, 255, 0.12) }
.skill-block h5{ margin:0 0 6px 0; color:var(--accent-2) }
.skill-block p{ margin:0; color:var(--text) }

/* PROJECT list (no cards) */
.project-list{ margin:10px 0 12px 0; padding:0; list-style:none; display:block }
.project-list li{ padding:12px 10px; border-radius:8px; background: linear-gradient(180deg, rgba(7,12,35,0.48), rgba(7,12,35,0.36)); margin-bottom:10px; border:1px solid rgba(135,35,65,0.08) }
.project-list li strong{ color:var(--accent-2) }
.badges{ margin-top:8px }
.badge{ display:inline-block; background: rgba(135,35,65,0.14); color:var(--accent); border-radius:6px; padding:4px 8px; font-size:12px; margin-right:6px; }

/* links */
.links-ct{ margin-top:12px; color:var(--muted) }
.links-ct a{ color:#e93535; text-decoration:underline }

/* RESPONSIVE: collapse to single column at small screens */
@media (max-width: 980px){
  :root{ --sidebar-w: 260px }
  .app-root{ grid-template-columns: var(--sidebar-w) 1fr }
  .content{ padding:18px }
  .profile-avatar{ width:120px; height:120px }
}

/* ===== MOBILE: sidebar di atas, content di bawah (preserve sidebar internals) ===== */
@media (max-width: 820px) {
  /* layout jadi single column: sidebar di atas, content di bawah */
  .app-root {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  /* Sidebar full width on top */
  .sidebar {
    width: 100%;
    padding: 12px 16px;
    border-right: none;
    border-bottom: 1px solid rgba(135,35,65,0.08);
    background: linear-gradient(180deg, rgba(9,18,44,0.98), rgba(9,18,44,0.95));
    display: flex;
    flex-direction: column; /* keep internal order */
    gap: 14px;
    position: relative; /* not sticky unless you want */
    top: 0;
    z-index: 100;
  }

  /* Keep profile layout but make avatar smaller and keep text visible */
  .profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 6px 0;
  }
  .profile-avatar {
    width: 72px;
    height: 72px;
    border-width: 3px;
  }
  .profile h1 { font-size: 16px; margin: 0; color: var(--accent-2); }
  .profile .role, .profile .location { font-size: 12px; color: var(--muted); margin: 0; }

  /* Show nav icons (keep them visible) */
  .sidebar-nav { order: 0; }
  .sidebar-nav ul { gap: 8px; align-items:center; margin: 6px 0; flex-wrap:wrap; }

  /* Keep sidebar buttons visible on mobile */
  .sidebar-buttons { display: flex; gap: 8px; justify-content: flex-start; flex-wrap:wrap; }

  /* Keep contact & footer visible in sidebar (do not hide) */
  .sidebar-bottom { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 6px 0; }
  .contact-compact { text-align: left; }
  .contact-compact p { margin: 4px 0; }

  /* Content area below the sidebar */
  .content {
    padding: 16px;
    height: auto;
    min-height: calc(100vh - 180px); /* approximate, ensures content visible */
    box-sizing: border-box;
    overflow: auto;
  }

  /* Adjust skills grid for mobile */
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* Slight spacing adjustments for sections */
  .section { margin-bottom: 18px; }
}


/* accessibility focus */
a:focus, button:focus{ outline:2px solid rgba(190,49,68,0.3); outline-offset:2px }
