/* 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);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

[data-theme="dark"] {
    /* Dark theme colors */
    --primary-color: #3b82f6;
    --secondary-color: #94a3b8;
    --accent-color: #fbbf24;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --border-color: #475569;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

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: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.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 i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

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

/* Social icon fallback styles - only show when Font Awesome is not loaded */
.social-links a[title="LinkedIn"]::before {
    content: "in";
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 0.9rem;
    display: none; /* Hide by default */
}

.social-links a[title="GitHub"]::before {
    content: "GH";
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 0.9rem;
    display: none; /* Hide by default */
}

.social-links a[title="Telegram"]::before {
    content: "TG";
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 0.9rem;
    display: none; /* Hide by default */
}

.social-links a[title="Twitter"]::before {
    content: "TW";
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 0.9rem;
    display: none; /* Hide by default */
}

/* Show fallback only when Font Awesome is not loaded */
.font-awesome-fallback .social-links a[title="LinkedIn"]::before,
.font-awesome-fallback .social-links a[title="GitHub"]::before,
.font-awesome-fallback .social-links a[title="Telegram"]::before,
.font-awesome-fallback .social-links a[title="Twitter"]::before {
    display: block !important;
}

/* Hide Font Awesome icons when fallback is active */
.font-awesome-fallback .social-links a i {
    display: none !important;
}

/* 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;
    }
}
