/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Reset color scheme to previous greyscale version */
:root {
    --primary-color: #333333;
    --secondary-color: #666666;
    --accent-color: #000000;
    --light-grey: #f5f5f5;
    --medium-grey: #e0e0e0;
    --dark-grey: #212121;
    --text-light: #ffffff;
    --text-dark: #333333;
}

/* Header Styles */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

/* Navigation Styles */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    margin-left: auto; /* Push nav links to the right */
}

.nav-links li a {
    text-decoration: none;
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--accent-color);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
    margin-left: auto; /* Push toggle button to the right */
}

/* Hero Section - Fixed positioning issue */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.8)),
                url('images/Backgorund_2.jpg') center/cover no-repeat;
    margin-top: 0; /* Remove any margin */
    padding-top: 80px; /* Add padding to account for fixed header */
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-light);
    position: relative;
}

.hero-content {
    width: 100%;
    padding: 0 20px;
    margin-top: -80px; /* Adjust content position */
}

/* Ensure proper spacing for content below hero */
main {
    margin-top: 0;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    color: var(--text-light);
    font-size: 3.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 1rem;
}

.hero-content p {
    color: var(--secondary-color);
    font-size: 1.4rem;
    margin: 1.5rem 0;
}

/* Button Styles */
.button {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--accent-color);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    border: 2px solid var(--accent-color);
    cursor: pointer;
    font-weight: 600;
}

.button:hover {
    background-color: transparent;
    color: var(--text-light);
}

.button-outline {
    background: transparent;
    border: 2px solid var(--text-light);
    color: var(--text-light);
}

.button-outline:hover {
    background: var(--text-light);
    color: var(--accent-color);
}

/* Section Styles */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 15px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
}

.section-header p {
    color: #666;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
}

.stat-item h4 {
    font-size: 2rem;
    color: var(--accent-color);
}

.expertise-areas {
    margin: 20px 0;
}

.expertise-areas ul {
    list-style: none;
    padding: 0;
}

.expertise-areas li {
    margin: 10px 0;
    font-size: 1.1rem;
}

.education {
    margin: 20px 0;
}

.education h4 {
    color: #007bff;
    margin-bottom: 5px;
}

.about-text p {
    margin-bottom: 15px;
    color: #666;
    font-size: 1.1rem;
}

.about-text h3 {
    color: var(--accent-color);
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.about-text h4 {
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

/* Services Section Styles */
.services {
    padding: 80px 0;
    background: #f8f9fa;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-item {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #eaeaea;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.service-content {
    padding: 30px;
}

.service-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-color);
    border-radius: 15px;
    color: #fff;
    font-size: 28px;
}

.service-info h3 {
    color: #2c3e50;
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 600;
}

.service-description {
    color: #505f6f;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.service-expertise {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.service-expertise h4 {
    color: #2c3e50;
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 500;
}

.service-expertise ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-expertise li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #505f6f;
    margin-bottom: 10px;
    font-size: 15px;
}

.service-expertise li i {
    color: var(--accent-color);
    font-size: 14px;
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .service-content {
        padding: 25px;
    }

    .service-info h3 {
        font-size: 22px;
    }

    .service-description {
        font-size: 15px;
    }

    .service-expertise {
        padding: 15px;
    }
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
}

.contact-info .info-item {
    margin-bottom: 30px;
}

.contact-info i {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--medium-grey);
    border-radius: 5px;
    font-family: inherit;
    background: #ffffff;
    color: var(--text-dark);
}

.contact-form textarea {
    height: 150px;
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
    background-color: var(--dark-grey);
    color: var(--text-light);
    padding: 50px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.social-links a {
    color: var(--text-light);
    margin-left: 20px;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--medium-grey);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        width: 28%;
        position: absolute;
        top: 100%;
        right: 20px; /* Position from right */
        transform: none;
        background: rgba(0, 0, 0, 0.8);
        padding: 15px;
        flex-direction: column;
        text-align: right;
        box-shadow: 0 3px 5px rgba(0,0,0,0.1);
        border-radius: 10px;
        margin-top: 10px;
        opacity: 0;
        transition: opacity 0.3s ease, transform 0.3s ease;
        gap: 0;
    }

    .nav-links.active {
        display: flex;
        animation: fadeIn 0.3s ease forwards;
        
    }

    .nav-links.closing {
        animation: fadeOut 0.3s ease forwards;
    }

    .nav-links li {
        margin: 5px 0;
        padding: 5px 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links li a {
        padding: 6px 15px;
        font-size: 0.95rem;
        text-align: right;
        color: white;
        display: block;
    }

    .nav-links li a:hover {
        background: rgba(255,255,255,0.15);
        color: var(--text-light);
        border-radius: 5px;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}

/* Animation Updates */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-aos="fade-up"] {
    animation: fadeInUp 0.6s ease-out;
}

/* Logo Styles */
.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px; /* Sesuaikan dengan ukuran yang diinginkan */
    width: auto;
    /* Tambahkan padding jika diperlukan */
    padding: 5px 0;
}

/* Responsive logo */
@media (max-width: 768px) {
    .logo-img {
        height: 35px; /* Ukuran lebih kecil untuk mobile */
    }
}

/* Sections Background */
.about {
    background-color: #ffffff;
}

.services {
    background-color: var(--light-grey);
}

.portfolio {
    background-color: var(--light-grey);
    padding: 100px 0;
}

.contact {
    background-color: var(--light-grey);
}

/* Section Headers */
.section-header h2 {
    color: var(--accent-color);
}

.section-header p {
    color: var(--secondary-color);
}

/* Portfolio Items */
.portfolio-item {
    background: #ffffff;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.portfolio-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.portfolio-icon {
    width: 70px;
    height: 70px;
    background: var(--light-grey);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.portfolio-icon i {
    font-size: 30px;
    color: var(--accent-color);
}

.portfolio-item h3 {
    font-size: 1.4rem;
    color: var(--accent-color);
    margin: 0;
}

.portfolio-item p {
    color: var(--secondary-color);
    font-size: 1rem;
    margin: 0;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 10px 0;
}

.portfolio-tags span {
    background: var(--light-grey);
    color: var(--secondary-color);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.portfolio-links {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.portfolio-link,
.portfolio-demo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.portfolio-link {
    background: var(--accent-color);
    color: #ffffff;
}

.portfolio-demo {
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.portfolio-link:hover,
.portfolio-demo:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.portfolio-link:hover {
    background: #000000;
}

.portfolio-demo:hover {
    background: var(--accent-color);
    color: #ffffff;
}

.portfolio-links i {
    font-size: 1rem;
}

/* Portfolio Grid Fix */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
        padding: 15px;
    }

    .portfolio-item {
        padding: 20px;
    }

    .portfolio-icon {
        width: 60px;
        height: 60px;
    }

    .portfolio-icon i {
        font-size: 25px;
    }

    .portfolio-item h3 {
        font-size: 1.2rem;
    }

    .portfolio-links {
        flex-direction: column;
        gap: 8px;
    }

    .portfolio-link,
    .portfolio-demo {
        width: 100%;
        justify-content: center;
    }
}

/* Footer Logo Size Fix */
.footer-logo-img {
    height: 35px; /* Reduced size */
    width: auto;
    margin-bottom: 10px;
}

/* Button Interaction Colors Update */
.button {
    background-color: var(--accent-color);
    color: var(--text-light);
    border: 2px solid var(--accent-color);
    transition: all 0.3s ease;
}

.button:hover {
    background-color: transparent;
    color: var(--accent-color);
}

.portfolio-link {
    background: var(--accent-color);
    color: var(--text-light);
    padding: 8px 20px;
    border-radius: 4px;
    border: 1px solid var(--accent-color);
}

.portfolio-link:hover {
    background: transparent;
    color: var(--text-light);
    border-color: var(--text-light);
}

/* Hero Button Styles */
.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.button {
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid;
}

/* Primary Button */
.hero .button {
    background-color: #ffffff;
    color: var(--accent-color);
    border-color: #ffffff;
}

.hero .button:hover {
    background-color: transparent;
    color: #ffffff;
    border-color: #ffffff;
}

/* Outline Button */
.hero .button-outline {
    background-color: transparent;
    color: #ffffff;
    border-color: #ffffff;
}

.hero .button-outline:hover {
    background-color: #ffffff;
    color: var(--accent-color);
}

/* Add hover transition */
.hero .button,
.hero .button-outline {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .button {
        padding: 10px 25px;
        font-size: 0.95rem;
    }
}

/* Hero Social Links */
.hero-social-links {
    margin-top: 30px;
    display: flex;
    gap: 20px;
    justify-content: center;
}

.hero-social-links a {
    color: #ffffff;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.hero-social-links a:hover {
    opacity: 1;
    transform: translateY(-3px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-social-links {
        margin-top: 25px;
        gap: 15px;
    }
    
    .hero-social-links a {
        font-size: 1.3rem;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background-color: #fff;
    margin: 50px auto;
    width: 90%;
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: var(--accent-color);
}

.close-modal {
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--accent-color);
}

.modal-body {
    padding: 20px;
}

.project-category {
    margin-bottom: 30px;
}

.project-category h3 {
    color: var(--accent-color);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #eee;
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.project-item {
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 20px;
    background-color: #f8f8f8;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.project-item:hover {
    background-color: #f0f0f0;
    transform: translateX(5px);
}

.project-item i.fas.fa-folder {
    font-size: 24px;
    color: var(--accent-color);
    margin-right: 15px;
    margin-top: 3px;
}

.project-info {
    flex: 1;
}

.project-info h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--accent-color);
}

.project-info p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.project-description {
    display: block;
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-top: 5px;
    font-style: italic;
}

.project-item i.fas.fa-external-link-alt {
    font-size: 16px;
    color: var(--secondary-color);
}

/* Project Details Styles */
.project-details {
    padding: 20px;
}

.project-details-header {
    margin-bottom: 25px;
}

.project-details-header h3 {
    color: var(--accent-color);
    margin-bottom: 10px;
}

.project-tech-stack {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 15px 0;
}

.tech-tag {
    background: #f0f0f0;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.project-links {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.project-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.github-link {
    background: var(--accent-color);
    color: #ffffff;
}

.demo-link {
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.project-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.github-link:hover {
    background: #000000;
}

.demo-link:hover {
    background: var(--accent-color);
    color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-content {
        margin: 20px auto;
        width: 95%;
    }

    .project-item {
        padding: 12px;
    }

    .project-info h4 {
        font-size: 1rem;
    }

    .project-links {
        flex-direction: column;
    }
    
    .project-link-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Contact Form Button Style */
.submit-btn {
    width: 100%;
    padding: 15px 25px;
    background: var(--accent-color);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
}

.submit-btn:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn .btn-text {
    position: relative;
    z-index: 1;
}

.submit-btn .loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Disabled state */
.submit-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Add new keyframes for fade animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}
