/* ============================================
   Apexcode+ Portfolio Website Styles
   ============================================ */

/* CSS Variables */
:root {
    --primary-color: #00d4ff;
    --secondary-color: #7b2cbf;
    --accent-color: #ff6b35;
    --dark-bg: #0a0a0f;
    --card-bg: #12121a;
    --text-light: #f0f0f0;
    --text-muted: #a0a0a0;
    --gradient: linear-gradient(135deg, #00d4ff 0%, #7b2cbf 100%);
    --shadow: 0 10px 30px rgba(0, 212, 255, 0.1);
    --transition: all 0.3s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ============================================
   Navigation
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.8rem 0;
    box-shadow: var(--shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-light);
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    transition: var(--transition);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 20px 80px;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(123, 44, 191, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        var(--dark-bg);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-title span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: var(--gradient);
    color: var(--dark-bg);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--dark-bg);
}

/* Hero Visual - Code Block */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.code-block {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.code-header {
    display: flex;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27ca40; }

.code-block pre {
    margin: 0;
}

.code-block code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-light);
}

.keyword { color: #ff79c6; }
.variable { color: #8be9fd; }
.property { color: #50fa7b; }
.string { color: #f1fa8c; }
.function { color: #ffb86c; }
.comment { color: #6272a4; }

/* ============================================
   Section Styles
   ============================================ */

section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
}

.section-title span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   About Section
   ============================================ */

.about {
    background: var(--card-bg);
}

.about-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.stats {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.about-image {
    display: flex;
    justify-content: center;
}

.image-frame {
    width: 300px;
    height: 300px;
    background: var(--gradient);
    border-radius: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.image-frame::before {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    border: 2px solid var(--primary-color);
    border-radius: 30px;
    opacity: 0.3;
}

.image-frame i {
    font-size: 8rem;
    color: var(--dark-bg);
}

/* ============================================
   Services Section
   ============================================ */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
    border-color: rgba(0, 212, 255, 0.2);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}

.service-icon i {
    font-size: 1.8rem;
    color: var(--dark-bg);
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.service-card p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* ============================================
   Portfolio Section
   ============================================ */

.portfolio {
    background: var(--card-bg);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    background: var(--dark-bg);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.portfolio-image {
    height: 200px;
    background: 
        radial-gradient(ellipse at center, rgba(0, 212, 255, 0.2) 0%, transparent 70%),
        var(--card-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.portfolio-image::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-image::before {
    opacity: 0.1;
}

.portfolio-image i {
    font-size: 4rem;
    color: var(--primary-color);
    z-index: 1;
}

.portfolio-info {
    padding: 1.5rem;
}

.portfolio-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.portfolio-info p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.tech-tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ============================================
   Contact Section
   ============================================ */

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.contact-item i {
    width: 60px;
    height: 60px;
    background: var(--card-bg);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    color: var(--primary-color);
}

.contact-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.contact-item p {
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: var(--card-bg);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    color: var(--text-light);
}

.social-links a:hover {
    background: var(--gradient);
    color: var(--dark-bg);
    transform: translateY(-5px);
}

.contact-form {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--dark-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-light);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.contact-form .btn {
    width: 100%;
    border: none;
    cursor: pointer;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background: var(--card-bg);
    padding: 60px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.footer-logo h3 span {
    color: var(--primary-color);
}

.footer-logo p {
    color: var(--text-muted);
}

.footer-links h4,
.footer-services h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.footer-links ul li,
.footer-services ul li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-services li {
    color: var(--text-muted);
}

.footer-admin h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.footer-admin ul li {
    margin-bottom: 0.8rem;
}

.footer-admin ul li a {
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-admin ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-subtitle {
        margin: 0 auto 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .stats {
        justify-content: center;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--card-bg);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        transform: translateY(-150%);
        transition: var(--transition);
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .hamburger {
        display: flex;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .service-card {
        padding: 1.5rem;
    }

    .code-block {
        padding: 1.5rem;
    }

    .code-block code {
        font-size: 0.85rem;
    }

    /* Embed Modal Responsive */
    .embed-modal-content {
        margin: 10px;
        max-height: 95vh;
    }
    
    .embed-preview {
        height: 40vh;
    }
}

 /* Embed Modal Styles */
.embed-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.embed-modal.active {
    display: flex;
}

.embed-modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.embed-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

#embedTitle {
    font-size: 1.5rem;
    margin: 0;
    flex: 1;
}

#embedType {
    background: var(--gradient);
    color: var(--dark-bg);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.embed-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.embed-modal-close:hover {
    background: var(--danger-color);
    color: white;
}

.embed-modal-body {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.embed-preview {
    flex: 1;
    min-height: 400px;
    background: var(--dark-bg);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.embed-preview img,
.embed-preview iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}

.embed-preview a {
    font-size: 1.2rem;
    color: var(--primary-color);
    word-break: break-all;
}

.embed-description {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 1rem;
}

.embed-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

#backToHome {
    background: var(--gradient);
    color: var(--dark-bg);
}

#copyEmbedLink:hover {
    background: var(--success-color);
    color: var(--dark-bg);
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: fadeInUp 0.8s ease forwards;
}

.hero-visual {
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.service-card,
.portfolio-item {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }

.portfolio-item:nth-child(1) { animation-delay: 0.1s; }
.portfolio-item:nth-child(2) { animation-delay: 0.2s; }
.portfolio-item:nth-child(3) { animation-delay: 0.3s; }
.portfolio-item:nth-child(4) { animation-delay: 0.4s; }
.portfolio-item:nth-child(5) { animation-delay: 0.5s; }
.portfolio-item:nth-child(6) { animation-delay: 0.6s; }
