/* General Styling */
:root {
    --primary-color: #60a5fa; /* Blue-400 */
    --secondary-color: #fbbf24; /* Amber-400 */
    --accent-color: #ec4899; /* Pink-500 */
    --dark-bg: #1f2937; /* Gray-800 */
    --light-bg: #f9fafb; /* Gray-50 */
    --text-color-dark: #e5e7eb; /* Gray-200 */
    --text-color-light: #374151; /* Gray-700 */
    --card-bg: #374151; /* Gray-700 */
    --border-color: #4b5563; /* Gray-600 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* This is crucial! It includes padding and border in the element's total width/height */
}

html, body {
    overflow-x: hidden; /* Prevent horizontal scrollbar on html/body */
    width: 100%; /* Ensure they take full width */
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-color-dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: #fff;
}

ul {
    list-style: none;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--dark-bg);
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: #4a8deb; /* Slightly darker primary */
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--dark-bg);
    transform: translateY(-2px);
}

.btn-submit {
    background-color: var(--accent-color);
    color: var(--dark-bg);
    border: none;
    cursor: pointer;
    width: 100%;
}

.btn-submit:hover {
    background-color: #d83d8e; /* Slightly darker accent */
    transform: translateY(-2px);
}

.pre-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color-dark);
    margin-bottom: 40px;
    text-align: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* Background Blobs */
#blobs-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    filter: blur(80px); /* Adjust blur for desired effect */
    opacity: 0.3; /* Soften the intensity */
}

.blob {
    position: absolute;
    border-radius: 50%;
    animation: moveBlobs 20s infinite alternate;
}

.blob:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.blob:nth-child(2) { top: 70%; left: 20%; animation-delay: 2s; }
.blob:nth-child(3) { top: 30%; left: 80%; animation-delay: 4s; }
.blob:nth-child(4) { top: 50%; left: 5%; animation-delay: 6s; }
.blob:nth-child(5) { top: 80%; left: 90%; animation-delay: 8s; }
.blob:nth-child(6) { top: 5%; left: 50%; animation-delay: 10s; }
.blob:nth-child(7) { top: 40%; left: 40%; animation-delay: 12s; }
.blob:nth-child(8) { top: 60%; left: 70%; animation-delay: 14s; }

@keyframes moveBlobs {
    0% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(20px, 30px) scale(1.05); }
    50% { transform: translate(-30px, -20px) scale(0.95); }
    75% { transform: translate(40px, -10px) scale(1.1); }
    100% { transform: translate(0, 0) scale(1); }
}


/* Header */
header {
    background-color: transparent;
    padding: 20px 0;
    position: relative;
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
}

.logo a {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color-dark);
}

.logo span {
    color: var(--primary-color);
}

#navbar {
    display: flex;
    align-items: center;
    gap: 30px;
}

#navbar li a {
    color: var(--text-color-dark);
    font-weight: 500;
    position: relative;
}

#navbar li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    left: 0;
    bottom: -5px;
    transition: width 0.3s ease-in-out;
}

#navbar li a:hover::after {
    width: 100%;
}

.burger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-color-dark);
    transition: all 0.3s ease;
}

/* Hero Section */
#hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70vh;
    padding: 50px 0;
}

.hero-left {
    flex: 1;
}

.hero-left h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
}

.hero-left h1 span {
    color: var(--primary-color);
}

.rotating-text-container {
    display: flex;
    font-size: 2rem;
    font-weight: 600;
    color: var(--secondary-color);
    height: 40px; /* Adjust height based on text size */
    overflow: hidden;
}

.static-text {
    white-space: nowrap;
}

.dynamic-text {
    display: inline-block;
    vertical-align: top;
    height: 100%;
    animation: rotateText 8s infinite;
}

.dynamic-text span {
    display: block;
    height: 100%;
    white-space: nowrap;
}

@keyframes rotateText {
    0% { transform: translateY(0%); }
    20% { transform: translateY(-100%); }
    40% { transform: translateY(-200%); }
    60% { transform: translateY(-300%); }
    80% { transform: translateY(-400%); } /* Adjust based on number of spans */
    100% { transform: translateY(0%); }
}


.paragrap {
    font-size: 1.1rem;
    margin-top: 20px;
    margin-bottom: 40px;
    color: var(--text-color-dark);
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.hero-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-right img {
    max-width: 100%;
    height: auto;
    animation: floatImage 3s ease-in-out infinite;
}

@keyframes floatImage {
    0% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0); }
}

/* Services Section */
#services {
    padding: 50px 0;
    background-color: var(--dark-bg);
}

.services-title {
    text-align: center;
}

.service-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.service-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
}

.service-icon svg {
    fill: var(--dark-bg);
    width: 30px;
    height: 30px;
}

.service-card h4 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-color-dark);
}

.service-card p {
    color: var(--text-color-dark);
    opacity: 0.8;
}

/* Portfolio Section */
#portfolios, #portfolios-2 {
    padding: 50px 0;
    background-color: var(--dark-bg);
}

#portfolios .section-title, #portfolios-2 .section-title {
    text-align: center;
}

.portfolio-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.portfolio-cover {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.portfolio-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-card:hover .portfolio-cover img {
    transform: scale(1.05);
}

.portfolio-info {
    padding: 25px;
}

.portfolio-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.portfolio-title h4 {
    font-size: 1.4rem;
    color: #b9d6f9;
}

.portfolio-link svg {
    fill: var(--text-color-dark);
    width: 22px;
    height: 22px;
    transition: fill 0.3s ease;
}

.portfolio-link:hover svg {
    fill: var(--accent-color);
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.portfolio-tags span {
    background-color: var(--border-color);
    color: var(--text-color-dark);
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 5px;
}

.portfolio-info p {
    font-size: 0.95rem;
    color: var(--text-color-dark);
    opacity: 0.8;
}

/* Skills & Education */
#skills {
    padding: 80px 0;
    background-color: var(--dark-bg);
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: flex-start;
}

.skills-left {
    position: relative;
}

.education-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    position: relative;
    padding-left: 30px;
}

.education-item .line {
    position: absolute;
    left: 0;
    top: 5px;
    width: 2px;
    height: calc(100% + 25px); /* Extend line for spacing */
    background-color: var(--border-color);
}

.education-item .line div {
    width: 12px;
    height: 12px;
    background-color: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    left: -5px; /* Adjust to center on the line */
    top: 0;
    border: 2px solid var(--dark-bg);
}

.education-info {
    flex: 1;
}

.education-info h4 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.education-info p {
    font-size: 1rem;
    color: var(--text-color-dark);
    opacity: 0.9;
    margin-bottom: 5px;
}

.education-info .education-years {
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 600;
}

.skills-right p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--text-color-dark);
    line-height: 1.8;
}

.skills-list {
    display: flex;
    gap: 40px;
}

.skills-list ul {
    flex: 1;
}

.skills-list li {
    font-size: 1rem;
    color: var(--text-color-dark);
    margin-bottom: 10px;
    position: relative;
    padding-left: 25px;
}

.skills-list li::before {
    content: '•';
    color: var(--secondary-color);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -5px;
}

/* Certificates */
#certificates {
    padding: 80px 0;
    background-color: var(--dark-bg);
}

.certificate-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.certificate-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.certificate-cover {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.certificate-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.certificate-card:hover .certificate-cover img {
    transform: scale(1.05);
}

.certificate-info {
    padding: 25px;
}

.certificate-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.certificate-title h4 {
    font-size: 1.2rem;
    color: #b9d6f9;
    line-height: 1.4;
}

.certificate-link svg {
    fill: var(--text-color-dark);
    width: 22px;
    height: 22px;
    transition: fill 0.3s ease;
}

.certificate-link:hover svg {
    fill: var(--accent-color);
}

.certificate-info p {
    font-size: 0.95rem;
    color: var(--text-color-dark);
    opacity: 0.8;
}

/* Contact Section */
#contact {
    padding: 35px 0;
    background-color: var(--dark-bg);
}

#contact .section-title {
    text-align: left;
}

.contact .main-container {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
    justify-content: center;
}

.contact-left {
    flex: 1.5;
    min-width: 300px;
}

.contact-left p {
    font-size: 1.1rem;
    color: var(--text-color-dark);
    opacity: 0.9;
    margin-bottom: 30px;
}

.contact-form div {
    margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--card-bg);
    color: var(--text-color-dark);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-color-dark);
    opacity: 0.6;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.5); /* Primary-400 with opacity */
}

.contact-right {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.contact-item-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.contact-item-icon svg {
    fill: var(--dark-bg);
    width: 24px;
    height: 24px;
}

.contact-item-detail h4 {
    font-size: 1.2rem;
    color: #a1cbff;
    margin-bottom: 5px;
}

.contact-item-detail p {
    font-size: 1rem;
    color: var(--text-color-dark);
    opacity: 0.9;
}

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

.footer-icons {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 20px;
}

.footer-icons a svg {
    fill: var(--text-color-dark);
    width: 24px;
    height: 24px;
    transition: fill 0.3s ease, transform 0.2s ease;
}

.footer-icons a:hover svg {
    fill: var(--primary-color);
    transform: translateY(-3px);
}

footer p {
    font-size: 0.9rem;
    color: var(--text-color-dark);
    opacity: 0.7;
}

/* Scroll to Top Button */
#scrollTopBtn {
    display: none; /* Sembunyikan secara default */
    position: fixed; /* Tetap di layar */
    bottom: 30px; /* Jarak dari bawah */
    right: 30px; /* Jarak dari kanan */
    z-index: 999; /* Pastikan di atas elemen lain */
    background-color: var(--primary-color);
    color: var(--dark-bg);
    border: none;
    border-radius: 50%; /* Bentuk lingkaran */
    width: 50px; /* Lebar tombol */
    height: 50px; /* Tinggi tombol */
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0; /* Hapus padding default button */
}

#scrollTopBtn:hover {
    background-color: #4a8deb; /* Warna hover */
    transform: translateY(-3px); /* Efek sedikit naik */
}

#scrollTopBtn svg {
    fill: var(--dark-bg); /* Warna ikon SVG */
    width: 24px;
    height: 24px;
}

/* Responsive adjustments will go in responsive.css */