/* =============================================
   Modern Resume - Main Stylesheet
   Author: Nadeem Khan
   ============================================= */

/* CSS Variables */
:root {
    --primary-dark: #1a1a2e;
    --primary-light: #16213e;
    --accent-blue: #0f3460;
    --accent-cyan: #00d9ff;
    --accent-purple: #7b2cbf;
    --text-primary: #eaeaea;
    --text-secondary: #a0a0a0;
    --bg-dark: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #252542;
    --gradient-primary: linear-gradient(135deg, #00d9ff 0%, #7b2cbf 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.4);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

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

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(123, 44, 191, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 217, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(15, 52, 96, 0.2) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.3;
}

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

/* =============================================
   Header Section
   ============================================= */
.header {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--gradient-dark);
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        conic-gradient(from 0deg at 50% 50%, 
            transparent 0deg, 
            rgba(0, 217, 255, 0.03) 60deg, 
            transparent 120deg,
            rgba(123, 44, 191, 0.03) 180deg,
            transparent 240deg,
            rgba(0, 217, 255, 0.03) 300deg,
            transparent 360deg);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.header-content {
    text-align: center;
    z-index: 1;
    padding: 20px;
}

.profile-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(0, 217, 255, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

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

.profile-img i {
    font-size: 80px;
    color: white;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 60px rgba(0, 217, 255, 0.4); }
    50% { box-shadow: 0 0 80px rgba(0, 217, 255, 0.6); }
}

.profile-ring {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid transparent;
    border-radius: 50%;
    border-top-color: var(--accent-cyan);
    animation: spin 3s linear infinite;
}

.profile-ring::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-bottom-color: var(--accent-purple);
    animation: spin 2s linear infinite reverse;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.header h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header .title {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-weight: 400;
}

.header .subtitle {
    font-size: 1rem;
    color: var(--accent-cyan);
    margin-bottom: 30px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.social-links a {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    font-size: 1.3rem;
    color: var(--text-primary);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    background: var(--gradient-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.3);
    border-color: transparent;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    display: block;
    width: 25px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 2px;
    animation: scroll-dot 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

@keyframes scroll-dot {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

/* =============================================
   Main Container
   ============================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
}

/* =============================================
   Section Styles
   ============================================= */
.section {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 50px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.section:nth-child(1) { animation-delay: 0.1s; }
.section:nth-child(2) { animation-delay: 0.2s; }
.section:nth-child(3) { animation-delay: 0.3s; }
.section:nth-child(4) { animation-delay: 0.4s; }
.section:nth-child(5) { animation-delay: 0.5s; }
.section:nth-child(6) { animation-delay: 0.6s; }

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

.section:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(0, 217, 255, 0.2);
}

.section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* =============================================
   About Section
   ============================================= */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.contact-info {
    background: rgba(255, 255, 255, 0.03);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-info h3 {
    margin-bottom: 25px;
    font-size: 1.3rem;
    color: var(--accent-cyan);
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    transition: var(--transition);
}

.contact-item:hover {
    background: rgba(0, 217, 255, 0.1);
    transform: translateX(5px);
}

.contact-item i {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1rem;
}

.contact-item span {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* =============================================
   Skills Section
   ============================================= */
.skill-icon {
    width: 28px;
    height: 28px;
    margin-right: 12px;
    object-fit: contain;
    border-radius: 5px;
}

.skill-list li {
    padding: 12px 0;
}

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

.skill-category {
    background: rgba(255, 255, 255, 0.03);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.skill-category:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 217, 255, 0.2);
}

.skill-category h3 {
    color: var(--accent-cyan);
    margin-bottom: 20px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-category h3 i {
    font-size: 1.2rem;
}

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

.skill-list li {
    padding: 10px 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.skill-list li::before {
    content: '▹';
    color: var(--accent-cyan);
    margin-right: 12px;
    font-size: 1.2rem;
}

/* =============================================
   Experience Section
   ============================================= */
.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--gradient-primary);
}

.timeline-item {
    position: relative;
    margin-bottom: 35px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.timeline-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 217, 255, 0.2);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -44px;
    top: 30px;
    width: 12px;
    height: 12px;
    background: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
}

.timeline-item h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.timeline-item .company {
    color: var(--accent-cyan);
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 1rem;
}

.timeline-item .period {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(0, 217, 255, 0.1);
    color: var(--accent-cyan);
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.timeline-item ul {
    list-style: none;
    margin-top: 15px;
}

.timeline-item ul li {
    padding: 6px 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 20px;
}

.timeline-item ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-purple);
}

/* =============================================
   Education Section
   ============================================= */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.education-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.education-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.education-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 217, 255, 0.2);
}

.education-card h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.education-card .year {
    display: inline-block;
    padding: 6px 18px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.education-card p {
    color: var(--text-secondary);
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.education-card .percentage {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-top: 15px;
}

/* =============================================
   Portfolio Section
   ============================================= */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.portfolio-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    border-color: var(--accent-cyan);
    box-shadow: 0 20px 40px rgba(0, 217, 255, 0.1);
}

.portfolio-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

.portfolio-item i {
    font-size: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.portfolio-item h4 {
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.portfolio-item span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* =============================================
   Knowledge Section
   ============================================= */
.knowledge-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.knowledge-tag {
    padding: 12px 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.knowledge-tag:hover {
    background: var(--gradient-primary);
    color: white;
    transform: scale(1.05);
    border-color: transparent;
}

/* =============================================
   Contact Form Section
   ============================================= */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-form {
    background: rgba(255, 255, 255, 0.03);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: rgba(0, 217, 255, 0.05);
}

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

.btn-submit {
    width: 100%;
    padding: 15px 30px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 217, 255, 0.3);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form Messages */
.form-message {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
}

.form-message.success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid #00ff88;
    color: #00ff88;
    display: block;
}

.form-message.error {
    background: rgba(255, 0, 68, 0.1);
    border: 1px solid #ff0044;
    color: #ff0044;
    display: block;
}

.contact-info-form h3 {
    color: var(--accent-cyan);
    margin-bottom: 25px;
    font-size: 1.3rem;
}

/* =============================================
   Footer
   ============================================= */
footer {
    background: var(--bg-card);
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

footer a {
    color: var(--accent-cyan);
    transition: var(--transition);
}

footer a:hover {
    color: var(--accent-purple);
}

/* =============================================
   Sidebar Navigation
   ============================================= */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 80px;
    height: 100vh;
    background: var(--bg-card);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 1000;
    transition: var(--transition);
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 10px;
    color: var(--text-secondary);
    transition: var(--transition);
    border-left: 3px solid transparent;
    text-decoration: none;
}

.sidebar-menu li a i {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.sidebar-menu li a span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    color: var(--accent-cyan);
    background: rgba(0, 217, 255, 0.1);
    border-left-color: var(--accent-cyan);
}

/* =============================================
   Main Content Area
   ============================================= */
.main-content {
    margin-left: 80px;
    min-height: 100vh;
}

.main-content .container {
    max-width: 1000px;
}

/* =============================================
   Footer
   ============================================= */
.main-content footer {
    background: var(--bg-card);
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.main-content footer p {
    color: var(--text-secondary);
}

.main-content footer a {
    color: var(--accent-cyan);
    transition: var(--transition);
}

.main-content footer a:hover {
    color: var(--accent-purple);
}

/* =============================================
   Responsive Design
   ============================================= */
@media (max-width: 992px) {
    .about-content,
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 2.5rem;
    }

    .section {
        padding: 30px;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        bottom: 0;
        top: auto;
        flex-direction: row;
        border-right: none;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }

    .sidebar-menu {
        display: flex;
        width: 100%;
        justify-content: space-around;
    }

    .sidebar-menu li a {
        flex-direction: row;
        padding: 15px;
        gap: 10px;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .sidebar-menu li a i {
        margin-bottom: 0;
    }

    .sidebar-menu li a span {
        font-size: 0.8rem;
    }

    .sidebar-menu li a:hover,
    .sidebar-menu li a.active {
        border-left-color: transparent;
        border-bottom-color: var(--accent-cyan);
    }

    .main-content {
        margin-left: 0;
        margin-bottom: 70px;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .header .title {
        font-size: 1.2rem;
    }

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

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

    .timeline {
        padding-left: 25px;
    }

    .timeline-item::before {
        left: -32px;
    }
}
