/* Modern Portfolio CSS - Dark Mode Aesthetic */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #13131a;
    --text-primary: #e8e8ee;
    --text-secondary: #a0a0b0;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --border-color: #262635;
    --card-bg: #0d0d12;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color-scheme: dark;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    background-color: var(--bg-primary);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    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(10, 10, 15, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo-gradient {
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

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

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

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

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    top: -300px;
    right: -200px;
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    bottom: -200px;
    left: -100px;
    border-radius: 50%;
}

.hero .container {
    text-align: center;
    z-index: 1;
    width: 100%;
    min-width: 0;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.btn {
    display: inline-block;
    appearance: none;
    border: 0;
    padding: 1rem 2.5rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: inherit;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.4);
}

/* Projects Section */
.projects {
    padding: 80px 0;
    position: relative;
}

.projects::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 402px;
    background: radial-gradient(ellipse at top, var(--bg-secondary) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.projects .container {
    position: relative;
    z-index: 1;
}


.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
}

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

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

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

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    white-space: pre-line;
}

.card-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.tags {
    display: flex;
    gap: 1rem 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    margin-top: auto;
}

.card-link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.card-link:hover {
    gap: 0.75rem;
    color: #818cf8;
}

/* Footer */
.platforms {
    padding: 60px 0;
    text-align: center;
}

.platforms-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.platform-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
}

.platform-icon {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.platform-link:hover {
    color: var(--text-primary);
    transform: translateY(-5px);
}

.platform-link:hover .platform-icon {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

/* Contact Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    height: 100dvh;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 3rem;
    border-radius: 24px;
    width: 100%;
    max-width: 500px;
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalAppear 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalAppear {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--text-primary);
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.modal-content p {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input, .form-group textarea {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    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(--accent);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.g-recaptcha {
    filter: brightness(0.8) contrast(0.9) grayscale(0.2);
    display: flex;
    justify-content: center;
}
.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-status {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    min-height: 1.2rem;
}

.form-status.success {
    color: #10b981;
}

.form-status.error {
    color: #ef4444;
}

.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    text-align: center;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding-inline: 1rem;
    }

    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-title {
        font-size: clamp(2.5rem, 12vw, 3rem);
    }

    .modal-content {
        padding: 2rem 1rem 1.5rem;
        border-radius: 16px;
    }
    
    .nav-links {
        gap: 1.5rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* Smooth transitions */
* {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, transform, opacity, box-shadow;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
