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

:root {
    --bg-dark: #0a0f1a;
    --bg-card: #121826;
    --bg-secondary: #1a2332;
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #00d9ff;
    --primary-dark: #00b8d9;
    --border: #2d3748;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

html {
    scroll-behavior: smooth;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s;
    padding: 1rem 0;
}

nav.scrolled {
    background: rgba(10, 15, 26, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary), #00b8d9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    min-height: 100vh;
    padding: 6rem 2rem;
    display: flex;
    align-items: center;
}

/* Hero Section */
#home {
    padding-top: 8rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), #00b8d9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    color: var(--text-muted);
    font-size: 1.125rem;
    margin: 1.5rem 0;
    line-height: 1.8;
}

.hero-intro {
    color: var(--primary);
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.btn-group {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
}

.btn-primary:hover {
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.8);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: rgba(0, 217, 255, 0.1);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-links a {
    color: var(--text-muted);
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary);
}

.hero-image {
    display: flex;
    justify-content: center;
}

.photo-placeholder {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.2), rgba(0, 184, 217, 0.2));
    border: 4px solid rgba(0, 217, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(0, 217, 255, 0.4);
    position: relative;
}

.photo-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary);
    opacity: 0.2;
    filter: blur(60px);
    z-index: -1;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.125rem;
}

/* Skills Section */
#skills {
    background: var(--bg-secondary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
}

.skill-category {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.skill-category:hover {
    border-color: rgba(0, 217, 255, 0.5);
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.1);
}

.skill-category h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    background: var(--bg-secondary);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    border: 1px solid var(--border);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    width: 100%;
}

.project-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.project-card:hover {
    border-color: rgba(0, 217, 255, 0.5);
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.1);
    transform: translateY(-4px);
}

.project-card h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.project-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.language-stats {
    margin: 1.5rem 0;
}

.language-item {
    margin-bottom: 1rem;
}

.language-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.language-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.language-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 1s ease-out;
    width: 0;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.github-link:hover {
    text-decoration: underline;
}

/* === OVERRIDE: Skills = 2 kolom per baris (desktop/tablet), 1 kolom di HP === */
@media (min-width: 768px) {
#skills .skills-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}   

@media (max-width: 767.98px) {
#skills .skills-grid {
grid-template-columns: 1fr;
    }
}

/* Education Section */
#education {
    background: var(--bg-secondary);
}

.education-content {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.education-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}

.education-card h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.education-card .specialization {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.education-card .duration {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.coursework-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.course-item {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 0.5rem;
}

.course-item strong {
    display: block;
    margin-bottom: 0.25rem;
}

.course-item small {
    color: var(--primary);
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.contact-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.3s;
}

.contact-card:hover {
    border-color: rgba(0, 217, 255, 0.5);
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.1);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 217, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: background 0.3s;
}

.contact-card:hover .contact-icon {
    background: rgba(0, 217, 255, 0.2);
}

.contact-card h3 {
    margin-bottom: 1rem;
}

.contact-card a {
    color: var(--primary);
    text-decoration: none;
}

.contact-card a:hover {
    text-decoration: underline;
}

.contact-note {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.WhatsApp {
  color: #25d366 !important;;
  font-size: 0.875rem;
  margin-top: 1rem;
  display: inline-block;
  text-decoration: none;
}

.WhatsApp:hover {
  text-decoration: underline;
  color: #1ebe5d !important;;
}

.location-card {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Footer */
footer {
    background: var(--bg-card);
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

footer p {
    color: var(--text-muted);
}

/* Icons (SVG) */
.icon {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(10, 15, 26, 0.98);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        display: none;
        border-top: 1px solid var(--border);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .projects-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* === color progress bar === */
.language-fill.html {
  background: #e34c26; /* HTML */
}

.language-fill.css {
  background: #2965f1; /* CSS */
}

.language-fill.javascript {
  background: #f7df1e; /* JavaScript */
}

.language-fill.cpp {
  background: #00599C; /* C++ */
}

.language-fill.java {
  background: #f89820; /* Java  */
}

/* Bar animation */
.language-fill {
  height: 8px;
  border-radius: 4px;
  width: 0;
  transition: width 1.5s ease-out;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 3rem;
  }

  #home {
    padding-top: 8rem;
  }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  #home {
    padding-top: 6rem;
  }

  .projects-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 600px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  #home {
    padding-top: 5rem;
  }

  .hero-content h1 {
    font-size: clamp(2rem, 6vw, 2.5rem);
  }

  .hero-content p {
    font-size: clamp(1rem, 3vw, 1.1rem);
  }
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }

  .contact-card {
    padding: 1.75rem;
  }

  .contact-icon {
    margin-bottom: 1rem;
  }

  .location-card {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .contact-card {
    padding: 1.25rem;
  }

  .contact-card h3 {
    font-size: 1rem;
  }

  .contact-card a,
  .contact-card p {
    font-size: 0.9rem;
  }

  .contact-icon {
    width: 50px;
    height: 50px;
  }

  .location-card {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 600px) {
  #home .social-links {
    justify-content: center;
  }
}

/* === PATCH FIX RESPONSIVE LAYOUT === */

/* Prevent horizontal scroll */
html, body {
  overflow-x: hidden;
}

/* --- Hero Fix --- */
.hero-grid {
  align-items: center;
  justify-items: center;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 0 1rem;
  }
  .hero-content p {
    margin: 1rem 0 2rem;
  }
  .hero-image {
    display: flex;
    justify-content: center;
  }
}

/* --- Technical Skills Responsive --- */
@media (min-width: 900px) {
  #skills .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 899px) and (min-width: 600px) {
  #skills .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 599px) {
  #skills .skills-grid {
    grid-template-columns: repeat(1, 1fr);
  }
  .skill-category {
    text-align: center;
  }
}

/* --- Projects: GitHub Button --- */
.github-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(0, 217, 255, 0.05);
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
}

.github-link:hover {
  background: rgba(0, 217, 255, 0.2);
  color: var(--primary);
  transform: translateY(-3px);
  text-decoration: none;
}

/* --- Contact Section Layout --- */
@media (min-width: 901px) {
  .contact-grid {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 2rem;
    flex-wrap: nowrap;
  }
}

@media (max-width: 900px) {
  .contact-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
}

/* --- WhatsApp Style --- */
.WhatsApp {
  color: #25d366 !important;
  font-weight: 500;
  display: inline-block;
  margin-top: 0.75rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.WhatsApp:hover {
  color: #1ebe5d !important;
  text-decoration: underline;
}

/* --- SVG Icons Hover Fix --- */
.social-links a:hover .icon {
  stroke: var(--primary);
  transform: scale(1.1);
  transition: all 0.3s ease;
}

/* --- HERO FIX ALIGNMENT --- */
#home .hero-grid {
  align-items: center;
  justify-items: center;
}

@media (max-width: 900px) {
  #home .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  #home .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  #home .hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

/* --- EDUCATION FIX CENTER --- */
#education .education-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#education .education-card {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

/* --- GET IN TOUCH FIX --- */
.contact-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 2rem;
}

.contact-card {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  padding: 2.5rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  text-align: center;
  transition: all 0.3s ease;
}

.contact-card h3 {
  margin-bottom: 0.75rem;
}

.contact-card a,
.contact-card p {
  word-wrap: break-word;
}

@media (max-width: 900px) {
  .contact-grid {
    flex-direction: column;
    gap: 1.5rem;
  }

  .contact-card {
    width: 100%;
  }
}

#home {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 8rem;
  min-height: 100vh;
}

#home .hero-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3rem;
}

#home .hero-content {
  flex: 1 1 450px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

#home .hero-image {
  flex: 1 1 350px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#home .photo-placeholder {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Responsive fix untuk mobile */
@media (max-width: 900px) {
  #home {
    flex-direction: column;
    text-align: center;
    padding: 6rem 1.5rem;
  }

  #home .hero-grid {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  #home .hero-content {
    align-items: center;
    text-align: center;
  }

  #home .hero-image {
    margin-top: 2rem;
  }

  #home .photo-placeholder {
    width: 260px;
    height: 260px;
  }
}

/* --- EDUCATION SECTION --- */
#education {
  background: var(--bg-secondary);
  padding: 6rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#education .section-header {
  text-align: center;
  margin-bottom: 3rem;
}

#education .education-content {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#education .education-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2.5rem;
  text-align: left;
  transition: all 0.3s ease;
}

#education .education-card:hover {
  border-color: rgba(0, 217, 255, 0.5);
  box-shadow: 0 4px 20px rgba(0, 217, 255, 0.1);
}

#education .coursework-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  width: 100%;
  margin-top: 2rem;
}

/* Responsive fix */
@media (max-width: 900px) {
  #education .education-card {
    padding: 1.75rem;
  }

  #education .coursework-grid {
    grid-template-columns: 1fr;
  }
}

/* === FINAL BUTTON FIX (HOME SECTION) === */

#home .btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
}

#home .btn {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  border-radius: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  min-width: 160px;
}

/* Desktop: tombol sejajar kiri */
@media (min-width: 901px) {
  #home .btn-group {
    justify-content: flex-start;
  }
}

/* Mobile: tombol center & full width */
@media (max-width: 900px) {
  #home .btn-group {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
  }

  #home .btn {
    width: 80%;
    max-width: 280px;
  }
}