/* CSS Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-tertiary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-light: #a5b4fc;
    --border: #2a2a2a;
    --success: #22c55e;
    --error: #ef4444;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--gradient-1);
    top: -10%;
    right: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--gradient-2);
    bottom: -10%;
    left: -10%;
    animation-delay: 5s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: var(--gradient-3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 0 4rem;
    animation: fadeInUp 0.8s ease-out;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    font-size: 0.875rem;
    color: var(--accent-light);
    margin-bottom: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

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

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.hero .tagline {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero .subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: var(--text-muted);
    margin-bottom: 3rem;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.social-icon {
    position: relative;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 50%;
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid var(--border);
}

.social-icon:hover {
    background: var(--accent);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
    border-color: var(--accent);
}

.social-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.3s ease;
}

.social-icon:hover svg {
    transform: scale(1.1);
}

.tooltip {
    position: absolute;
    bottom: -2.5rem;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.social-icon:hover .tooltip {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

/* Section Styles */
section {
    margin-bottom: 5rem;
    animation: fadeInUp 0.8s ease-out;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.section-number {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    font-family: 'Courier New', monospace;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    position: relative;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 4rem;
    height: 4px;
    background: var(--gradient-1);
    border-radius: 2px;
}

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

/* About Section */
.about-content {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.about-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-1);
}

.highlight-text {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-content p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

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

.skill-tag {
    padding: 0.75rem 1.25rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 0.75rem;
    text-align: center;
    font-weight: 500;
    color: var(--accent-light);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--accent);
    transform: translateY(-3px);
}

/* Contact Form */
.contact {
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-1);
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

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

.char-count {
    position: absolute;
    right: 0.75rem;
    bottom: -1.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
}

/* Honeypot */
.honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Cloudflare Turnstile */
.cf-turnstile {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

/* Button */
button[type="submit"] {
    width: 100%;
    padding: 1.25rem 2rem;
    background: var(--gradient-1);
    color: var(--text-primary);
    border: none;
    border-radius: 0.75rem;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
}

button[type="submit"]::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 ease;
}

button[type="submit"]:hover::before {
    left: 100%;
}

button[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.4);
}

button[type="submit"]:active {
    transform: translateY(-1px);
}

button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.arrow {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.3s ease;
}

button[type="submit"]:hover .arrow {
    transform: translateX(5px);
}

/* Spinner */
.spinner {
    display: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Form Messages */
.form-message {
    display: none;
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.form-message.success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    border: 2px solid var(--success);
}

.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 2px solid var(--error);
}

/* Footer */
footer {
    margin-top: auto;
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer-content p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-style: italic;
}

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

    .about-content,
    .contact {
        padding: 2rem 1.5rem;
    }

    .social-links {
        gap: 0.75rem;
    }

    .social-icon {
        width: 2.75rem;
        height: 2.75rem;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .gradient-orb {
        filter: blur(60px);
    }
}

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

    .hero .tagline {
        font-size: 1.125rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .contact,
    .about-content {
        padding: 1.5rem;
    }

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

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

/* Selection styles */
::selection {
    background: var(--accent);
    color: var(--text-primary);
}

::-moz-selection {
    background: var(--accent);
    color: var(--text-primary);
}
