/* ============================================================
   style.css – Rehan Ahmed Portfolio (Single Page)
   ============================================================ */

/* ===== ROOT VARIABLES ===== */
:root {
    --primary: #00d9ff;
    --secondary: #7e00ff;
    --accent: #ff00c8;
    --success: #00ff88;
    --warning: #ffaa00;
    --error: #ff0066;
    
    /* Light theme */
    --bg-primary: #050510;
    --bg-secondary: #0a0a16;
    --bg-card: rgba(10, 10, 22, 0.75);
    --bg-card-hover: rgba(20, 20, 40, 0.85);
    --text-primary: #f0f8ff;
    --text-secondary: #c0c0d0;
    --text-muted: #a0a0c0;
    --border-color: rgba(0, 217, 255, 0.15);
    --shadow-color: rgba(0, 217, 255, 0.1);
    --header-bg: rgba(5, 5, 16, 0.92);
    --footer-bg: rgba(5, 5, 16, 0.95);
}

[data-theme="light"] {
    --bg-primary: #f0f4f8;
    --bg-secondary: #e8edf2;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --text-primary: #0a0a16;
    --text-secondary: #1a1a2e;
    --text-muted: #4a4a5e;
    --border-color: rgba(0, 217, 255, 0.2);
    --shadow-color: rgba(0, 0, 0, 0.08);
    --header-bg: rgba(255, 255, 255, 0.92);
    --footer-bg: rgba(240, 244, 248, 0.95);
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* ===== ANIMATED BACKGROUND ===== */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.floating-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    opacity: 0.06;
    animation: float 25s infinite linear;
}

[data-theme="light"] .shape {
    opacity: 0.04;
}

.shape-1 {
    width: 120px;
    height: 120px;
    top: 8%;
    left: 5%;
    animation-delay: 0s;
    animation-duration: 28s;
}

.shape-2 {
    width: 180px;
    height: 180px;
    top: 55%;
    right: 3%;
    animation-delay: -6s;
    animation-duration: 32s;
}

.shape-3 {
    width: 90px;
    height: 90px;
    bottom: 15%;
    left: 15%;
    animation-delay: -12s;
    animation-duration: 24s;
}

.shape-4 {
    width: 140px;
    height: 140px;
    top: 25%;
    right: 25%;
    animation-delay: -18s;
    animation-duration: 30s;
}

.shape-5 {
    width: 220px;
    height: 220px;
    bottom: 5%;
    right: 10%;
    animation-delay: -9s;
    animation-duration: 35s;
}

@keyframes float {
    0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
    25%  { transform: translate(60px, -40px) rotate(90deg) scale(1.05); }
    50%  { transform: translate(-30px, 70px) rotate(180deg) scale(0.95); }
    75%  { transform: translate(40px, -20px) rotate(270deg) scale(1.02); }
    100% { transform: translate(0, 0) rotate(360deg) scale(1); }
}

/* ===== HEADER ===== */
header {
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    animation: slideDown 0.6s ease-out;
    transition: background 0.3s ease, border-color 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 0.5px;
}

.logo-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    animation: pulse 2s infinite;
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.4);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

.header-content {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1.1rem;
}

.header-icon:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.15);
}

.theme-toggle {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.05);
}

.theme-toggle:hover {
    border-color: var(--primary);
    transform: rotate(20deg);
    box-shadow: 0 0 25px rgba(0, 217, 255, 0.2);
}

.theme-toggle i {
    transition: transform 0.3s ease;
}

.theme-toggle:hover i {
    transform: rotate(-20deg);
}

/* ===== SECTIONS ===== */
.section {
    padding: 100px 0 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.section:first-of-type {
    padding-top: 120px;
}

.section-title {
    font-size: 2.6rem;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}

.section-title::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

.sub-title {
    font-size: 1.8rem;
    color: var(--primary);
    margin: 50px 0 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    display: inline-block;
}

/* ===== INTRODUCTION ===== */
#intro {
    background: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.intro-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.intro-text {
    flex: 1;
}

.typing-text {
    font-size: 3.8rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
    position: relative;
    line-height: 1.2;
}

.typing-text::after {
    content: '|';
    position: absolute;
    right: -12px;
    top: 0;
    color: var(--primary);
    animation: blink 1s step-end infinite;
    font-weight: 300;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.intro-text h2 {
    font-size: 1.8rem;
    margin: 8px 0 20px;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 1px;
}

.intro-text p {
    font-size: 1.1rem;
    margin-bottom: 35px;
    max-width: 620px;
    color: var(--text-secondary);
    line-height: 1.9;
}

.intro-btns {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: none;
    gap: 8px;
}

.btn.primary {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.25);
}

.btn.primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 35px rgba(0, 217, 255, 0.4);
}

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

.btn.secondary:hover {
    background: rgba(0, 217, 255, 0.08);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 217, 255, 0.15);
}

.btn-hover-effect {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.6s;
}

.btn:hover .btn-hover-effect {
    left: 100%;
}

.intro-image {
    flex-shrink: 0;
}

.image-container {
    position: relative;
}

.profile-image {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(0, 217, 255, 0.25);
    position: relative;
    z-index: 2;
    box-shadow: 0 0 60px rgba(0, 217, 255, 0.08);
}

.image-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0.08;
    z-index: 1;
    animation: glowPulse 4s infinite alternate;
}

@keyframes glowPulse {
    from { opacity: 0.06; transform: translate(-50%, -50%) scale(1); }
    to   { opacity: 0.15; transform: translate(-50%, -50%) scale(1.08); }
}

/* ===== EDUCATION ===== */
#education {
    background: var(--bg-secondary);
}

.education-card {
    max-width: 800px;
    margin: 0 auto;
}

.edu-item {
    background: var(--bg-card);
    padding: 35px 40px;
    border-radius: 16px;
    border-left: 5px solid var(--primary);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.edu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px var(--shadow-color);
}

.edu-item h3 {
    font-size: 1.6rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.edu-item .date {
    color: var(--text-muted);
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.edu-item .institution {
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.edu-item p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===== PROJECTS ===== */
#projects {
    background: var(--bg-primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 20px;
}

.project-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.4s ease;
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 12px 45px var(--shadow-color);
    background: var(--bg-card-hover);
}

.project-img {
    height: 160px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.project-card:hover .project-img img {
    transform: scale(1.05);
}

.project-info {
    padding: 18px 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-info h4 {
    font-size: 1.05rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.project-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 12px;
}

.project-tags span {
    padding: 3px 10px;
    background: rgba(0, 217, 255, 0.08);
    border-radius: 20px;
    font-size: 0.65rem;
    color: var(--primary);
    border: 1px solid rgba(0, 217, 255, 0.1);
}

.project-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.btn.small {
    padding: 6px 14px;
    font-size: 0.75rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: none;
    cursor: pointer;
}

.btn.small.github {
    background: #24292e;
    color: #fff;
}

.btn.small.github:hover {
    background: #2f363d;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.btn.small.youtube {
    background: #ff0000;
    color: #fff;
}

.btn.small.youtube:hover {
    background: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,0,0,0.25);
}

.badge.in-progress {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(255, 170, 0, 0.15);
    color: var(--warning);
    border: 1px solid rgba(255, 170, 0, 0.25);
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ===== ASSIGNMENTS ===== */
.assignments-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 20px;
}

.assign-card {
    background: var(--bg-card);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-align: center;
    padding-bottom: 14px;
}

.assign-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 8px 30px var(--shadow-color);
}

.assign-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.assign-card h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 12px 0 4px;
    padding: 0 10px;
}

.assign-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    padding: 0 12px;
    margin-bottom: 8px;
}

.assign-tags {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 0 10px;
}

.assign-tags span {
    padding: 3px 10px;
    background: rgba(0, 217, 255, 0.06);
    border-radius: 15px;
    font-size: 0.65rem;
    color: var(--text-muted);
    border: 1px solid rgba(0, 217, 255, 0.06);
}

/* ===== SERVICES ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 20px;
}

.service-card {
    background: var(--bg-card);
    padding: 25px 20px;
    border-radius: 14px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.4s ease;
    backdrop-filter: blur(4px);
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 10px 40px var(--shadow-color);
    background: var(--bg-card-hover);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.service-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== SKILLS ===== */
#skills {
    background: var(--bg-secondary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    max-width: 1100px;
    margin: 0 auto;
}

.skill-category {
    background: var(--bg-card);
    padding: 25px 22px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.skill-category:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 30px var(--shadow-color);
}

.skill-category h3 {
    font-size: 1.05rem;
    color: var(--primary);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.skill-category h3 i {
    font-size: 1.2rem;
    width: 24px;
}

.skill-category ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
}

.skill-category ul li {
    color: var(--text-secondary);
    font-size: 0.92rem;
    padding: 3px 0;
    position: relative;
    transition: color 0.3s;
}

.skill-category ul li::before {
    content: '▹';
    color: var(--primary);
    margin-right: 6px;
    font-size: 0.8rem;
}

.skill-category:hover ul li {
    color: var(--text-primary);
}

/* ===== FOOTER ===== */
footer {
    background: var(--footer-bg);
    padding: 35px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo span {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.footer-logo p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 2px;
}

.footer-copy p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============================================================
   RESPONSIVE DESIGN - FULLY FIXED FOR ALL DEVICES
   ============================================================ */

/* ===== TABLET (max-width: 1200px) ===== */
@media (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .assignments-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== TABLET (max-width: 992px) ===== */
@media (max-width: 992px) {
    .intro-content {
        gap: 40px;
    }
    .typing-text {
        font-size: 3rem;
    }
    .profile-image {
        width: 270px;
        height: 270px;
    }
    .image-glow {
        width: 290px;
        height: 290px;
    }
    
    /* Fix for tablet - ensure all sections visible */
    .projects-grid,
    .services-grid,
    .skills-grid,
    .assignments-grid {
        display: grid !important;
    }
}

/* ===== MOBILE LANDSCAPE & SMALL TABLET (max-width: 768px) ===== */
@media (max-width: 768px) {
    .intro-content {
        flex-direction: column;
        text-align: center;
        gap: 35px;
    }
    .intro-text p {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    .intro-btns {
        justify-content: center;
    }
    .typing-text {
        font-size: 2.6rem;
    }
    .intro-text h2 {
        font-size: 1.5rem;
    }
    .profile-image {
        width: 220px;
        height: 220px;
    }
    .image-glow {
        width: 240px;
        height: 240px;
    }
    .section-title {
        font-size: 2.2rem;
    }
    
    /* FIX: Mobile responsive grids - 2 columns */
    .projects-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        display: grid !important;
    }
    
    .assignments-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
        display: grid !important;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
        display: grid !important;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
        display: grid !important;
    }
    
    .edu-item {
        padding: 25px;
    }
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    /* Ensure sections are visible */
    #projects,
    #skills,
    #education,
    #intro {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .section {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        min-height: auto;
        padding: 80px 0 60px;
    }
}

/* ===== MOBILE PORTRAIT (max-width: 576px) ===== */
@media (max-width: 576px) {
    .container {
        width: 92%;
        padding: 0 12px;
    }
    .section {
        padding: 80px 0 60px;
        min-height: auto;
    }
    .section:first-of-type {
        padding-top: 100px;
    }
    .typing-text {
        font-size: 2rem;
    }
    .intro-text h2 {
        font-size: 1.2rem;
    }
    .intro-text p {
        font-size: 1rem;
    }
    .intro-btns {
        flex-direction: column;
        align-items: center;
    }
    .btn {
        width: 100%;
        max-width: 260px;
        justify-content: center;
        padding: 12px 24px;
        font-size: 0.95rem;
    }
    .profile-image {
        width: 180px;
        height: 180px;
    }
    .image-glow {
        width: 200px;
        height: 200px;
    }
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }
    .section-title::after {
        width: 60px;
        bottom: -12px;
    }
    .sub-title {
        font-size: 1.4rem;
    }
    
    /* FIX: Mobile responsive - single column for better readability */
    .projects-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
        display: grid !important;
    }
    
    .assignments-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
        display: grid !important;
    }
    
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
        display: grid !important;
    }
    
    .skills-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
        display: grid !important;
    }
    
    .project-img {
        height: 160px;
    }
    .project-info {
        padding: 16px 18px 20px;
    }
    .project-info h4 {
        font-size: 1.1rem;
    }
    .assign-card img {
        height: 120px;
    }
    .skill-category {
        padding: 18px 20px;
    }
    .skill-category ul li {
        font-size: 0.9rem;
    }
    .edu-item h3 {
        font-size: 1.3rem;
    }
    .edu-item {
        padding: 20px;
    }
    .project-links {
        flex-direction: column;
        align-items: stretch;
    }
    .btn.small {
        justify-content: center;
    }
    
    /* Ensure all sections visible on mobile */
    #projects,
    #skills,
    #education,
    #intro {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        min-height: auto;
    }
}

/* ===== EXTRA SMALL DEVICES (max-width: 400px) ===== */
@media (max-width: 400px) {
    .typing-text {
        font-size: 1.7rem;
    }
    .profile-image {
        width: 150px;
        height: 150px;
    }
    .image-glow {
        width: 170px;
        height: 170px;
    }
    
    .projects-grid,
    .assignments-grid,
    .services-grid,
    .skills-grid {
        max-width: 100% !important;
        display: grid !important;
    }
    
    .projects-grid {
        grid-template-columns: 1fr !important;
    }
    
    .assignments-grid {
        grid-template-columns: 1fr !important;
    }
    
    .services-grid {
        grid-template-columns: 1fr !important;
    }
    
    .skills-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ===== UTILITY ===== */
button {
    background: none;
    border: none;
    cursor: pointer;
}

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--primary), var(--secondary));
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

::selection {
    background: var(--primary);
    color: #fff;
}