:root {
    --bg-color: #060303;
    --panel-bg: rgba(20, 5, 5, 0.6);
    --panel-border: rgba(255, 50, 50, 0.15);
    --highlight: #d32f2f;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --font-main: 'Inter', sans-serif;
    --whatsapp-green: #25D366;
}

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

html {
    scroll-behavior: smooth;
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    /* Subtle grid background */
    background-image: 
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 50px 50px;
}

body {
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

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

.dim { color: var(--text-secondary); }
.highlight { color: var(--highlight); }

/* Glass Panel Utility */
.glass-panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
}

/* Modals */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #0f0505;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    position: relative;
    border: 1px solid var(--highlight);
    border-radius: 20px;
}

#manage-modal .modal-content {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.close-admin, .close-manage {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

#admin-login-form input,
#project-form input,
#project-form select {
    width: 100%;
    padding: 1rem;
    margin: 10px 0;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    border-radius: 8px;
    font-family: inherit;
}

#admin-login-form button {
    width: 100%;
    margin-top: 10px;
}

/* Existing Projects List */
.existing-projects {
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
}
.admin-proj-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.05);
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 8px;
}
.admin-proj-item button {
    background: var(--highlight);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 5px;
}
.admin-proj-item button.delete-btn {
    background: rgba(255,50,50,0.8);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: var(--font-main);
    font-size: 1rem;
}

.primary-btn {
    background: linear-gradient(135deg, #7A5CFA, #A044FF);
    color: white;
}
.primary-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.outline-btn {
    background: transparent;
    border: 2px solid #555;
    color: white;
}
.outline-btn:hover {
    border-color: #00e0ff;
    color: #00e0ff;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 70px;
    width: auto;
    border-radius: 8px;
    background-color: #ffffff; /* White background to ensure black logo text is perfectly readable */
    padding: 5px 15px;
    margin-right: 0;
}

.logo h1 {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 2px;
}

.logo span {
    font-size: 0.7rem;
    letter-spacing: 5px;
    color: var(--text-secondary);
}

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

nav a {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--highlight);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: 100px;
}

.hero-subtitle {
    font-size: 1rem;
    letter-spacing: 4px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-title {
    font-size: 5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.hero-roles {
    font-size: 1.2rem;
    letter-spacing: 3px;
    margin-bottom: 3rem;
    color: var(--text-secondary);
}

.hero-center {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
}

.profile-container {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--highlight);
    box-shadow: 0 0 30px rgba(211, 47, 47, 0.4);
    z-index: 10;
}

.profile-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.floating-badge {
    position: absolute;
    background: rgba(20, 5, 5, 0.8);
    border: 1px solid rgba(255, 50, 50, 0.2);
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
    white-space: nowrap;
    animation: float 4s ease-in-out infinite;
    z-index: 5;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.floating-badge i {
    color: var(--highlight);
}

.badge-1 { top: 10%; left: 10%; animation-delay: 0s; }
.badge-2 { top: 20%; right: 10%; animation-delay: 0.5s; }
.badge-3 { top: 50%; left: 0%; animation-delay: 1s; }
.badge-4 { top: 60%; right: 0%; animation-delay: 1.5s; }
.badge-5 { bottom: 10%; left: 20%; animation-delay: 2s; }
.badge-6 { bottom: 20%; right: 20%; animation-delay: 2.5s; }
.badge-7 { bottom: -10%; left: 50%; transform: translateX(-50%); animation-delay: 3s; }

.hero-actions {
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
}

.hero-actions .primary-btn {
    background: linear-gradient(135deg, #4459ff, #7a5cfa);
}

/* About Section */
.about-section {
    padding: 6rem 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.about-image {
    padding: 10px;
    border-radius: 24px;
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    display: block;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-text-panel {
    padding: 3rem;
}

.about-text-panel h2 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-text-panel h2 i {
    background: rgba(255,255,255,0.1);
    padding: 5px;
    border-radius: 50%;
    font-size: 0.8rem;
}

.about-text-panel p {
    line-height: 1.8;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.about-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.skills-panel, .contact-info-panel {
    padding: 2rem;
}

.skills-panel h2, .contact-info-panel h2 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skills-panel h2 i, .contact-info-panel h2 i {
    background: rgba(255,255,255,0.1);
    padding: 5px;
    border-radius: 50%;
    font-size: 0.7rem;
}

.software-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.icon-box {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(30, 30, 30, 0.5);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    font-weight: 700;
    transition: transform 0.3s;
}

.icon-box:hover {
    transform: scale(1.1);
    border-color: var(--highlight);
}

.contact-grid-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.contact-grid-inner span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 5px;
}

.contact-grid-inner p {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Certificates Section */
.certificates-section {
    padding: 6rem 0;
}

.certificates-section h2 {
    font-size: 2rem;
    letter-spacing: 3px;
    margin-bottom: 3rem;
}

.cert-flex {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 3rem;
    margin-bottom: 3rem;
}

.cert-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.cert-icon {
    width: 80px;
    height: 80px;
    background: rgba(30, 5, 5, 0.8);
    border: 1px solid rgba(255,50,50,0.2);
    border-radius: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: var(--highlight);
    transition: all 0.3s;
}

.cert-icon:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(211, 47, 47, 0.2);
}

.cert-item p {
    font-size: 0.9rem;
    font-weight: 600;
}

.cert-desc {
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Projects Accordion Section - Pill Gallery */
.projects-section {
    padding: 6rem 0;
}

.section-subtitle {
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.accordion-gallery {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    height: 600px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
}

.acc-item {
    flex: 1;
    position: relative;
    border-radius: 50vw;
    overflow: hidden;
    cursor: pointer;
    transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.05);
}

.acc-item::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    transition: background 0.6s;
    pointer-events: none;
}

.acc-item:hover {
    flex: 4;
}

.active-acc {
    flex: 4;
}

.acc-title {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 800;
    text-transform: uppercase;
    transition: 0.4s;
    z-index: 5;
    letter-spacing: 3px;
}

.acc-item:hover .acc-title,
.acc-item.active-acc .acc-title {
    opacity: 0;
    transform: rotate(180deg) translateX(20px);
}

@media (max-width: 968px) {
    .accordion-gallery {
        flex-direction: column;
        height: auto;
    }
    
    .acc-item {
        width: 100%;
        height: 80px;
        border-radius: 20px;
        transition: height 0.6s cubic-bezier(0.25, 1, 0.5, 1);
        justify-content: flex-start;
        padding-left: 2rem;
    }
    
    .acc-item:hover,
    .acc-item.active-acc {
        height: 300px;
    }
    
    .acc-title {
        writing-mode: horizontal-tb;
        transform: none;
    }
    
    .acc-item:hover .acc-title,
    .acc-item.active-acc .acc-title {
        transform: translateX(-20px);
    }
}

/* Project Modal Overrides */
#project-modal {
    position: fixed;
    inset: 0;
    background: rgba(4, 2, 2, 0.9);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
}
#project-modal.active { display: flex; }

.modal-nav-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--highlight);
    color: var(--highlight);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s;
}
.modal-nav-btn:hover { background: var(--highlight); color: #fff; transform: translateY(-50%) scale(1.1); }
.modal-nav-btn.prev { left: 20px; }
.modal-nav-btn.next { right: 20px; }

/* Modal Project Cards */
.modal-proj-card {
    background: rgba(20,5,5,0.8);
    border: 1px solid rgba(255,50,50,0.2);
    border-radius: 12px;
    overflow: hidden;
}
.modal-proj-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid rgba(255,50,50,0.2);
}
.modal-proj-card .info {
    padding: 1rem;
}
.modal-proj-card h4 {
    margin-bottom: 0.5rem;
    color: #fff;
}
.modal-proj-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--highlight);
    color: #fff;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* Contact Section */
.contact-section {
    padding: 6rem 0;
}

.contact-title {
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
}

.contact-subtitle {
    color: var(--text-secondary);
    margin-bottom: 4rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.rules-panel, .form-panel {
    padding: 3rem;
}

.rules-panel h2, .form-panel h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.rule-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.rule-icon {
    width: 40px;
    height: 40px;
    background: rgba(30, 30, 30, 0.8);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    flex-shrink: 0;
}

.rule-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.rule-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.form-panel p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.form-row {
    display: flex;
    gap: 1.5rem;
}

.form-group {
    flex: 1;
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding: 10px 0;
    color: white;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-bottom-color: var(--highlight);
}

/* Footer elements */
.whatsapp-float {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 60px;
    height: 60px;
    background-color: var(--whatsapp-green);
    color: white;
    border-radius: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    box-shadow: 0px 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 100;
    transition: transform 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

footer {
    display: flex;
    justify-content: space-between;
    padding: 2rem 4rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.admin-login-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: color 0.3s;
    font-family: inherit;
}
.admin-login-btn:hover {
    color: var(--highlight);
}

/* Responsive */
@media (max-width: 900px) {
    .about-grid, .about-bottom-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .floating-badge {
        display: none; /* Hide floating badges on mobile for cleaner look */
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .accordion-container {
        flex-direction: column;
        height: 600px;
    }
    
    .accordion-panel {
        max-width: 100%;
        max-height: 60px;
    }
    
    .panel-title {
        transform: none;
        bottom: 15px;
        left: 20px;
    }

    .accordion-panel.active {
        max-height: 400px;
    }
}

/* Premium Success Modal Popup */
.success-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(10, 3, 3, 0.95);
    border: 2px solid var(--highlight);
    padding: 2.5rem 3.5rem;
    border-radius: 24px;
    color: #fff;
    font-weight: 700;
    z-index: 100000;
    box-shadow: 0 0 50px rgba(211, 47, 47, 0.4), inset 0 0 20px rgba(255, 50, 50, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
    pointer-events: none;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.success-toast.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.success-toast i {
    color: var(--highlight);
    font-size: 3.5rem;
    filter: drop-shadow(0 0 10px var(--highlight));
    display: block;
}

.success-toast span {
    font-size: 1.2rem;
    color: var(--text-primary);
}
