.achievement-image-wrapper {
    width: 100%;
    height: 800px;
    background: #111;
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.3s, border-color 0.3s;
}

.achievement-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1rem;
    display: block;
    transition: transform 0.3s, filter 0.3s;
}

.achievement-image:hover {
    transform: scale(1.04);
    filter: brightness(1.08) contrast(1.1);
}

@media (max-width: 768px) {
    .achievement-image-wrapper {
        height: 120px;
    }
}

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

/* Color and Style Variables */
:root {
    --primary-dark: #0a0a0a;
    --secondary-dark: #1a1a1a;
    --accent-dark: #2a2a2a;
    --primary-red: #ff0000;
    /* Main accent color */
    --secondary-red: #cc0000;
    --accent-green: #00ff00;
    /* Color for terminal/highlight */
    --terminal-green: #00ff41;
    --text-light: #ffffff;
    --text-gray: #b0b0b0;
    --text-dark-gray: #808080;
    --gradient-red: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    --gradient-terminal: linear-gradient(135deg, #00ff41 0%, #00cc33 100%);
    --shadow-dark: 0 4px 20px rgba(255, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(255, 0, 0, 0.5);
    --border-glow: 0 0 10px rgba(255, 0, 0, 0.3);
}

/* Light theme overrides */
[data-theme="light"] {
    --primary-dark: #E8E8E8;
    --secondary-dark: #ffffff;
    --accent-dark: #e9e9e9;
    --text-light: #0f172a;
    --text-gray: #334155;
    --text-dark-gray: #64748b;
    --gradient-dark: linear-gradient(135deg, #ffffff 0%, #f2f2f2 100%);
}

/* General Body Styles */
body {
    font-family: 'Inter', sans-serif;
    background: var(--primary-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Matrix Background */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--primary-dark);
    opacity: 0.8;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Navigation */

header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(20, 20, 20, 0.45);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    z-index: 1000;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18);
    transition: all 0.3s ease;
}


/* header.scrolled {
            background: rgba(20, 20, 20, 0.65);
            box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.25), var(--shadow-dark);
            border-bottom: 1.5px solid rgba(255,255,255,0.13);
        } */

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin: 0 18px;
}

.nav-mobile-theme {
    display: none;
}

/* Logo */
.logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-red);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 0 0 10px var(--primary-red);
}

[data-theme="light"] .logo {
    text-shadow: none;
}

.logo i {
    color: var(--terminal-green);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Navigation Links */
.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
}

.nav-links a:hover {
    color: var(--primary-red);
    text-shadow: 0 0 10px var(--primary-red);
}

[data-theme="light"] .nav-links a:hover {
    text-shadow: none;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background: var(--primary-red);
    transition: all 0.3s ease;
    box-shadow: var(--border-glow);
}

.nav-links a:hover::after {
    width: 100%;
    left: 0;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-red);
    cursor: pointer;
}

/* Theme toggle button */
.theme-toggle {
    background: none;
    border: 1px solid var(--accent-dark);
    color: var(--text-light);
    border-radius: 0.5rem;
    padding: 0.45rem 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 0.75rem;
}

.theme-toggle:hover {
    border-color: var(--primary-red);
    box-shadow: var(--shadow-glow);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: var(--gradient-dark);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
    /* Added top padding to compensate for fixed header */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,0,0,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>') center/cover;
    opacity: 0.3;
}

.hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255, 0, 0, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: glow 4s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }

    to {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text h1 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

[data-theme="light"] .hero-text h1 {
    text-shadow: none;
}

.hero-text .highlight {
    color: var(--primary-red);
    text-shadow: 0 0 20px var(--primary-red);
}

[data-theme="light"] .hero-text .highlight {
    text-shadow: none;
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    font-family: 'JetBrains Mono', monospace;
}

.terminal-text {
    background: var(--secondary-dark);
    border: 1px solid var(--accent-dark);
    border-radius: 0.5rem;
    padding: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-dark);
}

.terminal-text .prompt {
    color: var(--terminal-green);
}

.terminal-text .command {
    color: var(--text-light);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    padding-bottom: 14px;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
    font-family: 'JetBrains Mono', monospace;
}

.btn-primary {
    background: var(--gradient-red);
    color: var(--text-light);
    border: 1px solid var(--primary-red);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    text-shadow: 0 0 10px var(--text-light);
}

[data-theme="light"] .btn-primary:hover {
    text-shadow: none;
    box-shadow: none;
}

.btn-secondary {
    background: transparent;
    color: var(--terminal-green);
    border: 1px solid var(--terminal-green);
}

.btn-secondary:hover {
    background: var(--terminal-green);
    color: var(--primary-dark);
    box-shadow: 0 0 20px var(--terminal-green);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Styles for profile picture */
.profile-image-container {
    width: 100%;
    /* Default to 100% width */
    max-width: 350px;
    /* Adjust max size */
    height: 350px;
    /* Make it square */
    background: var(--secondary-dark);
    border-radius: 1.5rem;
    /* Slightly rounded corners */
    overflow: hidden;
    box-shadow: var(--shadow-glow);
    /* Glow effect */
    border: 2px solid var(--primary-red);
    /* Red border */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    margin: 0 auto;
    /* Center the image container */
}

.profile-image-container:hover {
    transform: scale(1.02);
    box-shadow: 0 0 40px rgba(255, 0, 0, 0.7);
    /* More intense glow on hover */
}

.profile-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensure image fills the container without distortion */
    border-radius: 1.5rem;
    /* Match container border-radius */
}

.terminal-window {
    width: 100%;
    max-width: 500px;
    background: var(--secondary-dark);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-dark);
    border: 1px solid var(--accent-dark);
}

.terminal-header {
    background: var(--accent-dark);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terminal-dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: var(--primary-red);
}

.dot.yellow {
    background: #ffff00;
}

.dot.green {
    background: var(--terminal-green);
}

.terminal-body {
    padding: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
}

.terminal-line {
    margin-bottom: 0.5rem;
}

.terminal-line .prompt {
    color: var(--terminal-green);
}

.terminal-line .path {
    color: var(--primary-red);
}

.terminal-line .command {
    color: var(--text-light);
}

/* General Section */
.section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
}

[data-theme="light"] .section-title {
    text-shadow: none;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about {
    background: var(--secondary-dark);
}

.about-content {
    display: flex;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    width: 70%;
    margin: auto;
    justify-content: center;
    align-items: center;
}

.about-text {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    padding: 2rem;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-gray);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    transition: all 0.3s ease;
}

[data-theme="light"] .about-text {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

.about-text:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.25);
}

.about-text .highlight {
    color: var(--primary-red);
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat {
    text-align: center;
    padding: 2rem;
    background: var(--accent-dark);
    border-radius: 1rem;
    border: 1px solid rgba(255, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.stat:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary-red);
}

.stat-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-red);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px var(--primary-red);
}

.stat-label {
    color: var(--text-gray);
    font-weight: 500;
}

/* Skills Section */
.skills {
    background: var(--primary-dark);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--secondary-dark);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--accent-dark);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary-red);
}

.skill-icon-wrapper {
    width: 64px;
    height: 64px;
    background: var(--gradient-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-red);
    font-size: 1.75rem;
    border: 1px solid var(--accent-dark);
    border-radius: 0.75rem;
    flex: 0 0 64px;
}

.skill-info {
    padding: 0.25rem 0.25rem 0.25rem 0.5rem;
    text-align: left;
}

.skill-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.skill-category {
    color: var(--primary-red);
    margin-bottom: 1rem;
    font-weight: 500;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
    margin-bottom: 1rem;
}

.skill-tag {
    background: var(--primary-red);
    color: var(--text-light);
    padding: 0.35rem 0.9rem;
    border-radius: 0.6rem;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 6px 18px rgba(255, 0, 0, 0.08);
}

.skill-desc {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin: 1rem 0;
    font-family: 'Inter', sans-serif;
    line-height: 1.2;
}

.skill-social {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
}

/* Projects Section */
.projects {
    background: var(--primary-dark);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--secondary-dark);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(255, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary-red);
}

.project-image-wrapper {
    width: 100%;
    height: 200px;
    background: var(--gradient-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    font-size: 3rem;
    border-bottom: 1px solid var(--accent-dark);
    overflow: hidden;
}

.project-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.project-info {
    padding: 1.5rem;
    text-align: center;
}

.project-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.project-description {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.project-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.project-link-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.project-link {
    width: 40px;
    height: 40px;
    background: var(--secondary-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.project-link:hover {
    background: var(--primary-red);
    color: var(--text-light);
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--primary-red);
}

.project-modal {
    display: flex;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 10, 10, 0.85);
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light theme: modal overlay lighter */
[data-theme="light"] .project-modal {
    background: rgba(255, 255, 255, 0.85);
}

.project-modal-content {
    /* use theme variables so dialogs follow dark/light mode */
    background: var(--secondary-dark);
    color: var(--text-light);
    padding: 2rem;
    max-height: 90%;
    overflow-y: auto;
    scrollbar-width: none;
    border-radius: 1rem;
    max-width: 500px;
    width: 90vw;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.42);
    position: relative;
    text-align: left;
    transform: translateY(40px) scale(0.98);
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: var(--primary-red);
    cursor: pointer;
}

.project-modal-content h2 {
    margin-top: 0;
    color: var(--primary-red);
}

.project-modal-content ul {
    margin: 1rem 0 0 1.2rem;
    padding: 0;
    color: var(--terminal-green);
}

/* Modal carousel */
.modal-carousel {
    width: 100%;
    height: 260px;
    background: var(--secondary-dark);
    border: 1px solid var(--accent-dark);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin: 1rem 0;
}

.modal-carousel img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.carousel-control {
    background: var(--secondary-dark);
    color: var(--text-light);
    border: 1px solid var(--accent-dark);
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s;
}

.carousel-control:hover {
    border-color: var(--primary-red);
    box-shadow: var(--shadow-glow);
}

.carousel-control-div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.carousel-control-div-inner {
    display: flex;
    gap: 0.5rem;
}

/* prev/next inline in control bar; no absolute positioning */

.carousel-indicators {
    display: flex;
    gap: 6px;
    margin: 0 0.5rem;
}

.carousel-indicators .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-dark);
    border: 1px solid rgba(255, 0, 0, 0.4);
}

.carousel-indicators .dot.active {
    background: var(--primary-red);
}

/* Light-mode button overrides: make buttons solid red with white text */
[data-theme="light"] .btn,
[data-theme="light"] .btn-primary,
[data-theme="light"] .btn-secondary,
[data-theme="light"] .carousel-control,
[data-theme="light"] .project-link {
    background: var(--primary-red) !important;
    color: var(--text-light) !important;
    border-color: var(--primary-red) !important;
    box-shadow: 0 6px 18px rgba(204, 0, 0, 0.18);
}

[data-theme="light"] .btn-secondary {
    /* Ensure secondary buttons aren't green/outlined */
    background: var(--primary-red) !important;
    color: var(--text-light) !important;
    border: 1px solid var(--primary-red) !important;
}

[data-theme="light"] .project-link {
    background: var(--primary-red) !important;
    color: var(--text-light) !important;
}

/* Make skill tags solid red with white text in light mode as well */
[data-theme="light"] .skill-tag {
    background: var(--primary-red) !important;
    color: var(--text-light) !important;
    border: 1px solid var(--primary-red) !important;
}

.project-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.project-modal.show .project-modal-content {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.project-modal-content {
    background: #1a1a1a;
    color: #fff;
    padding: 2rem;
    border-radius: 1rem;
    max-width: 500px;
    width: 90vw;
    box-shadow: 0 8px 32px 0 rgba(255, 0, 0, 0.16), 0 0 16px 4px rgba(255, 0, 0, 0.18);
    border: 2px solid transparent;
    position: relative;
    text-align: left;
    transform: translateY(40px) scale(0.98);
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-modal.show .project-modal-content {
    opacity: 1;
    transform: translateY(0) scale(1);
    box-shadow: 0 8px 32px 0 rgba(255, 0, 0, 0.28), 0 0 32px 8px rgba(255, 0, 0, 0.22);
    border-color: var(--primary-red);
}


/* Achievements Section */
.achievement-image-wrapper {
    width: 100%;
    height: 180px;
    background: #111;
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.achievement-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1rem;
    display: block;
}

.achievements {
    background: var(--secondary-dark);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.achievement-card {
    background: var(--accent-dark);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    height: 100%;
    border-radius: 1rem;
    border: 1px solid rgba(255, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-red);
}

/* Light mode: ensure achievement accent bars and icons remain red with white text */
[data-theme="light"] .achievement-card::before {
    background: var(--primary-red);
}

[data-theme="light"] .achievement-icon {
    background: var(--primary-red);
    color: var(--text-light);
}

/* If buttons use pseudo-elements, keep them white-on-red in light mode */
[data-theme="light"] .btn::before,
[data-theme="light"] .btn::after {
    background: var(--primary-red) !important;
    color: var(--text-light) !important;
}

.btn.achievement-detail-btn {
    width: auto;
    display: flex;
    padding: 12px 0;
    justify-content: center;
    text-align: center;
    margin-top: auto;
    cursor: pointer;
}

.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary-red);
}

.achievement-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-red);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.achievement-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.achievement-description {
    color: var(--text-gray);
    line-height: 1.6;
}

/* Blog Section */
.blog {
    background: var(--primary-dark);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--secondary-dark);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(255, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary-red);
}

.blog-image-wrapper {
    width: 100%;
    height: 200px;
    background: var(--gradient-dark);
    overflow: hidden;
}

.blog-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.blog-card:hover .blog-image {
    transform: scale(1.05);
}

.blog-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.blog-excerpt {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.blog-meta {
    margin-bottom: 1.5rem;
}

.blog-meta-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.blog-meta-group .blog-badge {
    width: fit-content;
}

.blog-badge {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    border-radius: 1rem;
    font-family: 'JetBrains Mono', monospace;
}

.date-badge {
    background: var(--accent-dark);
    color: var(--terminal-green);
    border: 1px solid rgba(0, 255, 65, 0.3);
}

.tag-badge {
    background: var(--accent-dark);
    color: var(--primary-red);
    border: 1px solid rgba(255, 0, 0, 0.3);
}

.btn.blog-detail-btn {
    width: 100%;
    justify-content: center;
    margin-top: auto;
}

/* Contact Section */
.contact {
    background: var(--secondary-dark);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--primary-dark);
    border-radius: 1rem;
    border: 1px solid var(--accent-dark);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    margin-bottom: 1rem;
    cursor: pointer;
}

.contact-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-red);
    box-shadow: var(--shadow-glow);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-red);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.25rem;
}

.contact-details h4 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    color: var(--text-light);
}

.contact-details p {
    color: var(--text-gray);
}

.contact-details a {
    color: var(--primary-red);
    text-decoration: none;
}

.contact-details a:hover {
    text-shadow: 0 0 10px var(--primary-red);
}

/* Removed .hacker-terminal in favor of unified .terminal-text styles */

[data-theme="light"] .terminal-title {
    color: #b91c1c;
}

[data-theme="light"] .terminal-content .green {
    color: #166534;
}

[data-theme="light"] .terminal-content .red {
    color: #991b1b;
}

[data-theme="light"] .terminal-content .white {
    color: #0f172a;
}

/* typing cursor effect for terminal */
.typing::after {
    content: '_';
    margin-left: 4px;
    color: var(--primary-red);
    animation: blink-caret 1s steps(2, start) infinite;
}

@keyframes blink-caret {

    0%,
    50% {
        opacity: 1;
    }

    50.01%,
    100% {
        opacity: 0;
    }
}

.terminal-title {
    color: var(--primary-red);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    text-align: center;
}

.terminal-content {
    font-size: 0.9rem;
    line-height: 1.8;
}

.terminal-content .green {
    color: var(--terminal-green);
}

.terminal-content .red {
    color: var(--primary-red);
}

.terminal-content .white {
    color: var(--text-light);
}

/* Footer */
footer {
    background: var(--secondary-dark);
    padding: 2rem 0;
    border-top: 1px solid var(--accent-dark);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-gray);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    color: var(--text-gray);
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    color: var(--primary-red);
    text-shadow: 0 0 10px var(--primary-red);
}

[data-theme="light"] .footer-social a:hover {
    text-shadow: none;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--gradient-red);
    color: var(--text-light);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;

        /* match header navbar dark translucent background for consistency */
        background: rgba(20, 20, 20, 0.65);
        backdrop-filter: blur(24px) saturate(160%);
        -webkit-backdrop-filter: blur(24px) saturate(140%);
        border: 1px solid rgba(255, 255, 255, 0.06);

        flex-direction: column;
        padding: 0.75rem;
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);

        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.22s ease;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .hero-content {
        grid-template-columns: 1fr;

        gap: 2rem;
        /* Changes here: for mobile, reverse element order */
        display: flex;
        /* Ensure flexbox for flex-direction */
        flex-direction: column-reverse;
        /* This reverses the order */
    }

    /* Adjust width and add auto margins for centering on mobile */
    .profile-image-container {
        width: 90%;
        /* Reduce width to create space from sides */
        max-width: 350px;
        /* Maintain max-width */
        margin: 0 auto;
        /* Ensure it's centered */
        /* Remove padding that previously caused issues */
        padding: 0;
        box-sizing: border-box;
        margin-top: 20px;
        /* Add top margin to move away from header */
    }

    .hero-buttons {
        justify-content: center;
        /* Center buttons on mobile */
        margin-top: 20px;
        /* Add some space from the text above */
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .about-content {
        width: 100%;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .skills-grid,
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2rem;
    }

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

    .container {
        padding: 0 15px;
    }
}

/* Add these rules for theme toggle handling */
.nav-theme-toggle {
    display: none;
    /* Hidden by default */
}

.theme-toggle--mobile {
    text-align: right;
    padding: 8px;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle--mobile:hover {
    color: var(--primary-red);
}

/* Update the media query for mobile */
@media (max-width: 768px) {
    /* ...existing mobile styles... */

    .theme-toggle--header {
        display: none;
        /* Hide header theme toggle on mobile */
    }

    .nav-theme-toggle {
        margin-left: auto;
        display: block;
        /* Show mobile theme toggle */
    }

    /* Style the theme toggle like other nav links */
    .nav-theme-toggle .theme-toggle--mobile {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-family: inherit;
    }
}

/* Experience Section */
.experience {
    background: var(--secondary-dark);
}

.experience-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    transition: all 0.3s ease;
}

[data-theme="light"] .experience-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.experience-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.experience-header i {
    font-size: 2rem;
    color: var(--primary-red);
}

.experience-header h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    color: var(--text-light);
}

.experience-timeline {
    position: relative;
    padding: 2rem 0;
}

.experience-timeline::after {
    content: '';
    position: absolute;
    left: 145px;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--primary-red);
    opacity: 0.3;
}

.experience-item {
    position: relative;
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
    z-index: 1;
}

.experience-item::before {
    content: '';
    position: absolute;
    left: 141px;
    top: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-red);
    z-index: 2;
}

.experience-item:last-child {
    padding-bottom: 0;
}

@media (max-width: 768px) {
    .experience-timeline::after {
        left: 20px;
    }

    .experience-item {
        grid-template-columns: 1fr;
        padding-left: 50px;
    }

    .experience-item::before {
        left: 16px;
    }
}