* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --gradient-primary: linear-gradient(135deg, #6b0099 0%, #a020d0 25%, #d040a0 50%, #f06070 75%, #ff8040 100%);
    --gradient-subtle: linear-gradient(135deg, #8b00b3 0%, #d040a0 50%, #ffa020 100%);
    --accent-purple: #a020d0;
    --accent-orange: #ff8040;
    --bg-dark: #1a1a1e;
    --bg-darker: #131316;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-light: rgba(255, 255, 255, 0.5);
    --border-light: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/** Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 26, 30, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

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

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

.logo {
    font-family: 'Style Script', cursive;
    font-size: 1.8rem;
    font-weight: 400;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

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

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

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

/** Mobile menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/** Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 4rem;
    position: relative;
    background: linear-gradient(180deg, var(--bg-darker) 0%, var(--bg-dark) 50%, var(--bg-darker) 100%);
}

.hero-content {
    max-width: 900px;
    width: 100%;
    text-align: center;
}

.hero-name {
    font-family: 'Style Script', cursive;
    font-size: clamp(4rem, 12vw, 8rem);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 2rem;
    padding: 0.3em 0;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease;
    filter: drop-shadow(0 2px 20px rgba(160, 32, 208, 0.3));
}

.hero-text p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 14px rgba(160, 32, 208, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(160, 32, 208, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-light);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    border-color: var(--accent-purple);
    background: rgba(160, 32, 208, 0.1);
}

/** Section styles */
section {
    padding: 12rem 2rem;
}

section#home {
    padding: 4rem 2rem;
}

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

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
    background: var(--gradient-subtle);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.125rem;
}

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

.about-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.stat-card {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    text-align: center;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-lg);
    border-color: rgba(160, 32, 208, 0.3);
}

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

.stat-number.infinity {
    font-size: 4rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.3;
}

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

.skills-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    transition: all 0.3s ease;
    text-align: center;
}

.skill-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(160, 32, 208, 0.3);
}

.skill-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.skill-icon svg {
    width: 80px;
    height: 80px;
    stroke-width: 1.5;
    filter: drop-shadow(0 2px 10px rgba(160, 32, 208, 0.3));
    transition: all 0.3s ease;
}

.skill-card:hover .skill-icon svg {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 20px rgba(160, 32, 208, 0.5));
}

.skill-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.skill-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/** Work History */
.work {
    background: var(--bg-dark);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

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

.timeline-left,
.timeline-right {
    width: calc(50% - 2rem);
}

.timeline-left {
    text-align: right;
    padding-right: 2rem;
}

.timeline-right {
    padding-left: 2rem;
}

.timeline-item:nth-child(even) .timeline-left {
    order: 2;
    text-align: left;
    padding-left: 2rem;
    padding-right: 0;
}

.timeline-item:nth-child(even) .timeline-right {
    order: 1;
    text-align: right;
    padding-right: 2rem;
    padding-left: 0;
}

.job-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.company-name {
    background: var(--gradient-subtle);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 0.95rem;
}

.job-date {
    color: var(--text-light);
    font-size: 0.875rem;
}

.download-resume {
    text-align: center;
    margin-top: 3rem;
}

/** Portfolio Section */
.portfolio {
    position: relative;
    background: var(--bg-darker);
}

.portfolio-header {
    text-align: center;
    margin-bottom: 3rem;
}

.portfolio-callout {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    font-size: 0.875rem;
    margin-top: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

.portfolio-item {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--border-light);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    background: var(--bg-card-hover);
}

.portfolio-image {
    width: 100%;
    height: 200px;
    background: var(--gradient-subtle);
    opacity: 0.1;
    position: relative;
}

.portfolio-coming-soon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    color: var(--text-secondary);
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-content h3 {
    margin-bottom: 0.5rem;
    background: var(--gradient-subtle);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.portfolio-content p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/** Contact Section */
.contact {
    background: var(--bg-dark);
    padding-bottom: 2rem;
}

.contact-container {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(160, 32, 208, 0.5);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(160, 32, 208, 0.1);
}

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

.form-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    display: none;
}

.form-status.success {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
    display: block;
}

.form-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    display: block;
}

/** Social Section */
.social-section {
    margin-top: 4rem;
    margin-bottom: 4rem;
    text-align: center;
}

.social-section h3 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    background: var(--gradient-subtle);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.social-links-inline {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.social-link-gradient {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 30px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
    background: linear-gradient(var(--bg-dark), var(--bg-dark)) padding-box,
                var(--gradient-primary) border-box;
}

.social-link-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(160, 32, 208, 0.3);
    background: linear-gradient(rgba(160, 32, 208, 0.1), rgba(160, 32, 208, 0.1)) padding-box,
                var(--gradient-primary) border-box;
}

.social-link-gradient svg {
    width: 24px;
    height: 24px;
    stroke: url(#social-gradient);
    fill: none;
}

.social-link-gradient:first-child svg {
    fill: url(#social-gradient);
    stroke: none;
}

/** Footer */
footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border-light);
    color: var(--text-secondary);
    padding: 2rem;
    text-align: center;
    min-height: 100px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    margin: 0;
    font-size: 0.875rem;
}

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

/** Responsive Design */
@media (max-width: 968px) {
    /* Contact form already stacks vertically by default */
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(26, 26, 30, 0.98);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border-light);
        box-shadow: var(--shadow-md);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        padding: 4rem 1rem 3rem;
    }

    .hero-name {
        font-size: clamp(3rem, 15vw, 5rem);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 300px;
    }

    .stat-card {
        padding: 1.5rem 1rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    .skills-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

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

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

    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 60px;
    }

    .timeline-dot {
        left: 20px;
    }

    .timeline-left,
    .timeline-right {
        width: 100%;
        text-align: left !important;
        padding: 0 !important;
    }

    .timeline-item:nth-child(even) .timeline-left,
    .timeline-item:nth-child(even) .timeline-right {
        order: unset;
    }

    .job-date {
        margin-top: 0.5rem;
    }

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

    .contact-form {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 3rem;
    }

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

    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 250px;
    }

    .stat-card {
        aspect-ratio: auto;
        padding: 1.5rem;
    }

    .skill-card {
        padding: 1.5rem;
    }

    .portfolio-item {
        margin: 0 -1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

/** Smooth scroll padding for fixed nav */
section {
    scroll-margin-top: 80px;
}

/** Ensure touch scrolling works smoothly on iOS */
@supports (-webkit-touch-callout: none) {
    body {
        -webkit-overflow-scrolling: touch;
    }
}