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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.nav-logo h2 {
    color: #007AFF;
    font-weight: 700;
    font-size: 1.8rem;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.nav-logo h2:hover {
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(0, 122, 255, 0.3);
}

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

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #007AFF;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #007AFF;
    transition: width 0.3s ease;
}

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

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

.bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

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

.highlight {
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: #E0E0E0;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    line-height: 1.7;
    color: #F0F0F0;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: #007AFF;
    color: white;
}

.btn-primary:hover {
    background: #0056CC;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 122, 255, 0.3);
}

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

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

/* Code Block */
.code-block {
    background: #1E1E1E;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.3s ease;
}

.code-block:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.code-header {
    background: #2D2D2D;
    padding: 12px 20px;
    display: flex;
    gap: 8px;
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dot.red {
    background: #FF5F56;
}

.code-dot.yellow {
    background: #FFBD2E;
}

.code-dot.green {
    background: #27CA3F;
}

.code-content {
    padding: 20px;
}

.code-content pre {
    margin: 0;
    color: #F8F8F2;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Section Styles */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: #333;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #007AFF, #667eea);
    border-radius: 2px;
}

/* About Section */
.about {
    padding: 80px 0;
    background: #f8f9fa;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #555;
    line-height: 1.7;
}

.skills h3 {
    font-size: 1.3rem;
    margin: 2rem 0 1rem;
    color: #333;
}

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

.skill-tag {
    background: #007AFF;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: #0056CC;
    transform: translateY(-2px);
}

.location-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.location-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.1), rgba(102, 126, 234, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.location-card:hover::before {
    opacity: 1;
}

.location-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.location-card:hover i {
    transform: scale(1.1);
    color: #667eea;
}

.location-card i {
    font-size: 2.5rem;
    color: #007AFF;
    margin-bottom: 1rem;
}

.location-card h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.location-card p {
    color: #666;
}

/* Services Section */
.services {
    padding: 80px 0;
    background: white;
}

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

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007AFF, #667eea);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 122, 255, 0.2);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #007AFF, #667eea);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.service-icon i {
    font-size: 2rem;
    color: white;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #333;
}

.service-card p {
    color: #666;
    line-height: 1.6;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: #f8f9fa;
}

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

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #333;
}

.contact-info p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 2rem;
    line-height: 1.7;
}

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

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-method i {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #007AFF, #667eea);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
}

.contact-method:hover i {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.4);
}

.contact-method h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: #333;
}

.contact-method a,
.contact-method p {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-method a:hover {
    color: #007AFF;
}

/* Contact Form */
.contact-form {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.contact-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007AFF, #667eea);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    background: #fafafa;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007AFF;
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
    transform: translateY(-2px);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007AFF;
}

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

/* Footer */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo h3 {
    color: #007AFF;
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #007AFF;
}

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

.footer-social a {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #333, #555);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.footer-social a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #007AFF, #667eea);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.footer-social a:hover::before {
    opacity: 1;
}

.footer-social a i {
    position: relative;
    z-index: 1;
}

.footer-social a:hover {
    background: #007AFF;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: #999;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-container {
        gap: 3rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .about-content {
        gap: 3rem;
    }

    .contact-content {
        gap: 3rem;
    }
}

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

    .nav-logo h2 {
        font-size: 1.5rem;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.1);
        padding: 2rem 0;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }

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

    .nav-item {
        margin: 1rem 0;
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 0.5rem 1rem;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .nav-link:hover {
        background: rgba(0, 122, 255, 0.1);
        color: #007AFF;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding: 0 15px;
    }

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

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

    .code-block {
        transform: none;
        margin: 0 auto;
        max-width: 100%;
    }

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

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

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }

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

    .hero-buttons .btn {
        width: 100%;
        max-width: 250px;
        margin: 0.5rem 0;
    }

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

    .skill-tags {
        justify-content: center;
    }

    .contact-methods {
        align-items: center;
    }

    .contact-form {
        margin-top: 2rem;
    }
}

@media (max-width: 480px) {
    .nav-logo h2 {
        font-size: 1.3rem;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.1;
    }

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

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

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

    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 100px 0 60px;
        min-height: 90vh;
    }

    .about,
    .services,
    .contact {
        padding: 60px 0;
    }

    .hero-buttons .btn {
        padding: 14px 20px;
        font-size: 0.95rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 14px 16px;
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    .skill-tags {
        gap: 0.6rem;
    }

    .skill-tag {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .code-block {
        font-size: 0.8rem;
        padding: 15px;
    }

    .contact-methods {
        gap: 1rem;
    }

    .contact-method {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .contact-method i {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .nav-logo h2 {
        font-size: 1.1rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

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

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

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

    .hero-buttons .btn {
        padding: 12px 18px;
        font-size: 0.9rem;
    }

    .service-card {
        padding: 1.25rem;
    }

    .contact-form {
        padding: 1.25rem;
    }

    .skill-tags {
        gap: 0.5rem;
    }

    .skill-tag {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-content {
    animation: slideInLeft 0.8s ease-out;
}

.hero-image {
    animation: slideInRight 0.8s ease-out 0.2s both;
}

.about-content {
    animation: fadeInUp 0.8s ease-out;
}

.services-grid {
    animation: scaleIn 0.8s ease-out;
}

.contact-content {
    animation: fadeInUp 0.8s ease-out;
}

/* Stagger animation for service cards */
.service-card:nth-child(1) {
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.service-card:nth-child(2) {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.service-card:nth-child(3) {
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.service-card:nth-child(4) {
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

/* Smooth scrolling for older browsers */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}