:root {
    --ios-background: #0F0F1A;
    --ios-card: #1C1C2E;
    --ios-primary: #0A84FF;
    --ios-secondary: #FF3B77;
    --ios-accent: #7E3BFF;
    --ios-text: #FFFFFF;
    --ios-secondary-text: #98989F;
    --ios-border: rgba(255, 255, 255, 0.1);
    --nav-height: 60px;
    --gradient-primary: linear-gradient(135deg, var(--ios-primary), var(--ios-accent));
    --gradient-secondary: linear-gradient(135deg, var(--ios-secondary), var(--ios-accent));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 20px);
}

body {
    background: linear-gradient(135deg, var(--ios-background), #1A1A2E);
    color: var(--ios-text);
    line-height: 1.5;
    padding-top: var(--nav-height);
}

/* Navigation Styles */
.ios-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: linear-gradient(to right, rgba(28, 28, 46, 0.8), rgba(15, 15, 26, 0.8));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--ios-border);
}

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

.nav-logo {
    height: 40px;
    width: 40px;
    overflow: hidden;
    border-radius: 50%;
    border: 2px solid transparent;
    background: var(--gradient-primary);
    padding: 2px;
    transition: transform 0.3s ease;
}

.nav-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.nav-logo:hover {
    transform: scale(1.1);
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

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

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

.nav-links a.active {
    color: var(--ios-primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--ios-primary);
    border-radius: 1px;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 20px;
    flex-direction: column;
    justify-content: space-between;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--ios-text);
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(28, 28, 30, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 20px;
        flex-direction: column;
        gap: 20px;
        text-align: center;
        transform: translateY(-100%);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
        pointer-events: none;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-logo {
        height: 35px;
        width: 35px;
    }
}

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

/* Header Styles */
.ios-header {
    text-align: center;
    padding: 40px 20px;
    animation: fadeDown 0.8s ease-out;
}

.ios-header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.subtitle {
    color: var(--ios-secondary-text);
    font-size: 1.2rem;
}

/* Card Styles */
.ios-card {
    background: linear-gradient(145deg, var(--ios-card), rgba(28, 28, 46, 0.8));
    border-radius: 16px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 8px 32px rgba(10, 132, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ios-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(10, 132, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Stats Card */
.stats-card {
    display: flex;
    justify-content: space-around;
    text-align: center;
    padding: 30px;
}

.stat-item h3 {
    font-size: 2rem;
    color: var(--ios-primary);
    margin-bottom: 5px;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.service-card {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0.05;
    transition: opacity 0.3s ease;
}

.service-card:hover::before {
    opacity: 0.1;
}

.service-icon {
    font-size: 2.5rem;
    color: var(--ios-primary);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.portfolio-image {
    height: 200px;
    background: var(--gradient-secondary);
    border-radius: 12px;
    margin-bottom: 15px;
}

/* Contact Section */
.contact-card {
    text-align: center;
}

.contact-info p {
    margin: 10px 0;
    color: var(--ios-secondary-text);
}

/* Section Styles */
.ios-section {
    margin: 40px 0;
    animation: fadeUp 0.8s ease-out;
}

.ios-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Animations */
@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 0;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    background: linear-gradient(rgba(15, 15, 26, 0.7), rgba(28, 28, 46, 0.8)),
                url('https://images.unsplash.com/photo-1557804506-669a67965ba0?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    padding: 40px;
    position: relative;
    z-index: 1;
}

/* Remove the previous ::before pseudo-element and add text shadow for better readability */
.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    background: linear-gradient(90deg, var(--ios-primary), #64D2FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeDown 0.8s ease-out;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.typewriter {
    font-size: 2rem;
    color: var(--ios-text);
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-description {
    font-size: 1.2rem;
    color: var(--ios-text);
    margin-bottom: 30px;
    animation: fadeUp 0.8s ease-out 0.3s backwards;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.hero-btn {
    padding: 15px 32px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 180px;
}

.hero-btn i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.hero-btn:hover i {
    transform: translateX(5px);
}

.hero-btn.primary {
    background: var(--gradient-primary);
    color: var(--ios-text);
    border: none;
    position: relative;
    z-index: 1;
}

.hero-btn.primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-secondary);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px;
    z-index: -1;
}

.hero-btn.primary:hover::before {
    opacity: 1;
}

.hero-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--ios-text);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.hero-btn.secondary::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    z-index: -1;
    border-radius: 18px;
}

@media (max-width: 768px) {
    .hero-content {
        padding: 30px 20px;
        margin: 0 15px;
    }

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

    .typewriter {
        font-size: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .hero-btn {
        width: 100%;
        padding: 12px 24px;
    }
}

/* About Section */
.about-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: center;
}

.about-image {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    aspect-ratio: 1;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    border: 3px solid transparent;
    background: var(--gradient-primary);
    background-clip: padding-box;
    position: relative;
    box-shadow: 0 0 30px rgba(10, 132, 255, 0.2);
}

.about-image::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: var(--gradient-primary);
    z-index: -1;
    border-radius: 23px;
}

.about-content h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--ios-primary);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.stat-item {
    background: linear-gradient(145deg, var(--ios-card), rgba(28, 28, 46, 0.9));
    border-radius: 20px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--ios-border);
    transition: all 0.3s ease;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.1;
    transition: opacity 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(10, 132, 255, 0.2);
}

.stat-item:hover::before {
    opacity: 0.2;
}

.stat-item i {
    font-size: 2.5rem;
    color: var(--ios-primary);
    margin-bottom: 15px;
    display: inline-block;
    transition: transform 0.3s ease;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-item:hover i {
    transform: scale(1.1);
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 10px 0;
}

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

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

.skill-card {
    padding: 30px;
}

.skill-icon {
    font-size: 2rem;
    color: var(--ios-primary);
    margin-bottom: 15px;
}

.skill-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 15px;
    overflow: hidden;
}

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

/* Contact Form */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.contact-info-card {
    padding: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--ios-primary);
    margin-right: 15px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-form-card {
    padding: 30px;
}

.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--ios-border);
    border-radius: 12px;
    color: var(--ios-text);
    font-size: 16px;
    transition: all 0.3s ease;
}

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

.form-group label {
    position: absolute;
    left: 12px;
    top: 12px;
    color: var(--ios-secondary-text);
    transition: all 0.3s ease;
    pointer-events: none;
}

.form-group input:focus,
.form-group textarea:focus {
    background: linear-gradient(145deg, rgba(28, 28, 46, 0.8), rgba(15, 15, 26, 0.8));
    border-color: transparent;
    background-clip: padding-box;
    position: relative;
}

.form-group input:focus::before,
.form-group textarea:focus::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: var(--gradient-primary);
    z-index: -1;
    border-radius: 13px;
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:valid + label,
.form-group textarea:valid + label {
    transform: translateY(-25px);
    font-size: 0.8rem;
    color: var(--ios-primary);
}

/* Responsive Updates */
@media (max-width: 768px) {
    .about-container,
    .contact-container {
        grid-template-columns: 1fr;
    }

    .about-image {
        max-width: 250px;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Animation for skill bars */
.skill-card.animate .skill-progress {
    animation: progressAnimation 1s ease-out forwards;
}

@keyframes progressAnimation {
    from { width: 0; }
    to { width: var(--progress); }
}

/* Animation for skill bars */
.skill-card.animate .skill-progress {
    animation: progressAnimation 1s ease-out forwards;
}

@keyframes progressAnimation {
    from { width: 0; }
    to { width: var(--progress); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        padding: 20px 40px;
    }

    .about-image {
        max-width: 350px;
    }
}

@media (max-width: 992px) {
    .about-image {
        max-width: 300px;
    }

    .about-content {
        text-align: center;
    }

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

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }

    .typewriter {
        font-size: 1.3rem;
    }

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

    .stat-item {
        padding: 20px;
    }

    .stat-item h3 {
        font-size: 2rem;
    }

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

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .hero-btn {
        width: 100%;
    }

    .nav-logo {
        height: 32px;
        width: 32px;
    }

    .about-image {
        max-width: 200px;
    }
}

/* Add smooth transitions for all interactive elements */
.ios-card,
.service-card,
.portfolio-card,
.skill-card,
.hero-btn,
.nav-links a {
    transition: all 0.3s ease-in-out;
}

/* Enhance form responsiveness */
.form-group input,
.form-group textarea {
    font-size: 16px; /* Prevents zoom on mobile */
    padding: 15px;
}

/* Improve button touch targets on mobile */
@media (max-width: 768px) {
    .hero-btn,
    .nav-links a,
    .form-group input,
    .form-group textarea {
        padding: 15px 20px;
        min-height: 44px; /* iOS minimum touch target size */
    }
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--ios-background);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: all 0.5s ease;
}

.preloader-finish {
    opacity: 0;
    visibility: hidden;
}

.loader {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-circle {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--ios-primary);
    animation: bounce 1.5s ease-in-out infinite;
}

.loader-circle:nth-child(1) {
    background: var(--ios-primary);
    animation-delay: 0s;
    transform: translate(-60px);
}

.loader-circle:nth-child(2) {
    background: var(--ios-secondary);
    animation-delay: 0.1s;
}

.loader-circle:nth-child(3) {
    background: var(--ios-accent);
    animation-delay: 0.2s;
    transform: translate(60px);
}

.loader-shadow {
    position: absolute;
    width: 50px;
    height: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    top: 70%;
    animation: shadow 1.5s ease-in-out infinite;
    filter: blur(5px);
}

.loader-shadow:nth-child(4) {
    animation-delay: 0s;
    transform: translate(-60px);
}

.loader-shadow:nth-child(5) {
    animation-delay: 0.1s;
}

.loader-shadow:nth-child(6) {
    animation-delay: 0.2s;
    transform: translate(60px);
}

.loader-text {
    position: absolute;
    top: 100%;
    font-size: 2rem;
    font-weight: 600;
    margin-top: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-80px) scale(0.9);
    }
}

@keyframes shadow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.4;
    }
    50% {
        transform: scale(0.5);
        opacity: 0.2;
    }
}

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