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

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #0ea5e9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --text-very-light: #f8fafc;
    --bg-primary: #ffffff66;
    --bg-secondary: #f8fafc66;
    --bg-dark: #0f172a66;
    --border-color: #e2e8f0;
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #bb5cf6 100%, #f65ce9 100%);
    --gradient-1-background: linear-gradient(135deg, #4e51ec 0%, #d75cf6 100%, #f65cb1 100%);
    --gradient-1-dark: linear-gradient(135deg, #f16387 0%, #f65ce9 100%);
    --gradient-2: linear-gradient(135deg, #0ea5e9 0%, #bcbeff 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    /* iOS Safe Area Support */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    /* height: 100svh; */

    /* padding-top: constant(safe-area-inset-top); Fallback for older iOS versions */
    /* padding-top: env(safe-area-inset-top); */


    background: var(--gradient-1);
    animation: gradient 10s ease infinite;
    background-size: 400% 400%;
    background-attachment: fixed;
}

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

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

.section {
    padding: 6rem 0;
}

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

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-1);
    border-radius: 2px;
}

/* Navigation */
.navbar {
    position: sticky;
    top: 5px;
    width: calc(100% - 10px);
    background: rgba(255, 255, 255, 0);
    color: var(--text-primary);
    backdrop-filter: blur(5px);
    /* box-shadow: var(--shadow-sm); */
    z-index: 1000;
    border: 1px solid transparent;
    margin: 0 5px;
    border-radius: 10px;
    /* iOS Safe Area Support */
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);



    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;

    transition: border 1s ease, background 1s ease, box-shadow 1s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: rgba(245, 245, 245, 0.6);
}

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


.navbar .nav-brand .logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: white;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    text-decoration-line: none;
    color: var(--text-very-light);

    transition: background 1s ease;
}


.navbar.scrolled .nav-brand .logo {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

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

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

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

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

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

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

.navbar.scrolled .hamburger span {
    background: var(--text-primary);
}

/* Hero Section */
.hero {
    margin-top: calc(-70px);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    /* iOS Safe Area Support - ensure content is properly positioned */
    padding-top: env(safe-area-inset-top);
}

.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.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.3) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    max-width: 900px;
    padding: 2rem;
}

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

.hero-subtitle {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    opacity: 0.95;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

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

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    position: relative;
}

.mouse::before {
    content: '';
    width: 4px;
    height: 8px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

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

/* Animations */
.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay-1 {
    animation: fadeIn 1s ease-out 0.2s backwards;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 1s ease-out 0.4s backwards;
}

.animate-fade-in-delay-3 {
    animation: fadeIn 1s ease-out 0.6s backwards;
}

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

/* About Section */
.about {
    background: var(--bg-primary);
    padding: 6rem 0;
    position: relative;
}

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

.about-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.about-text .lead {
    font-size: 1.375rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1rem;
}

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

.stat-card {
    text-align: center;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    transition: all 0.3s ease;
}

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

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Skills Section */
.skills {
    background: var(--bg-secondary);
}

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

.skill-category {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.skill-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.skill-category h3 {
    font-size: 1.375rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.skill-category li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.skill-category li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 600;
}

/* Experience Section */
.experience {
    background: var(--bg-primary);
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 4px solid var(--bg-primary);
    box-shadow: 0 0 0 4px var(--border-color);
}

.timeline-content {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

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

.timeline-date {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

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

.timeline-content h4 {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 1rem;
}

.timeline-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

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

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

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

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

.project-card {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    transition: border-left 0.3s ease;
    display: flex;
    flex-direction: column;
    border-left: 4px solid var(--bg-primary);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-left: 4px solid var(--primary-color);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    flex: 1;
}

.project-type {
    background: var(--gradient-1);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    flex: 1;
}

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

.tech-tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
}

.project-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.metric {
    text-align: center;
}

.metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.metric-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

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

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

.contact-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

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

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.contact-method:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

.contact-icon {
    font-size: 1.5rem;
}

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

.form-group {
    display: flex;
    flex-direction: column;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

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

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

/* Footer */
.footer {
    background: var(--bg-dark);
    color: white;
    text-align: center;
    padding: 2rem;
    /* iOS Safe Area Support - account for home indicator */
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
}

.footer p {
    margin: 0.5rem 0;
    opacity: 0.8;
}

.footer-tagline {
    font-style: italic;
    font-size: 0.875rem;
}

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

    .nav-menu {
        position: absolute;
        /* left: calc(-100% - 10px); */
        left: -10px;
        top: calc(75px);
        flex-direction: column;
        background: rgba(255, 255, 255, 1);
        color: var(--text-primary);
        backdrop-filter: blur(20px);

        border-radius: 10px;
        width: 100%;
        text-align: center;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;

        /* transition */
        transform: translateX(-100%);
        transition: transform 0.5s ease;
    }

    .nav-menu.active {
        transform: translateX(0);
        left: 0;
    }

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

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

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

    .hero-description {
        font-size: 1rem;
    }

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

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

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

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

    .timeline::before {
        left: 10px;
    }

    .timeline-item {
        padding-left: 50px;
    }

    .timeline-dot {
        left: 1px;
    }

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

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

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

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

    .section {
        padding: 4rem 0;
    }
}

