:root {
    --bg: #232631;
    --card-bg: #2d303d;
    --accent: #FBB03B;
    --text-white: #ffffff;
    --text-dim: #94A3B8;
}

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

html {
    scroll-behavior: smooth;
}

/* --- PRELOADER --- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.8s ease, visibility 0.8s;
    cursor: pointer;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%);
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.loader-logo {
    height: 100px;
    width: auto;
    opacity: 0;
    animation: dropFloat 2.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.loader-text {
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s forwards;
}

.loader-name {
    font-family: 'Inter', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: 1px;
    margin-bottom: 5px;
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.loader-name .dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    background-color: var(--accent);
    border-radius: 50%;
    margin-left: 6px;
    opacity: 0;
    animation: dotPop 0.6s ease-out 1.5s forwards;
}

.loader-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-white);
    letter-spacing: 2px;
}

.loader-bar {
    width: 200px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
    opacity: 0;
    animation: fadeInUp 0.5s ease 0.8s forwards;
}

.loader-progress {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    width: 0%;
    background-color: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    transition: width 0.3s ease, opacity 0.3s ease;
}

@keyframes dropFloat {
    0% { transform: translateY(-50px) scale(0.8); opacity: 0; filter: drop-shadow(0px 0px 0px rgba(251, 176, 59, 0)); }
    40% { transform: translateY(0) scale(1.05); opacity: 1; filter: drop-shadow(0px 10px 20px rgba(251, 176, 59, 0.4)); }
    100% { transform: translateY(-10px) scale(1); opacity: 1; filter: drop-shadow(0px 15px 25px rgba(251, 176, 59, 0.2)); }
}

@keyframes splitBar {
    0% { width: 0; opacity: 1; }
    50% { width: 60%; opacity: 1; }
    90% { width: 100%; opacity: 1; }
    100% { width: 100%; opacity: 0; }
}

@keyframes dotPop {
    0% { transform: scale(0); opacity: 0; box-shadow: none; }
    60% { transform: scale(1.4); opacity: 1; box-shadow: 0 0 20px rgba(251, 176, 59, 0.8); }
    100% { transform: scale(1); opacity: 1; box-shadow: 0 0 15px rgba(251, 176, 59, 0.5), 0 0 5px rgba(251, 176, 59, 0.3); }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* PRELOADER MOBILE RESPONSIVENESS */
@media (max-width: 768px) {
    .loader-logo {
        height: 70px;
    }
    
    .loader-name {
        font-size: 1.8rem;
        margin-bottom: 5px;
    }
    
    .loader-name .dot {
        width: 12px;
        height: 12px;
        margin-left: 4px;
    }
    
    .loader-subtitle {
        font-size: 0.75rem;
        letter-spacing: 1px;
    }
    
    .loader-bar {
        width: 160px;
        height: 3px;
        margin-top: 8px;
    }
    
    .loader-content {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .loader-logo {
        height: 50px;
    }
    
    .loader-name {
        font-size: 1.4rem;
        margin-bottom: 3px;
    }
    
    .loader-name .dot {
        width: 10px;
        height: 10px;
        margin-left: 3px;
    }
    
    .loader-subtitle {
        font-size: 0.7rem;
        letter-spacing: 0.5px;
    }
    
    .loader-bar {
        width: 120px;
        height: 2px;
        margin-top: 6px;
    }
    
    .loader-content {
        gap: 15px;
    }
    
    .loader-logo {
        animation: dropFloat 2.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    }
}

body {
    background-color: var(--bg);
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

body:has(.preloader:not(.hidden)) {
    overflow: hidden !important;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--accent);
    color: #1a1a2e;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(251, 176, 59, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: #fff;
    color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

/* Scroll Animation classes */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.label {
    color: var(--text-dim);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 10%;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(35, 38, 49, 0.95);
    backdrop-filter: blur(10px);
    gap: 20px;
}

.logo {
    flex-shrink: 0;
}

.mobile-menu-toggle {
    display: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dim);
    font-weight: 500;
    font-size: 1rem;
    transition: 0.3s;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a.active, .nav-links a:hover {
    color: var(--text-white);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background-color: var(--accent);
    border-radius: 50%;
}

.nav-right {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-inline-start: auto;
}

/* LANGUAGE SWITCHER */
.lang-dropdown {
    position: relative;
    z-index: 1000;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    padding: 10px 18px;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

.lang-menu {
    position: absolute;
    top: 120%;
    right: 0;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    min-width: 160px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

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

.lang-menu a {
    display: block;
    padding: 10px 15px;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.lang-menu a:hover, .lang-menu a.active {
    background: rgba(251, 176, 59, 0.1);
    color: var(--accent);
}

/* HERO */
.hero {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    padding: 20px 10% 100px;
    align-items: center;
    gap: 40px;
}

.main-title {
    font-size: 5.5rem;
    line-height: 0.95;
    font-weight: 800;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, var(--text-dim) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dot-accent {
    color: var(--accent);
}

/* SOCIAL ICONS */
.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 40px;
}

.social-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--card-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-dim);
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.05);
}

.social-btn:hover {
    color: var(--text-white);
    background-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(251, 176, 59, 0.2);
}

/* PROFILE IMAGE */
.profile-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}

.profile-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: var(--accent);
    filter: blur(120px);
    opacity: 0.15;
    z-index: 0;
    border-radius: 50%;
}

.profile-img {
    width: 100%;
    height: 580px;
    object-fit: cover;
    border-radius: 20px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-dim);
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
}

.sub-headline {
    font-size: 2rem;
    margin-bottom: 20px;
    line-height: 1.3;
    font-weight: 600;
}

.hero-desc {
    color: var(--text-dim);
    margin-bottom: 35px;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* BUTTONS */
.hero-actions {
    display: flex;
    align-items: center;
    gap: 30px;
}

.primary-btn {
    background-color: var(--accent);
    color: #232631;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.primary-btn:hover {
    background-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

.my-story, .explore {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s ease;
}

.my-story i, .explore i {
    color: var(--accent);
    transition: transform 0.3s ease;
}

.my-story:hover i, .explore:hover i {
    transform: translateX(5px);
}

/* ABOUT & STATS */
.about-section {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    padding: 100px 10%;
    gap: 100px;
}

.contact-headline {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 15px;
}

.mb-4 { margin-bottom: 30px; }

.contact-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-white);
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
    margin-top: 15px;
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-3px);
    border-color: var(--accent);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(251, 176, 59, 0.1);
    color: var(--accent);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.contact-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-value {
    font-weight: 600;
    font-size: 1.05rem;
}

.contact-card .arrow {
    color: var(--text-dim);
    transition: 0.3s ease;
}

.contact-card:hover .arrow {
    color: var(--accent);
}

/* QUOTE */
.quote-wrapper {
    position: relative;
    margin-bottom: 60px;
}

.quote-icon {
    position: absolute;
    top: -20px;
    left: -30px;
    font-size: 4rem;
    color: var(--card-bg);
    opacity: 0.5;
    z-index: -1;
}

.big-quote {
    font-size: 2.1rem;
    font-weight: 300;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

/* STATS */
.stats-container {
    display: flex;
    align-items: center;
    gap: 40px;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
}

.stat-box {
    flex: 1;
}

.stat-divider {
    width: 1px;
    height: 60px;
    background: rgba(255,255,255,0.1);
}

.stat-num-wrapper {
    display: flex;
    align-items: baseline;
    margin-bottom: 5px;
}

.stat-num {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
}

.stat-plus {
    font-size: 2rem;
    color: var(--accent);
    font-weight: 800;
    margin-left: 5px;
}

.stat-desc { 
    color: var(--text-dim); 
    font-size: 0.9rem; 
    line-height: 1.4;
}

/* CATEGORY CARDS */
.categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 0 10% 100px;
    gap: 20px;
}

.card {
    padding: 60px 40px;
    border-radius: 4px;
}

.card.yellow { background-color: var(--accent); color: #000; }
.card.dark { background-color: var(--card-bg); }

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: inherit;
}

.card.yellow .card-icon {
    background-color: rgba(0, 0, 0, 0.1);
    color: #000;
}

.card h3 { font-size: 1.8rem; margin-bottom: 10px; }

/* ABOUT ME SECTION */
.about-me {
    padding: 0 10% 100px;
}

.about-me-container {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

.about-me-text {
    flex: 1;
    font-size: 1.15rem;
    color: var(--text-white);
    line-height: 1.8;
}

.about-me-text p {
    margin-bottom: 25px;
}

.about-me-text .highlight-text {
    color: #ae7522; /* Warmer highlight to tie in gently with the theme, darker than pure accent */
    font-weight: 600;
}

.about-me-card {
    flex: 0 0 350px;
    background-color: var(--card-bg); /* Match theme's exact card bg */
    border-radius: 12px;
    padding: 35px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.about-me-info-block {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08); /* Similar to portfolio lines */
}

.about-me-info-block:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.about-me-label {
    font-size: 0.75rem;
    color: #ae7522; /* Matches highlight text */
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

.about-me-value {
    color: var(--text-white);
    font-size: 1.1rem;
    line-height: 1.5;
}

.about-me-subvalue {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-top: 5px;
}

@media (max-width: 900px) {
    .about-me-container {
        flex-direction: column;
    }
    .about-me-card {
        width: 100%;
        flex: auto;
    }
}

/* PORTFOLIO SECTION */
.portfolio {
    padding: 100px 10%;
}

.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 50px;
}

.portfolio-header h2 {
    font-size: 3.5rem;
    line-height: 1.1;
}

/* PROJECT GRID SYSTEM */
/* EDUCATION TIMELINE SECTION */
.education {
    padding: 0 10% 100px;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -36px;
    top: 15px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--accent);
    box-shadow: 0 0 10px rgba(251, 176, 59, 0.5);
    border: 2px solid var(--bg);
}

.timeline-content {
    background-color: var(--card-bg);
    padding: 35px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    border-color: rgba(251, 176, 59, 0.3);
}

.timeline-date {
    display: inline-block;
    padding: 6px 14px;
    background-color: rgba(251, 176, 59, 0.1);
    color: var(--accent);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.timeline-title {
    font-size: 1.5rem;
    color: var(--text-white);
    margin-bottom: 5px;
}

.timeline-school {
    color: var(--text-dim);
    font-size: 1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.timeline-desc {
    color: var(--text-dim);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* CERTIFICATION GRID DESIGN */
.certifications-section {
    padding: 0 10% 100px;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.cert-card {
    background-color: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.cert-card:hover {
    transform: translateY(-5px);
    border-color: rgba(251, 176, 59, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.cert-header {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.cert-icon {
    width: 65px;
    height: 65px;
    border-radius: 14px;
    background-color: rgba(30, 30, 30, 0.8);
    color: #ae7522; /* Matches the issuer bronze tone from reference */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.cert-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 5px;
}

.cert-title {
    font-size: 1.35rem;
    color: var(--text-white);
    margin-bottom: 8px;
    line-height: 1.4;
    font-weight: 700;
}

.cert-issuer {
    color: #ae7522; /* Copper/Gold */
    font-size: 0.95rem;
    font-weight: 500;
}

.cert-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    margin-top: auto;
}

.cert-year {
    color: var(--text-dim);
    font-size: 0.95rem;
}

.cert-badge {
    background-color: rgba(39, 174, 96, 0.1);
    color: #2ecc71; /* Green text matching reference */
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 700;
    letter-spacing: 1px;
}

.cert-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background-color: rgba(255, 255, 255, 0.05); /* Dark pill shape */
    color: var(--text-white);
    text-decoration: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.cert-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

/* CERTIFICATE MODAL */
.cert-modal {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    padding-top: 50px; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(15, 15, 15, 0.95); 
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.cert-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border-radius: 10px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
}

@keyframes zoomIn {
    from {transform: scale(0.9); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

.cert-modal-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #f1f1f1;
    font-size: 45px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    line-height: 1;
}

.cert-modal-close:hover,
.cert-modal-close:focus {
    color: var(--accent);
}

/* PROJECT MODAL DESIGN */
.project-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 12, 0.85);
    backdrop-filter: blur(8px);
    overflow-y: auto;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pm-wrapper {
    background: var(--card-bg);
    border: 1px solid rgba(251, 176, 59, 0.2);
    border-radius: 20px;
    width: 100%;
    max-width: 900px;
    position: relative;
    box-shadow: 0 25px 60px -10px rgba(251, 176, 59, 0.15);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(20px);
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.pm-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: rgba(251, 176, 59, 0.1);
    border: 1px solid rgba(251, 176, 59, 0.2);
    color: var(--accent);
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.pm-close:hover {
    background: var(--accent);
    color: #111;
    transform: rotate(90deg);
    box-shadow: 0 0 15px rgba(251, 176, 59, 0.4);
}

.pm-header {
    background: linear-gradient(180deg, rgba(251, 176, 59, 0.05) 0%, transparent 100%);
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.pm-header-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(251, 176, 59, 0.5));
}

.pm-header-title {
    font-size: 0.85rem;
    letter-spacing: 3px;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
}

.pm-body {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 40px;
    padding: 40px;
}

.pm-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #FBB03B, #ff7a00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pm-meta {
    font-size: 0.95rem;
    color: #a0a0a0;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pm-dot { font-size: 0.6rem; color: #555; }

.pm-desc {
    font-size: 1.3rem;
    color: #d1d1d1;
    line-height: 1.5;
    margin-bottom: 35px;
}

.pm-section {
    margin-bottom: 30px;
}

.pm-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.pm-bar {
    width: 4px;
    height: 22px;
    border-radius: 2px;
}
.pm-bar-orange { 
    background-color: var(--accent); 
    box-shadow: 0 0 10px rgba(251, 176, 59, 0.6);
}
.pm-bar-green { 
    background-color: #2ecc71; 
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.6);
}

.pm-section-title h3 {
    font-size: 1.25rem;
    color: #fff;
    margin: 0;
}

.pm-text {
    font-size: 1.05rem;
    color: #9ba0a6;
    line-height: 1.7;
}

.pm-sidebar {
    display: flex;
    flex-direction: column;
    gap: 35px;
    border-inline-start: 1px solid rgba(255, 255, 255, 0.05); /* Logical property for RTL support */
    padding-inline-start: 40px;
}

.pm-side-block h4 {
    font-size: 0.85rem;
    color: #7b8086;
    letter-spacing: 1px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

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

.pm-tag {
    background: rgba(251, 176, 59, 0.05);
    border: 1px solid rgba(251, 176, 59, 0.2);
    color: #e1e1e1;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pm-tag:hover {
    background: rgba(251, 176, 59, 0.15);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 5px 15px rgba(251, 176, 59, 0.1);
}

.pm-link-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #FBB03B 0%, #ff7a00 100%);
    color: #111;
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(251, 176, 59, 0.3);
}

.pm-link-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(251, 176, 59, 0.4);
    filter: brightness(1.1);
}

.pm-link-btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.pm-link-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.pm-link-arrow {
    margin-left: auto;
    font-size: 0.8rem;
    color: inherit;
    opacity: 0.6;
}

@media (max-width: 768px) {
    .pm-wrapper {
        max-height: 95vh;
        border-radius: 15px;
    }
    .pm-header {
        padding: 20px;
    }
    .pm-body {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 20px;
    }
    .pm-sidebar {
        border-inline-start: none;
        border-block-start: 1px solid rgba(255, 255, 255, 0.05); /* Top border instead of left */
        padding-inline-start: 0;
        padding-block-start: 30px;
    }
}

/* TECHNOLOGIES SECTION */
.technologies {
    padding: 100px 10%;
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.5) 0%, rgba(30, 25, 30, 0.3) 100%);
    position: relative;
}

.tech-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.tech-label {
    color: var(--accent);
    font-size: 0.95rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 15px;
}

.tech-title {
    font-size: 3.5rem;
    line-height: 1.1;
    color: var(--text-white);
    margin-bottom: 20px;
    font-weight: 800;
}

.tech-subtitle {
    color: var(--text-dim);
    font-size: 1.15rem;
    line-height: 1.6;
}

.marquee-wrapper {
    overflow: hidden;
    width: 100%;
    padding: 10px 0;
    margin-bottom: 20px;
    display: flex;
    direction: ltr; /* Force LTR globally for the marquee so the infinite flex loop calculation never breaks in Arabic */
}

.marquee-track {
    display: flex;
    gap: 20px;
    width: max-content;
    padding-left: 20px; /* Offset the first gap visually if needed */
}

/* Animations for left and right scrolling */
.track-left {
    animation: scroll-left 35s linear infinite;
}

.track-right {
    animation: scroll-right 40s linear infinite;
}

/* Pause on hover */
.marquee-track:hover {
    animation-play-state: paused;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 10px)); } /* Half width minus gap compensation */
}

@keyframes scroll-right {
    0% { transform: translateX(calc(-50% - 10px)); }
    100% { transform: translateX(0); }
}

/* Bento Box Design matching screenshot */
.bento-box {
    background-color: #17171a; /* Very dark background */
    border: 1px solid rgba(255, 255, 255, 0.04); /* Subtle edge */
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    height: 180px;
    width: 180px; /* Base 1x1 size */
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.bento-box:hover {
    transform: translateY(-5px);
    background-color: #1c1c21;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.bento-wide {
    width: 380px; /* 2x wide span */
}

.bento-large {
    width: 380px; /* Large span */
    /* Adjusting height isn't ideal in a single-row flex layout without breaking it, 
       so we just maintain height and double the width for marquee uniformity, 
       it'll look excellent */
}

.bento-box i {
    font-size: 3.5rem;
    transition: transform 0.3s ease;
}

.bento-box:hover i {
    transform: scale(1.1);
}

.bento-box span {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f1f1f1;
    letter-spacing: 0.5px;
}

.project-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.project-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: var(--card-bg);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Layout Variations */
.project-card.large { grid-column: span 8; height: 500px; }
.project-card.portrait { grid-column: span 4; height: 500px; }
.project-card.wide { grid-column: span 12; height: 450px; margin-top: 20px; }

.project-image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.project-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6) grayscale(20%);
    transition: 0.8s ease;
}

/* The Secret Sauce: Gradient Overlays */
.overlay-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(35, 38, 49, 1) 0%, rgba(35, 38, 49, 0) 60%);
    z-index: 1;
}

/* TEXT CONTENT OVER IMAGE */
.project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 40px;
    z-index: 2;
    transform: translateY(20px);
    transition: 0.5s ease;
}

.project-info h3 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 10px 0;
}

.project-info p {
    color: var(--text-dim);
    max-width: 400px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Glassmorphism Tech Tags */
.tech-stack {
    display: flex;
    gap: 10px;
}

.tech-stack span {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* HOVER EFFECTS */
.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

.project-card:hover img {
    filter: brightness(0.9) grayscale(0%);
    transform: scale(1.05);
}

.project-card:hover .project-info {
    transform: translateY(0);
}

.project-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* MOBILE RESPONSIVENESS */
@media (max-width: 900px) {
    .project-card.large, .project-card.portrait, .project-card.wide {
        grid-column: span 12;
        height: 400px;
    }
}

/* DOTS */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: var(--text-dim);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.dot.active, .dot:hover {
    background-color: var(--accent);
}

/* TESTIMONIAL */
.testimonial {
    display: flex;
    padding: 100px 10%;
    gap: 80px;
    align-items: center;
}

.testimonial-img {
    width: 350px;
    height: 450px;
    object-fit: cover;
    border-radius: 10px;
}

.quote-mark {
    font-size: 8rem;
    color: var(--accent);
    line-height: 0;
    display: block;
    margin-bottom: 40px;
}

.testimonial-content p {
    font-size: 1.8rem;
    margin-bottom: 40px;
}

/* FOOTER */
.footer {
    padding: 100px 10% 40px;
    border-top: 1px solid rgba(255,255,255,0.05);
    background: linear-gradient(to bottom, var(--bg), #1a1c24);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    margin-bottom: 80px;
}

.footer-cta {
    display: flex;
    flex-direction: column;
}

.footer-title {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 20px;
}

.footer-desc {
    color: var(--text-dim);
    font-size: 1.05rem;
    max-width: 450px;
    line-height: 1.6;
    margin-bottom: 40px;
}

.direct-email {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.direct-email:hover {
    color: var(--accent);
}

.direct-email i {
    color: var(--accent);
}

/* Footer Form */
.footer-form-wrapper {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.form-header {
    margin-bottom: 30px;
}

.form-header h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.form-header p {
    color: var(--text-dim);
    font-size: 0.95rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-group input, 
.input-group textarea {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 15px 20px;
    color: var(--text-white);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    resize: vertical;
}

.input-group input:focus, 
.input-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(0,0,0,0.3);
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.submit-btn {
    background: var(--accent);
    color: #232631;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255,255,255,0.1);
}

.attachment-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-white);
    width: 54px;
    height: 54px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.attachment-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--accent);
}

/* Footer Bottom */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* ========================================= */
/* MOCKUP DEMO AND SLIDER CSS */
/* ========================================= */

.macbook-mockup {
    width: 100%;
    max-width: 1024px;
    margin: -30px auto 40px auto;
    border: 25px solid #111;
    border-radius: 20px 20px 0 0;
    position: relative;
    background: #000;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

.macbook-mockup::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background: #333;
    border-radius: 50%;
}

.macbook-screen {
    width: 100%;
    aspect-ratio: 16 / 9; /* Matches the exact proportions of a standard 1920x1080 screen */
    overflow: hidden; /* Changed from scroll to hidden for slider */
    background: #fff;
    position: relative;
}

/* --- Added Slider Styles for Mockup --- */
.slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease-in-out;
}

.slide {
    min-width: 100%;
    height: 100%;
    overflow-y: auto; /* Allow vertical scrolling */
    scrollbar-width: none; /* Hide scrollbar Firefox */
    -ms-overflow-style: none; /* Hide scrollbar IE/Edge */
}

/* Hide scrollbar WebKit */
.slide::-webkit-scrollbar {
    display: none;
}

.slide img {
    width: 100%;
    height: auto; /* Let it grow naturally */
    object-fit: cover;
    object-position: top;
    display: block; /* Remove bottom whitespace */
}

.slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.slider-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slider-btn:hover {
    background: #ff2a2a;
}

.dot-indicators {
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #444;
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: var(--accent);
}
/* -------------------------------------- */

.macbook-base {
    height: 25px;
    background: #2a2a2a;
    border-radius: 0 0 20px 20px;
    position: absolute;
    bottom: -50px;
    width: 110%;
    left: -5%;
    display: flex;
    justify-content: center;
}

.macbook-notch {
    width: 150px;
    height: 10px;
    background: #111;
    border-radius: 0 0 10px 10px;
}

/* Smartphone Mockup CSS */
.smartphone-mockup {
    width: 340px;
    height: 650px;
    margin: 0 auto;
    border: 15px solid #111;
    border-radius: 40px;
    position: relative;
    background: #000;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    overflow: hidden;
}

.smartphone-mockup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 25px;
    background: #111;
    border-radius: 0 0 15px 15px;
    z-index: 10;
}

.smartphone-screen {
    width: 100%;
    height: 100%;
    overflow: hidden; /* Changed from scroll to hidden for slider */
    background: #fff;
    position: relative;
}

/* App Screens Container */
.app-screens {
    height: calc(100% - 60px); /* 100% minus the nav bar height */
    overflow-y: auto;
    background-color: #f7f9fc;
    position: relative;
    width: 100%;
}

.app-screen {
    display: none;
    width: 100%;
    animation: fadeIn 0.3s ease;
}

.app-screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Bottom Navigation */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 60px;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    background: none;
    border: none;
    color: #888;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    gap: 4px;
    width: 100%;
    height: 100%;
    transition: all 0.2s;
}

.nav-item i {
    font-size: 1.2rem;
}

.nav-item.active {
    color: var(--accent);
}

.nav-item:hover {
    color: var(--accent);
}

@media (max-width: 1024px) {
    .hero, .about-section, .categories, .work-grid, .footer-content {
        grid-template-columns: 1fr;
    }
    .footer-content {
        gap: 50px;
    }
    .hero-center { order: -1; }
    .main-title, .footer-title { font-size: 3rem; }
    
    /* Technologies Responsive */
    .technologies {
        padding: 50px 0; /* Remove side padding for full-width scroll */
    }
    
    .tech-title {
        font-size: 2.5rem;
    }
    
    .bento-box {
        width: 140px;
        height: 140px;
    }
    .bento-wide {
        width: 280px;
    }
    .bento-large {
        width: 280px;
    }
    .bento-box i {
        font-size: 2.5rem;
    }
    .bento-box span {
        font-size: 0.95rem;
    }
}

/* ========== MOBILE PHONE RESPONSIVENESS ========== */
@media (max-width: 768px) {
    /* General Spacing */
    body {
        overflow-x: hidden;
    }
    
    /* Navbar */
    .navbar {
        padding: 12px 5%;
        flex-wrap: nowrap;
        gap: 15px;
        justify-content: flex-start;
    }
    
    .logo {
        order: 1;
        flex-shrink: 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        z-index: 1001;
        order: 2;
        margin: 0;
    }
    
    .mobile-menu-toggle span {
        width: 25px;
        height: 2px;
        background: var(--text-white);
        border-radius: 2px;
        transition: all 0.3s ease;
        display: block;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translateY(10px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translateY(-10px);
    }
    
    .nav-right {
        display: flex;
        gap: 15px;
        align-items: center;
        order: 3;
        flex-shrink: 0;
    }
    
    .nav-links {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(35, 38, 49, 0.99);
        backdrop-filter: blur(10px);
        flex-direction: column;
        gap: 0;
        z-index: 1000;
        padding: 15px 0;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .nav-links.mobile-menu-open {
        display: flex;
    }
    
    .nav-links li {
        padding: 12px 5%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    }
    
    .nav-links a {
        font-size: 0.9rem;
        display: block;
    }
    
    .lang-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
        min-width: auto;
    }
    
    /* Preloader */
    .loader-name {
        font-size: 1.8rem;
    }
    
    .loader-subtitle {
        font-size: 0.8rem;
    }
    
    /* Hero Section */
    .hero {
        grid-template-columns: 1fr;
        padding: 40px 5% 60px;
        gap: 30px;
    }
    
    .main-title {
        font-size: 2.8rem;
        line-height: 1;
        margin-bottom: 15px;
    }
    
    .badge {
        padding: 6px 12px;
        font-size: 0.7rem;
    }
    
    .sub-headline {
        font-size: 1.4rem;
    }
    
    .hero-desc {
        font-size: 0.95rem;
        margin-bottom: 25px;
        line-height: 1.6;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .primary-btn {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .my-story, .explore {
        font-size: 0.9rem;
    }
    
    .profile-img {
        height: auto;
        border-radius: 15px;
    }
    
    .social-icons {
        gap: 10px;
        margin-top: 30px;
    }
    
    .social-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    /* About Section */
    .about-section {
        grid-template-columns: 1fr;
        padding: 60px 5%;
        gap: 40px;
    }
    
    .contact-headline {
        font-size: 1.8rem;
    }
    
    .contact-card {
        gap: 15px;
        padding: 15px;
    }
    
    .contact-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        flex-shrink: 0;
    }
    
    .contact-value {
        font-size: 0.95rem;
    }
    
    .big-quote {
        font-size: 1.5rem;
        line-height: 1.4;
    }
    
    /* Stats */
    .stats-container {
        flex-direction: column;
        gap: 25px;
        padding: 30px;
    }
    
    .stat-box {
        width: 100%;
    }
    
    .stat-divider {
        display: none;
    }
    
    .stat-num {
        font-size: 2.5rem;
    }
    
    .stat-desc {
        font-size: 0.85rem;
    }
    
    /* Categories */
    .categories {
        grid-template-columns: 1fr;
        padding: 0 5% 60px;
        gap: 15px;
    }
    
    .card {
        padding: 40px 25px;
        border-radius: 12px;
    }
    
    .card h3 {
        font-size: 1.4rem;
    }
    
    .card p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* About Me Section */
    .about-me {
        padding: 60px 5%;
    }
    
    .about-me-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .about-me-text {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .about-me-text p {
        margin-bottom: 20px;
    }
    
    .about-me-card {
        width: 100%;
        padding: 25px;
    }
    
    /* Education Timeline */
    .education {
        padding: 60px 5%;
    }
    
    .timeline {
        padding-left: 20px;
    }
    
    .timeline::before {
        left: -8px;
    }
    
    .timeline-dot {
        left: -32px;
        width: 12px;
        height: 12px;
    }
    
    .timeline-content {
        padding: 25px;
    }
    
    .timeline-title {
        font-size: 1.3rem;
    }
    
    .timeline-date {
        font-size: 0.8rem;
        padding: 5px 12px;
    }
    
    /* Certifications */
    .certifications-section {
        padding: 60px 5%;
    }
    
    .cert-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cert-card {
        padding: 20px;
    }
    
    .cert-title {
        font-size: 1.2rem;
    }
    
    .cert-btn {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    /* Technologies Section */
    .technologies {
        padding: 60px 5%;
    }
    
    .tech-header {
        margin-bottom: 40px;
    }
    
    .tech-title {
        font-size: 2rem;
    }
    
    .tech-subtitle {
        font-size: 0.95rem;
    }
    
    .bento-box {
        width: 120px;
        height: 120px;
        gap: 10px;
        border-radius: 15px;
    }
    
    .bento-box i {
        font-size: 2.5rem;
    }
    
    .bento-box span {
        font-size: 0.8rem;
    }
    
    .bento-wide {
        width: 250px;
    }
    
    .bento-large {
        width: 250px;
    }
    
    .marquee-track {
        gap: 15px;
        padding-left: 10px;
    }
    
    /* Projects Section */
    .portfolio {
        padding: 60px 5%;
    }
    
    .portfolio-header {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 40px;
    }
    
    .portfolio-header h2 {
        font-size: 2rem;
    }
    
    .explore {
        font-size: 0.9rem;
    }
    
    .project-container {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
    }
    
    .project-card {
        grid-column: span 1 !important;
        height: 300px;
    }
    
    .project-card.large,
    .project-card.portrait,
    .project-card.wide {
        grid-column: span 1 !important;
        height: 300px;
    }
    
    .project-info {
        padding: 25px;
    }
    
    .project-info h3 {
        font-size: 1.3rem;
        margin: 5px 0;
    }
    
    .project-info p {
        font-size: 0.85rem;
        max-width: 100%;
        margin-bottom: 15px;
    }
    
    .tech-stack {
        flex-wrap: wrap;
    }
    
    .tech-stack span {
        font-size: 0.65rem;
        padding: 4px 10px;
    }
    
    .project-link {
        font-size: 0.85rem;
    }
    
    /* Footer */
    .footer {
        padding: 60px 5% 30px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .footer-title {
        font-size: 2rem;
    }
    
    .footer-desc {
        font-size: 0.95rem;
        max-width: 100%;
    }
    
    .direct-email {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }
    
    .footer-form-wrapper {
        padding: 30px;
    }
    
    .form-header h3 {
        font-size: 1.4rem;
    }
    
    .form-header p {
        font-size: 0.9rem;
    }
    
    .input-group input,
    .input-group textarea {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .submit-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .attachment-btn {
        width: 48px;
        height: 48px;
        font-size: 1rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    /* Back to Top Button */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 30px;
        right: 20px;
        font-size: 1rem;
        z-index: 998;
    }
    
    /* Modals */
    .project-modal {
        padding: 10px;
    }
    
    .pm-wrapper {
        border-radius: 12px;
        max-width: 100%;
    }
    
    .pm-close {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
        top: 15px;
        right: 15px;
    }
    
    .pm-header {
        padding: 15px;
    }
    
    .pm-header-title {
        font-size: 0.75rem;
    }
    
    .pm-body {
        padding: 15px;
        gap: 20px;
    }
    
    .pm-title {
        font-size: 1.8rem;
    }
    
    .pm-desc {
        font-size: 1rem;
    }
    
    .pm-section-title h3 {
        font-size: 1.1rem;
    }
    
    .pm-text {
        font-size: 0.9rem;
    }
    
    .pm-sidebar {
        padding: 0;
    }
    
    .pm-tag {
        font-size: 0.75rem;
        padding: 5px 10px;
    }
    
    .pm-link-btn {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
}

/* ========== EXTRA SMALL PHONES (320px - 480px) ========== */
@media (max-width: 480px) {
    /* General */
    .navbar {
        padding: 12px 3%;
    }
    
    .nav-links li {
        padding: 10px 3%;
    }
    
    /* Hero */
    .hero {
        padding: 30px 3% 50px;
        gap: 20px;
    }
    
    .main-title {
        font-size: 2rem;
        margin-bottom: 10px;
    }
    
    .sub-headline {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .hero-desc {
        font-size: 0.85rem;
        margin-bottom: 20px;
    }
    
    .hero-actions {
        gap: 10px;
    }
    
    .primary-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    /* Portfolio Title */
    .portfolio-title,
    .about,
    .education,
    .certifications-section,
    .technologies {
        padding: 50px 3%;
    }
    
    /* Category Cards */
    .categories {
        padding: 0 3% 50px;
    }
    
    .card {
        padding: 30px 20px;
    }
    
    .card h3 {
        font-size: 1.2rem;
    }
    
    .card p {
        font-size: 0.85rem;
    }
    
    /* Contact Card */
    .contact-card {
        padding: 12px;
        gap: 12px;
    }
    
    /* Timeline */
    .timeline {
        padding-left: 15px;
    }
    
    .timeline::before {
        left: -10px;
    }
    
    .timeline-dot {
        left: -30px;
        width: 10px;
        height: 10px;
    }
    
    .timeline-content {
        padding: 20px;
    }
    
    /* Bento/Tech Boxes */
    .bento-box {
        width: 100px;
        height: 100px;
        gap: 8px;
    }
    
    .bento-box i {
        font-size: 2rem;
    }
    
    .bento-box span {
        font-size: 0.7rem;
    }
    
    .bento-wide,
    .bento-large {
        width: 200px;
    }
    
    /* Footer */
    .footer {
        padding: 50px 3% 25px;
    }
    
    .footer-title {
        font-size: 1.6rem;
    }
    
    .footer-form-wrapper {
        padding: 20px;
    }
    
    /* Status Bar & Back to Top */
    .back-to-top {
        width: 42px;
        height: 42px;
        bottom: 15px;
        right: 15px;
        font-size: 0.9rem;
    }
    
    /* Language Selector */
    .lang-menu {
        min-width: 140px;
    }
    
    .lang-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

