/* --- 1. CORE VARIABLES & THEME --- */
:root {
    /* Dark Theme (Default) - Deep Forest */
    --bg-deep: #0a1f0a;
    --bg-panel: #142814;
    --text-main: #e8f5e8;
    --text-dim: #8daa8d;
    --border-dim: #2a4a2a;
    --scanline-color: rgba(10, 30, 10, 0.1);
    --cursor-border: rgba(120, 200, 80, 0.4);

    /* Unique Color Palette - Forest & Amber */
    --accent-primary: #22c55e;
    --accent-secondary: #f59e0b;
    --accent-tertiary: #84cc16;
    --accent-success: #16a34a;

    /* Unique Button Colors */
    --btn-live: #ec4899;
    --btn-github: #8b5cf6;
    --btn-resume: #06b6d4;
    --btn-contact: #10b981;
    --btn-download: #f97316;

    --font-display: 'Space Grotesk', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
}

/* LIGHT MODE OVERRIDES - Meadow Sunrise */
body.light-mode {
    --bg-deep: #f0f9f0;
    /* Mint cream background */
    --bg-panel: #ffffff;
    /* Pure white panels */
    --text-main: #1a3a1a;
    /* Deep forest green text */
    --text-dim: #4a6a4a;
    /* Sage green for secondary text */
    --border-dim: #c8e6c8;
    /* Light green borders */
    --scanline-color: rgba(0, 0, 0, 0.02);
    /* Very subtle scanlines */
    --cursor-border: rgba(34, 197, 94, 0.6);
    /* Green cursor ring */
    
    /* Light Mode Unique Colors */
    --accent-primary: #16a34a;
    /* Forest green */
    --accent-secondary: #d97706;
    /* Amber */
    --accent-tertiary: #65a30d;
    /* Lime green */
    --accent-success: #15803d;
    /* Deep green */

    /* Light Mode Button Colors */
    --btn-live: #db2777;
    --btn-github: #7c3aed;
    --btn-resume: #0891b2;
    --btn-contact: #059669;
    --btn-download: #ea580c;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: var(--font-display);
    overflow-x: hidden;
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- 2. CRT SCANLINE OVERLAY --- */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0) 50%,
            var(--scanline-color) 50%,
            var(--scanline-color));
    background-size: 100% 4px;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.6;
}

/* --- 3. CUSTOM CURSOR --- */
.cursor-dot,
.cursor-outline {
    position: fixed;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-secondary);
    box-shadow: 0 0 10px var(--accent-secondary);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--cursor-border);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body:hover .cursor-outline.hovered {
    width: 60px;
    height: 60px;
    background-color: rgba(34, 197, 94, 0.1);
    border-color: var(--accent-primary);
    mix-blend-mode: multiply;
}

body:not(.light-mode):hover .cursor-outline.hovered {
    mix-blend-mode: screen;
}

/* --- 4. LAYOUT --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5vw;
    position: relative;
    z-index: 2;
}

section {
    min-height: 100vh;
    padding: 80px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mono {
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: var(--accent-primary);
    letter-spacing: 1px;
}

.section-header {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 60px;
    border-top: 1px solid var(--border-dim);
    padding-top: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
}

.section-header::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 50px;
    height: 1px;
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
}

.section-num {
    font-family: var(--font-code);
    font-size: 1rem;
    color: var(--text-dim);
    writing-mode: vertical-rl;
}

/* --- 5. DOCK NAV --- */
.dock-wrapper {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: flex-end;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(20, 40, 20, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-dim);
    border-radius: 50px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    transition: background 0.3s;
}

body.light-mode .dock-wrapper {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--border-dim);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.dock-item {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-panel);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    border: 1px solid transparent;
}

.dock-item:hover {
    min-width: 60px;
    height: 60px;
    margin-bottom: 15px;
    background: var(--accent-primary);
    color: var(--bg-deep);
    transform: translateY(-10px);
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px var(--accent-primary);
}

/* --- 6. HERO SECTION --- */
.hero-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    align-items: center;
    gap: 50px;
}

.hero-name {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 800;
    line-height: 0.9;
    text-transform: uppercase;
    position: relative;
    color: var(--text-main);
    margin-bottom: 20px;
}

.hero-visual {
    position: relative;
    width: 100%;
    max-width: 350px;
    aspect-ratio: 1/1;
    margin: 0 auto;
}

.hero-img-box {
    width: 100%;
    height: 100%;
    position: relative;
    border: 2px solid var(--text-dim);
    overflow: hidden;
    z-index: 1;
    transition: 0.3s;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.1);
    transition: 0.5s;
}

.hero-img-box:hover .hero-img {
    filter: grayscale(0%) contrast(1);
}

.hero-img-box:hover {
    border-color: var(--accent-primary);
}

.hero-visual::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent-secondary);
    z-index: 0;
    transition: 0.3s;
}

.hero-visual:hover::after {
    top: 10px;
    left: 10px;
    background: rgba(245, 158, 11, 0.1);
}

/* Glitch Animation */
.glitch-wrapper {
    position: relative;
    display: inline-block;
}

.glitch {
    position: relative;
    color: var(--text-main);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-deep);
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 var(--accent-secondary);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 var(--accent-primary);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(31px, 9999px, 94px, 0);
    }

    100% {
        clip: rect(12px, 9999px, 54px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(68px, 9999px, 87px, 0);
    }

    100% {
        clip: rect(33px, 9999px, 6px, 0);
    }
}

/* --- 7. SKILLS --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--accent-primary);
    font-family: var(--font-code);
}

.skill-line {
    height: 1px;
    background: var(--border-dim);
    flex-grow: 1;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-tag {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-dim);
    color: var(--text-dim);
    font-family: var(--font-code);
    font-size: 0.9rem;
    transition: 0.3s;
}

body.light-mode .skill-tag {
    background: rgba(0, 0, 0, 0.03);
}

.skill-tag:hover {
    border-color: var(--accent-primary);
    color: var(--text-main);
    background: rgba(34, 197, 94, 0.1);
    transform: translateY(-3px);
}

/* --- 8. EDUCATION & PROJECTS --- */
.edu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.sys-log-card {
    background: rgba(255, 255, 255, 0.03);
    border-left: 2px solid var(--text-dim);
    padding: 30px;
    font-family: var(--font-code);
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

body.light-mode .sys-log-card {
    background: rgba(0, 0, 0, 0.03);
}

.sys-log-card:hover {
    border-left-color: var(--accent-primary);
    background: rgba(34, 197, 94, 0.05);
}

.sys-date {
    color: var(--accent-primary);
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: block;
}

.sys-title {
    font-size: 1.2rem;
    color: var(--text-main);
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

.sys-loc {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.project-item {
    display: grid;
    grid-template-columns: 0.5fr 3fr 1.5fr 0.5fr;
    align-items: center;
    padding: 35px 0;
    border-bottom: 1px solid var(--border-dim);
    transition: 0.3s;
}

.project-item:hover {
    background: var(--bg-panel);
    padding-left: 20px;
    border-color: var(--text-dim);
}

.proj-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-main);
    transition: 0.3s;
}

.project-item:hover .proj-title {
    color: var(--accent-primary);
}

.proj-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    align-items: center;
}

/* --- 9. UNIQUE BUTTON STYLES --- */
.btn-icon {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-dim);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    text-decoration: none;
    transition: 0.3s;
    font-family: var(--font-code);
    position: relative;
}

.btn-icon:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.3);
}

/* Live Button - Pink */
.btn-live {
    border-radius: 12px;
    width: auto;
    height: auto;
    padding: 12px 24px;
    border: 2px solid var(--btn-live);
    background: linear-gradient(135deg, var(--btn-live) 0%, #be185d 100%);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-live::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-live:hover::before {
    left: 100%;
}

.btn-live:hover {
    background: transparent;
    color: var(--btn-live);
    border-color: var(--btn-live);
    box-shadow: 0 0 25px rgba(236, 72, 153, 0.5);
    transform: translateY(-3px) scale(1.05);
}

/* GitHub Button - Purple */
.btn-github {
    border-radius: 12px;
    width: auto;
    height: auto;
    padding: 12px 24px;
    border: 2px solid var(--btn-github);
    background: linear-gradient(135deg, var(--btn-github) 0%, #6d28d9 100%);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-github::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-github:hover::before {
    left: 100%;
}

.btn-github:hover {
    background: transparent;
    color: var(--btn-github);
    border-color: var(--btn-github);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.5);
    transform: translateY(-3px) scale(1.05);
}

/* Resume Button - Cyan */
.btn-resume {
    padding: 15px 30px;
    border: 2px solid var(--btn-resume);
    background: linear-gradient(135deg, var(--btn-resume) 0%, #0e7490 100%);
    color: white;
    text-decoration: none;
    font-family: var(--font-code);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.btn-resume::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-resume:hover::before {
    left: 100%;
}

.btn-resume:hover {
    background: transparent;
    color: var(--btn-resume);
    border-color: var(--btn-resume);
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.5);
    transform: translateY(-3px) scale(1.05);
}

/* Contact Button - Emerald */
.btn-contact {
    padding: 15px 30px;
    border: 2px solid var(--btn-contact);
    background: linear-gradient(135deg, var(--btn-contact) 0%, #047857 100%);
    color: white;
    text-decoration: none;
    font-family: var(--font-code);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.btn-contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-contact:hover::before {
    left: 100%;
}

.btn-contact:hover {
    background: transparent;
    color: var(--btn-contact);
    border-color: var(--btn-contact);
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.5);
    transform: translateY(-3px) scale(1.05);
}

/* Download Button - Orange */
.btn-download {
    padding: 15px 30px;
    border: 2px solid var(--btn-download);
    background: linear-gradient(135deg, var(--btn-download) 0%, #ea580c 100%);
    color: white;
    text-decoration: none;
    font-family: var(--font-code);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.btn-download::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-download:hover::before {
    left: 100%;
}

.btn-download:hover {
    background: transparent;
    color: var(--btn-download);
    border-color: var(--btn-download);
    box-shadow: 0 0 25px rgba(249, 115, 22, 0.5);
    transform: translateY(-3px) scale(1.05);
}

/* --- 10. ACHIEVEMENTS SECTION --- */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.achievement-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-dim);
    padding: 30px;
    border-radius: 8px;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

body.light-mode .achievement-card {
    background: rgba(0, 0, 0, 0.03);
}

.achievement-card:hover {
    border-color: var(--accent-primary);
    background: rgba(34, 197, 94, 0.05);
    transform: translateY(-5px);
}

.achievement-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--accent-primary);
}

.achievement-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-secondary);
    margin-bottom: 10px;
}

.achievement-title {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 10px;
}

.achievement-desc {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* --- 11. SYSTEM FOOTER (Detailed) --- */
.system-footer {
    border-top: 1px solid var(--border-dim);
    background: var(--bg-panel);
    padding: 80px 0 40px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-logo {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 20px;
}

.footer-desc {
    color: var(--text-dim);
    max-width: 400px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-heading {
    color: var(--accent-primary);
    margin-bottom: 25px;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    transition: 0.3s;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--text-main);
    padding-left: 5px;
}

.footer-contact p {
    margin-bottom: 15px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.footer-contact a {
    color: var(--text-main);
    text-decoration: none;
    transition: 0.3s;
}

.footer-contact a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-dim);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-dim);
    font-family: var(--font-code);
    font-size: 0.8rem;
}

.footer-socials {
    display: flex;
    gap: 20px;
}

.footer-socials a {
    color: var(--text-dim);
    font-size: 1.1rem;
    transition: 0.3s;
}

.footer-socials a:hover {
    color: var(--accent-secondary);
    transform: translateY(-3px);
}

/* --- 12. ANIMATIONS --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes countUp {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

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

@keyframes blink {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--accent-primary);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fadeInRight {
    animation: fadeInRight 0.8s ease-out forwards;
}

.animate-countUp {
    animation: countUp 1s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-typewriter {
    overflow: hidden;
    border-right: 2px solid var(--accent-primary);
    white-space: nowrap;
    animation: typewriter 3s steps(40, end), blink 1s step-end infinite;
}

.hidden {
    opacity: 0;
}

/* --- 13. RESPONSIVE MEDIA QUERIES --- */

/* Tablet & Small Desktop (max-width: 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .hero-name {
        font-size: clamp(2.5rem, 6vw, 5rem);
    }

    .section-header {
        font-size: 2.5rem;
    }

    .system-footer {
        padding: 60px 0 30px;
        margin-top: 60px;
    }
    
    .footer-grid {
        gap: 40px;
        margin-bottom: 40px;
    }
    
    .footer-desc {
        max-width: 100%;
    }
}

/* Mobile & Tablet Portrait (max-width: 768px) */
@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
        padding-top: 20px;
    }

    .hero-visual {
        order: -1;
        max-width: 250px;
        margin: 0 auto 30px;
    }

    .hero-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-text div[style*="display: flex"] {
        justify-content: center;
    }

    .section-header {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 40px;
    }

    .section-num {
        writing-mode: horizontal-tb;
        font-size: 0.9rem;
        margin-bottom: 5px;
    }

    #about div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }

    .project-item {
        grid-template-columns: 1fr;
        gap: 12px;
        text-align: left;
        position: relative;
        padding: 30px 0;
    }

    .project-item .mono:first-child {
        font-size: 0.8rem;
        opacity: 0.5;
        margin-bottom: 5px;
    }

    .proj-title {
        font-size: 1.5rem;
    }

    .project-item .mono[style*="text-align: right"] {
        text-align: left !important;
        display: block;
        margin: 10px 0;
    }

    .proj-actions {
        justify-content: flex-start;
        margin-top: 10px;
        flex-wrap: wrap;
    }

    .btn-live,
    .btn-github {
        width: 40px;
        height: 40px;
        padding: 10px;
        border-radius: 50%;
        font-size: 1rem;
    }

    .btn-live span,
    .btn-github span {
        display: none;
    }

    .btn-live i,
    .btn-github i {
        margin: 0;
    }

    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer-contact p {
        justify-content: center;
    }

    .footer-socials {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding-top: 25px;
    }

    .dock-wrapper {
        bottom: 20px;
        padding: 25px 15px;
        gap: 10px;
        width: 90%;
        max-width: 500px;
        max-width: 500px;
        justify-content: space-between;
        border-radius: 9999px;
    }

    .dock-item {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .system-footer {
        padding: 50px 0 25px;
        margin-top: 50px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
        margin-bottom: 40px;
    }
    
    .footer-desc {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .footer-contact p {
        justify-content: center;
    }
    
    .footer-links {
        order: 3;
    }
    
    .footer-contact {
        order: 2;
    }
    
    .footer-about {
        order: 1;
    }
}

/* Large Mobile (max-width: 640px) */
@media (max-width: 640px) {
    .system-footer {
        padding: 40px 0 20px;
        margin-top: 40px;
    }
    
    .footer-grid {
        gap: 35px;
        margin-bottom: 35px;
    }
    
    .footer-logo {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    .footer-heading {
        font-size: 0.85rem;
        margin-bottom: 20px;
    }
    
    .footer-links a,
    .footer-contact p {
        font-size: 0.9rem;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .hero-name {
        font-size: 2.5rem;
    }

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

    .glitch::before,
    .glitch::after {
        display: none;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .dock-wrapper {
        bottom: 10px;
        padding: 20px 15px;
        border-radius: 9999px;
    }

    .dock-item {
        width: 50px;
        height: 35px;
    }

    .system-footer {
        padding: 30px 0 15px;
        margin-top: 30px;
    }
    
    .footer-grid {
        gap: 30px;
        margin-bottom: 30px;
    }
    
    .footer-logo {
        font-size: 1.2rem;
    }
    
    .footer-heading {
        font-size: 0.8rem;
        margin-bottom: 15px;
    }
    
    .footer-links li {
        margin-bottom: 10px;
    }
    
    .footer-contact p {
        margin-bottom: 12px;
        flex-direction: column;
        gap: 5px;
    }
    
    .footer-bottom {
        gap: 15px;
        padding-top: 20px;
        font-size: 0.75rem;
    }
    
    .footer-socials {
        gap: 15px;
    }
    
    .footer-socials a {
        font-size: 1rem;
    }
}

/* Extra Small Mobile (max-width: 360px) */
@media (max-width: 360px) {
    .system-footer {
        padding: 25px 0 15px;
    }
    
    .footer-grid {
        gap: 25px;
        margin-bottom: 25px;
    }
    
    .footer-logo {
        font-size: 1.1rem;
    }
    
    .footer-desc {
        font-size: 0.9rem;
    }
    
    .footer-links a,
    .footer-contact p {
        font-size: 0.85rem;
    }
    
    .footer-bottom {
        font-size: 0.7rem;
    }
}

/* Touch Device Optimization */
@media (hover: none) and (pointer: coarse) {
    .cursor-dot,
    .cursor-outline {
        display: none !important;
    }

    * {
        cursor: auto !important;
    }

    .dock-item:hover {
        transform: none;
        margin-bottom: 0;
    }

    .skill-tag:hover {
        transform: none;
    }

    .project-item:hover {
        padding-left: 0;
        background: transparent;
    }

    .project-item {
        border-bottom: 1px solid var(--border-dim);
    }

    .footer-links a:hover {
        padding-left: 0;
    }
    
    .footer-socials a:hover {
        transform: none;
    }
    
    .footer-contact a:hover {
        color: var(--text-main);
    }

    .btn-live:hover,
    .btn-github:hover,
    .btn-resume:hover,
    .btn-contact:hover,
    .btn-download:hover {
        transform: none;
        box-shadow: none;
        background: initial;
    }
    
    .btn-live:hover::before,
    .btn-github:hover::before,
    .btn-resume:hover::before,
    .btn-contact:hover::before,
    .btn-download:hover::before {
        left: -100%;
    }
}

/* Landscape Orientation for Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .system-footer {
        padding: 40px 0 20px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        text-align: left;
    }
    
    .footer-about {
        grid-column: 1 / -1;
        text-align: center;
    }
    
    .footer-contact p {
        justify-content: flex-start;
    }
}

/* High-Resolution Displays */
@media (min-resolution: 192dpi) and (max-width: 768px) {
    .system-footer {
        padding: 45px 0 25px;
    }
}

/* Dark mode specific adjustments */
@media (max-width: 768px) {
    body:not(.light-mode) .system-footer {
        background: var(--bg-panel);
    }
    
    body.light-mode .system-footer {
        background: var(--bg-panel);
    }
}