/* ===============================================================
   PORTFOLIO STYLESHEET — Modern Revamp
   Author: Shaikh Ibrahim Mohammed Rashid
   Features: CSS Variables, Glassmorphism, Smooth Animations,
             Dark Mode, Responsive Grid, Modern Typography
   =============================================================== */

/* ---------- CSS Custom Properties (Premium Navy/Neon Theme) ---------- */
:root {
    /* Primary palette — Neon Cyan */
    --primary: #00f3ff;
    --primary-light: #80f7ff;
    --primary-dark: #00bac7;
    --primary-rgb: 0, 243, 255;

    /* Accent — Deep Purple/Pink for premium highlights */
    --accent: #a855f7;
    --accent-light: #c084fc;
    --accent-dark: #7e22ce;
    --accent-rgb: 168, 85, 247;

    /* Secondary Accent — Neon Magenta */
    --secondary: #ff007f;
    --secondary-rgb: 255, 0, 127;

    /* Neutrals — Deep Slate/Navy background */
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --heading: #ffffff;
    --bg: #050811; /* Extremely premium dark slate */
    --bg-alt: #0a0f1d;
    --card: rgba(10, 15, 30, 0.7); /* Premium Glassmorphic base */
    --card-border: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.1);

    /* Shadows — Elegant neon glows */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.6);
    --shadow-md: 0 10px 30px -5px rgba(0, 0, 0, 0.8);
    --shadow-lg: 0 20px 40px -5px rgba(0, 243, 255, 0.2); /* Neon cyan glow */
    --shadow-xl: 0 25px 50px -12px rgba(168, 85, 247, 0.25); /* Purple accent glow */

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Border radius - Bento Box style */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-base: 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

    /* Glass effect variables */
    --glass-bg: rgba(5, 8, 17, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: 24px;

    /* Navbar height */
    --nav-height: 85px;
}

/* ---------- Theme Variables ---------- */
/* Force dark theme default for the premium aesthetic */
[data-theme="dark"], body {
    color: var(--text);
    background-color: var(--bg);
}

/* Light Theme overrides */
[data-theme="light"] {
    --bg: #f8fafc; /* Slate 50 */
    --bg-alt: #f1f5f9; /* Slate 100 */
    --text: #0f172a; /* Slate 900 */
    --text-secondary: #475569; /* Slate 600 */
    --heading: #020617; /* Slate 950 */
    --card: rgba(255, 255, 255, 0.7); /* Light Glassmorphic base */
    --card-border: rgba(0, 0, 0, 0.08);
    --border: rgba(0, 0, 0, 0.1);
    
    /* Shadows - subtly adjusted for light mode */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px -5px rgba(0, 243, 255, 0.15); /* Still subtle cyan */
    --shadow-xl: 0 25px 50px -12px rgba(168, 85, 247, 0.15);

    /* Glass effect variables for light mode */
    --glass-bg: rgba(248, 250, 252, 0.75);
    --glass-border: rgba(0, 0, 0, 0.08);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
    overflow-x: hidden;
}

/* Screen-reader-only utility — visually hidden but SEO & accessibility readable */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text);
    background-color: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-slow),
                color var(--transition-slow);
}

/* Selection styling */
::selection {
    background-color: rgba(var(--primary-rgb), 0.2);
    color: var(--heading);
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color var(--transition-base);
}
a:hover { color: var(--primary-dark); }
a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- Scroll Progress Bar ---------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 10001;
    transition: width 0.05s linear;
    border-radius: 0 2px 2px 0;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--heading);
    line-height: 1.2;
    letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); font-weight: 600; }
h4 { font-size: 1.15rem; font-weight: 600; }
p { margin-bottom: var(--space-md); }

/* Section heading with decorative gradient underline */
.section-heading {
    text-align: center;
    margin-bottom: var(--space-3xl);
    position: relative;
}
.section-heading::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    margin: var(--space-md) auto 0;
    border-radius: var(--radius-full);
}

/* Subtitle text below section headings */
.section-subtitle {
    text-align: center;
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-top: calc(var(--space-md) * -1);
    margin-bottom: var(--space-2xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- Layout Container ---------- */
.section-container {
    width: min(90%, 1200px);
    margin: var(--space-4xl) auto;
    padding: var(--space-3xl);
    background-color: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: background-color var(--transition-slow),
                border-color var(--transition-slow),
                box-shadow var(--transition-slow);
}

/* Alternating highlight sections with gradient tint */
.highlight-section {
    background: linear-gradient(135deg,
        rgba(var(--primary-rgb), 0.03) 0%,
        rgba(var(--accent-rgb), 0.03) 100%);
    border-left: 4px solid var(--primary);
}
[data-theme="dark"] .highlight-section {
    background: linear-gradient(135deg,
        rgba(var(--primary-rgb), 0.08) 0%,
        rgba(var(--accent-rgb), 0.05) 100%);
}

/* ---------- Buttons ---------- */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
    min-height: 44px; /* Mobile touch target */
    min-width: 44px;
}
.cta-button.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}
.cta-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
}
.cta-button.outline {
    background: transparent;
    color: var(--primary) !important;
    border: 2px solid var(--primary);
}
.cta-button.outline:hover {
    background: var(--primary);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.3);
}
.cta-button.secondary {
    background: var(--bg-alt);
    color: var(--text) !important;
    border: 1px solid var(--border);
}
.cta-button.secondary:hover {
    background: var(--border);
    transform: translateY(-2px);
}
.cta-button i { font-size: 0.9em; }

/* ---------- Header / Navbar (Glassmorphism) ---------- */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
    transition: box-shadow var(--transition-base),
                background var(--transition-slow);
}
header.scrolled {
    box-shadow: var(--shadow-md);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--nav-height);
}

/* Logo with code-bracket styling */
.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--heading) !important;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
}
.logo-bracket {
    color: var(--primary);
    font-weight: 800;
}

/* Nav links — pill-style on hover */
.nav-links {
    display: flex;
    list-style: none;
    gap: var(--space-xs);
}
.nav-links li a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    position: relative;
}
.nav-links li a:hover,
.nav-links li a.active {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
}

/* Nav actions: theme toggle + burger */
.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    width: 44px; /* Accessible 44px touch target */
    height: 44px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all var(--transition-base);
}
.theme-toggle:hover {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.25);
}

/* Burger — 3-line animated toggle */
.burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 44px; /* Accessible 44px touch target */
    height: 44px;
    border-radius: var(--radius-sm);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background var(--transition-base);
}
.burger:hover { background: rgba(var(--primary-rgb), 0.1); }
.burger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text);
    border-radius: 2px;
    transition: all var(--transition-base);
}
.burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    background-color: var(--primary);
}
.burger.active span:nth-child(2) {
    opacity: 0;
}
.burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    background-color: var(--primary);
}

/* ---------- Hero Section ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-4xl) var(--space-xl);
    overflow: hidden;
    /* Deep gradient hero background */
    background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 40%, #312e81 70%, #1e1b4b 100%);
    color: #ffffff;
}

/* Animated floating shapes for visual depth */
.hero-bg-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    animation: floatShape 20s ease-in-out infinite;
}
.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}
.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    bottom: -80px;
    left: -80px;
    animation-delay: -7s;
}
.shape-3 {
    width: 200px;
    height: 200px;
    background: #a78bfa;
    top: 50%;
    left: 50%;
    animation-delay: -14s;
}
@keyframes floatShape {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(15px, 30px) scale(1.02); }
}

/* Dot-grid texture overlay on hero */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}
.hero-image-wrapper {
    margin-bottom: var(--space-xl);
}
.profile-pic {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 8px rgba(var(--primary-rgb), 0.2),
                0 20px 40px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.profile-pic:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(var(--primary-rgb), 0.3),
                0 24px 48px rgba(0, 0, 0, 0.35);
}

.hero-greeting {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--primary-light);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
}
.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: #ffffff;
    margin-bottom: var(--space-lg);
    background: linear-gradient(135deg, #ffffff 0%, #c7d2fe 50%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero .subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: rgba(255, 255, 255, 0.75);
    font-weight: 400;
    margin-bottom: var(--space-sm);
    line-height: 1.6;
}
.hero .tagline {
    font-size: 1rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: var(--space-2xl);
}

/* Social icons in hero — circular bordered */
.social-links {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}
.social-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.4rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all var(--transition-base);
}
.social-links a:hover {
    color: #ffffff;
    background: rgba(var(--primary-rgb), 0.3);
    border-color: rgba(var(--primary-rgb), 0.5);
    transform: translateY(-3px);
}

/* Hero CTA button group */
.hero-cta {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}
.hero-cta .cta-button.outline {
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff !important;
}
.hero-cta .cta-button.outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff !important;
}

/* Scroll-down indicator at bottom of hero */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-2xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: bounceDown 2s ease-in-out infinite;
}
@keyframes bounceDown {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ---------- Fade-in on Scroll ---------- */
.section-to-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.section-to-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- About Section ---------- */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}
.about-content p {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}
.about-content .cta-button {
    margin-top: var(--space-lg);
}

/* About keyword pill tags */
.about-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
}
.about-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    background: rgba(var(--primary-rgb), 0.08);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--transition-base);
    white-space: nowrap;
}
.about-tag:hover {
    background: rgba(var(--primary-rgb), 0.18);
    border-color: rgba(var(--primary-rgb), 0.5);
    transform: translateY(-2px);
}
.about-tag i {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Project tech-stack chip tags */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: var(--space-sm);
}
.project-tags .tag {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent-light);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Featured project badge overlay */
.project-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.4);
}

/* Achievement icon */
.achievement-icon {
    font-size: 2.2rem;
    margin-bottom: var(--space-sm);
    display: block;
    line-height: 1;
}

/* ---------- Skills Section ---------- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-lg);
}
.skill-item {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    border-radius: var(--radius-lg);
    background: var(--card);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}
/* Top gradient bar — appears on hover */
.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity var(--transition-base);
}
.skill-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(var(--primary-rgb), 0.15);
}
.skill-item:hover::before { opacity: 1; }

/* Icon wrapper with gradient background */
.skill-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--space-lg);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg,
        rgba(var(--primary-rgb), 0.1),
        rgba(var(--accent-rgb), 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
}
.skill-item i {
    font-size: 1.8rem;
    color: var(--primary);
}
.skill-item h3 {
    margin-bottom: var(--space-sm);
    font-size: 1.1rem;
}
.skill-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ---------- Projects Section ---------- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: var(--space-xl);
}
.project-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all var(--transition-slow);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}
.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    box-shadow: 0 0 0px rgba(var(--primary-rgb), 0);
    transition: box-shadow var(--transition-slow);
    z-index: -1;
}
.project-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: rgba(var(--primary-rgb), 0.4);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.project-card:hover::after {
    box-shadow: 0 20px 40px rgba(var(--primary-rgb), 0.15);
}

/* Featured Bento Box project layout */
@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .project-card.featured {
        grid-column: span 2;
        display: flex;
        flex-direction: row;
    }
    .project-card.featured .project-img-wrapper {
        flex: 1.2;
        height: 100%;
    }
    .project-card.featured .project-img-wrapper img {
        height: 100%;
        min-height: 320px;
    }
    .project-card.featured .project-body {
        flex: 1;
        justify-content: center;
        padding: var(--space-xl);
    }
}

/* Image zoom on card hover */
.project-img-wrapper {
    position: relative;
    overflow: hidden;
}
.project-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}
.project-card:hover img {
    transform: scale(1.05);
}
.project-body {
    padding: var(--space-lg);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.project-card h3 {
    color: var(--heading);
    margin-bottom: var(--space-sm);
    font-size: 1.25rem;
    font-weight: 700;
}
.project-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    flex-grow: 1;
    line-height: 1.7;
}
.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
}
.project-links a {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary) !important;
    transition: all var(--transition-base);
    min-height: 44px; /* Touch target size */
}
.project-links a:hover {
    background: var(--primary);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.35);
}

/* ---------- Achievements Section ---------- */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: var(--space-lg);
}
.achievement-card {
    background: var(--card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--card-border);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all var(--transition-slow);
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.achievement-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    box-shadow: 0 0 0px rgba(var(--accent-rgb), 0);
    transition: box-shadow var(--transition-slow);
    z-index: -1;
}

/* Left accent bar on standard cards */
.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: width var(--transition-base);
}

.achievement-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(var(--primary-rgb), 0.35);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.achievement-card:hover::before {
    width: 6px;
}
.achievement-card:hover::after {
    box-shadow: 0 20px 40px rgba(var(--primary-rgb), 0.12);
}

/* Featured Bento Box achievement styling */
@media (min-width: 1024px) {
    .achievements-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .achievement-card.featured {
        grid-column: span 2;
        background: linear-gradient(135deg, rgba(10, 15, 30, 0.8), rgba(168, 85, 247, 0.08));
        border-color: rgba(var(--accent-rgb), 0.3);
    }
    .achievement-card.featured::before {
        background: linear-gradient(180deg, var(--accent), var(--secondary));
    }
    .achievement-card.featured:hover {
        border-color: rgba(var(--accent-rgb), 0.6);
        box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
    .achievement-card.featured:hover::after {
        box-shadow: 0 25px 45px rgba(var(--accent-rgb), 0.18);
    }
}

.achievement-card h3 {
    color: var(--heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    line-height: 1.35;
}
.achievement-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    line-height: 1.6;
}
.achievement-hashtags {
    font-size: 0.8rem;
    color: var(--primary);
    margin-top: var(--space-md);
    line-height: 1.5;
    opacity: 0.8;
    letter-spacing: 0.05em;
}

/* ---------- Blog Section ---------- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
}
.blog-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
}
.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}
.blog-card:hover img { transform: scale(1.05); }
.blog-card .blog-content {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.blog-card .blog-category {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-xs);
}
.blog-card .blog-title {
    color: var(--heading);
    font-size: 1.15rem;
    margin-bottom: var(--space-sm);
    line-height: 1.4;
}
.blog-card .blog-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}
.blog-card .blog-snippet {
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex-grow: 1;
    margin-bottom: var(--space-md);
    line-height: 1.65;
}
.blog-card .blog-link {
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    margin-top: auto;
    transition: gap var(--transition-base);
}
.blog-card .blog-link:hover { gap: 10px; }

/* ---------- Certifications Section ---------- */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}
.cert-card {
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    background: var(--card);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}
.cert-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(var(--primary-rgb), 0.2);
}
.cert-card h4 {
    color: var(--heading);
    margin-bottom: var(--space-sm);
    font-size: 1rem;
    line-height: 1.4;
}
.cert-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 3px 0;
}
.cert-card .cert-link {
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: var(--space-md);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: rgba(var(--primary-rgb), 0.06);
    transition: all var(--transition-base);
}
.cert-card .cert-link:hover {
    background: rgba(var(--primary-rgb), 0.15);
}

/* ---------- Contact Section ---------- */
#contact {
    text-align: center;
}
.contact-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

/* ---------- Footer ---------- */
footer {
    text-align: center;
    padding: var(--space-2xl) var(--space-xl);
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: var(--space-4xl);
    transition: background-color var(--transition-slow),
                border-color var(--transition-slow);
}
footer a { color: var(--primary); }

/* ---------- Back to Top Button ---------- */
.back-to-top {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-base);
    z-index: 999;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
}

/* ===============================================================
   BLOG POST PAGE STYLES (preserved for sub-pages)
   =============================================================== */
.back-to-home-link {
    color: var(--primary);
    font-weight: 600;
    padding: 8px 16px;
    border: 2px solid var(--primary);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.back-to-home-link:hover {
    background-color: var(--primary);
    color: #ffffff !important;
    transform: translateY(-2px);
}

.page-blog-post header nav { justify-content: space-between; }
.page-blog-post .nav-links,
.page-blog-post .burger { display: none; }

.blog-post-container {
    width: min(90%, 900px);
    margin: var(--space-3xl) auto;
    padding: var(--space-3xl);
    background-color: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}
.post-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--heading);
    line-height: 1.2;
    margin-bottom: var(--space-md);
}
.post-meta {
    display: flex;
    gap: var(--space-xl);
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}
.post-meta span { display: flex; align-items: center; gap: 8px; }
.post-image {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xl);
}
.post-content { font-size: 1.05rem; line-height: 1.85; }
.post-content h2 {
    font-size: 1.6rem;
    color: var(--primary);
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
    text-align: left;
}
.post-content h2::after { margin: 10px 0 0; }
.post-content h3 {
    font-size: 1.3rem;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
}
.post-content p { margin-bottom: var(--space-lg); }
.post-content ul, .post-content ol {
    margin-left: var(--space-xl);
    margin-bottom: var(--space-lg);
}
.post-content li { margin-bottom: var(--space-sm); }
.post-content strong { color: var(--heading); }
.post-content pre {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.9rem;
    margin-bottom: var(--space-lg);
}
.back-link-container {
    text-align: center;
    margin-top: var(--space-2xl);
    border-top: 1px solid var(--border);
    padding-top: var(--space-xl);
}

/* ===============================================================
   RESPONSIVE DESIGN
   =============================================================== */

/* Tablet: consolidate nav spacing */
@media (max-width: 1024px) {
    .nav-links { gap: var(--space-xs); }
    .nav-links li a { font-size: 0.85rem; padding: var(--space-sm) 10px; }
}

/* Mobile: full-screen nav overlay, single-col grids */
@media (max-width: 768px) {
    .section-container {
        width: 95%;
        padding: var(--space-xl);
        margin: var(--space-2xl) auto;
    }
    .section-heading { margin-bottom: var(--space-2xl); }

    /* Full-screen mobile nav overlay */
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--glass-bg);
        backdrop-filter: blur(var(--glass-blur));
        -webkit-backdrop-filter: blur(var(--glass-blur));
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: var(--space-lg);
        transform: translateY(-100%);
        opacity: 0;
        transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
        z-index: 999;
    }
    .nav-links.nav-active {
        transform: translateY(0);
        opacity: 1;
    }
    .nav-links li {
        width: 80%;
        text-align: center;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease 0.2s, transform 0.4s ease 0.2s;
    }
    .nav-links.nav-active li {
        opacity: 1;
        transform: translateY(0);
    }
    /* Staggered entry for menu links */
    .nav-links.nav-active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.nav-active li:nth-child(2) { transition-delay: 0.15s; }
    .nav-links.nav-active li:nth-child(3) { transition-delay: 0.2s; }
    .nav-links.nav-active li:nth-child(4) { transition-delay: 0.25s; }
    .nav-links.nav-active li:nth-child(5) { transition-delay: 0.3s; }
    .nav-links.nav-active li:nth-child(6) { transition-delay: 0.35s; }
    .nav-links.nav-active li:nth-child(7) { transition-delay: 0.4s; }
    .nav-links.nav-active li:nth-child(8) { transition-delay: 0.45s; }

    .nav-links li a {
        font-size: 1.5rem;
        font-weight: 600;
        padding: var(--space-md) var(--space-xl);
        display: block;
        width: 100%;
        border-radius: var(--radius-md);
        transition: all var(--transition-base);
    }
    .nav-links li a:hover,
    .nav-links li a.active {
        color: var(--primary);
        background: rgba(var(--primary-rgb), 0.08);
        text-shadow: 0 0 10px rgba(var(--primary-rgb), 0.5);
    }
    .burger {
        display: flex;
        z-index: 1001;
    }

    /* Disable scroll animations on mobile to prevent animation locks */
    .section-to-animate {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    /* Hero adjustments */
    .hero {
        min-height: auto;
        padding: calc(var(--nav-height) + var(--space-2xl)) var(--space-lg) var(--space-3xl);
    }
    .hero h1 { font-size: 2.2rem; }
    .profile-pic { width: 120px; height: 120px; }
    .hero-cta { flex-direction: column; align-items: center; }
    .hero-cta .cta-button { width: 100%; max-width: 280px; }
    .scroll-indicator { display: none; }

    /* Single-column grids */
    .skills-grid,
    .projects-grid,
    .achievements-grid,
    .cert-grid,
    .blog-grid {
        display: grid;
        grid-template-columns: 1fr;
        min-height: min-content;
        width: 100%;
    }

    /* Reset featured bento cards to single-column */
    .project-card.featured,
    .achievement-card.featured {
        grid-column: span 1;
    }
    .project-card.featured {
        flex-direction: column;
    }
    .project-card.featured .project-img-wrapper img {
        height: 220px;
        min-height: auto;
    }

    /* Stack contact buttons vertically */
    .contact-links { flex-direction: column; align-items: center; }
    .cta-button { width: 100%; max-width: 320px; text-align: center; }

    /* Blog post mobile */
    .page-blog-post nav .logo { font-size: 1.2rem; }
    .blog-post-container { width: 95%; padding: var(--space-lg); }
    .post-title { font-size: 1.8rem; }
    .post-content { font-size: 0.95rem; }
}

/* Small mobile */
@media (max-width: 480px) {
    .hero h1 { font-size: 1.8rem; }
    .hero .subtitle { font-size: 0.9rem; }
    .section-container { padding: var(--space-lg); }
    .project-links { flex-direction: column; }
    nav { padding: 0 var(--space-md); }
}

/* ---------- Page Load Animation — staggered children in hero ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero-content > * {
    animation: fadeInUp 0.8s ease-out backwards;
}
.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.2s; }
.hero-content > *:nth-child(3) { animation-delay: 0.3s; }
.hero-content > *:nth-child(4) { animation-delay: 0.4s; }
.hero-content > *:nth-child(5) { animation-delay: 0.5s; }
.hero-content > *:nth-child(6) { animation-delay: 0.6s; }
.hero-content > *:nth-child(7) { animation-delay: 0.7s; }
.hero-content > *:nth-child(8) { animation-delay: 0.8s; }

/* ---------- Premium Profile Pic Pulse Ring ---------- */
@keyframes pulseRing {
    0% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.4); }
    70% { box-shadow: 0 0 0 18px rgba(var(--primary-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0); }
}
.profile-pic {
    animation: pulseRing 2.5s ease-out infinite;
}

/* ---------- Hero Heading Shimmer ---------- */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
.hero h1 {
    background-size: 200% auto;
    animation: shimmer 4s linear infinite;
}

/* ---------- Floating Motion for Hero Image ---------- */
@keyframes gentleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.hero-image-wrapper {
    animation: gentleFloat 4s ease-in-out infinite;
}

/* ---------- Project Badge Pulse ---------- */
@keyframes badgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
.project-badge {
    animation: badgePulse 2s ease-in-out infinite;
}

/* ---------- Reduce Motion for Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
