/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --dark-bg: #0f172a;
    --darker-bg: #020617;
    --light-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

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

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 50px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    z-index: -1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

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

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

.social-links {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.2rem;
}

.social-icon:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-5px);
}

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

.profile-card {
    position: relative;
    animation: float 6s ease-in-out infinite;
}

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

.profile-img-wrapper {
    position: relative;
}

.profile-img {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 150px;
    color: white;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1;
}

.profile-img::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: var(--gradient);
    opacity: 0.3;
    filter: blur(20px);
    z-index: -1;
}

.profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 50px;
    border: 2px solid var(--text-muted);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.scroll-indicator span {
    width: 6px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 3px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(20px);
        opacity: 0;
    }
}

/* Section Styles */
section {
    padding: 100px 20px;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    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: 3rem;
}

/* About Section */
.about {
    background: var(--darker-bg);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

.about-img-wrapper {
    position: relative;
}

.about-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid var(--primary-color);
    border-radius: 20px;
    top: 20px;
    left: 20px;
    z-index: 0;
}

.about-img {
    width: 100%;
    aspect-ratio: 1;
    background: var(--gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 120px;
    color: white;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.about-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.info-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 10px;
    transition: var(--transition);
}

.info-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 5px;
}

.info-item h4 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.info-item p {
    color: var(--text-primary);
    margin: 0;
    font-weight: 500;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid transparent;
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.2);
}

.skill-icon {
    font-size: 4rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.skill-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.skill-bar {
    width: 100%;
    height: 8px;
    background: var(--dark-bg);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient);
    border-radius: 10px;
    width: 0;
    transition: width 1s ease;
}

/* Projects Section */
.projects {
    background: var(--darker-bg);
}

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

.project-card {
    background: var(--light-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid transparent;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.3);
}

.project-image {
    height: 200px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    padding: 0.4rem 1rem;
    background: var(--dark-bg);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--primary-color);
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.contact-item h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: var(--text-muted);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--light-bg);
    border: 2px solid transparent;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

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

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* Footer */
.footer {
    background: var(--darker-bg);
    padding: 2rem 0;
    border-top: 1px solid var(--light-bg);
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

/* Responsive Design */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--dark-bg);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        padding: 2rem 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }

    .profile-img {
        width: 280px;
        height: 280px;
        font-size: 120px;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-info {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .section-title {
        font-size: 2rem;
    }

    .profile-img {
        width: 220px;
        height: 220px;
        font-size: 90px;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* Video Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    background-color: var(--light-bg);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: var(--text-primary);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10001;
}

.modal-close:hover {
    color: var(--accent-color);
    transform: rotate(90deg);
}

.modal-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
}

.modal-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 15px;
    }
    
    .modal-close {
        top: -35px;
        font-size: 35px;
    }
}

/* Auth Gate + Modals (Violet theme) */
:root {
    --auth-primary: #8b5cf6; /* violet */
    --auth-secondary: #6366f1; /* indigo */
    --auth-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
}

.auth-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
                #0b1224ee;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 11000;
    backdrop-filter: blur(6px);
}

.auth-overlay.show { display: flex; }

.auth-card {
    width: min(440px, 92vw);
    background: #0f1a31;
    border: 1px solid rgba(139, 92, 246, 0.18);
    border-radius: 18px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.auth-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #031a16;
    background: var(--auth-gradient);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.35);
    font-size: 26px;
}

.auth-title { font-size: 1.8rem; margin-bottom: 6px; color: #c9fffa; }
.auth-subtitle { color: #96b0c4; margin-bottom: 22px; }

.auth-actions { display: flex; gap: 12px; justify-content: center; }
.auth-btn { min-width: 120px; }
.auth-btn-outline { border: 2px solid var(--auth-primary); color: #eafffd; }
.auth-btn-outline:hover { background: var(--auth-primary); }

.auth-modal { position: fixed; inset: 0; display: none; z-index: 12000; align-items: center; justify-content: center; background: rgba(3, 8, 18, 0.75); backdrop-filter: blur(6px); }
.auth-modal.show { display: flex; }

.auth-modal-content {
    position: relative;
    width: min(440px, 94vw);
    background: #0e1730;
    border: 1px solid rgba(139, 92, 246, 0.18);
    border-radius: 18px;
    padding: 16px 16px 22px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
    max-height: 90vh; /* allow scrolling if content is tall */
    overflow-y: auto;
}

.auth-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: transparent;
    border: 0;
    color: #cfe9ff;
    font-size: 32px;
    cursor: pointer;
    transition: transform .2s ease, color .2s ease;
}
.auth-modal-close:hover { color: #ffffff; transform: rotate(90deg); }

.auth-panel-header { text-align: center; padding: 6px 6px 12px; border-bottom: 1px solid rgba(255,255,255,0.06); margin-bottom: 12px; }
.auth-panel-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--auth-gradient); color: #041a16; display: grid; place-items: center; margin: 6px auto 8px; box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35); }
.auth-panel h3 { font-size: 1.35rem; color: #c7fff7; }
.auth-panel p { color: #9cc3ce; }

.auth-form { display: flex; flex-direction: column; gap: 12px; padding: 12px 6px 0; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; color: #d9f8f4; font-size: .95rem; }
.auth-form input { width: 100%; padding: 12px 12px; border-radius: 12px; border: 2px solid rgba(255,255,255,0.06); background: #0b1328; color: #eafffd; transition: border-color .2s ease, box-shadow .2s ease; }
.auth-form input:focus { outline: none; border-color: var(--auth-primary); box-shadow: 0 0 0 4px rgba(139,92,246,.18); }

.password-field { position: relative; display: flex; align-items: center; }
.password-field input { width: 100%; padding-right: 44px; }
.toggle-pass { position: absolute; right: 6px; background: transparent; border: 0; color: #a9c6d1; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.toggle-pass:hover { color: #eafffd; }

.full { width: 100%; }

.auth-error { color: #ff6b6b; min-height: 20px; font-size: .9rem; }

.password-rules { background: #0b142c; border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 12px 14px; color: #98c0cb; }
.password-rules ul { margin-left: 18px; margin-top: 6px; display: grid; gap: 4px; }
/* default rule color */
.password-rules li { color: #98c0cb; transition: color .2s ease; }
/* satisfied rule turns violet (matches site accent) */
.password-rules li.rule-ok { color: var(--secondary-color); }

.hidden { display: none; }

/* Navbar small logout button */
.nav-logout {
    margin-left: 10px;
    padding: 0.45rem 1rem;
    border-radius: 24px;
    background: var(--auth-gradient);
    color: #041a16;
    border: 0;
    font-weight: 700;
    cursor: pointer;
}
 .nav-logout:hover { filter: brightness(1.05); }
