/* Root Variables */
:root {
    /* Colors */
    --primary-color: #0066FF;
    --primary-dark: #0052CC;
    --secondary-color: #00D9FF;
    --accent-color: #7B61FF;
    --dark-bg: #0A0E27;
    --darker-bg: #060913;
    --card-bg: #1a1f3a;
    --card-hover: #252b4a;
    --text-primary: #FFFFFF;
    --text-secondary: #A0AEC0;
    --text-muted: #718096;
    --border-color: #2D3748;
    --border-light: rgba(255, 255, 255, 0.1);
    --accent-orange: #FF6B35;
    --success-color: #10B981;
    --gradient-primary: linear-gradient(135deg, #0066FF 0%, #00D9FF 100%);
    --gradient-accent: linear-gradient(135deg, #7B61FF 0%, #0066FF 100%);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    
    /* Spacing */
    --section-padding: 120px;
    --container-padding: 20px;
    
    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(0, 102, 255, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: var(--darker-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Loading Screen */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--darker-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loader-text {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    background: rgba(10, 14, 39, 0.98);
    box-shadow: var(--shadow-md);
}

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

.nav-brand {
    display: flex;
    flex-direction: column;
}

.brand-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-mono);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 2px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.nav-menu {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-smooth);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

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

.lang-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    gap: 8px;
    align-items: center;
    transition: var(--transition-smooth);
}

.lang-toggle:hover {
    border-color: var(--primary-color);
    background: rgba(0, 102, 255, 0.1);
}

.lang-option {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.lang-option.active {
    color: var(--primary-color);
}

.lang-divider {
    color: var(--border-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-smooth);
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

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

/* Hero Section with Slider */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 140px 0 80px;
    overflow: hidden;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    display: flex;
    align-items: center;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(0, 102, 255, 0.1);
    border: 1px solid rgba(0, 102, 255, 0.3);
    border-radius: 20px;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.greeting {
    display: block;
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 10px;
}

.name {
    display: inline;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 30px;
    max-width: 600px;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.hero-visual {
    animation: fadeInRight 1s ease-out 0.4s both;
}

.tech-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.tech-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.tech-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.tech-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.tech-item span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Hero Controls */
.hero-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 10;
}

.hero-prev,
.hero-next {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 102, 255, 0.2);
    border: 1px solid var(--primary-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
}

.hero-prev:hover,
.hero-next:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.hero-dots {
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.dot.active {
    background: var(--primary-color);
    width: 30px;
    border-radius: 6px;
}

/* Code Block Visual */
.code-block {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    transition: var(--transition-smooth);
}

.code-block:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

.code-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
}

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

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

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

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

.code-title {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.code-content {
    padding: 24px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.8;
}

.code-content pre {
    margin: 0;
}

.code-comment {
    color: #6B7280;
}

.code-keyword {
    color: #FF6B9D;
}

.code-string {
    color: #C3E88D;
}

.code-function {
    color: #82AAFF;
}

.code-type {
    color: #FFCB6B;
}

.code-number {
    color: #F78C6C;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 1;
}

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

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--primary-color);
    position: relative;
    z-index: 1;
}

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

/* Section Styles */
section {
    padding: var(--section-padding) 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-label {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(0, 102, 255, 0.1);
    border: 1px solid rgba(0, 102, 255, 0.3);
    border-radius: 20px;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about {
    background: var(--dark-bg);
}

.about-content {
    display: grid;
    gap: 60px;
}

.about-text {
    max-width: 900px;
    margin: 0 auto;
}

.about-intro {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.8;
}

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

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

.skill-category {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    transition: var(--transition-smooth);
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.skill-icon {
    width: 50px;
    height: 50px;
    background: rgba(0, 102, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.skill-category h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-weight: 600;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background: rgba(0, 102, 255, 0.1);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    border: 1px solid rgba(0, 102, 255, 0.2);
    transition: var(--transition-smooth);
}

.skill-tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    background: rgba(0, 102, 255, 0.2);
}

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

.project-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.project-image {
    width: 100%;
    height: 280px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: var(--transition-smooth);
}

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 102, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-smooth);
}

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

.project-view-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--text-primary);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    text-decoration: none;
    transform: scale(0.8);
    transition: var(--transition-bounce);
}

.project-card:hover .project-view-btn {
    transform: scale(1);
}

.project-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.project-category {
    background: rgba(0, 102, 255, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    border: 1px solid rgba(0, 102, 255, 0.2);
}

.project-year {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.project-title {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 600;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    flex: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: rgba(0, 102, 255, 0.1);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    border: 1px solid rgba(0, 102, 255, 0.2);
}

/* Blog Section */
.blog {
    background: var(--dark-bg);
}

.blog-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: var(--text-primary);
    transform: translateY(-2px);
}

.blog-carousel-wrapper {
    position: relative;
    overflow: hidden;
    padding: 0 50px;
}

.blog-carousel {
    display: flex;
    gap: 30px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card {
    min-width: 350px;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.blog-image {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

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

.blog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition-smooth);
}

.blog-card:hover .blog-overlay {
    opacity: 0.2;
}

.blog-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 10px;
    flex-wrap: wrap;
}

.blog-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.blog-date i {
    color: var(--primary-color);
}

.blog-category {
    background: rgba(0, 102, 255, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    border: 1px solid rgba(0, 102, 255, 0.2);
}

.blog-title {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.blog-excerpt {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    flex: 1;
}

.blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.blog-reading-time {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.blog-reading-time i {
    color: var(--primary-color);
}

.blog-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-link:hover {
    gap: 12px;
}

.blog-link i {
    transition: var(--transition-smooth);
}

.blog-link:hover i {
    transform: translateX(5px);
}

.blog-carousel-prev,
.blog-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 102, 255, 0.2);
    border: 1px solid var(--primary-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    z-index: 10;
    backdrop-filter: blur(10px);
}

.blog-carousel-prev {
    left: 0;
}

.blog-carousel-next {
    right: 0;
}

.blog-carousel-prev:hover,
.blog-carousel-next:hover {
    background: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

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

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--card-bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    font-size: 1.2rem;
}

.contact-item h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.contact-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.contact-item a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
    padding: 8px 0;
}

.social-link:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.social-link i {
    font-size: 1.2rem;
}

/* Contact Form */
.contact-form {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.form-group {
    position: relative;
    margin-bottom: 30px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.form-group label {
    position: absolute;
    left: 16px;
    top: 16px;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    pointer-events: none;
    background: var(--dark-bg);
    padding: 0 5px;
}

.form-group input:focus + label,
.form-group input:valid + label,
.form-group textarea:focus + label,
.form-group textarea:valid + label {
    top: -10px;
    font-size: 0.85rem;
    color: var(--primary-color);
}

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

/* Footer */
.footer {
    background: var(--darker-bg);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
}

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

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.footer-column h4 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

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

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-column ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

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

.footer-bottom p {
    color: var(--text-secondary);
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 999;
    box-shadow: var(--shadow-md);
}

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

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

/* Hero Background */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
}

.circuit-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, rgba(0, 102, 255, 0.1) 1px, transparent 1px),
        linear-gradient(rgba(0, 102, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
    animation: circuitMove 20s linear infinite;
}

@keyframes circuitMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(0, 102, 255, 0.1) 0%, transparent 50%);
}

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

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

/* Responsive Design */
@media (max-width: 968px) {
    :root {
        --section-padding: 80px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .projects-grid,
    .blog-carousel {
        grid-template-columns: 1fr;
    }
    
    .blog-card {
        min-width: 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(10, 14, 39, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 40px;
        transition: var(--transition-smooth);
        border-right: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-brand {
        font-size: 1.1rem;
    }
    
    .brand-name {
        display: inline-block;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-carousel-wrapper {
        padding: 0 20px;
    }
    
    .blog-carousel-prev,
    .blog-carousel-next {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .contact-form {
        padding: 24px;
    }
    
    .code-block {
        font-size: 0.8rem;
    }
    
    .hero-controls {
        bottom: 20px;
    }
    
    .hero-prev,
    .hero-next {
        width: 40px;
        height: 40px;
    }
}

/* Smooth scrolling for all links */
a[href^="#"] {
    scroll-behavior: smooth;
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Hide blog cards initially for filter animation */
.blog-card.hidden {
    display: none;
}
