/* CSS Variables for Dark/Light Mode */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --border-color: #e2e8f0;
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent-color: #60a5fa;
    --accent-hover: #3b82f6;
    --border-color: #334155;
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-heavy: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: all 0.3s ease;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Theme Toggle */
.theme-toggle {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: var(--accent-hover);
    box-shadow: var(--shadow-medium);
}

/* Floating Social Icons */
.floating-social {
    position: fixed;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.floating-social a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.floating-social a:hover {
    transform: translateX(10px);
    background: var(--accent-color);
    color: white;
    box-shadow: var(--shadow-medium);
}

/* Scroll to Top */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-medium);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    background: var(--accent-hover);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

[data-theme="dark"] .header {
    background: rgba(15, 23, 42, 0.95);
}

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

.nav-brand h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin: 0;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

.nav-link {
    font-weight: 500;
    color: var(--text-primary);
    position: relative;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: var(--accent-color);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g fill="%23cbd5e0" fill-opacity="0.1"><circle cx="3" cy="3" r="2"/></g></svg>') repeat;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 800px;
    padding: 2rem;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.2s forwards;
}

.highlight {
    color: var(--accent-color);
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-color);
    opacity: 0.3;
    animation: expandWidth 2s ease 1s forwards;
}

@keyframes expandWidth {
    from { width: 0; }
    to { width: 100%; }
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.4s forwards;
}

.typewriter-container {
    margin: 2rem 0;
    font-size: 1.2rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.6s forwards;
}

.typewriter-text {
    color: var(--text-secondary);
}

.typewriter {
    color: var(--accent-color);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    border-right: 2px solid var(--accent-color);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { border-color: var(--accent-color); }
    51%, 100% { border-color: transparent; }
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.8s forwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 1s ease 1s forwards;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.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: var(--accent-color);
    color: white;
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

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

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-secondary);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Section Styles */
.section {
    padding: 5rem 0;
    position: relative;
}

.section:nth-child(even) {
    background: var(--bg-secondary);
}

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

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* Animation on Scroll */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .floating-social {
        display: none;
    }
    
    .theme-toggle {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
        margin-left: 0.5rem;
    }
    
    .hamburger {
        display: flex;
        z-index: 1000;
    }
    
    .header .container {
        padding: 0.75rem 1rem;
    }
    
    .nav-right {
        gap: 0.5rem;
    }
    
    .nav {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        border-top: 1px solid var(--border-color);
        box-shadow: var(--shadow-medium);
        transition: all 0.3s ease;
        opacity: 0;
        visibility: hidden;
        z-index: 998;
    }
    
    .nav.active {
        top: 62px;
        opacity: 1;
        visibility: visible;
    }
    
    .nav-list {
        flex-direction: column;
        padding: 1.5rem;
        gap: 0.5rem;
        margin: 0;
    }
    
    .nav-link {
        padding: 0.75rem 0.5rem;
        border-radius: 8px;
        font-size: 1rem;
    }
    
    .nav-link:hover {
        background: var(--bg-secondary);
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        gap: 0.5rem;
    }
    
    .typewriter-container {
        font-size: 1rem;
    }
    
    .scroll-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.profile-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.profile-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
}

.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 4px solid var(--accent-color);
    transition: all 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.05);
}

/* Skills Section */
.skills-content {
    max-width: 1000px;
    margin: 0 auto;
}

.skills-category {
    margin-bottom: 3rem;
}

.skills-category h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

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

.skill-item {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.skill-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.skill-info span:first-child {
    font-weight: 600;
    color: var(--text-primary);
}

.skill-info span:last-child {
    color: var(--accent-color);
    font-weight: 600;
}

.skill-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
    border-radius: 4px;
    width: 0;
    transition: width 2s ease;
}

.skill-progress.animate {
    width: var(--progress-width);
}

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

.soft-skill {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.soft-skill:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.soft-skill i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.soft-skill h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.languages {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.language {
    background: var(--bg-secondary);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.language:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.language span {
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
}

.language-level {
    color: var(--accent-color);
    font-weight: 500;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.project-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(59, 130, 246, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

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

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-links {
    display: flex;
    gap: 1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background: white;
    color: var(--accent-color);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-small:hover {
    background: var(--accent-color);
    color: white;
    transform: scale(1.1);
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-content p {
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-tag {
    background: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-outcome {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-details {
    margin: 2rem 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-light);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--accent-color);
    width: 30px;
}

.contact-item h4 {
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
}

.contact-item p {
    margin: 0;
    font-size: 0.9rem;
}

.social-links-contact {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.social-link:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

/* Contact Form */
.contact-form {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-light);
}

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

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

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    pointer-events: none;
    background: var(--bg-primary);
    padding: 0 0.5rem;
}

.form-group input:focus + label,
.form-group input:valid + label,
.form-group textarea:focus + label,
.form-group textarea:valid + label {
    top: -0.5rem;
    left: 0.75rem;
    font-size: 0.8rem;
    color: var(--accent-color);
}

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

/* Form Validation Messages */
.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
    display: none;
    transition: all 0.3s ease;
}

.form-message.success {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

[data-theme="dark"] .form-message.success {
    background: #064e3b;
    color: #34d399;
    border: 1px solid #065f46;
}

.form-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

[data-theme="dark"] .form-message.error {
    background: #7f1d1d;
    color: #f87171;
    border: 1px solid #991b1b;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 3rem 0 1rem;
    border-top: 1px solid var(--border-color);
}

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

.footer-info h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-color);
}

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

.footer-social .social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.footer-social .social-links a:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Additional Responsive Styles */
@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .languages {
        flex-direction: column;
        align-items: center;
    }
    
    .social-links-contact {
        flex-direction: column;
    }
    
    .profile-img {
        width: 150px;
        height: 150px;
    }
}

