/* Modern CSS Reset and Variables */
:root {
    /* Color Palette */
    --primary-bg: #0a0e27;
    --secondary-bg: #1a1f3a;
    --accent-bg: #2d3561;
    --card-bg: rgba(45, 53, 97, 0.95);
    --glass-bg: rgba(26, 31, 58, 0.85);
    
    --primary-text: #ffffff;
    --secondary-text: #b8c5d6;
    --accent-text: #64ffda;
    --highlight-text: #82c4ff;
    
    --primary-accent: #64ffda;
    --secondary-accent: #7c3aed;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    
    /* Gradients */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-gradient: linear-gradient(135deg, #64ffda 0%, #7c3aed 100%);
    --card-gradient: linear-gradient(145deg, rgba(45, 53, 97, 0.95) 0%, rgba(26, 31, 58, 0.9) 100%);
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    
    /* Border radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(100, 255, 218, 0.3);
    
    /* Typography */
    --font-primary: "SpaceGrotesk", system-ui, -apple-system, sans-serif;
    --font-secondary: "Quicksand", system-ui, -apple-system, sans-serif;
    --font-mono: "Monaco", "Consolas", "Liberation Mono", monospace;
}

/* Font Declarations */
@font-face {
    font-family: "SpaceGrotesk";
    src: url(./fonts/Space_Grotesk/SpaceGrotesk-VariableFont_wght.ttf);
    font-display: swap;
}

@font-face {
    font-family: "Quicksand";
    src: url(./fonts/Quicksand/Quicksand-VariableFont_wght.ttf);
    font-display: swap;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 2rem;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    background: var(--primary-bg);
    color: var(--primary-text);
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Enhanced Background Effects */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%),
        url('img/skull.gif');
    background-size: 100% 100%, 100% 100%, 100% 100%, cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -2;
    transform: scaleX(-1);
    opacity: 0.7;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(10, 14, 39, 0.9) 0%, 
        rgba(26, 31, 58, 0.8) 50%, 
        rgba(45, 53, 97, 0.7) 100%);
    z-index: -1;
    backdrop-filter: blur(2px);
}

#abtme::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 70%, rgba(100, 255, 218, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(124, 58, 237, 0.2) 0%, transparent 50%),
        url('img/Earth-1-1440x900.jpg');
    background-size: 100% 100%, 100% 100%, cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -2;
    opacity: 0.8;
}

/* Typography */
a {
    color: var(--accent-text);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

a:hover {
    color: var(--primary-accent);
    transform: translateY(-1px);
}

a:visited {
    color: var(--accent-text);
}

a:active {
    color: var(--primary-accent);
}

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

/* Navigation Styles */
nav {
    padding: var(--space-sm);
    position: relative;
    z-index: 1000;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    background: var(--glass-bg);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(100, 255, 218, 0.1), transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar:hover::before {
    left: 100%;
}

.navbar:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

#logo {
    height: 2.5rem;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(100, 255, 218, 0.5));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#logo:hover {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 15px rgba(100, 255, 218, 0.8));
}

.navbar ul {
    display: flex;
    list-style: none;
    gap: var(--space-sm);
    margin: 0;
    padding: 0;
}

.navbar ul li {
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    padding: var(--space-xs) var(--space-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-secondary);
    font-weight: 600;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
}

.navbar ul li::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: inherit;
}

.navbar ul li:hover::before {
    transform: scale(1);
}

.navbar ul li:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-glow);
    cursor: pointer;
}

.navbar ul li a {
    color: var(--primary-text);
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* Header Styles */
header {
    margin: 0;
    padding: var(--space-lg) 0;
    flex: 1;
}

#wrap {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    margin: 0 var(--space-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#wrap:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.header {
    display: flex;
    align-items: baseline;
    padding: var(--space-lg);
    position: relative;
    z-index: 1;
}

.header p {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--primary-accent);
    margin-right: var(--space-md);
    text-shadow: 0 0 20px rgba(100, 255, 218, 0.5);
    animation: pulse 2s ease-in-out infinite alternate;
}

@keyframes pulse {
    from { text-shadow: 0 0 20px rgba(100, 255, 218, 0.5); }
    to { text-shadow: 0 0 30px rgba(100, 255, 218, 0.8); }
}

.title-tagline {
    display: flex;
    flex-direction: column;
}

.header h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--highlight-text);
    text-shadow: 
        0 1px 1px rgba(0, 0, 0, 0.1),
        0 0 5px rgba(130, 196, 255, 0.3),
        0 0 10px rgba(130, 196, 255, 0.2);
    letter-spacing: -0.02em;
    margin: 0;
    background: linear-gradient(135deg, var(--highlight-text), var(--primary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 600;
    font-family: var(--font-secondary);
    color: var(--secondary-text);
    margin-top: var(--space-xs);
    font-style: italic;
}

/* Content and Layout Styles */
#content {
    flex: 1;
    padding: var(--space-lg) 0;
}

#space {
    width: 100%;
    margin-top: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#space:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-xl);
}

#sec1 {
    margin-bottom: var(--space-2xl);
    padding: var(--space-lg) 0;
}

/* Article Styles */
article {
    background: var(--card-gradient);
    margin: var(--space-lg);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    color: var(--primary-text);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

article::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
}

article:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(100, 255, 218, 0.3);
}

article h2 {
    color: var(--primary-accent);
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 700;
    margin-bottom: var(--space-md);
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

article p {
    color: var(--secondary-text);
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

article ul {
    list-style: none;
    margin: var(--space-md) 0;
    padding: 0;
}

article ul li {
    position: relative;
    padding-left: var(--space-lg);
    margin-bottom: var(--space-xs);
    color: var(--secondary-text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

article ul li::before {
    content: "▶";
    position: absolute;
    left: 0;
    color: var(--primary-accent);
    font-size: 0.8em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

article ul li:hover {
    color: var(--primary-text);
    transform: translateX(5px);
}

article ul li:hover::before {
    color: var(--secondary-accent);
    transform: scale(1.2);
}

/* Project Section Styles */
#projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--space-xl);
    padding: var(--space-lg);
    max-width: 1400px;
    margin: 0 auto;
}

.project-box {
    background: var(--card-gradient);
    color: var(--primary-text);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: fit-content;
}

.project-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
}

.project-box::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(100, 255, 218, 0.05), transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-box:hover::after {
    left: 100%;
}

.project-box:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        var(--shadow-xl),
        0 0 40px rgba(100, 255, 218, 0.2);
    border-color: rgba(100, 255, 218, 0.4);
}

.project-box h2 {
    color: var(--primary-accent);
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
    margin-bottom: var(--space-md);
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-box p {
    color: var(--secondary-text);
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.project-box ul {
    list-style: none;
    margin: var(--space-md) 0;
    padding: 0;
}

.project-box ul li {
    position: relative;
    padding-left: var(--space-lg);
    margin-bottom: var(--space-xs);
    color: var(--secondary-text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-box ul li::before {
    content: "✦";
    position: absolute;
    left: 0;
    color: var(--primary-accent);
    font-size: 0.9em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-box ul li:hover {
    color: var(--primary-text);
    transform: translateX(5px);
}

.project-box ul li:hover::before {
    color: var(--secondary-accent);
    transform: scale(1.3) rotate(90deg);
}

/* Button Styles */
.project-box button,
button {
    background: var(--accent-gradient);
    color: var(--primary-text);
    border: none;
    border-radius: var(--radius-full);
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    margin-top: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-box button::before,
button::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: inherit;
}

.project-box button:hover::before,
button:hover::before {
    transform: scale(1);
}

.project-box button:hover,
button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        var(--shadow-lg),
        var(--shadow-glow);
}

.project-box button:active,
button:active {
    transform: translateY(0) scale(0.98);
}

.project-box a {
    display: inline-block;
    position: relative;
    z-index: 1;
}

/* Image Gallery and Preview Styles */
.preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-xl) var(--space-lg);
    gap: var(--space-xl);
}

#skyline {
    width: 100%;
    max-width: 1200px;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#skyline:hover {
    transform: scale(1.02);
    box-shadow: 
        var(--shadow-xl),
        0 0 40px rgba(100, 255, 218, 0.3);
}

#skyline img {
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#skyline:hover img {
    transform: scale(1.05);
}

#imggroup {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
    width: 100%;
    max-width: 1000px;
    margin-top: var(--space-xl);
}

#imggroup img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    aspect-ratio: 16/9;
    object-fit: cover;
}

#imggroup img:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 
        var(--shadow-xl),
        0 0 30px rgba(100, 255, 218, 0.2);
}

#areapic {
    margin: var(--space-lg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#areapic:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

/* Profile & Skills Enhancements */
.profile-block { 
    display: flex; 
    gap: var(--space-xl); 
    align-items: stretch; 
    flex-wrap: wrap;
}
.profile-pic-wrapper { 
    flex: 0 0 180px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}
.profile-pic { 
    width: 180px; 
    height: 180px; 
    object-fit: cover; 
    border-radius: 30%; 
    border: 3px solid rgba(100,255,218,0.3); 
    box-shadow: 0 0 0 4px rgba(124,58,237,0.15), var(--shadow-lg); 
    transition: all .5s cubic-bezier(.4,0,.2,1); 
    filter: saturate(1.1) contrast(1.05);
    background: radial-gradient(circle at 30% 30%, rgba(100,255,218,0.15), transparent 70%);
}
.profile-pic:hover { 
    transform: translateY(-6px) rotate3d(1,1,0,8deg) scale(1.04); 
    box-shadow: 0 10px 25px -5px rgba(0,0,0,.4), 0 0 0 4px rgba(100,255,218,0.35), 0 0 35px rgba(124,58,237,.4); 
}
.profile-text { flex: 1 1 320px; }

.skills-list { 
    list-style: none; 
    display: grid; 
    grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); 
    gap: var(--space-sm) var(--space-md); 
    margin: var(--space-md) 0 0; 
    padding: 0; 
}
.skills-list li { 
    display: flex; 
    align-items: center; 
    gap: .5rem; 
    background: linear-gradient(135deg, rgba(100,255,218,0.07), rgba(124,58,237,0.07)); 
    padding: .55rem .9rem; 
    border-radius: var(--radius-md); 
    position: relative; 
    overflow: hidden; 
    font-size: .85rem; 
    letter-spacing: .5px; 
    border: 1px solid rgba(255,255,255,0.06); 
    backdrop-filter: blur(12px); 
    transition: all .35s cubic-bezier(.4,0,.2,1);
}
.skills-list li::before { 
    content:""; 
    position:absolute; 
    inset:0; 
    background: linear-gradient(120deg, rgba(100,255,218,0.15), transparent 60%); 
    opacity:0; 
    transition: opacity .4s; 
    pointer-events:none; 
}
.skills-list li:hover { 
    transform: translateY(-4px); 
    border-color: rgba(100,255,218,0.35); 
    box-shadow: 0 6px 18px -4px rgba(0,0,0,.5), 0 0 25px -5px rgba(100,255,218,.4); 
}
.skills-list li:hover::before { opacity:1; }
.skill-badge { 
    font-weight:700; 
    font-family: var(--font-secondary); 
    padding: .35rem .7rem; 
    background: var(--accent-gradient); 
    border-radius: var(--radius-full); 
    font-size:.7rem; 
    letter-spacing:1px; 
    text-transform:uppercase; 
    box-shadow: 0 2px 6px -2px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,0.15); 
    position: relative; 
}
.skill-badge::after { 
    content:""; 
    position:absolute; 
    inset:0; 
    border-radius:inherit; 
    background:linear-gradient(135deg, rgba(255,255,255,0.35), transparent 60%); 
    mix-blend-mode: overlay; 
    opacity:.5; 
    pointer-events:none; 
}
.skill-level { 
    color: var(--secondary-text); 
    font-size:.7rem; 
    letter-spacing:.5px; 
    text-transform:uppercase; 
    opacity:.85; 
}

/* Footer RESET (remove old complex layout) */
footer, .footer-content, .footer-left, .footer-right, .footer-nav, .footer-social { all: unset; }
footer { display:flex; }

/* Minimal Footer */
footer {
    width: calc(100% - 2rem);
    margin: var(--space-2xl) 1rem 1rem 1rem;
    padding: var(--space-md) var(--space-lg);
    background: var(--glass-bg);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
}
footer::before { content:""; position:absolute; display:none; }
footer p { margin:0; flex:1; text-align:center; font-family:var(--font-secondary); color:var(--secondary-text); font-weight:500; }
#p1 { width:2.4rem; height:2.4rem; display:flex; align-items:center; justify-content:center; background:var(--accent-gradient); border-radius:var(--radius-full); font-weight:700; color:var(--primary-text); text-decoration:none; font-size:1.05rem; box-shadow:var(--shadow-md); transition:.25s; }
#p1:hover { transform:translateY(-2px) scale(1.08); box-shadow:var(--shadow-glow); }
.github-link { background:var(--accent-gradient); color:var(--primary-text); text-decoration:none; padding:.55rem 1.1rem; border-radius:var(--radius-full); font-weight:600; font-family:var(--font-secondary); font-size:.9rem; letter-spacing:.5px; box-shadow:var(--shadow-md); transition:.25s; }
.github-link:hover { transform:translateY(-2px) scale(1.05); box-shadow:var(--shadow-glow); }
@media (max-width:700px){ footer { flex-direction:column; width:calc(100% - 1.2rem); text-align:center; padding:var(--space-md); } footer p { order:3; } }
/* Subtle divider lines */
.footer-left::after { 
    content:""; 
    width:100%; 
    height:1px; 
    background: linear-gradient(90deg, rgba(100,255,218,0.4), rgba(124,58,237,0.1)); 
    margin-top: var(--space-sm); 
    opacity:.5; 
}
@media (max-width:820px){
  .footer-left::after { display:none; }
}

/* Back to top micro interaction */
#p1 { 
    font-family: var(--font-mono); 
    line-height:1; 
}
#p1:hover { 
    animation: backtop-wiggle .8s ease both; 
}
@keyframes backtop-wiggle { 
  0% { transform:translateY(-4px) scale(1.1) rotate(5deg); } 
  40% { transform:translateY(-6px) scale(1.15) rotate(-5deg); } 
  70% { transform:translateY(-4px) scale(1.1) rotate(3deg); } 
  100% { transform:translateY(-4px) scale(1.1) rotate(5deg); } 
}

/* About page layout */
.about-layout { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(340px,1fr)); 
    gap: var(--space-xl); 
    align-items: stretch; 
}
@media (max-width: 760px){
  .profile-block { justify-content:center; }
  .profile-pic-wrapper { flex:0 0 140px; }
  .profile-pic { width:140px; height:140px; }
  .skills-list { grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); }
  .skill-level { display:none; }
}

/* Footer Styles */
footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin: var(--space-2xl) var(--space-lg) var(--space-2xl) var(--space-lg);
    padding: var(--space-md) var(--space-lg);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: auto;
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
}

footer p {
    margin: 0;
    color: var(--secondary-text);
    font-family: var(--font-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    text-align: center;
    flex: 1;
}

/* Back to Top Button */
#p1 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    color: var(--primary-text);
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
}

#p1:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: var(--shadow-glow);
}

/* GitHub Link */
footer a:not(#p1) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    color: var(--primary-text);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
}

footer a:not(#p1):hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-glow);
}

/* Enhanced GitHub Button */
.github-btn-container {
    margin-top: var(--space-lg);
    display: flex;
    justify-content: flex-start;
}

.github-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    background: var(--primary-gradient);
    color: var(--primary-text);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-secondary);
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.github-btn::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.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.github-btn:hover,
.github-btn:focus {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        var(--shadow-xl),
        0 0 30px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.github-btn span {
    position: relative;
    z-index: 2;
}

/* Utility Classes */
.fade-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(10, 14, 39, 0.3) 100%);
    pointer-events: none;
    z-index: 10;
}

.glass-effect {
    backdrop-filter: blur(20px);
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glow-effect {
    box-shadow: 
        var(--shadow-lg),
        0 0 20px rgba(100, 255, 218, 0.2);
}

/* Loading Animation */
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.loading-shimmer {
    position: relative;
    overflow: hidden;
}

.loading-shimmer::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 1.5s infinite;
}

/* Scroll Indicators */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--accent-gradient);
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* Enhanced Focus States for Accessibility */
button:focus,
a:focus,
.navbar ul li:focus {
    outline: 2px solid var(--primary-accent);
    outline-offset: 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--secondary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-accent), var(--primary-accent));
}

/* Selection Styling */
::selection {
    background: rgba(100, 255, 218, 0.3);
    color: var(--primary-text);
}

::-moz-selection {
    background: rgba(100, 255, 218, 0.3);
    color: var(--primary-text);
}

/* Responsive Design */
@media (max-width: 1200px) {
    #projects {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: var(--space-lg);
    }
    
    .project-box {
        padding: var(--space-lg);
    }
}

@media (max-width: 1024px) {
    footer {
        margin: var(--space-lg) var(--space-sm) var(--space-sm) var(--space-sm);
    }

    .footer-nav {
        gap: var(--space-md);
    }
}

@media (max-width: 768px) {
    :root {
        --space-xs: 0.25rem;
        --space-sm: 0.75rem;
        --space-md: 1rem;
        --space-lg: 1.5rem;
        --space-xl: 2rem;
        --space-2xl: 2.5rem;
    }

    body::before {
        background-size: cover;
        background-position: center;
    }

    .navbar {
        flex-direction: column;
        gap: var(--space-sm);
        padding: var(--space-md);
    }

    .navbar ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-xs);
    }

    .navbar ul li {
        margin: 0;
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.9rem;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .header p {
        margin-right: 0;
    }

    #projects {
        grid-template-columns: 1fr;
        gap: var(--space-md);
        padding: var(--space-sm);
    }

    .project-box {
        margin: var(--space-sm);
        padding: var(--space-md);
    }

    article {
        margin: var(--space-sm);
        padding: var(--space-md);
    }

    #imggroup {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    footer {
        flex-direction: column;
        gap: var(--space-sm);
        margin: var(--space-lg) var(--space-xs);
        padding: var(--space-md);
    }

    footer p {
        order: 2;
    }

    #wrap {
        margin: 0 var(--space-xs);
    }
}

@media (max-width: 480px) {
    .header p {
        font-size: 1.5rem;
    }

    .header h1 {
        font-size: 1.25rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .project-box h2 {
        font-size: 1.1rem;
    }

    .navbar ul li {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    #logo {
        height: 2rem;
    }

    footer {
        margin: var(--space-lg) var(--space-xs);
        padding: var(--space-sm);
    }

    #p1 {
        width: 2rem;
        height: 2rem;
        font-size: 0.9rem;
    }

    footer a:not(#p1) {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Print Styles */
@media print {
    body::before,
    body::after,
    .fade-overlay {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .navbar,
    footer {
        display: none;
    }

    article,
    .project-box {
        background: white;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary-bg: #000000;
        --secondary-bg: #1a1a1a;
        --primary-text: #ffffff;
        --secondary-text: #cccccc;
        --primary-accent: #00ff00;
        --secondary-accent: #0080ff;
    }
}

/* Dark Mode Support (already implemented, but ensuring consistency) */
@media (prefers-color-scheme: dark) {
    /* Already optimized for dark mode */
}

/* Animation Performance Optimizations */
.navbar,
.project-box,
article,
button,
#logo {
    will-change: transform;
}

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

@supports (scroll-behavior: smooth) {
    html {
        scroll-behavior: smooth;
    }
}

/* Ensure html scrolls smoothly for anchor links */
html {
    scroll-behavior: smooth;
}

/* Footer improvements for better spacing and not cut off */
footer {
    margin: var(--space-2xl) var(--space-lg) var(--space-2xl) var(--space-lg);
    padding: var(--space-xl) var(--space-xl) var(--space-lg) var(--space-xl);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    min-height: 90px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    footer {
        margin: var(--space-xl) var(--space-xs) var(--space-xl) var(--space-xs);
        padding: var(--space-lg) var(--space-sm) var(--space-md) var(--space-sm);
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
}

@media (max-width: 480px) {
    footer {
        margin: var(--space-lg) var(--space-xs) var(--space-lg) var(--space-xs);
        padding: var(--space-md) var(--space-xs) var(--space-sm) var(--space-xs);
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }
}

/* Make sure the back-to-top anchor works and is not cut off */
#p1 {
    scroll-margin-top: 120px;
}

/* Add a top anchor for smooth scroll */
body::before {
    content: "";
    display: block;
    height: 1px;
    width: 1px;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}