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

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-tertiary: #666666;
    --accent-primary: #00d4ff;
    --accent-secondary: #0099cc;
    --border-color: #2a2a2a;
    --hover-bg: #1e1e1e;
    --gradient-border: linear-gradient(45deg, #00d4ff, #ff6b35);
    --page-bg: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 25%, #16213e 50%, #0f0f23 75%, #1a1a2e 100%);
}

/* Light mode theme */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-tertiary: #6c757d;
    --accent-primary: #0066cc;
    --accent-secondary: #004499;
    --border-color: #dee2e6;
    --hover-bg: #f1f3f4;
    --gradient-border: linear-gradient(45deg, #0066cc, #ff6b35);
    --page-bg: linear-gradient(135deg, #ffffff 0%, #f8f9ff 25%, #e8eeff 50%, #dde7ff 75%, #f0f2ff 100%);
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--page-bg);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    cursor: none;
    text-align: center;
    position: relative;
    min-height: 100vh;
}

/* Hide default cursor on all interactive elements */
a, button, input, textarea, select, [role="button"], .nav-link, .contact-link, .carousel-nav, .experience-header, .hero-image-holder, .expertise-card, .tech-tag, .toggle-switch, .toggle-container, .expand-icon, .language-dropdown-toggle, .language-option {
    cursor: none !important;
}

/* Animated background canvas */
#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.6;
}

[data-theme="light"] #background-canvas {
    opacity: 0.3;
}

/* Enhanced Custom Cursor */
.cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 1;
}

.cursor-inner {
    position: fixed;
    width: 6px;
    height: 6px;
    background-color: var(--accent-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    mix-blend-mode: difference;
    transition: all 0.1s ease;
}

.cursor-trail {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9997;
    opacity: 0.3;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1), transparent);
}

.cursor.hover {
    transform: scale(2);
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--accent-secondary);
}

.cursor-inner.hover {
    transform: scale(1.5);
    background-color: var(--accent-secondary);
}

/* Mouse follower particles */
.mouse-follower {
    position: fixed;
    width: 4px;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9996;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 0 10px var(--accent-primary);
}

/* Disable custom cursor on mobile */
@media (hover: none) {
    .cursor,
    .cursor-inner,
    .cursor-trail,
    .mouse-follower {
        display: none;
    }
    
    body {
        cursor: auto !important;
    }
}

/* Navigation */
.navigation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);            
    border-bottom: 3px solid transparent;
    border-image: var(--gradient-border) 1;
    z-index: 1000;
    padding: 1rem 0;
}

[data-theme="light"] .navigation {
    background: rgba(255, 255, 255, 0.95);
}

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

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

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Toggle Switch Styles */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* Enhanced Amharic font handling - preserve size hierarchy */
[lang="am"] .hero-title,
[data-translate="hero.name"]:lang(am) {
    font-size: clamp(2.5rem, 5vw, 4rem) !important;
    font-weight: 1000 !important;
    line-height: 1.1 !important;
}

[lang="am"] .hero-subtitle,
[data-translate="hero.subtitle"]:lang(am) {
    font-size: 1.25rem !important;
    line-height: 1.5 !important;
}

/* Removed .hero-subtitle-secondary Amharic styles - both use .hero-subtitle now */

[lang="am"] .section-title {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
}

[lang="am"] .expertise-title {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
}

[lang="am"] .expertise-subtitle {
    font-size: 1rem !important;
    font-weight: 500 !important;
}

[lang="am"] .work-title,
[lang="am"] .contact-title {
    font-size: 2rem !important;
    font-weight: 600 !important;
}

[lang="am"] .quote-text {
    font-size: 1.5rem !important;
    line-height: 1.6 !important;
}

[lang="am"] .job-title-company {
    font-size: 1.2rem !important;
    font-weight: 600 !important;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.toggle-switch:hover {
    background: var(--hover-bg);
}

.toggle-switch.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--text-primary);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active .toggle-slider {
    transform: translateX(20px);
    background: var(--bg-primary);
}

/* Language Dropdown Styles */
.language-dropdown-container {
    position: relative;
    display: inline-block;
}

.language-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.language-dropdown-toggle:hover {
    background: var(--hover-bg);
    border-color: var(--accent-primary);
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.language-dropdown-toggle.active .dropdown-arrow {
    transform: rotate(180deg);
}

.language-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.language-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

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

.language-option:hover {
    background: var(--hover-bg);
    color: var(--accent-primary);
}

.language-option.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.logo {
    display: inline-block;
    text-decoration: none;
}

.logo img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid transparent;
    background-image: linear-gradient(var(--bg-secondary), var(--bg-secondary)), var(--gradient-border);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.1);
}

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

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

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, var(--accent-primary), #ff6b35);
    transition: width 0.3s ease;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    margin-top: 80px;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    padding: 4rem 0;
    position: relative;
}

.hero-content {
    max-width: 1200px;
    margin: 0;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    text-align: left;
}

.hero-image-holder {
    aspect-ratio: 4/5;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 12px;
    background-image: linear-gradient(var(--bg-secondary), var(--bg-secondary)), var(--gradient-border);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    overflow: hidden;
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
    contain: layout;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.hero-content.loaded .hero-image-holder {
    opacity: 1;
    transform: translateY(0);
}

.hero-image-holder:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.2);
}

.hero-image-holder .image-container {
    width: 100%;
    height: 100%;
}

.hero-image-holder .image-container img {
    border-radius: 8px !important;
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.hero-image-holder .placeholder {
    font-size: 4rem;
    color: var(--text-tertiary);
    background: none;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 2rem;
    line-height: 1.5;
    text-align: justify;
}

/* Removed .hero-subtitle-secondary - both paragraphs now use .hero-subtitle */

/* Section Styles */
.section {
    padding: 4rem 0;
    border-top: 3px solid transparent;
    border-image: var(--gradient-border) 1;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-primary);
    text-align: left;
}

/* Half Picture Half Text Cards */
.expertise-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.expertise-card {
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 12px;
    background-image: linear-gradient(var(--bg-secondary), var(--bg-secondary)), var(--gradient-border);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 300px;
}

.expertise-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.2);
}

.card-image {
    background: linear-gradient(45deg, var(--accent-secondary), var(--accent-primary));
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 3rem;
    font-weight: 600;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: pointer;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    width: 100%;
    height: 100%;
    position: relative;
    background: linear-gradient(45deg, var(--accent-secondary), var(--accent-primary));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Navigation areas */
.carousel-nav {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    z-index: 20;
    cursor: pointer;
    transition: background 0.2s ease;
}

.carousel-nav-left {
    left: 0;
}

.carousel-nav-right {
    right: 0;
}

.carousel-nav:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Progress bars */
.carousel-progress {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    gap: 4px;
    z-index: 15;
}

.progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, var(--accent-primary), #ff6b35, #00d4ff);
    width: 0%;
    transition: width 0.1s ease;
}

.progress-bar.active .progress-fill {
    animation: progressFill 3s linear;
}

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

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 !important;
    transition: transform 0.3s ease;
    content-visibility: auto;
    contain-intrinsic-size: 300px 200px;
}

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

/* Responsive image containers */
.image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0 !important;
    content-visibility: auto;
    contain-intrinsic-size: 300px 200px;
}

/* Override any inherited border-radius for carousel images */
.carousel-container .image-container img,
.card-image .image-container img,
.project-image .image-container img {
    border-radius: 0 !important;
}

/* Fallback for missing images */
.image-container .placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 3rem;
    font-weight: 600;
    color: var(--text-primary);
    background: linear-gradient(45deg, var(--accent-secondary), var(--accent-primary));
}

/* Responsive image adjustments for different screen sizes */
@media (max-width: 1200px) {
    .image-container img {
        object-fit: cover;
    }
}

@media (max-width: 768px) {
    .image-container {
        min-height: 200px;
    }
    
    .image-container img {
        object-fit: cover;
        width: 100%;
        height: 100%;
    }
}

@media (max-width: 480px) {
    .image-container {
        min-height: 180px;
    }
}

.carousel-slide .placeholder {
    font-size: 3rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Old carousel dots styles removed - now using progress bars */

.card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.expertise-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    text-align: left;
}

.expertise-subtitle {
    font-size: 1rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-weight: 500;
    text-align: left;
}

.expertise-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    text-align: justify;
}

/* Quote Section */
.quote-section {
    padding: 3rem 0;
    text-align: center;
    position: relative;
}

.quote-text {
    font-size: 1.5rem;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto 1rem;
    position: relative;
    text-align: justify;
}

.quote-text::before,
.quote-text::after {
    content: '"';
    font-size: 2rem;
    color: var(--accent-primary);
    position: absolute;
}

.quote-text::before {
    top: -0.5rem;
    left: -1rem;
}

.quote-text::after {
    bottom: -1rem;
    right: -1rem;
}

.quote-author {
    font-size: 1rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* Work Section */
.work-section {
    padding: 4rem 0;
    border-top: 3px solid;
    border-image: var(--gradient-border) 1;
}

.work-header {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 3rem;
    margin-bottom: 3rem;
}

.work-info {
    flex: 1;
    max-width: none;
    text-align: left;
}

.work-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-align: left;
}

.work-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    text-align: justify;
}

.work-stats {
    text-align: center;
    flex-shrink: 0;
    min-width: 120px;
    align-self: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.featured-project {
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 12px;
    background-image: linear-gradient(var(--bg-secondary), var(--bg-secondary)), var(--gradient-border);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    overflow: hidden;
    margin-top: 2rem;
    transition: all 0.3s ease;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 300px;
}

.featured-project:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.2);
}

.project-image {
    background: linear-gradient(45deg, var(--bg-tertiary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.project-image .carousel-container {
    width: 100%;
    height: 100%;
}

.project-image .carousel-slide {
    background: linear-gradient(45deg, var(--bg-tertiary), var(--accent-secondary));
}

.project-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.project-label {
    font-size: 0.8rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-align: left;
}

.project-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-align: left;
}

.project-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    text-align: justify;
}

/* Experience Section - Updated with expandable functionality */
.experience-section {
    padding: 4rem 0;
    border-top: 3px solid;
    border-image: var(--gradient-border) 1;
}

.experience-item {
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 12px;
    background-image: linear-gradient(var(--bg-secondary), var(--bg-secondary)), var(--gradient-border);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.experience-item:hover {
    box-shadow: 0 4px 16px rgba(0, 212, 255, 0.1);
}

.experience-header {
    padding: 1.5rem 2rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.experience-basic-info {
    text-align: left;
    flex-grow: 1;
}

.job-title-company {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    text-align: left;
}

.company-name {
    color: var(--accent-primary);
}

.job-period {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    font-weight: 500;
    text-align: left;
}

.expand-icon {
    width: 24px;
    height: 24px;
    border: 2px solid transparent;
    border-radius: 4px;
    background-image: linear-gradient(var(--bg-secondary), var(--bg-secondary)), var(--gradient-border);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
}

.expand-icon:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: scale(1.1);
}

.experience-item.expanded .expand-icon {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.experience-details {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.experience-item.expanded .experience-details {
    max-height: 800px;
    opacity: 1;
    padding: 0 2rem 2rem 2rem;
}

.experience-content {
    padding-top: 1rem;
    border-top: 2px solid;
    border-image: var(--gradient-border) 1;
    text-align: left;
}

.job-location {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: left;
}

.job-location::before {
    content: '📍';
    font-size: 0.8rem;
}

.job-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid transparent;
    background-image: linear-gradient(var(--bg-tertiary), var(--bg-tertiary)), var(--gradient-border);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: scale(1.05);
}

/* Contact Section */
.contact-section {
    padding: 4rem 0;
    border-top: 3px solid;
    border-image: var(--gradient-border) 1;
    text-align: center;
}

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

.contact-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-align: justify;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.contact-link {
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 8px;
    background-image: linear-gradient(var(--bg-secondary), var(--bg-secondary)), var(--gradient-border);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    color: var(--text-primary);
    text-decoration: none;
    padding: 1rem 2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-link:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

.contact-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

/* Footer */
.footer {
    padding: 2rem 0;
    border-top: 3px solid;
    border-image: var(--gradient-border) 1;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 2px solid;
    border-image: var(--gradient-border) 1;
    padding: 1rem 0;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu .nav-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 2rem;
}

/* Enhanced responsive design for various devices */

/* Tablet landscape */
@media (max-width: 1024px) {
    .expertise-card,
    .featured-project {
        grid-template-columns: 1fr;
        min-height: unset;
    }
    
    .card-image,
    .project-image {
        min-height: 300px;
    }
}

/* Tablet portrait and mobile landscape */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

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

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

    .hero-content .hero-image-holder {
        max-width: 300px;
        margin: 0 auto;
    }

    .nav-container {
        padding: 0 1rem;
        position: relative;
    }

    .nav-center .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

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

    .section {
        padding: 2rem 0;
    }

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

    .expertise-card,
    .featured-project {
        grid-template-columns: 1fr;
        min-height: unset;
    }

    .card-image,
    .project-image {
        min-height: 250px;
    }

    .work-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2rem;
    }

    .work-info {
        text-align: center;
        width: 100%;
    }

    .work-stats {
        width: 100%;
    }

    .experience-header {
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .experience-basic-info {
        text-align: center;
    }

    .experience-item.expanded .experience-details {
        padding: 0 1.5rem 1.5rem 1.5rem;
    }

    .quote-text {
        font-size: 1.2rem;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .contact-link {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .carousel-progress {
        top: 8px;
        left: 8px;
        right: 8px;
        gap: 2px;
    }

    .progress-bar {
        height: 2px;
    }

    /* Mobile Amharic adjustments */
    [lang="am"] .hero-title {
        font-size: 2.5rem !important;
    }

    [lang="am"] .section-title {
        font-size: 2rem !important;
    }

    [lang="am"] .quote-text {
        font-size: 1.2rem !important;
    }
}

/* iOS specific optimizations */
@supports (-webkit-touch-callout: none) {
    .image-container img {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    .carousel-slide img:hover {
        transform: scale(1.02);
    }
}

/* Android Chrome specific optimizations */
@media screen and (-webkit-min-device-pixel-ratio: 2) {
    .image-container {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
}

/* High DPI displays (Retina, etc.) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .image-container img {
        image-rendering: -webkit-optimize-contrast; /* Safari */
        image-rendering: -webkit-crisp-edges; /* Webkit browsers */
        image-rendering: -moz-crisp-edges; /* Firefox */
        image-rendering: -o-crisp-edges; /* Opera */
        image-rendering: crisp-edges; /* Standard */
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    .card-image,
    .project-image {
        min-height: 200px;
    }
    
    .image-container {
        min-height: 150px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Simple scroll animations using modern CSS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modern CSS scroll-driven animations */
@supports (animation-timeline: view()) {
    .scroll-animate {
        animation: fadeInUp linear;
        animation-timeline: view();
        animation-range: entry 0% entry 30%;
    }
}

/* Fallback for browsers without scroll-timeline support */
@supports not (animation-timeline: view()) {
    .scroll-animate {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .scroll-animate.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
    .scroll-animate {
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* Hide scrollbar but keep functionality */
::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* Performance optimizations */
.carousel-container {
    contain: layout style paint;
}

.expertise-card, .featured-project, .experience-item {
    contain: layout style;
}