/* Root Variables */
:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --dark-bg: #0f172a;
    --light-bg: #1e293b;
    --card-bg: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --success-color: #10b981;
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 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 2rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow);
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.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: width 0.3s;
}

.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: flex-start;
    justify-content: center;
    padding-top: 150px;
    padding-bottom: 80px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.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% 50%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    z-index: 0;
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    margin: 50px auto 0;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
    position: relative;
    z-index: 5;
}

.hero-text {
    padding: 2rem 0;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

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

.hero-subtitle {
    font-size: 1.8rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 600;
    line-height: 1.3;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.8;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    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;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px 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(-2px);
}

.btn-download {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-download:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

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

.social-links a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.25rem;
    transition: var(--transition);
    border: 2px solid transparent;
}

.social-links a:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.hero-image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 15;
    margin-top: 2rem;
}

.floating-card {
    width: 350px;
    height: 350px;
    background: var(--gradient);
    border-radius: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10rem;
    color: white;
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 15;
    overflow: hidden;
}

.hero-profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2rem;
}

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

/* Section Styles */
section {
    padding: 6rem 0;
    position: relative;
    z-index: 1;
}

section:first-of-type {
    padding-top: 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

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

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

.about-content {
    display: grid;
    gap: 3rem;
}

.about-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

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

.stat-item {
    text-align: center;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 1rem;
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.stat-item h3 {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--text-secondary);
    font-weight: 500;
}

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

.highlight-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    transition: var(--transition);
}

.highlight-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

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

.highlight-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.highlight-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Experience Section */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--card-bg);
}

.timeline-item {
    display: flex;
    margin-bottom: 3rem;
    position: relative;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gradient);
    z-index: 1;
    box-shadow: 0 0 0 4px var(--dark-bg);
}

.timeline-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    width: calc(50% - 40px);
    margin-left: auto;
    transition: var(--transition);
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 0;
    margin-right: auto;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

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

.timeline-content h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.timeline-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.timeline-content ul {
    list-style: none;
    margin-bottom: 1rem;
}

.timeline-content ul li {
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    position: relative;
    color: var(--text-secondary);
}

.timeline-content ul li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tags span {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
    padding: 0.375rem 0.875rem;
    border-radius: 0.375rem;
    font-size: 0.85rem;
    font-weight: 500;
}

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

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

.project-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.project-icon {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin-bottom: 1.5rem;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-card > p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.project-features {
    list-style: none;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-features li {
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.project-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.badge {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-inactive {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-muted);
}

/* Skills Section */
.skills-grid {
    display: grid;
    gap: 2rem;
}

.skill-category {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.skill-category i {
    color: var(--primary-color);
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item span {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.skill-bar {
    height: 10px;
    background: var(--light-bg);
    border-radius: 5px;
    overflow: hidden;
}

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

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tags span {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: var(--transition);
}

.skill-tags span:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Contact Section */
.contact {
    background: var(--light-bg);
}

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

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

.contact-info > p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.contact-item i {
    width: 50px;
    height: 50px;
    border-radius: 0.5rem;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

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

.contact-item a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--primary-color);
}

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

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

.contact-social a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.25rem;
    transition: var(--transition);
}

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

.contact-form-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
}

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

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

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

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

.contact-form button {
    width: 100%;
}

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

.footer p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.footer i {
    color: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--light-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem;
        box-shadow: var(--shadow);
        z-index: 9998;
    }

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

    .hero {
        padding-top: 130px;
        padding-bottom: 60px;
        min-height: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 0 1.5rem;
    }

    .hero-text {
        text-align: center;
        padding: 1rem 0;
    }

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

    .hero-subtitle {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 2rem;
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
        gap: 1rem;
    }

    .social-links {
        justify-content: center;
        padding-top: 0.5rem;
    }

    .hero-image {
        order: -1;
        padding: 2rem 1rem;
        z-index: 15;
        margin-top: 3rem;
    }

    .floating-card {
        width: 250px;
        height: 250px;
        font-size: 6rem;
        z-index: 15;
    }

    .hero-profile-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 2rem;
    }

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

    .timeline::before {
        left: 0;
    }

    .timeline-dot {
        left: 0;
    }

    .timeline-content {
        width: 100%;
        margin-left: 40px !important;
    }

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

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

    .container {
        padding: 0 1.5rem;
    }

    section {
        padding: 4rem 0;
    }
}

@media (max-width: 480px) {
    .hero {
        padding-top: 120px;
        padding-bottom: 50px;
    }

    .hero-content {
        padding: 0 1rem;
        gap: 2rem;
    }

    .hero-text {
        padding: 0.5rem 0;
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .hero-buttons {
        gap: 0.75rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .hero-image {
        margin-top: 2rem;
    }

    .floating-card {
        width: 200px;
        height: 200px;
        font-size: 5rem;
        z-index: 15;
    }

    .hero-profile-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 2rem;
    }

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

    .container {
        padding: 0 1rem;
    }

    section {
        padding: 3rem 0;
    }
}

/* Force top spacing on mobile devices - iPhone Fix */
@media (max-width: 768px) {
    .hero {
        padding-top: 130px !important;
        margin-top: 0 !important;
    }
}

@media (max-width: 480px) {
    .hero {
        padding-top: 120px !important;
        margin-top: 0 !important;
    }
}

/* iOS Safe Area for notched devices */
@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        .hero {
            padding-top: max(130px, env(safe-area-inset-top) + 110px) !important;
        }
    }
    
    @media (max-width: 480px) {
        .hero {
            padding-top: max(120px, env(safe-area-inset-top) + 100px) !important;
        }
    }
}

