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

:root {
    /* Light theme colors */
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px -8px rgba(0, 0, 0, 0.15);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1e293b 100%);
    --gradient-accent: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
}

[data-theme="dark"] {
    /* Dark theme — premium deep navy palette */
    --primary-color:    #6366f1;
    --secondary-color:  #94a3b8;
    --accent-color:     #f59e0b;
    --text-primary:     #e2e8f0;
    --text-secondary:   #94a3b8;
    --bg-primary:       #0a0f1e;
    --bg-secondary:     #0f1629;
    --bg-tertiary:      #1a2340;
    --bg-card:          #111827;
    --bg-input:         #0f172a;
    --border-color:     rgba(99, 102, 241, 0.15);
    --border-subtle:    rgba(255, 255, 255, 0.06);
    --shadow:           0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-lg:        0 10px 40px rgba(0, 0, 0, 0.6);
    --shadow-xl:        0 20px 60px rgba(0, 0, 0, 0.7);
    --shadow-glow:      0 0 30px rgba(99, 102, 241, 0.2);
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-accent:  linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-hero:    linear-gradient(135deg, #020617 0%, #0a0f1e 60%, #0f1629 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: all 0.3s ease;
}

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

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

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

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

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

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

/* Live Chat Widget Styles */
.chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: all 0.3s ease;
}

.chat-toggle:hover {
    transform: scale(1.1);
}

.chat-toggle i {
    color: white;
    font-size: 1.5rem;
}

.chat-toggle.active {
    background: var(--accent-color);
}

.live-chat-widget {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: var(--bg-primary);
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    display: none;
    flex-direction: column;
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.live-chat-widget.active {
    display: flex !important;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chat-header {
    background: var(--gradient-primary);
    color: white;
    padding: 15px 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-close {
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.chat-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: var(--bg-secondary);
}

.chat-message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 80%;
    word-wrap: break-word;
}

.chat-message.other {
    background: var(--bg-primary);
    color: var(--text-primary);
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

.chat-message.user {
    background: var(--primary-color);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.chat-message strong {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.chat-message small {
    font-size: 0.7rem;
    opacity: 0.7;
}

.chat-input {
    padding: 15px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 15px 15px;
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.chat-input input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.chat-input button {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-input button:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

/* Responsive adjustments for live chat */
@media (max-width: 480px) {
    .live-chat-widget {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
        height: 400px;
    }
    
    .chat-toggle {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
    
    .chat-toggle i {
        font-size: 1.2rem;
    }
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

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

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

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    position: relative;
    gap: 2rem;
}

.nav-logo {
    flex-shrink: 0;
    z-index: 1001;
    margin-right: 2rem;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: center;
    position: relative;
    z-index: 1000;
    margin-left: 2rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    flex-shrink: 0;
    z-index: 1001;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

.theme-toggle {
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    z-index: 1001;
    margin-left: 1rem;
}

.theme-toggle:hover {
    background: var(--bg-secondary);
    transform: scale(1.1);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle i {
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Language Switcher */
.language-switcher {
    margin-left: 1.5rem;
    flex-shrink: 0;
    z-index: 1001;
}

.lang-dropdown {
    position: relative;
    display: inline-block;
    z-index: 1001;
}

.lang-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid transparent;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 120px;
    user-select: none;
}

.lang-dropdown-btn .lang-flag-img {
    width: 18px;
    height: 13px;
}

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

.lang-dropdown-btn:active {
    transform: translateY(0);
}

.lang-dropdown-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.lang-dropdown-btn:active {
    transform: translateY(0);
}

.lang-dropdown-btn i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.lang-dropdown.active .lang-dropdown-btn i {
    transform: rotate(180deg);
}

.lang-dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    pointer-events: none;
    display: block !important;
}

.lang-dropdown.active .lang-dropdown-content {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

.lang-option:last-child {
    border-bottom: none;
}

.lang-option:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
    transform: translateX(5px);
}

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

.lang-flag-img {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: inline-block;
    vertical-align: middle;
    max-width: 100%;
    height: auto;
}

/* Fallback for missing flag images */
.lang-flag-img:not([src]), 
.lang-flag-img[src=""],
.lang-flag-img[src*="error"] {
    display: none;
}

/* Flag fallback text */
.lang-flag-fallback {
    width: 20px;
    height: 15px;
    background: var(--primary-color);
    color: white;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: bold;
    text-transform: uppercase;
}

.lang-name {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0.05;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    text-align: center;
    padding: 0 20px;
}

.hero-title br {
    display: block;
}

.hero-title .highlight {
    display: inline-block;
    text-align: center;
}



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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

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

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-avatar {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 4px solid white;
}

.hero-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

/* About Section */
.about {
    padding: 80px 0;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

.about-text h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.skills-list {
    list-style: none;
    margin-top: 1.5rem;
}

.skills-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.skills-list i {
    color: var(--primary-color);
    width: 20px;
}

.about-avatar {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 4px solid white;
    box-shadow: var(--shadow-lg);
}

.about-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto;
}

/* Skills Section */
.skills-section {
    margin-top: 4rem;
}

.skills-section h3 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

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

.skill-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

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

.skill-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    background: var(--gradient-primary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: white;
    overflow: hidden;
    flex-shrink: 0;
}

.skill-icon i,
.skill-icon img,
.skill-icon svg {
    font-size: 1.7rem;
    line-height: 1;
    display: block;
    max-width: 34px;
    max-height: 34px;
    object-fit: contain;
}

/* Devicon colored variants — constrain size */
.skill-icon [class*="devicon-"] {
    font-size: 1.8rem;
    width: 32px;
    height: 32px;
}

/* Devicon SVG/image based icons */
.skill-icon i.colored {
    background: none !important;
}

.skill-info {
    flex: 1;
}

.skill-info h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.skill-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 1s ease;
}

.skill-percentage {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Services Section */
.services {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

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

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.service-features {
    list-style: none;
}

.service-features li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Portfolio Section */
.portfolio {
    padding: 80px 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    background: var(--bg-secondary);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.portfolio-image {
    height: 200px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.1);
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-content h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.portfolio-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.portfolio-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.portfolio-tech span {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

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

/* Blog Section */
.blog {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--bg-primary);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

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

.blog-image {
    height: 200px;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.blog-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.blog-content {
    padding: 1.5rem;
}

.blog-content h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.blog-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: var(--accent-color);
}

/* Contact Section */
.contact {
    padding: 80px 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

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

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

.contact-item i {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
}

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

.contact-item p {
    color: var(--text-secondary);
    margin: 0;
}

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

.social-links a {
    width: 45px;
    height: 45px;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.social-links a:active {
    transform: translateY(-1px);
}

.social-links svg {
    transition: transform 0.3s ease;
}

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

/* Tooltip for social icons */
.social-link {
    position: relative;
}

.social-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--text-primary);
    color: var(--bg-primary);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 4px 10px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.social-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--text-primary);
}

.social-link:hover .social-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Footer social links specific styles */
.footer .social-links {
    margin-top: 1.5rem;
}

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

.footer .social-links a:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.footer .social-links i {
    font-size: 1.3rem;
}

/* Social fallback styles */
.social-fallback {
    position: absolute;
    font-size: 0.8rem;
    font-weight: bold;
    display: none;
}

/* Show fallback when Font Awesome is not loaded */
.font-awesome-fallback .social-fallback {
    display: block !important;
}

.font-awesome-fallback .social-links a i {
    display: none !important;
}

/* Individual social link styles */
.social-link {
    width: 45px;
    height: 45px;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

.social-link:active {
    transform: translateY(-1px);
}

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

.form-group {
    margin-bottom: 1.5rem;
}

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

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

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

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fed7aa;
}

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

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

.footer-section h3,
.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

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

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

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

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        gap: 1rem;
    }
    
    .nav-logo {
        margin-right: 1rem;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-primary);
        width: 100%;
        text-align: center;
        transition: all 0.3s ease;
        box-shadow: var(--shadow);
        padding: 2rem 0;
        transform: none;
        justify-content: flex-start;
        gap: 1rem;
        margin-left: 0;
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
    }

    .nav-menu.active {
        left: 0;
        transform: none;
        opacity: 1;
        visibility: visible;
    }

    .nav-toggle {
        display: flex;
    }
    
    .theme-toggle {
        width: 35px;
        height: 35px;
        margin-left: 0.5rem;
    }
    
    .theme-toggle i {
        font-size: 1rem;
    }
    
    .language-switcher {
        margin-left: 0.5rem;
        margin-top: 0;
    }
    
    .lang-dropdown-btn {
        min-width: 100px;
        font-size: 0.8rem;
    }
    
    .lang-dropdown-btn .lang-flag-img {
        width: 16px;
        height: 12px;
    }
    
    .lang-dropdown-content {
        right: auto;
        left: -30px;
        min-width: 140px;
        max-height: 300px;
        overflow-y: auto;
    }
    
    .lang-dropdown-content .lang-flag-img {
        width: 18px;
        height: 13px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-avatar {
        width: 200px;
        height: 200px;
        font-size: 5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .services-grid,
    .portfolio-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

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

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
    }
}

/* Avatar Styles */
.post-author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

/* Portfolio and Blog Image Fallbacks */
.portfolio-img:not([src]), 
.portfolio-img[src=""],
.portfolio-img[src*="error"] {
    display: none;
}

.portfolio-image:not(:has(img)) {
    font-size: 4rem;
    color: white;
}

.blog-img:not([src]), 
.blog-img[src=""],
.blog-img[src*="error"] {
    display: none;
}

.blog-image:not(:has(img)) {
    font-size: 4rem;
    color: white;
}

/* Blog Post Styles */
.blog-post {
    padding: 120px 0 80px;
    background: var(--bg-secondary);
}

.post-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--bg-primary);
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.post-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.post-category {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.post-date, .post-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.post-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.post-excerpt {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.post-content {
    background: var(--bg-primary);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 3rem;
}

.post-image {
    height: 400px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.post-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.post-text {
    padding: 3rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.post-text p {
    margin-bottom: 1.5rem;
}

.post-text h2, .post-text h3, .post-text h4 {
    margin: 2rem 0 1rem 0;
    color: var(--text-primary);
}

.post-text h2 {
    font-size: 1.8rem;
}

.post-text h3 {
    font-size: 1.5rem;
}

.post-text h4 {
    font-size: 1.3rem;
}

.post-text ul, .post-text ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.post-text li {
    margin-bottom: 0.5rem;
}

.post-text blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.post-text code {
    background: var(--bg-secondary);
    padding: 0.2rem 0.5rem;
    border-radius: 0.3rem;
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
}

.post-text pre {
    background: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-text pre code {
    background: none;
    padding: 0;
    color: var(--text-primary);
}

/* Related Posts */
.related-posts {
    margin-bottom: 3rem;
}

.related-posts h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

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

.related-card {
    background: var(--bg-primary);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.related-image {
    height: 200px;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.related-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.related-content {
    padding: 1.5rem;
}

.related-content h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.related-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.related-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.related-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Back to Blog */
.back-to-blog {
    text-align: center;
    margin-top: 3rem;
}

/* Responsive adjustments for blog post */
@media (max-width: 768px) {
    .post-title {
        font-size: 2rem;
    }
    
    .post-text {
        padding: 2rem;
        font-size: 1rem;
    }
    
    .post-image {
        height: 250px;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .post-title {
        font-size: 1.5rem;
    }
    
    .post-text {
        padding: 1.5rem;
        font-size: 0.95rem;
    }
    
    .post-image {
        height: 200px;
    }
}

/* ============================================
   DESIGN IMPROVEMENTS - Modern UI Overrides
   ============================================ */

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

.fade-in-up {
    animation: fadeInUp 0.6s ease both;
}

/* --- Section Headers --- */
.section-header {
    position: relative;
    margin-bottom: 4rem;
}

.section-header h2 {
    display: inline-block;
    position: relative;
    padding-bottom: 1rem;
}

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

.section-header::before {
    content: attr(data-label);
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* --- Improved Buttons --- */
.btn-primary {
    background: var(--gradient-accent);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary::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;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.45);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 0; height: 100%;
    background: var(--gradient-accent);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn-secondary:hover {
    background: var(--gradient-accent);
    border-color: transparent;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.35);
}

/* --- Hero Section Enhancements --- */
.hero {
    background: var(--gradient-hero);
    color: white;
    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: -100px; left: -100px;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(37,99,235,0.12) 0%, transparent 70%);
    bottom: -50px; right: 100px;
    pointer-events: none;
}

.hero-title {
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero-subtitle {
    color: rgba(255,255,255,0.85);
}

.hero-description {
    color: rgba(255,255,255,0.7);
}

.highlight {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero Avatar - glowing ring */
.hero-avatar {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: var(--gradient-accent);
    border: 4px solid rgba(255,255,255,0.2);
    box-shadow:
        0 0 0 8px rgba(99,102,241,0.2),
        0 0 0 16px rgba(99,102,241,0.1),
        var(--shadow-xl);
    animation: avatarPulse 3s ease-in-out infinite;
}

@keyframes avatarPulse {
    0%, 100% { box-shadow: 0 0 0 8px rgba(99,102,241,0.2), 0 0 0 16px rgba(99,102,241,0.1), var(--shadow-xl); }
    50%       { box-shadow: 0 0 0 12px rgba(99,102,241,0.15), 0 0 0 24px rgba(99,102,241,0.07), var(--shadow-xl); }
}

/* Hero Stats */
.hero-stats {
    margin-top: 3rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
}

.stat-item {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
}

.stat-item:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-4px);
}

.stat-item h3 {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.stat-item p {
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    margin: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- About Section --- */
.about {
    background: var(--bg-primary);
    padding: 100px 0;
}

/* --- Skills --- */
.skill-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-left: 4px solid transparent;
    border-image: var(--gradient-accent) 1;
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.skill-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
    border-left-color: var(--primary-color);
}

.skill-icon {
    background: var(--gradient-accent);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
    overflow: hidden;
}

.skill-bar {
    height: 6px;
    border-radius: 3px;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.skill-progress {
    background: var(--gradient-accent);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

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

@keyframes shimmer {
    0%   { left: -100%; }
    100% { left: 200%; }
}

.skill-percentage {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* --- Services --- */
.services {
    padding: 100px 0;
    background: var(--bg-secondary);
    position: relative;
}

.service-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(37,99,235,0.2);
}

.service-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: var(--gradient-accent);
    box-shadow: 0 6px 20px rgba(37,99,235,0.3);
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 10px 30px rgba(37,99,235,0.4);
}

.service-features li::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: 700;
}

/* --- Portfolio --- */
.portfolio {
    padding: 100px 0;
    background: var(--bg-primary);
}

.portfolio-item {
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--bg-primary);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(37,99,235,0.2);
}

.portfolio-image {
    height: 220px;
    position: relative;
    overflow: hidden;
    background: var(--gradient-accent);
}

.portfolio-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,23,42,0.6) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-image::after {
    opacity: 1;
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.08);
}

.portfolio-content {
    padding: 1.75rem;
}

.portfolio-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.portfolio-tech span {
    background: rgba(37,99,235,0.1);
    color: var(--primary-color);
    border: 1px solid rgba(37,99,235,0.2);
    padding: 0.2rem 0.65rem;
    border-radius: 2rem;
    font-size: 0.78rem;
    font-weight: 600;
    transition: var(--transition-fast);
}

.portfolio-tech span:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* --- Blog --- */
.blog {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.blog-card {
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--bg-primary);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(37,99,235,0.2);
}

.blog-image {
    height: 210px;
    position: relative;
    overflow: hidden;
    background: var(--gradient-secondary);
}

.blog-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,23,42,0.5) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card:hover .blog-image::after {
    opacity: 1;
}

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

.blog-content {
    padding: 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-content h3 {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    flex: 1;
}

.blog-meta {
    font-size: 0.8rem;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

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

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition-fast);
}

.read-more::after {
    content: '→';
    transition: transform 0.2s ease;
}

.read-more:hover {
    color: var(--accent-color);
    gap: 0.6rem;
}

.read-more:hover::after {
    transform: translateX(4px);
}

/* --- Contact Section --- */
.contact {
    padding: 100px 0;
    background: var(--bg-primary);
}

.contact-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    gap: 1.25rem;
    transition: var(--transition);
}

.contact-item:hover {
    border-color: rgba(37,99,235,0.3);
    box-shadow: var(--shadow);
    transform: translateX(4px);
}

.contact-item i {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--gradient-accent);
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
    flex-shrink: 0;
}

.contact-form {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

.form-group input,
.form-group textarea {
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    background: var(--bg-primary);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.08);
    background: var(--bg-primary);
}

.social-link {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--gradient-accent);
    border-color: transparent;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(37,99,235,0.35);
}

/* --- Footer Redesign --- */
.footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 70px 0 30px;
}

.footer-section h3,
.footer-section h4 {
    color: #f1f5f9;
}

.footer-section p {
    color: #94a3b8;
}

.footer-section ul li a {
    color: #94a3b8;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.footer-section ul li a::before {
    content: '›';
    color: var(--primary-color);
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.footer-section ul li a:hover {
    color: #60a5fa;
    padding-left: 4px;
}

.footer-section ul li a:hover::before {
    transform: translateX(4px);
}

.footer-bottom {
    color: #64748b;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-bottom p {
    color: #64748b;
    margin: 0;
}

/* Dark mode footer stays consistent */
[data-theme="dark"] .footer {
    background: linear-gradient(135deg, #020617 0%, #0f172a 100%);
}

/* --- Navbar Improvements --- */
.navbar {
    box-shadow: 0 1px 20px rgba(0,0,0,0.08);
}

.nav-logo a {
    font-size: 1.4rem;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.25rem 0;
}

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

/* --- Skills section (light bg) --- */
.skills-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    margin-top: 3rem;
}

.skills-section h3 {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- About section info list --- */
.skills-list li {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    margin-bottom: 0.5rem;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.skills-list li:hover {
    border-color: rgba(37,99,235,0.2);
    background: rgba(37,99,235,0.05);
}

.skills-list i {
    color: var(--primary-color);
}

/* --- Blog actions button --- */
.blog-actions .btn-secondary {
    padding: 0.85rem 2rem;
    font-weight: 600;
    border-radius: 3rem;
}

/* --- Gradient text utility --- */
.gradient-text {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Card hover glow effect (dark mode) --- */
[data-theme="dark"] .service-card:hover,
[data-theme="dark"] .portfolio-item:hover,
[data-theme="dark"] .blog-card:hover {
    box-shadow: 0 20px 50px rgba(99,102,241,0.15);
}

/* --- Page sections alternating bg --- */
.about    { background: var(--bg-primary); }
.services { background: var(--bg-secondary); }
.portfolio { background: var(--bg-primary); }
.blog     { background: var(--bg-secondary); }
.contact  { background: var(--bg-primary); }

/* --- Form group labels visible --- */
.form-group {
    position: relative;
}

/* --- Alert improvements --- */
.alert {
    border-radius: var(--radius-md);
    border-left-width: 4px;
    border-left-style: solid;
}

.alert-success {
    border-left-color: #22c55e;
}

.alert-danger {
    border-left-color: #ef4444;
}

.alert-warning {
    border-left-color: #f59e0b;
}

/* Footer aliases (SEO name variants) */
.footer-aliases {
    font-size: 0.72rem;
    color: #475569;
    margin-top: 0.4rem;
    letter-spacing: 0.01em;
}

[data-theme="dark"] .footer-aliases {
    color: #334155;
}

/* --- Section spacing improvements --- */
section {
    position: relative;
}

/* --- Portfolio/Blog grid min-width tweak for 2-col at medium --- */
@media (min-width: 768px) and (max-width: 1100px) {
    .portfolio-grid,
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

/* ================================================================
   DARK THEME — PREMIUM OVERRIDES
   ================================================================ */

/* Hero */
[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #020617 0%, #0a0f1e 55%, #0f1629 100%);
}

/* Sections alternating deep backgrounds */
[data-theme="dark"] .about    { background: #0a0f1e; }
[data-theme="dark"] .services { background: #080d1a; }
[data-theme="dark"] .portfolio { background: #0a0f1e; }
[data-theme="dark"] .blog      { background: #080d1a; }
[data-theme="dark"] .contact   { background: #0a0f1e; }

/* Navbar */
[data-theme="dark"] .navbar {
    background: rgba(8, 13, 26, 0.97);
    border-bottom: 1px solid rgba(99, 102, 241, 0.12);
    backdrop-filter: blur(20px);
}

/* Stat cards — glass morph */
[data-theme="dark"] .stat-item {
    background: linear-gradient(135deg, rgba(99,102,241,0.1) 0%, rgba(139,92,246,0.06) 100%);
    border: 1px solid rgba(99,102,241,0.2);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .stat-item h3 {
    background: linear-gradient(135deg, #6366f1, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Cards */
[data-theme="dark"] .service-card,
[data-theme="dark"] .portfolio-item,
[data-theme="dark"] .blog-card,
[data-theme="dark"] .skill-item {
    background: #111827;
    border-color: rgba(99, 102, 241, 0.1);
}

[data-theme="dark"] .service-card:hover {
    background: #141e33;
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.15), 0 0 0 1px rgba(99,102,241,0.2);
}

[data-theme="dark"] .portfolio-item:hover,
[data-theme="dark"] .blog-card:hover {
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.15);
}

/* About section info boxes */
[data-theme="dark"] .about-info,
[data-theme="dark"] .contact-item {
    background: #111827;
    border-color: rgba(99, 102, 241, 0.12);
}

[data-theme="dark"] .contact-item:hover {
    background: #141e33;
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 8px 30px rgba(99,102,241,0.12);
}

/* Skills section */
[data-theme="dark"] .skills-section {
    background: linear-gradient(135deg, rgba(99,102,241,0.06) 0%, rgba(139,92,246,0.03) 100%);
    border: 1px solid rgba(99,102,241,0.12);
}

[data-theme="dark"] .skill-item {
    background: #0f172a;
}

[data-theme="dark"] .skill-item:hover {
    background: #141e33;
    border-left-color: #6366f1;
    box-shadow: 0 8px 25px rgba(99,102,241,0.1);
}

/* Section headings */
[data-theme="dark"] .section-header h2 {
    color: #e2e8f0;
}

[data-theme="dark"] .section-header p {
    color: #64748b;
}

/* Form inputs */
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .form-group select {
    background: #0f172a;
    border-color: rgba(99, 102, 241, 0.2);
    color: #e2e8f0;
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
    border-color: #6366f1;
    background: #111827;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

[data-theme="dark"] .form-group input::placeholder,
[data-theme="dark"] .form-group textarea::placeholder {
    color: #475569;
}

/* Contact form */
[data-theme="dark"] .contact-form {
    background: #111827;
    border: 1px solid rgba(99, 102, 241, 0.12);
}

/* Social links */
[data-theme="dark"] .social-links a {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

[data-theme="dark"] .social-links a:hover {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

/* Portfolio / Blog image overlay */
[data-theme="dark"] .portfolio-overlay,
[data-theme="dark"] .blog-image-overlay {
    background: linear-gradient(to top, rgba(2,6,23,0.9) 0%, rgba(10,15,30,0.5) 60%, transparent 100%);
}

/* Skill progress bar */
[data-theme="dark"] .skill-bar {
    background: rgba(255,255,255,0.05);
}

/* Section divider underline */
[data-theme="dark"] .section-header h2::after {
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

/* Buttons */
[data-theme="dark"] .btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    box-shadow: 0 4px 20px rgba(99,102,241,0.35);
}

[data-theme="dark"] .btn-primary:hover {
    box-shadow: 0 8px 30px rgba(99,102,241,0.5);
    transform: translateY(-2px);
}

[data-theme="dark"] .btn-secondary {
    border-color: rgba(99,102,241,0.5);
    color: #a5b4fc;
}

[data-theme="dark"] .btn-secondary:hover {
    background: rgba(99,102,241,0.15);
    border-color: #6366f1;
    color: #c4b5fd;
}

/* Footer */
[data-theme="dark"] .footer {
    background: linear-gradient(135deg, #020617 0%, #080d1a 100%);
    border-top: 1px solid rgba(99,102,241,0.1);
}

/* Scrollbar */
[data-theme="dark"] ::-webkit-scrollbar {
    width: 6px;
}
[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #0a0f1e;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(#6366f1, #8b5cf6);
    border-radius: 3px;
}

/* Nav links */
[data-theme="dark"] .nav-link {
    color: #94a3b8;
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
    color: #a5b4fc;
}

/* --- Mobile improvements --- */
@media (max-width: 768px) {
    .hero-avatar {
        width: 200px;
        height: 200px;
    }

    .stat-item h3 {
        font-size: 2rem;
    }

    .service-card,
    .contact-form {
        padding: 1.75rem 1.5rem;
    }

    .footer {
        padding: 50px 0 20px;
    }

    .skills-section {
        padding: 2rem 1.25rem;
    }
}

@media (max-width: 480px) {
    .contact-form {
        padding: 1.5rem 1.25rem;
    }

    .portfolio-grid,
    .blog-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }
}
