/* ===== CSS Variables ===== */
:root {
    --primary-color: #3b82f6;
    --secondary-color: #10b981;
    --dark-bg: #0f172a;
    --card-bg: #1e293b;
    --text-light: #f1f5f9;
    --text-gray: #94a3b8;
    --gradient: linear-gradient(135deg, #3b82f6, #10b981);
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
}

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

ul {
    list-style: none;
}

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

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 0.7rem 0;
    background: rgba(15, 23, 42, 0.98);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-light);
    transition: color 0.3s;
    font-weight: 500;
    position: relative;
}

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

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

.nav-links a:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-light);
    z-index: 1001;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    animation: slideInLeft 0.8s ease-out;
}

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

.hero-content h2 {
    font-size: 1.5rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
    animation: slideInLeft 0.8s ease-out 0.2s backwards;
}

.hero-content p {
    color: var(--text-gray);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 500px;
    animation: slideInLeft 0.8s ease-out 0.4s backwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    animation: slideInLeft 0.8s ease-out 0.6s backwards;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

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

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    animation: slideInLeft 0.8s ease-out 0.8s backwards;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.hero-image {
    display: flex;
    justify-content: center;
    animation: fadeInRight 1s ease-out;
}

.image-frame {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: white;
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3);
}

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

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Section Title ===== */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gradient);
    margin: 10px auto 0;
    border-radius: 2px;
}

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

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

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

.stat {
    text-align: center;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stat h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat p {
    color: var(--text-gray);
}

/* ===== Skills Section ===== */
.skills {
    padding: 6rem 0;
    background: var(--card-bg);
}

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

.skill-card {
    background: var(--dark-bg);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.skill-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skill-card h3 {
    margin-bottom: 1rem;
}

.skill-card ul li {
    color: var(--text-gray);
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: color 0.3s, padding-left 0.3s;
}

.skill-card ul li:last-child {
    border-bottom: none;
}

.skill-card ul li:hover {
    color: var(--primary-color);
    padding-left: 10px;
}

/* ===== Projects Section ===== */
.projects {
    padding: 6rem 0;
}

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

.project-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-image {
    height: 200px;
    background: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--primary-color);
    position: relative;
    overflow: hidden;
}

.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover .project-image::before {
    opacity: 0.1;
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.project-info p {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

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

.project-tags span {
    padding: 0.3rem 0.8rem;
    background: var(--dark-bg);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s;
}

.project-tags span:hover {
    background: var(--primary-color);
    color: white;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s;
}

.project-link:hover {
    gap: 0.8rem;
}

.project-link i {
    transition: transform 0.3s;
}

.project-link:hover i {
    transform: translateX(5px);
}

/* ===== Contact Section ===== */
.contact {
    padding: 6rem 0;
    background: var(--card-bg);
}

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

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.contact-info > p {
    color: var(--text-gray);
    margin-bottom: 2rem;
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-gray);
}

.contact-item i {
    width: 45px;
    height: 45px;
    background: var(--dark-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: all 0.3s;
}

.contact-item:hover i {
    background: var(--primary-color);
    color: white;
}

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

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    background: var(--dark-bg);
    border: 2px solid transparent;
    border-radius: 8px;
    color: var(--text-light);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

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

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

.contact-form .btn {
    align-self: flex-start;
    padding: 1rem 2.5rem;
}

/* ===== Footer ===== */
footer {
    background: var(--dark-bg);
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

footer p {
    color: var(--text-gray);
}

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

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    transition: all 0.3s;
}

.footer-social a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* ===== Mobile Responsive ===== */
@media (max-width: 992px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        margin: 0 auto 2rem;
    }

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

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

    .hero-image {
        order: -1;
    }

    .image-frame {
        width: 250px;
        height: 250px;
        font-size: 5rem;
    }

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

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--card-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.3s ease;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    }

    .nav-links.active {
        right: 0;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active i::before {
        content: '\f00d';
    }

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

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

    footer .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content h2 {
        font-size: 1.2rem;
    }

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

    .btn {
        width: 100%;
        text-align: center;
    }

    .image-frame {
        width: 200px;
        height: 200px;
        font-size: 4rem;
    }

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

    .skill-card {
        padding: 1.5rem;
    }
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* ===== Selection Styling ===== */
::selection {
    background: var(--primary-color);
    color: white;
}

/* ===== Success Message Display ===== */
.message-display {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    animation: fadeInUp 0.5s ease;
}

.success-message {
    text-align: center;
}

.success-message i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.success-message p {
    margin: 0.5rem 0;
    color: var(--text-light);
}

.success-message small {
    color: var(--text-gray);
}

/* ===== Admin Panel ===== */
.admin-panel {
    padding: 6rem 0;
    min-height: 100vh;
}

.admin-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: flex-end;
}

.btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

#adminPasswordSection {
    max-width: 400px;
    margin: 2rem auto;
    text-align: center;
}

#adminPasswordSection input {
    padding: 0.8rem 1rem;
    background: var(--card-bg);
    border: 2px solid transparent;
    border-radius: 8px;
    color: var(--text-light);
    font-size: 1rem;
    width: 100%;
    margin-bottom: 1rem;
}

#adminPasswordSection input:focus {
    outline: none;
    border-color: var(--primary-color);
}

#adminPasswordSection .hint {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.messages-list {
    margin-top: 2rem;
}

.messages-list h3 {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.no-messages {
    text-align: center;
    color: var(--text-gray);
    padding: 2rem;
}

.message-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.message-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.message-header strong {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.message-time {
    color: var(--text-gray);
    font-size: 0.85rem;
}

.message-email {
    color: var(--secondary-color);
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.message-text {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--dark-bg);
    border-radius: 8px;
}

.delete-msg-btn {
    background: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.delete-msg-btn:hover {
    background: #ef4444;
    color: white;
}

/* ===== Admin Access Button ===== */
.admin-access-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--text-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s;
    z-index: 999;
    /* Hidden by default - visible only on hover in top-left corner area */
    opacity: 0;
    pointer-events: none;
}

/* Show admin button when hovering over a specific trigger area */
.admin-access-btn.visible {
    opacity: 0.3;
    pointer-events: auto;
}

.admin-access-btn:hover {
    opacity: 1 !important;
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

