.projects-scroller {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.projects-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  will-change: transform;
}

.project-card {
  min-width: 300px; /* atau sesuai ukuran desain */
  margin-right: 32px;
  flex-shrink: 0;
}

:root {
    --primary-light: #4a6fa5;
    --secondary-light: #6b8cbc;
    --accent-light: #ff6b6b;
    --background-light: #f8f9fa;
    --text-light: #333;
    --text-secondary-light: #666;
    --card-light: #fff;
    --nav-light: rgba(255, 255, 255, 0.95);
    --border-light: #e0e0e0;
    
    --primary-dark: #6b8cbc;
    --secondary-dark: #4a6fa5;
    --accent-dark: #ff8e8e;
    --background-dark: #121212;
    --text-dark: #f0f0f0;
    --text-secondary-dark: #bbb;
    --card-dark: #1e1e1e;
    --nav-dark: rgba(30, 30, 30, 0.95);
    --border-dark: #444;
    
    --transition-speed: 0.3s;
    --border-radius: 10px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --box-shadow-dark: 0 5px 15px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color var(--transition-speed), 
                color var(--transition-speed),
                border-color var(--transition-speed);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-light);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

body[data-theme="dark"] {
    background-color: var(--background-dark);
    color: var(--text-dark);
}

/* Typography */
h1, h2, h3, h4 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

.highlight {
    color: var(--primary-light);
}

body[data-theme="dark"] .highlight {
    color: var(--primary-dark);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-light);
    color: white;
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-light);
    border: 2px solid var(--primary-light);
}

body[data-theme="dark"] .btn-primary {
    background-color: var(--primary-dark);
}

body[data-theme="dark"] .btn-secondary {
    color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow);
}

.btn-primary:hover {
    box-shadow: 0 5px 15px rgba(74, 111, 165, 0.4);
}

/* Layout */
section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--primary-light);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-light);
    border-radius: 2px;
}

body[data-theme="dark"] .section-title {
    color: var(--primary-dark);
}

body[data-theme="dark"] .section-title::after {
    background-color: var(--primary-dark);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--nav-light);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--box-shadow);
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: all var(--transition-speed);
}

body[data-theme="dark"] .navbar {
    background-color: var(--nav-dark);
    box-shadow: var(--box-shadow-dark);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-light);
    text-decoration: none;
}

body[data-theme="dark"] .logo {
    color: var(--primary-dark);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

body[data-theme="dark"] .nav-links a {
    color: var(--text-dark);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-light);
    transition: width var(--transition-speed);
}

body[data-theme="dark"] .nav-links a::after {
    background-color: var(--primary-dark);
}

.nav-links a:hover::after {
    width: 100%;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-light);
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body[data-theme="dark"] .theme-toggle {
    color: var(--text-dark);
}

.theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

body[data-theme="dark"] .theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-light);
    padding: 0.5rem;
}

body[data-theme="dark"] .hamburger {
    color: var(--text-dark);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 2rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.hero-text h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 400;
    color: var(--text-secondary-light);
}

body[data-theme="dark"] .hero-text h2 {
    color: var(--text-secondary-dark);
}

.hero-text p {
    margin-bottom: 2rem;
    max-width: 600px;
    font-size: 1.1rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.hero-image {
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-image img {
    max-width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    position: relative;
    z-index: 1;
}

body[data-theme="dark"] .hero-image img {
    box-shadow: var(--box-shadow-dark);
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.experience {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.exp-item {
    text-align: center;
    padding: 1rem;
    border-radius: var(--border-radius);
    background-color: var(--card-light);
    box-shadow: var(--box-shadow);
    flex: 1;
}

body[data-theme="dark"] .exp-item {
    background-color: var(--card-dark);
    box-shadow: var(--box-shadow-dark);
}

.exp-item h3 {
    font-size: 2rem;
    color: var(--primary-light);
    margin-bottom: 0.5rem;
}

body[data-theme="dark"] .exp-item h3 {
    color: var(--primary-dark);
}

.about-image {
    display: flex;
    justify-content: center;
    position: relative;
}

.about-image img {
    max-width: 100%;
    border-radius: var(--border-radius);
    position: relative;
    z-index: 1;
}

.image-border {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid var(--primary-light);
    border-radius: var(--border-radius);
    top: 20px;
    left: 20px;
    z-index: 0;
    transition: all var(--transition-speed);
}

body[data-theme="dark"] .image-border {
    border-color: var(--primary-dark);
}

.about-image:hover .image-border {
    top: 15px;
    left: 15px;
}

/* Timeline Styles */
.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background-color: var(--primary-light);
    transform: translateX(-50%);
    z-index: 1;
}

body[data-theme="dark"] .timeline-container::before {
    background-color: var(--primary-dark);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.timeline-item:nth-child(even) {
    align-items: flex-end;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 20px;
    width: 16px;
    height: 16px;
    background-color: var(--primary-light);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

body[data-theme="dark"] .timeline-dot {
    background-color: var(--primary-dark);
}

.timeline-content {
    width: calc(50% - 40px);
    padding: 20px;
    background-color: var(--card-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    position: relative;
}

body[data-theme="dark"] .timeline-content {
    background-color: var(--card-dark);
    box-shadow: var(--box-shadow-dark);
}

.timeline-item:nth-child(even) .timeline-content {
    margin-right: 0;
    margin-left: auto;
}

.timeline-date {
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 8px;
}

body[data-theme="dark"] .timeline-date {
    color: var(--primary-dark);
}

.timeline-content h3 {
    margin-bottom: 10px;
    color: var(--primary-light);
}

body[data-theme="dark"] .timeline-content h3 {
    color: var(--primary-dark);
}

.timeline-content ul {
    padding-left: 20px;
    margin-top: 10px;
}

.timeline-content li {
    margin-bottom: 5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .timeline-container::before {
        left: 20px;
    }
    
    .timeline-item {
        align-items: flex-start !important;
    }
    
    .timeline-dot {
        left: 20px;
    }
    
    .timeline-content {
        width: calc(100% - 60px);
        margin-left: 40px !important;
    }
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background-color: var(--card-light);
    padding: 2rem 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed);
}

body[data-theme="dark"] .skill-card {
    background-color: var(--card-dark);
    box-shadow: var(--box-shadow-dark);
}

.skill-card:hover {
    transform: translateY(-10px);
}

.skill-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-light);
}

body[data-theme="dark"] .skill-card i {
    color: var(--primary-dark);
}

.skill-card h3 {
    margin-bottom: 0.5rem;
}

.skill-card p {
    color: var(--text-secondary-light);
    font-size: 0.9rem;
}

body[data-theme="dark"] .skill-card p {
    color: var(--text-secondary-dark);
}

/* Projects Section */
.projects {
    overflow: hidden;
    padding-bottom: 4rem;
    position: relative;
}

.projects-container {
    display: flex;
    gap: 2rem;
    padding-bottom: 2rem;
    width: max-content;
}

.project-card {
    flex: 0 0 calc(100% - 2rem); /* Full width minus gap on mobile */
    scroll-snap-align: start;
    background-color: var(--card-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.5s ease-in-out; /* Smooth sliding transition */
    display: flex;
    flex-direction: column;
}

/* Desktop styles */
@media (min-width: 768px) {
    .project-card {
        flex: 0 0 400px; /* Fixed width for desktop */
    }
}

/* Rest of your existing project card styles remain the same */


/* Animation for infinite sliding */
@keyframes slide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-100% - 2rem)); /* Account for gap */
    }
}

.projects-container.animate {
    animation: slide 30s linear infinite;
    width: max-content;
}

/* Pause animation on hover */
.projects-container:hover {
    animation-play-state: paused;
}

.project-card {
    flex: 0 0 calc(100% - 2rem); /* Full width minus gap on mobile */
    scroll-snap-align: start;
    background-color: var(--card-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.5s ease-in-out; /* Smooth sliding transition */
    display: flex;
    flex-direction: column;
}

/* Desktop styles */
@media (min-width: 768px) {
    .project-card {
        flex: 0 0 400px; /* Fixed width for desktop */
    }
}

body[data-theme="dark"] .project-card {
    background-color: var(--card-dark);
    box-shadow: var(--box-shadow-dark);
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-image {
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    margin-bottom: 0.5rem;
}

.project-info p {
    margin-bottom: 1rem;
    color: var(--text-secondary-light);
    flex: 1;
}

body[data-theme="dark"] .project-info p {
    color: var(--text-secondary-dark);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tag {
    background-color: var(--primary-light);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

body[data-theme="dark"] .project-tag {
    background-color: var(--primary-dark);
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .project-card {
        flex: 0 0 280px;
    }
    
    .project-info h3 {
        font-size: 1.1rem;
    }
    
    .project-info p {
        font-size: 0.9rem;
    }
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.contact-info p {
    margin-bottom: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-light);
    width: 30px;
    text-align: center;
}

body[data-theme="dark"] .contact-item i {
    color: var(--primary-dark);
}

.contact-form {
    background-color: var(--card-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

body[data-theme="dark"] .contact-form {
    background-color: var(--card-dark);
    box-shadow: var(--box-shadow-dark);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-light);
    border-radius: 5px;
    background-color: var(--card-light);
    color: var(--text-light);
    font-family: inherit;
    transition: all var(--transition-speed);
}

body[data-theme="dark"] .form-group input,
body[data-theme="dark"] .form-group textarea {
    background-color: var(--card-dark);
    border-color: var(--border-dark);
    color: var(--text-dark);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(74, 111, 165, 0.2);
}

body[data-theme="dark"] .form-group input:focus,
body[data-theme="dark"] .form-group textarea:focus {
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 2px rgba(107, 140, 188, 0.2);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}
.form-success {
  color: #4BB543; /* Hijau sukses */
  margin-top: 1rem;
  text-align: center;
  font-weight: 500;
  animation: fadeIn 0.5s ease-in;
}
/* Footer */
footer {
    text-align: center;
    padding: 3rem 2rem;
    background-color: var(--card-light);
    margin-top: 3rem;
}

body[data-theme="dark"] footer {
    background-color: var(--card-dark);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-light);
}

body[data-theme="dark"] .footer-logo {
    color: var(--primary-dark);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-light);
    transition: color var(--transition-speed);
}

body[data-theme="dark"] .footer-links a {
    color: var(--text-dark);
}

.footer-links a:hover {
    color: var(--primary-light);
}

body[data-theme="dark"] .footer-links a:hover {
    color: var(--primary-dark);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-light);
    font-size: 1.5rem;
    transition: color var(--transition-speed);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

body[data-theme="dark"] .social-links a {
    color: var(--text-dark);
}

.social-links a:hover {
    color: var(--primary-light);
    background-color: rgba(74, 111, 165, 0.1);
}

body[data-theme="dark"] .social-links a:hover {
    color: var(--primary-dark);
    background-color: rgba(107, 140, 188, 0.1);
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

body[data-theme="dark"] .footer-bottom {
    border-top-color: var(--border-dark);
}

/* Animations */
/* Tambahkan ini di bagian Animations */
.highlight-section {
    animation: highlight 1s ease-out;
}

@keyframes highlight {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 111, 165, 0.4);
    }
    100% {
        box-shadow: 0 0 0 10px rgba(74, 111, 165, 0);
    }
}

body[data-theme="dark"] .highlight-section {
    animation: highlight-dark 1s ease-out;
}

@keyframes highlight-dark {
    0% {
        box-shadow: 0 0 0 0 rgba(107, 140, 188, 0.4);
    }
    100% {
        box-shadow: 0 0 0 10px rgba(107, 140, 188, 0);
    }
}

/* Pastikan transition untuk nav-links ada */
.nav-links {
    transition: transform var(--transition-speed) ease-in-out;
}
.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease-in forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content,
    .about-content,
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .hero-text {
        order: 2;
        text-align: center;
    }
    
    .hero-image {
        order: 1;
    }
    
    .about-image {
        order: 1;
    }
    
    .about-text {
        order: 2;
        text-align: center;
    }
    
    .experience {
        justify-content: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-text h1 {
        font-size: 3rem;
    }
    
    .contact-info {
        text-align: center;
        align-items: center;
    }
    
    .contact-item {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background-color: var(--nav-light);
        flex-direction: column;
        align-items: center;
        padding: 2rem;
        gap: 1.5rem;
        box-shadow: var(--box-shadow);
        transform: translateY(-150%);
        transition: transform var(--transition-speed);
        z-index: 999;
    }
    
    body[data-theme="dark"] .nav-links {
        background-color: var(--nav-dark);
    }
    
    .nav-links.active {
        transform: translateY(0);
    }
    
    .hamburger {
        display: block;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .hero-text h2 {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .project-links {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    section {
        padding: 4rem 1rem;
    }
    
    .hero {
        padding: 6rem 1rem 2rem;
    }
    
    .skills-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .experience {
        flex-direction: column;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}