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

html {
    scroll-behavior: smooth;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #a78bfa;
    --dark-bg: #1a1a2e;
    --card-bg: #16213e;
    --text-light: #e8e8e8;
    --text-gray: #a0a0a0;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(-45deg, #1a252f, #2d3e50, #312e81, #1e293b);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
    color: var(--text-light);
    line-height: 1.6;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
    text-decoration: none;
}

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

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

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

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

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

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

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Sections */
section {
    min-height: 100vh;
    padding: 100px 2rem 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* Hero Section */
#home {
    background: transparent;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

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

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

.profile-picture {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid transparent;
    background: var(--gradient-2);
    padding: 5px;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-picture:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 50px rgba(99, 102, 241, 0.7);
}

.profile-placeholder {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: white;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 5px solid rgba(255, 255, 255, 0.1);
}

.profile-placeholder:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 50px rgba(99, 102, 241, 0.7);
}

.hero-text {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

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

.cta-button {
    display: inline-block;
    background: var(--gradient-2);
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.6);
}

/* Section Title */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* About Section */
.about-content {
    display: flex;
    gap: 3rem;
    align-items: center;
    flex-wrap: wrap;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

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

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

.info-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.info-box {
    background: rgba(99, 102, 241, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.skill-card {
    background: rgba(99, 102, 241, 0.1);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

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

.skill-card h3 {
    color: var(--text-light);
    font-size: 1.2rem;
}

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

.project-card {
    background: rgba(22, 33, 62, 0.8);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

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

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

.project-content {
    padding: 2rem;
}

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

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

.project-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

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

/* Contact Section - Contact Manager */
#contact {
    padding: 100px 2rem 50px;
}

.contact-manager-container {
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(22, 33, 62, 0.9);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.contact-header {
    background: var(--gradient-1);
    padding: 2rem;
    text-align: center;
}

.contact-header h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.contact-header p {
    font-size: 1rem;
    opacity: 0.9;
}

.form-container {
    padding: 2rem;
    background: rgba(26, 26, 46, 0.5);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    background: rgba(26, 26, 46, 0.7);
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.error-message {
    color: #ff6b6b;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: var(--gradient-2);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.6);
}

.search-container {
    padding: 1.5rem 2rem;
    background: rgba(26, 26, 46, 0.3);
    border-top: 1px solid rgba(99, 102, 241, 0.2);
}

.search-box {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    background: rgba(26, 26, 46, 0.7);
    color: var(--text-light);
    font-size: 1rem;
}

.search-box:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contacts-container {
    padding: 2rem;
}

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

.contacts-header h4 {
    font-size: 1.3rem;
    color: var(--accent-color);
}

.contact-count {
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.contact-list {
    list-style: none;
}

.contact-item {
    background: rgba(99, 102, 241, 0.1);
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.contact-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

.contact-info {
    margin-bottom: 1rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.contact-info strong {
    color: var(--accent-color);
    display: inline-block;
    min-width: 80px;
}

.contact-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit,
.btn-delete {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-edit {
    background: #3498db;
    color: white;
}

.btn-edit:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

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

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-gray);
}

.empty-state p {
    font-size: 1.1rem;
}

/* Footer */
footer {
    background: rgba(26, 26, 46, 0.95);
    padding: 3rem 2rem;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    list-style: none;
    margin-bottom: 2rem;
}

.social-links a {
    font-size: 2rem;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.2);
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(26, 26, 46, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
        gap: 1rem;
    }

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

    .hamburger {
        display: flex;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

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

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

    .contact-actions {
        flex-direction: column;
    }

    .btn-edit,
    .btn-delete {
        width: 100%;
    }
}
