/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color variables */
    --primary-color: #1e88e5;
    --secondary-color: #0d47a1;
    --accent-color: #00e5ff;
    --accent-secondary: #64ffda;
    
    /* Background colors */
    --bg-dark: #121212;
    --bg-darker: #0a0a0a;
    --bg-medium: #1e1e24;
    --bg-card: #1f2128;
    --bg-card-hover: #252a38;
    
    /* Text colors */
    --text-light: #e0e0e0;
    --text-medium: #b0b0b0;
    --text-muted: #707070;
    --white: #fff;
    
    /* Effect variables */
    --border-glow: rgba(0, 229, 255, 0.3);
    --transition-fast: 0.3s;
    --transition-medium: 0.5s;
    --transition-slow: 0.8s;
    --box-shadow-light: 0 3px 10px rgba(0, 0, 0, 0.3);
    --box-shadow-medium: 0 5px 15px rgba(0, 0, 0, 0.5);
    --neon-shadow: 0 0 10px var(--border-glow), 0 0 20px var(--border-glow);
}

/* Global styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background-color: var(--bg-dark);
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 25% 10%, rgba(30, 136, 229, 0.05) 0%, transparent 25%),
        radial-gradient(circle at 75% 75%, rgba(0, 229, 255, 0.05) 0%, transparent 25%);
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: color var(--transition-fast);
    position: relative;
}

a:hover {
    color: var(--accent-secondary);
}

::selection {
    background-color: rgba(0, 229, 255, 0.3);
    color: var(--white);
}

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

/* Header */
header {
    background-color: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: transform var(--transition-medium), box-shadow var(--transition-fast);
    border-bottom: 1px solid rgba(0, 229, 255, 0.1);
    will-change: transform, box-shadow;
}

header.hide {
    transform: translateY(-100%);
}

header.shadow {
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.15);
}

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

header h1 {
    color: var(--text-light);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    text-shadow: 0 0 5px rgba(0, 229, 255, 0.5);
}

header h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    background-size: 200% 100%;
    animation: gradient-shift 3s infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Navigation */
nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

nav .nav-logo {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: var(--neon-shadow);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    position: relative;
    padding-bottom: 5px;
    transition: color var(--transition-fast);
    color: var(--text-medium);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width var(--transition-medium), opacity var(--transition-medium);
    opacity: 0;
    box-shadow: var(--neon-shadow);
}

nav a.active {
    color: var(--accent-color);
    font-weight: 500;
}

nav ul li a:hover {
    color: var(--accent-color);
}

nav ul li a:hover::after,
nav a.active::after {
    width: 100%;
    opacity: 1;
}

/* Hero section */
#hero {
    background: radial-gradient(ellipse at bottom, var(--bg-medium) 0%, var(--bg-darker) 100%);
    padding: 120px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    will-change: background-position;
}

#hero::before,
#hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#hero::before {
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 229, 255, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 80% 70%, rgba(30, 136, 229, 0.05) 0%, transparent 20%);
}

#hero::after {
    background-image: 
        linear-gradient(45deg, var(--bg-darker) 25%, transparent 25%),
        linear-gradient(-45deg, var(--bg-darker) 25%, transparent 25%);
    background-size: 60px 60px;
    opacity: 0.03;
    z-index: 1;
}

#hero h2 {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--text-light);
    transform: translateY(20px);
    opacity: 0;
    animation: fadeInUp 1s forwards 0.3s;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
    position: relative;
    z-index: 2;
    will-change: transform;
}

#hero p {
    font-size: 1.3rem;
    color: var(--accent-color);
    transform: translateY(20px);
    opacity: 0;
    animation: fadeInUp 1s forwards 0.6s;
    position: relative;
    z-index: 2;
}

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

/* Sections common styles */
section {
    padding: 80px 0;
    position: relative;
}

section h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-light);
    font-weight: 500;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: translateX(-50%);
    transition: width var(--transition-medium);
    box-shadow: var(--neon-shadow);
}

section:hover h2::after {
    width: 100px;
}

/* About section */
#about {
    background-color: var(--bg-darker);
    background-image: 
        linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px),
        linear-gradient(0deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

#about p {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 20px;
    color: var(--text-medium);
}

/* Projects section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.project-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--box-shadow-light);
    transition: transform var(--transition-medium), box-shadow var(--transition-medium), 
                opacity var(--transition-medium), background-color var(--transition-medium);
    opacity: 0;
    transform: translateY(20px);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-top: 3px solid var(--accent-color);
    will-change: transform, opacity, background-color;
}

.project-card::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(135deg, transparent, rgba(0, 229, 255, 0.05), transparent);
    transition: all 0.8s ease;
}

.project-card:hover::before {
    top: 100%;
    left: 100%;
}

.project-card.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 229, 255, 0.1);
    background-color: var(--bg-card-hover);
    border-top-color: var(--accent-secondary);
}

.project-card h3 {
    margin-bottom: 12px;
    color: var(--text-light);
    position: relative;
    padding-bottom: 8px;
    font-weight: 600;
}

.project-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width var(--transition-medium);
    box-shadow: var(--neon-shadow);
}

.project-card:hover h3::after {
    width: 80px;
}

.project-links {
    display: flex;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    border-radius: 6px;
    background-color: var(--bg-darker);
    color: var(--text-medium);
    transition: all var(--transition-medium);
    border: 1px solid rgba(0, 229, 255, 0.1);
}

.project-link i {
    margin-right: 8px;
}

.project-link:hover {
    background-color: rgba(0, 229, 255, 0.1);
    color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 229, 255, 0.1);
}

/* Contact section */
#contact {
    background-color: var(--bg-medium);
    position: relative;
    overflow: hidden;
}

#contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(0, 229, 255, 0.05) 0%, transparent 25%),
        radial-gradient(circle at 80% 70%, rgba(30, 136, 229, 0.05) 0%, transparent 25%);
    pointer-events: none;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.social-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 22px;
    transition: all var(--transition-medium);
    position: relative;
    border: 1px solid rgba(0, 229, 255, 0.2);
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 229, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-medium);
    pointer-events: none;
    z-index: 1;
}

.social-icon:hover {
    transform: translateY(-5px);
    color: var(--accent-color);
    box-shadow: 0 5px 15px rgba(0, 229, 255, 0.15);
}

.social-icon:hover::before {
    opacity: 1;
}

/* Footer */
footer {
    background-color: var(--bg-darker);
    padding: 20px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(0, 229, 255, 0.1);
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0.5;
}

/* About page styles */
.about-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 40px;
    gap: 20px;
}

.about-section {
    flex: 1;
    min-width: 300px;
    padding: 20px;
    background-color: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--box-shadow-light);
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-top: 3px solid var(--accent-color);
}

.about-section h3 {
    margin-bottom: 15px;
    color: var(--text-light);
    font-weight: 500;
}

.about-section ul {
    list-style: none;
}

.about-section ul li {
    margin-bottom: 10px;
    color: var(--text-medium);
}

/* Contact page styles */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.contact-info,
.contact-form {
    padding: 30px;
    background-color: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--box-shadow-light);
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-top: 3px solid var(--accent-color);
}

.contact-info h3,
.contact-form h3 {
    margin-bottom: 20px;
    color: var(--text-light);
    font-weight: 500;
}

.contact-list {
    list-style: none;
}

.contact-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    color: var(--text-medium);
}

.contact-list li i {
    margin-right: 15px;
    color: var(--accent-color);
    font-size: 18px;
}

/* Form styles */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    position: absolute;
    top: 10px;
    left: 15px;
    color: var(--text-muted);
    font-size: 14px;
    transition: all var(--transition-fast);
    pointer-events: none;
    z-index: 5;
    background-color: var(--bg-card);
    padding: 0 5px;
}

.form-group.focused label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -8px;
    left: 12px;
    font-size: 12px;
    color: var(--accent-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 6px;
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: inherit;
    outline: none;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.1);
}

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

.submit-btn {
    padding: 12px 30px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.2);
}

.submit-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(45deg, var(--accent-color), var(--accent-secondary));
    transition: all var(--transition-fast);
    z-index: -1;
    opacity: 0.8;
}

.submit-btn:hover {
    box-shadow: 0 6px 15px rgba(0, 229, 255, 0.3);
    transform: translateY(-2px);
}

.submit-btn:hover:before {
    width: 100%;
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(0, 229, 255, 0.2);
}

.form-response {
    margin-top: 20px;
    color: var(--accent-color);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Loading animation */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-darker);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.5s ease-out;
}

.loading-overlay.hide {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid transparent;
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

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

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 50px;
    border: 2px solid var(--accent-color);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    padding-top: 10px;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
    z-index: 5;
    transition: opacity 0.5s ease;
}

.scroll-indicator::before {
    content: '';
    width: 4px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 2px;
    animation: scrollDown 1.5s infinite;
}

@keyframes scrollDown {
    0% { transform: translateY(0); opacity: 0; }
    30% { opacity: 1; }
    60% { opacity: 0.5; }
    100% { transform: translateY(15px); opacity: 0; }
}

/* Skills bars */
.skills-container {
    max-width: 600px;
    margin: 30px auto 0;
}

.skill-group {
    margin-bottom: 20px;
}

.skill-bar {
    height: 10px;
    background-color: var(--bg-darker);
    border-radius: 5px;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 5px;
    width: 0;
    transition: width 1.5s ease-in-out;
    position: relative;
    overflow: hidden;
    will-change: width;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.skill-name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--text-medium);
    font-size: 0.9rem;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--primary-color), var(--accent-color));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(var(--accent-color), var(--accent-secondary));
}

/* Custom cursor */
.animated-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s;
    z-index: 9999;
    mix-blend-mode: difference;
    will-change: transform, width, height;
}

.animated-cursor::after {
    content: '';
    position: absolute;
    width: 5px;
    height: 5px;
    background-color: var(--accent-color);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.animated-cursor.active {
    width: 50px;
    height: 50px;
    border-width: 1px;
}

.animated-cursor.active::after {
    width: 3px;
    height: 3px;
}

/* Media queries */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        margin-top: 20px;
    }
    
    #hero {
        padding: 80px 0;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .about-details {
        flex-direction: column;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
}

/* Reduce motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .scroll-indicator,
    .animated-cursor,
    .skill-progress::after {
        display: none !important;
    }
} 