/* 
   Responsive Design Styles
   Breakpoints:
   - Extra Small: < 576px (Mobile Portrait)
   - Small: >= 576px (Mobile Landscape)
   - Medium: >= 768px (Tablets)
   - Large: >= 992px (Laptops)
   - Extra Large: >= 1200px (Desktops)
   - Huge: >= 1400px (Wide Screens)
*/

/* =========================================
   1. Extra Small Screens (Mobile - Portrait - Less than 576px)
   ========================================= */

/* Container Adjustment */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* Navbar - Mobile & Tablet Baseline View */
.main-header {
    height: 68px;
}

.main-header .container,
.main-header .container.header {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    gap: 0.75rem;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 0 1 auto;
}

.logo {
    white-space: nowrap;
    flex-shrink: 0;
    max-width: none;
    font-size: clamp(1.15rem, 3.4vw, 1.45rem);
}

/* Header Actions: Language Switcher, Theme Switcher, Nav Toggle */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

.lang-switcher-wrapper,
.theme-switcher-wrapper {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.header-action-btn {
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.header-action-btn:hover {
    background: rgba(14, 165, 233, 0.16);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-1px);
}

#lang-switch {
    height: 38px;
    padding: 0.38rem 0.75rem;
    border-radius: 50px;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 600;
}

#lang-text {
    font-weight: 700;
    font-size: 0.82rem;
}

.lang-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

#theme-switch {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    padding: 0;
    font-size: 0.95rem;
}

.nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    padding: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    transition: all 0.25s ease;
    flex-shrink: 0;
    z-index: 1001;
}

.nav-toggle:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-1px);
}

.nav-toggle:focus {
    outline: none;
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

body.light-mode .header-action-btn,
body.light-mode .nav-toggle {
    background: #ffffff;
    border-color: var(--border-color);
    color: #0f172a;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

body.light-mode .header-action-btn:hover,
body.light-mode .nav-toggle:hover {
    background: rgba(14, 165, 233, 0.1);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

/* Off-canvas Navigation Drawer */
.main-nav {
    display: block;
    position: fixed;
    top: 0;
    right: -100%;
    left: auto;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background-color: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1), left 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s;
    box-shadow: -10px 0 35px var(--shadow-color);
    padding-top: 85px;
    border-left: 1px solid var(--border-color);
    border-radius: 0;
    overflow-y: auto;
    visibility: hidden;
}

.main-nav.active {
    right: 0;
    left: auto;
    visibility: visible;
}

/* RTL Support for Mobile/Tablet Drawer */
body[dir="rtl"] .main-nav,
html[dir="rtl"] .main-nav,
html[lang="ar"] .main-nav {
    right: auto;
    left: -100%;
    border-left: none;
    border-right: 1px solid var(--border-color);
    box-shadow: 10px 0 35px var(--shadow-color);
}

body[dir="rtl"] .main-nav.active,
html[dir="rtl"] .main-nav.active,
html[lang="ar"] .main-nav.active {
    right: auto;
    left: 0;
}

.nav-list {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 0;
    padding: 1.5rem;
    margin: 0;
    list-style: none;
}

.main-nav.active .nav-list li {
    opacity: 0;
    animation: fadeInItem 0.4s ease forwards;
}

.nav-list li:nth-child(1) { animation-delay: 0.1s; }
.nav-list li:nth-child(2) { animation-delay: 0.2s; }
.nav-list li:nth-child(3) { animation-delay: 0.3s; }
.nav-list li:nth-child(4) { animation-delay: 0.4s; }
.nav-list li:nth-child(5) { animation-delay: 0.5s; }
.nav-list li:nth-child(6) { animation-delay: 0.6s; }
.nav-list li:nth-child(7) { animation-delay: 0.7s; }

@keyframes fadeInItem {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    color: var(--text-light);
    background: transparent;
    border: none;
    margin-bottom: 0.25rem;
    border-radius: 12px;
}

body.light-mode .main-nav {
    background-color: rgba(248, 250, 252, 0.98);
    border-left: 1px solid var(--border-color);
}

body.light-mode .nav-link:hover {
    background-color: rgba(14, 165, 233, 0.08);
}

.nav-list li:last-child .nav-link {
    border-bottom: none;
}

.nav-link:hover {
    background-color: rgba(14, 165, 233, 0.1);
    transform: translateX(-5px);
}

body[dir="rtl"] .nav-link:hover {
    transform: translateX(5px);
}

.hero-content,
.about-content,
.contact-form-wrapper,
.hiveity-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.skills-wrapper-mobile {
    position: relative;
    width: 100%;
}

.skill-scroll-btn, .project-scroll-btn {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    color: var(--primary-blue);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.skill-scroll-btn.prev, .project-scroll-btn.prev {
    left: 0;
}

.skill-scroll-btn.next, .project-scroll-btn.next {
    right: 0;
}

.skills-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    overflow-x: visible;
    scroll-snap-type: none;
    gap: 2rem;
    padding-bottom: 1.5rem;
    margin: 0;
    width: 100%;
    scrollbar-width: none;
    scroll-behavior: smooth;
}
.skills-grid-cards::-webkit-scrollbar { display: none; }

.tech-icons-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

.tech-icon-item {
    min-height: 112px;
    padding: 1rem .5rem;
}

.tech-icon-item i {
    font-size: 2.25rem;
}

.tech-icon-item span {
    font-size: .85rem;
}

.projects-wrapper-mobile {
    position: relative;
    width: 100%;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 1.5rem;
    overflow: visible;
    padding-bottom: 1rem;
    margin: 0;
    width: 100%;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.about-code-block {
    display: none;
}

img {
    max-width: 100%;
    height: auto;
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.5rem; }

.skill-card {
    padding: 1rem;
    min-width: 0;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    background: rgba(30, 41, 59, 0.6);
    display: flex;
    flex-direction: column;
}

.skill-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.skill-title {
    font-size: 1rem;
}

.project-card {
    width: 100%;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-image {
    height: auto;
    aspect-ratio: 16 / 10; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.project-info {
    padding: 1.5rem;
    min-height: 0;
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.timeline {
    padding-left: 1rem;
    padding-right: 0;
    position: relative;
}

.timeline::before {
    left: 8px;
    transform: none;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-blue) 0%, rgba(14, 165, 233, 0.05) 100%);
}

.timeline-item {
    display: block;
    margin-bottom: 2.5rem;
    padding-left: 2rem;
    position: relative;
}

.timeline-date {
    display: inline-block;
    position: relative;
    margin-bottom: 0.8rem;
    text-align: left;
    padding: 0;
    font-size: 0.85rem;
    background: rgba(14, 165, 233, 0.1);
    width: fit-content;
    padding: 4px 12px;
    border-radius: 50px;
    font-weight: 700;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

.timeline-icon {
    position: absolute;
    left: -8px;
    top: 4px;
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
    transform: none;
    z-index: 2;
    box-shadow: 0 0 0 4px var(--dark-bg);
}

.timeline-item:hover .timeline-icon {
    transform: scale(1.1);
}

.timeline-content {
    width: 100%;
    padding: 1.2rem;
    background: rgba(30, 41, 59, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.timeline-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 2rem;
}

.footer-social-links {
    justify-content: center;
}

.footer-bottom {
    flex-direction: column;
    gap: 1rem;
}

.contact-info-sidebar {
    position: static;
    width: 100%;
}

.contact-actions,
.contact-direct,
.about-actions,
.hero-actions,
.project-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.action-btn,
.direct-contact,
.project-btn {
    width: 100%;
    justify-content: center;
}

.hero {
    padding: 120px 0 60px;
    background-attachment: scroll;
}

.hero-text h1 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.hero-text .subtitle {
    font-size: 1.2rem;
}

.hero-text p {
    font-size: 1rem;
}

.logo-wrapper {
    margin: 0;
}

@media (max-width: 480px) {
    .main-header {
        height: 62px;
    }
    .main-header .container,
    .main-header .container.header {
        padding-left: 12px;
        padding-right: 12px;
        gap: 8px;
    }
    .logo {
        font-size: 1.12rem;
    }
    .header-actions {
        gap: 0.35rem;
    }
    #lang-switch {
        height: 35px;
        padding: 0.3rem 0.6rem;
        font-size: 0.78rem;
    }
    #theme-switch {
        width: 35px;
        height: 35px;
        font-size: 0.88rem;
    }
    .nav-toggle {
        width: 35px;
        height: 35px;
        font-size: 1.05rem;
    }
}

@media (max-width: 380px) {
    .logo {
        font-size: 1.02rem;
    }
    .main-header .container,
    .main-header .container.header {
        padding-left: 8px;
        padding-right: 8px;
        gap: 6px;
    }
    .header-actions {
        gap: 0.25rem;
    }
    #lang-switch {
        height: 33px;
        padding: 0.28rem 0.5rem;
        gap: 0.3rem;
    }
    #lang-text {
        font-size: 0.75rem;
    }
    .lang-icon {
        width: 16px;
        height: 16px;
    }
    #theme-switch {
        width: 33px;
        height: 33px;
    }
    .nav-toggle {
        width: 33px;
        height: 33px;
        font-size: 0.95rem;
    }
}

@media (max-width: 340px) {
    .logo {
        font-size: 0.92rem;
    }
    #lang-text {
        display: none;
    }
    #lang-switch {
        padding: 0.28rem 0.45rem;
    }
}

body[dir="rtl"] .timeline::before { 
    right: 8px; 
    left: auto; 
}
body[dir="rtl"] .timeline-item { 
    padding-left: 0;
    padding-right: 2rem;
    text-align: right;
}
body[dir="rtl"] .timeline-date { 
    text-align: right;
}
body[dir="rtl"] .timeline-icon { 
    right: -8px;
    left: auto;
    transform: none;
}

body[dir="rtl"] .timeline-item:hover .timeline-icon {
    transform: scale(1.1);
}

body[dir="rtl"] .nav-list { padding-right: 0; }

body[dir="rtl"] .nav-toggle {
    margin: 0;
}


/* =========================================
   2. Small Screens (Mobile Landscape - >= 576px)
   ========================================= */   
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }

    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .form-row {
        flex-direction: row;
        gap: 20px;
    }
    
    .form-row .form-group {
        flex: 1;
    }

    .footer-content {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        text-align: left;
    }
    .footer-social-links {
        justify-content: flex-start;
    }

    h1 { font-size: 2.2rem; }

    .hero {
        padding: 150px 0 80px;
    }

    .hero-text h1 {
        font-size: 2.8rem;
    }

    .skill-card {
        min-width: 180px;
    }

    .project-card {
        min-width: 340px;
    }
    
    .project-image {
        height: auto;
        aspect-ratio: 16 / 10;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================================
   3. Medium Screens (Tablets - >= 768px and < 1024px)
   ========================================= */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    .skill-scroll-btn, .project-scroll-btn {
        display: none;
    }

    .skills-wrapper-mobile,
    .projects-wrapper-mobile {
        display: block;
    }

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

    .hiveity-content {
        display: grid;
        grid-template-columns: 2fr 3fr;
        align-items: start;
    }

    .about-code-block {
        display: flex;
    }
    
    .about-code-block code {
        font-size: 0.85rem;
    }

    .about-code-block pre {
        white-space: pre-wrap;
        word-wrap: break-word;
        overflow-x: visible;
    }
    
    .contact-actions, 
    .contact-direct, 
    .about-actions, 
    .hero-actions, 
    .project-links {
        flex-direction: row;
    }

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

    .tech-icons-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        display: grid;
        overflow-x: visible;
        padding-bottom: 0;
        margin: 0;
        width: auto;
        flex: none;
        scroll-snap-type: none;
    }

    .projects-grid .project-card:nth-child(n+3) {
        display: flex;
    }

    .skill-card {
        padding: 2.5rem 2rem;
        min-width: 0;
    }

    .skill-icon {
        font-size: 4rem;
        margin-bottom: 1.5rem;
    }

    .project-card {
        min-width: 0;
    }

    .skill-title {
        font-size: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1.5fr 1fr 1fr;
        gap: 3rem;
    }

    .footer-section:last-child {
        text-align: end;
    }
    
    .footer-section:last-child .footer-social-links {
        justify-content: flex-end;
    }
    
    .timeline::before {
        display: none;
    }

    .timeline-item {
        display: flex;
        flex-direction: row !important;
        align-items: flex-start;
        padding-left: 0;
    }

    .timeline-item:nth-child(even) {
        flex-direction: row-reverse !important;
    }

    .timeline-date {
        text-align: center;
        padding: 0 2rem;
        margin-bottom: 0;
    }

    .timeline-content {
        width: auto;
    }
    
    .timeline-icon {
        position: absolute;
        top: -15px;
        transform: none;
    }

    .timeline-icon::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 15px;
        background: var(--primary-blue);
        z-index: -1;
    }

    .timeline-item:nth-child(odd) .timeline-icon { right: 2rem; left: auto; }
    .timeline-item:nth-child(even) .timeline-icon { left: 2rem; right: auto; }

    .timeline-item:hover .timeline-icon {
        transform: scale(1.1);
    }
    
    body[dir="rtl"] .timeline::before { right: 50%; left: auto; transform: translateX(50%); }
    body[dir="rtl"] .timeline-item { padding-right: 0; }
    
    body[dir="rtl"] .timeline-item:nth-child(odd) .timeline-icon { left: 2rem; right: auto; }
    body[dir="rtl"] .timeline-item:nth-child(even) .timeline-icon { right: 2rem; left: auto; }
    
    body[dir="rtl"] .timeline-item:hover .timeline-icon { transform: scale(1.1); }
    
    .action-btn, 
    .direct-contact, 
    .project-btn {
        width: auto;
    }

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

    .hero {
        padding: 180px 0 100px;
        background-attachment: fixed;
    }

    .hero-text h1 {
        font-size: clamp(2.5rem, 5vw, 4rem);
    }

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

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 40px;
        align-items: center;
    }

    .hero-text {
        width: auto;
        padding-right: 0;
        max-width: 100%;
        margin: 0 auto;
    }

    .hero-image-wrapper {
        width: auto;
        margin: 0 auto;
    }

    .main-header .container,
    .main-header .container.header {
        justify-content: space-between;
        gap: 1rem;
    }
    .header-actions {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-shrink: 0;
    }
    .nav-toggle {
        display: flex !important;
    }
    .main-nav {
        display: block;
        position: fixed;
        top: 0;
        right: -100%;
        left: auto;
        width: 75%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--header-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: 999;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1), left 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s;
        box-shadow: -10px 0 40px var(--shadow-color);
        padding-top: 90px;
        border-left: 1px solid var(--border-color);
        border-radius: 0;
        overflow-y: auto;
        visibility: hidden;
    }
    .main-nav.active {
        right: 0;
        left: auto;
        visibility: visible;
    }
    body[dir="rtl"] .main-nav,
    html[dir="rtl"] .main-nav,
    html[lang="ar"] .main-nav {
        right: auto;
        left: -100%;
        border-left: none;
        border-right: 1px solid var(--border-color);
        box-shadow: 10px 0 40px var(--shadow-color);
    }
    body[dir="rtl"] .main-nav.active,
    html[dir="rtl"] .main-nav.active,
    html[lang="ar"] .main-nav.active {
        right: auto;
        left: 0;
    }
    .nav-list {
        display: flex;
        flex-direction: column;
        text-align: center;
        gap: 0;
        padding: 1.5rem;
        margin: 0;
        list-style: none;
    }
    .lang-switcher-wrapper,
    .theme-switcher-wrapper {
        display: inline-flex;
        align-items: center;
        margin: 0;
    }

    .about-content {
        flex-direction: column;
        align-items: center;
    }
    .contact-form-wrapper {
        flex-direction: column;
        align-items: center;
    }
    .contact-info-sidebar {
        position: static;
        width: 100%;
    }
    .contact-form-wrapper form {
        width: 100%;
    }
    .action-btn, 
    .direct-contact, 
    .project-btn {
        width: 100%;
        justify-content: center;
    }
    .logo {
        font-size: clamp(1.3rem, 3vw, 1.6rem); 
        max-width: none;
    }
}

/* =========================================
   4. Large Screens (Laptops - >= 992px)
   ========================================= */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }

    .hero-content {
        max-width: 960px;
    }

    .skills-grid-cards {
        grid-template-columns: repeat(4, 1fr);
    }

    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    h1 { font-size: 3.5rem; }
}

/* =========================================
   5. Extra Large Screens (Desktops - >= 1024px)
   ========================================= */
@media (min-width: 1024px) {
    .main-header {
        height: var(--header-height, 70px);
    }
    .main-header .container,
    .main-header .container.header {
        justify-content: space-between;
        gap: 1.5rem;
    }
    .nav-toggle {
        display: none !important;
    }
    
    .main-nav {
        display: flex !important;
        flex: 1;
        height: auto;
        position: static;
        background-color: transparent !important;
        box-shadow: none !important;
        padding: 0;
        overflow: visible;
        border: none !important;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        visibility: visible !important;
        justify-content: center;
        width: auto;
        max-width: none;
    }

    body[dir="rtl"] .main-nav,
    html[dir="rtl"] .main-nav,
    html[lang="ar"] .main-nav {
        left: auto;
        right: auto;
        border: none !important;
        box-shadow: none !important;
    }

    .nav-list {
        display: flex;
        width: auto;
        justify-content: center; 
        align-items: center;
        flex-direction: row;
        gap: clamp(0.2rem, 0.75vw, 0.75rem);
        flex-wrap: nowrap;
        background: transparent !important;
        padding: 0;
        margin: 0;
    }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        flex-shrink: 0;
    }

    .lang-switcher-wrapper,
    .theme-switcher-wrapper {
        margin: 0 !important;
        flex-shrink: 0;
    }

    body[dir="rtl"] .lang-switcher-wrapper {
        margin: 0 !important;
    }

    .logo {
        max-width: none;
        font-size: clamp(1.1rem, 1.6vw, 1.8rem);
        flex-shrink: 0; 
    }

    .nav-link {
        padding: 0.5rem clamp(0.2rem, 0.6vw, 0.8rem);
        gap: clamp(0.2rem, 0.4vw, 0.5rem);
        border-bottom: none;
        font-size: clamp(0.8rem, 0.9vw, 0.95rem);
        background: transparent;
        box-shadow: none;
        border: none !important;
        white-space: nowrap;
        transform: none !important;
    }

    body.light-mode .nav-link:hover,
    body.light-mode .nav-link.active {
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
    }

    .nav-link::after {
        display: block;
    }

    .nav-link:hover,
    .nav-link.active {
        background: transparent;
        border-color: transparent;
        box-shadow: none;
        transform: none;
    }

    .simple-header #theme-switch,
    .simple-header #lang-switch {
        background: rgba(30, 41, 59, 0.4) !important;
        border: 1px solid var(--border-color) !important;
        padding: 0.5rem 1.2rem;
        border-radius: 50px;
    }
    
    .simple-header #theme-switch {
        width: 42px;
        height: 42px;
        padding: 0;
        border-radius: 50%;
    }

    body.light-mode .simple-header #theme-switch {
        background: #ffffff !important;
        box-shadow: 0 2px 10px rgba(14, 165, 233, 0.15) !important;
    }

    .nav-link:hover,
    .nav-link.active {
        color: var(--primary-blue);
        background: transparent !important;
        border-color: transparent !important;
        box-shadow: none;
        transform: translateY(-2px);
    }

    body.light-mode .main-nav,
    body.light-mode .nav-list {
        background-color: transparent !important;
        border: none !important;
    }

    #lang-switch {
        width: auto;
        border-radius: 50px;
        padding: 0.5rem 1.2rem;
        font-size: 0.95rem;
    }

    #theme-switch {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        font-size: 1.1rem;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .theme-switcher-wrapper #theme-switch {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .hero-text {
        width: 50%;
        padding-right: 2rem;
    }
    
    .hero-image-wrapper {
        width: 45%;
    }
    
    .about-content {
        flex-direction: row;
        align-items: start;
    }
    
    .contact-form-wrapper {
        flex-direction: row;
        gap: 4rem;
    }
    
    .contact-info-sidebar {
        width: 35%;
        position: sticky;
        top: 100px;
    }
    
    .contact-form-wrapper form {
        width: 65%;
    }

    .hero {
        padding: 180px 0 100px;
        background-attachment: fixed;
    }

    .hero-text h1 {
        font-size: clamp(2.5rem, 5vw, 4rem);
    }
}

/* =========================================
   6. Huge Screens (Wide Screens - >= 1200px)
   ========================================= */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =========================================
   7. Ultra Wide Screens (>= 1400px)
   ========================================= */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

@media (max-width: 767px) {
    #projects .projects-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
        width: 100%;
    }

    #projects .project-card {
        min-width: 0;
        width: 100%;
    }

    #projects .project-image {
        aspect-ratio: 16 / 10;
        padding: .5rem;
    }

    #projects .project-image-itgs,
    #projects .project-image-feedback,
    #projects .project-image-todo,
    #projects .project-image-jokes {
        aspect-ratio: 1 / 1;
        padding: .25rem;
    }

    #projects .project-image-miead,
    #projects .project-image-sentiment,
    #projects .project-image-spherex {
        aspect-ratio: 16 / 10;
        height: 195px;
        padding: 0.65rem;
    }

    #projects .project-image-miead img,
    #projects .project-image-sentiment img {
        height: 84%;
        width: auto;
        max-width: 84%;
        aspect-ratio: 1 / 1;
        border-radius: 12px;
    }

    #projects .project-image-spherex img {
        width: 94%;
        height: auto;
        max-height: 82%;
        border-radius: 6px;
    }

    .project-category-header {
        margin: 1.5rem 0 0.8rem;
        padding: 1rem 1.15rem;
    }

    .project-category-header h3.subsection-title {
        font-size: 1.15rem;
    }

    .project-category-header p {
        font-size: 0.88rem;
    }

    #projects .project-info {
        min-height: 0;
        padding: 1.15rem;
    }

    #projects .project-info h3,
    #projects .project-description {
        min-height: 0;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    #projects .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    #projects .projects-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}