@font-face {
    font-family: "Mona Sans";
    src: url("https://assets.codepen.io/64/Mona-Sans.woff2") format("woff2 supports variations"),
        url("https://assets.codepen.io/64/Mona-Sans.woff2") format("woff2-variations");
    font-weight: 100 1000;
}

@layer properties {
    @property --bg-position {
        syntax: "<number>";
        inherits: true;
        initial-value: 100;
    }

    @property --after-blur {
        syntax: "<number>";
        inherits: true;
        initial-value: 0;
    }

    @property --after-opacity {
        syntax: "<number>";
        inherits: true;
        initial-value: 1;
    }

    @property --before-opacity {
        syntax: "<number>";
        inherits: true;
        initial-value: 0.3;
    }

    @property --btn-offset {
        syntax: "<number>";
        inherits: true;
        initial-value: 1;
    }

    @property --btn-scale {
        syntax: "<number>";
        inherits: true;
        initial-value: 1;
    }
}

:root {
    --debug: 0;

    /* Advanced Button Colors */
    --body-bg: hsl(0, 0%, 6%);
    --btn-bg: hsl(0, 0%, 0%);
    --btn-border-width: 1.5;
    --btn-offset: 1;
    --btn-scale: 1;
    --after-bg: linear-gradient(to right, rgb(0 0 0), rgb(0 0 0), rgb(0 0 0), rgb(0 0 0), rgb(0 0 0), rgb(0 0 0), rgb(0 0 0), rgb(0 0 0), rgb(0 0 0), rgb(0 0 0), rgb(0 0 0), rgb(0 0 0), rgb(0 0 0), rgb(0 0 0));
    --after-blur: 10;
    --after-opacity: 1;
    --after-pos-y: 10;

    --before-opacity: 0.3;

    /* positions */
    --bg-position: 100;

    --color-white: hsl(0, 0%, 100%);
    --color-cyan: hsl(180, 100%, 50%);
    --color-blue: hsl(240, 100%, 50%);
    --color-purple: hsl(270, 100%, 50%);
    --color-pink: hsl(330, 40%, 70%);
    --color-red: hsl(0, 100%, 50%);
    --color-yellow: hsl(60, 100%, 50%);
    --color-lime: hsl(90, 100%, 75%);

    --color-orange: oklch(69.1% 0.223 36.85);

    /* Boot Sequence Animations */
    @keyframes glitch-text {
        0% {
            transform: translate(0);
        }

        20% {
            transform: translate(-2px, 2px);
        }

        40% {
            transform: translate(-2px, -2px);
        }

        60% {
            transform: translate(2px, 2px);
        }

        80% {
            transform: translate(2px, -2px);
        }

        100% {
            transform: translate(0);
        }
    }

    .glitch {
        animation: glitch-text 0.1s infinite;
    }

    #boot-sequence.fade-out {
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.8s ease-out;
    }

    /* Original Variables */
    --bg-color: #050505;
    --text-color: #e0e0e0;
    --accent-color: #bd00ff;
    /* Neon Violet */
    --accent-secondary: #7a00a3;
    --alert-color: #ff3333;
    --font-heading: 'Rajdhani',
    sans-serif;
    --font-mono: 'JetBrains Mono',
    monospace;

    /* Dock Effect Variables */
    --lerp-0: 1;
    --lerp-1: 0.5625;
    --lerp-2: 0.25;
    --lerp-3: 0.0625;
    --lerp-4: 0;

    --size-1: 0.25rem;
    --size-2: 0.5rem;
    --size-3: 1rem;
    --size-4: 1.5rem;

    --radius-3: 8px;
    --surface-1: #ffffff;
}

/* Light Mode Overrides */
[data-theme="light"] {
    --bg-color: #f5f5f5;
    --text-color: #1a1a1a;
    --accent-color: #0066cc;
    --card-bg: #ffffff;
}

[data-theme="light"] body {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    color: #1a1a1a;
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 {
    color: #1a1a1a !important;
}

[data-theme="light"] p,
[data-theme="light"] span,
[data-theme="light"] li,
[data-theme="light"] a,
[data-theme="light"] .hero-text,
[data-theme="light"] .terminal-content {
    color: #1a1a1a !important;
}

[data-theme="light"] .project-card,
[data-theme="light"] .terminal-box,
[data-theme="light"] .skill-card,
[data-theme="light"] .education-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] nav a {
    color: #1a1a1a !important;
}

[data-theme="light"] .progress-track {
    background-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .skill-header,
[data-theme="light"] .education-year,
[data-theme="light"] .education-degree,
[data-theme="light"] .education-institution,
[data-theme="light"] .education-description {
    color: #1a1a1a !important;
}

[data-theme="light"] .subtitle {
    color: #1a1a1a !important;
}


/* Network Handshake Loading Screen */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: clip-path 0.8s ease-in-out;
    clip-path: inset(0 0 0 0);
}

.preloader.split-reveal {
    clip-path: inset(50% 0 50% 0);
    pointer-events: none;
}

.handshake-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

/* Bit Stream */
.bit-stream {
    height: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: var(--text-color);
}

.bit {
    animation: bit-fade 0.8s ease-in-out infinite;
    opacity: 0;
}

.bit:nth-child(2n) {
    animation-delay: 0.2s;
}

.bit:nth-child(3n) {
    animation-delay: 0.4s;
}

@keyframes bit-fade {

    0%,
    100% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}

/* Handshake SVG */
.handshake-svg {
    filter: drop-shadow(0 0 10px var(--accent-color));
}

/* Network Nodes */
.node {
    fill: var(--accent-color);
    animation: node-pulse 1.5s ease-in-out infinite;
}

.node-left {
    animation-delay: 0s;
}

.node-right {
    animation-delay: 0.75s;
}

@keyframes node-pulse {

    0%,
    100% {
        r: 15;
        opacity: 1;
    }

    50% {
        r: 18;
        opacity: 0.7;
    }
}

/* Data Line */
.data-line {
    fill: none;
    stroke: var(--accent-color);
    stroke-width: 3;
    stroke-linecap: round;
    animation: draw-line 2s ease-in-out forwards;
}

@keyframes draw-line {
    to {
        stroke-dashoffset: 0;
    }
}

/* Status Text */
.handshake-status {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--text-color);
    text-align: center;
    min-height: 30px;
    animation: text-pulse 1.5s ease-in-out infinite;
}

@keyframes text-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* Terminal Boot Sequence */
.terminal-boot {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: var(--font-mono);
    transition: opacity 0.3s ease;
}

.terminal-boot.fade-out {
    opacity: 0;
    pointer-events: none;
}

.boot-shield {
    margin-bottom: 30px;
    animation: shield-glow 0.5s ease-in-out infinite alternate;
}

.boot-shield svg {
    stroke: var(--accent-color);
    filter: drop-shadow(0 0 10px var(--accent-color));
}

@keyframes shield-glow {
    0% {
        opacity: 0.7;
        transform: scale(1);
    }

    100% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.boot-terminal {
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: left;
    min-width: 400px;
    max-width: 600px;
    color: #0f0;
    text-shadow: 0 0 5px #0f0;
}

[data-theme="light"] .boot-terminal {
    color: #003366;
    text-shadow: none;
}

[data-theme="light"] .boot-shield svg {
    stroke: #0066cc;
    filter: drop-shadow(0 0 10px #0066cc);
}

.boot-line {
    opacity: 0;
    animation: line-appear 0.1s ease forwards;
}

@keyframes line-appear {
    to {
        opacity: 1;
    }
}

/* Cyber Network Breach Loading Screen */
.network-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease;
}

.network-loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

#network-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.breach-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

/* Breach Icon */
.breach-icon {
    animation: breach-pulse 2s ease-in-out infinite;
}

.breach-icon svg {
    stroke: var(--accent-color);
    filter: drop-shadow(0 0 20px var(--accent-color));
}

.breach-icon circle:nth-child(1) {
    animation: ripple-1 2s ease-out infinite;
}

.breach-icon circle:nth-child(2) {
    animation: ripple-2 2s ease-out infinite 0.3s;
}

.breach-icon circle:nth-child(3) {
    animation: ripple-3 2s ease-out infinite 0.6s;
}

@keyframes breach-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes ripple-1 {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes ripple-2 {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes ripple-3 {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Breach Text */
.breach-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    min-width: 400px;
}

.breach-status {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: var(--accent-color);
    letter-spacing: 3px;
    animation: text-glow 1.5s ease-in-out infinite;
}

@keyframes text-glow {

    0%,
    100% {
        opacity: 1;
        text-shadow: 0 0 10px var(--accent-color);
    }

    50% {
        opacity: 0.7;
        text-shadow: 0 0 20px var(--accent-color);
    }
}

.breach-progress {
    width: 100%;
    height: 4px;
    background: rgba(189, 0, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.breach-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-secondary));
    box-shadow: 0 0 15px var(--accent-color);
    animation: breach-load 5s ease-out forwards;
}

@keyframes breach-load {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

.breach-percent {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-color);
}

/* Lock Breaking Container (Legacy) */
.lock-breaking-container {
    position: relative;
    z-index: 10001;
    display: flex;
    flex-direction: column;
}

/* Cyber Lock (moved outside nesting) */
.cyber-lock {
    position: relative;
    animation: lock-shake 0.5s ease-in-out 2s 3;
}

.cyber-lock svg {
    stroke: var(--accent-color);
    filter: drop-shadow(0 0 20px var(--accent-color));
}

.lock-crack {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 0;
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
    animation: crack-grow 1s ease-out 2.5s forwards;
}

@keyframes lock-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px) rotate(-2deg);
    }

    75% {
        transform: translateX(5px) rotate(2deg);
    }
}

@keyframes crack-grow {
    0% {
        height: 0;
        opacity: 0;
    }

    50% {
        height: 60px;
        opacity: 1;
    }

    100% {
        height: 60px;
        opacity: 0;
    }
}

/* Access Text */
.access-text {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--text-color);
}

.access-text .bracket {
    color: var(--accent-color);
    font-weight: bold;
}

.access-text .label {
    color: var(--accent-color);
    font-weight: bold;
    margin: 0 8px;
}

.access-text .message {
    margin-left: 10px;
    animation: text-flicker 0.3s ease-in-out infinite;
}

@keyframes text-flicker {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Progress Container */
.progress-container {
    position: relative;
    width: 400px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(189, 0, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-secondary));
    box-shadow: 0 0 15px var(--accent-color);
    animation: progress-load 3s ease-out forwards;
}

@keyframes progress-load {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

.progress-percent {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-color);
    text-align: right;
    animation: count-up 3s ease-out forwards;
}

@keyframes count-up {
    0% {
        content: '0%';
    }

    100% {
        content: '100%';
    }
}

/* Boot Sequence Styles (Legacy - kept for compatibility) */
.theme-toggle-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--bg-color);
    border: none;
    color: var(--accent-color);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;

    /* Neumorphic shadows */
    box-shadow:
        8px 8px 16px rgba(0, 0, 0, 0.4),
        -8px -8px 16px rgba(255, 255, 255, 0.05);
}

.theme-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        10px 10px 20px rgba(0, 0, 0, 0.5),
        -10px -10px 20px rgba(255, 255, 255, 0.08);
}

.theme-toggle-btn:active {
    transform: translateY(0px);
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.4),
        inset -4px -4px 8px rgba(255, 255, 255, 0.05);
}

.theme-icon {
    filter: drop-shadow(0 0 8px var(--accent-color));
}

/* Light mode neumorphic adjustments */
[data-theme="light"] .theme-toggle-btn {
    background: #e0e0e0;
    box-shadow:
        8px 8px 16px rgba(0, 0, 0, 0.15),
        -8px -8px 16px rgba(255, 255, 255, 0.7);
}

[data-theme="light"] .theme-toggle-btn:hover {
    box-shadow:
        10px 10px 20px rgba(0, 0, 0, 0.2),
        -10px -10px 20px rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .theme-toggle-btn:active {
    box-shadow:
        inset 4px 4px 8px rgba(0, 0, 0, 0.15),
        inset -4px -4px 8px rgba(255, 255, 255, 0.7);
}

/* Glide To Reveal Styles */
.glide-text {
    margin: 0;
    font-size: 1.5rem;
    /* Adjusted for context */
    color: hsl(0 0% 40%);
    text-align: center;
    background: linear-gradient(hsl(0 0% 80%), hsl(0 0% 50%));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 20px;
}

.glide-code {
    font-size: 1.2rem;
    /* Reduced for long text */
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping */
    color: hsl(0 0% 100%);
    border-radius: 1rem;
    background: hsl(0 0% 6%);
    justify-content: center;
    box-shadow: 0 1px hsl(0 0% 100% / 0.25) inset;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem;
    gap: 2px;
}

.glide-code:hover {
    cursor: grab;
}

.glide-digit {
    display: flex;
    height: 100%;
    padding: 0.2rem;
    /* Reduced padding */
    list-style: none;
}

.glide-digit:focus-visible {
    outline-color: hsl(0 0% 50% / 0.25);
    outline-offset: 1rem;
}

.glide-digit span {
    display: block;
    /* Ensure transform works */
    scale: calc(var(--active, 0) + 0.5);
    filter: blur(calc((1 - var(--active, 0)) * 1rem));
    transition: scale calc(((1 - var(--active, 0)) + 0.2) * 1s), filter calc(((1 - var(--active, 0)) + 0.2) * 1s);
}

.glide-digit:first-of-type {
    padding-left: 2rem;
}

.glide-digit:last-of-type {
    padding-right: 2rem;
}

/* Lerp Variables for Glide Effect */
.glide-digit {
    --lerp-0: 1;
    /* === sin(90deg) */
    --lerp-1: 0.766;
    /* calc(sin(50deg)) */
    --lerp-2: 0.707;
    /* calc(sin(45deg)) */
    --lerp-3: 0.573;
    /* calc(sin(35deg)) */
    --lerp-4: 0.422;
    /* calc(sin(25deg)) */
    --lerp-5: 0.258;
    /* calc(sin(15deg)) */
}

.glide-digit:is(:hover, :focus-visible) {
    --active: var(--lerp-0);
}

.glide-digit:is(:hover, :focus-visible)+.glide-digit,
.glide-digit:has(+ .glide-digit:is(:hover, :focus-visible)) {
    --active: var(--lerp-1);
}

.glide-digit:is(:hover, :focus-visible)+.glide-digit+.glide-digit,
.glide-digit:has(+ .glide-digit + .glide-digit:is(:hover, :focus-visible)) {
    --active: var(--lerp-2);
}

.glide-digit:is(:hover, :focus-visible)+.glide-digit+.glide-digit+.glide-digit,
.glide-digit:has(+ .glide-digit + .glide-digit + .glide-digit:is(:hover, :focus-visible)) {
    --active: var(--lerp-3);
}

/* Skills Section (Adapted to Default Theme) */
#skills {
    background-color: transparent;
    /* Default bg */
    color: var(--text-color);
    /* Default text */
    padding: 80px 20px;
    width: 100%;
}

#skills h2 {
    color: var(--accent-color);
    /* Cyber Blue/Purple */
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

#skills .subtitle {
    color: var(--text-color);
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    font-size: 1.2rem;
    text-transform: uppercase;
    opacity: 0.8;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 Column Grid */
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.skill-card {
    background: transparent;
    padding: 20px;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
}

.progress-track {
    width: 100%;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.1);
    /* Dark mode friendly track */
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-fill {
    height: 100%;
    background-color: #007bff;
    /* Bright Blue Fill */
    border-radius: 6px;
    width: 0%;
    /* Animate width via JS or inline style */
}

.skill-meta {
    display: flex;
    gap: 15px;
}

.skill-badge {
    background-color: #007bff;
    color: #ffffff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

[data-theme="light"] .skill-badge {
    background-color: #0066cc;
    color: #ffffff;
}

@media (max-width: 768px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* Education Section */
#education {
    padding: 80px 20px;
}

#education h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    letter-spacing: 2px;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.education-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 30px;
    transition: all 0.3s ease;
}

.education-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.education-year {
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.education-degree {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-color);
}

.education-institution {
    font-size: 1rem;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 15px;
}

.education-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-color);
    opacity: 0.6;
}

@media (max-width: 768px) {
    .education-grid {
        grid-template-columns: 1fr;
    }
}

/* Light Mode Overrides */
[data-theme="light"] {
    --bg-color: #f0f0f0;
    --body-bg: #ffffff;
    --text-color: #1a1a1a;
    --accent-color: #9d00d6;
    /* Slightly darker purple for contrast */
    --surface-1: #1a1a1a;

    /* Card Backgrounds for Light Mode */
    --card-bg-light: rgba(255, 255, 255, 0.9);
    --card-border-light: #ccc;

    /* Ensure cursor visibility */
    --cursor-color: rgba(0, 0, 0, 0.1);
}

/* Light Mode Specific Styles */
[data-theme="light"] .project-card,
[data-theme="light"] .contact-box,
[data-theme="light"] .navbar {
    background: var(--card-bg-light, rgba(255, 255, 255, 0.9));
    border-color: var(--card-border-light, #ccc);
    color: var(--text-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .cursor-bg {
    background: radial-gradient(circle 400px at var(--x) var(--y), rgba(0, 0, 0, 0.15), transparent 80%);
}

[data-theme="light"] .tool-item {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    margin-left: 20px;
}

.theme-toggle:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--accent-color);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-mono);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: crosshair;
}

/* Background Animation Layer */
.cursor-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(600px circle at var(--x, 50%) var(--y, 50%), rgba(189, 0, 255, 0.15), transparent 40%);
    z-index: -1;
    transition: background 0.1s ease;
}

/* Splash Screen */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.5s ease-out;
}

.terminal-loader {
    font-family: var(--font-mono);
    text-align: center;
    width: 300px;
}

.terminal-loader .text {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-bottom: 20px;
    letter-spacing: 2px;
    animation: blink 1s infinite;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #333;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    margin-bottom: 10px;
}

.progress {
    width: 0%;
    height: 100%;
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
    animation: load 2.5s ease-in-out forwards;
}

.status-text {
    color: #555;
    font-size: 0.8rem;
    text-transform: uppercase;
}

@keyframes load {
    0% {
        width: 0%;
    }

    50% {
        width: 60%;
    }

    100% {
        width: 100%;
    }
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(189, 0, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(189, 0, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Hero Section Layout */
.hero-content {
    display: flex;
    align-items: flex-start;
    /* Align to top (corner) */
    gap: 50px;
    padding: 40px 0;
    text-align: left;
    /* Ensure text is left aligned in the top part */
}

.hero-text {
    flex: 1;
    margin-top: 20px;
    /* Fix alignment with image top */
}







/* Mission Toggle Button */
.mission-toggle-btn {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mission-toggle-btn:hover {
    background: rgba(189, 0, 255, 0.1);
    box-shadow: 0 0 10px var(--accent-color);
}

/* Profile Image */
.profile-container {
    flex-shrink: 0;
}

.profile-pic {
    width: 250px;
    height: 250px;
    /* Force square aspect ratio for perfect circle */
    object-fit: cover;
    /* Show full image content */
    border-radius: 50%;
    /* Remove box design */
    box-shadow: 0 0 20px rgba(189, 0, 255, 0.3);
    /* Add subtle glow to circle */
    background: transparent;
    transition: transform 0.3s;
    animation: wobble-float 6s ease-in-out infinite;
}

.profile-pic:hover {
    transform: scale(1.02);
    animation-play-state: paused;
    /* Pause on hover for interaction */
}

@keyframes wobble-float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-5px) rotate(2deg);
    }

    50% {
        transform: translateY(0) rotate(0deg);
    }

    75% {
        transform: translateY(5px) rotate(-2deg);
    }
}

@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .profile-pic {
        width: 200px;
        height: 200px;
    }
}

/* Header */
header {
    padding: 40px 0;
    border-bottom: 1px solid rgba(189, 0, 255, 0.2);
    margin-bottom: 60px;
}

h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(189, 0, 255, 0.5);
    margin-bottom: 10px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
    position: relative;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent-color);
    text-shadow: 0 0 5px var(--accent-color);
}

nav a::before {
    content: '[';
    margin-right: 5px;
    opacity: 0;
    color: var(--accent-color);
    transition: opacity 0.3s;
}

nav a::after {
    content: ']';
    margin-left: 5px;
    opacity: 0;
    color: var(--accent-color);
    transition: opacity 0.3s;
}

nav a:hover::before,
nav a:hover::after {
    opacity: 1;
}

/* Sections */
section {
    margin-bottom: 100px;
}

h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 40px;
    border-left: 4px solid var(--accent-color);
    padding-left: 20px;
    color: var(--text-color);
}

/* Terminal Box */
.terminal-box {
    background: rgba(20, 0, 20, 0.8);
    border: 1px solid var(--accent-color);
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(189, 0, 255, 0.1);
    overflow: hidden;
}

.terminal-header {
    background: rgba(189, 0, 255, 0.1);
    padding: 10px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid rgba(189, 0, 255, 0.2);
}

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

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.terminal-content {
    padding: 30px;
    font-size: 1.1rem;
}

.highlight {
    color: var(--accent-color);
    font-weight: bold;
    margin-top: 20px;
    display: block;
}

/* Projects */
/* Social Links 3D Effect */
.social-links a {
    text-decoration: none;
    font-size: 1.2rem;
    color: var(--text-color);
    padding: 10px 20px;
    border: 1px solid var(--accent-color);
    border-radius: 5px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.social-links a:hover {
    background: var(--accent-color);
    color: #000;
    box-shadow: 0 0 15px var(--accent-color);
    transform: translateY(-5px) scale(1.05) rotateX(10deg);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

@media (max-width: 1400px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
}

.project-card {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02) rotateX(2deg);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--accent-color);
}

.project-card h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: #fff;
}

.role-tag {
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-bottom: 25px;
    opacity: 0.8;
}

.case-study {
    display: grid;
    gap: 20px;
}

.step strong {
    display: block;
    color: var(--accent-color);
    margin-bottom: 8px;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.step ul {
    list-style: none;
    padding-left: 15px;
}

.step ul li {
    margin-bottom: 5px;
    position: relative;
}

.step ul li::before {
    content: '>';
    color: var(--accent-color);
    position: absolute;
    left: -15px;
}

/* Tool Icons */
.tags {
    margin-top: 15px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.tool {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 80px;
    /* Fixed width for alignment */
    transition: transform 0.3s ease;
    cursor: help;
}

.tool img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    opacity: 0.8;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
    transition: all 0.3s ease;
}

/* Specific override for wide Nessus logo */
.tags img[alt="Nessus"] {
    width: 120px;
    /* Allow more width */
    height: auto;
    object-fit: contain;
}

.tool span {
    font-size: 0.85rem;
    color: var(--text-color);
    font-family: var(--font-mono);
    opacity: 0.7;
    transition: color 0.3s;
}

.tool:hover {
    transform: translateY(-5px);
}

.tool:hover img {
    opacity: 1;
    filter: drop-shadow(0 0 10px var(--accent-color));
    transform: scale(1.1);
}

.tool:hover span {
    color: var(--accent-color);
    opacity: 1;
}



/* Float Keyframes */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Contact */
/* Contact */
.contact-box {
    text-align: center;
    padding: 50px;
    /* Border removed as requested */
}

/* ... existing btn styles ... */

/* Animated Mail Icon */
.letter-image {
    position: relative;
    width: 200px;
    height: 200px;
    cursor: pointer;
    margin-top: 50px;
    background: transparent;
    /* Ensure hover area is solid */
}

.btn {
    display: inline-block;
    margin-top: 20px;
    padding: 15px 40px;
    background: var(--accent-color);
    color: #000;
    text-decoration: none;
    font-weight: bold;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    text-transform: uppercase;
    clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
    transition: background 0.3s, transform 0.1s;
}

.btn:hover {
    background: #fff;
    transform: scale(1.05);
}

footer {
    text-align: center;
    padding: 40px;
    opacity: 0.5;
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Utilities */
.typing-effect {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--accent-color);
    width: 0;
    animation: typing 2s steps(40, end) forwards, blink 0.75s step-end infinite;
}

.delay-1 {
    animation-delay: 2s;
    /* Maintain width 0 until animation starts */
    animation-fill-mode: forwards;
}

@keyframes typing {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

@keyframes blink {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: var(--accent-color)
    }
}

/* Project Image */
.project-img {
    width: 60%;
    display: block;
    margin: 0 auto 20px auto;
    border-radius: 5px;
    border: 1px solid rgba(189, 0, 255, 0.2);
    transition: transform 0.3s;
}

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

/* Neon Glitch Pulse Effect */
.glitch {
    position: relative;
    color: var(--accent-color);
}

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

.glitch::before {
    left: 2px;
    text-shadow: 2px 0 #bd00ff;
    animation: neon-glitch 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9;
    animation: neon-glitch 2s infinite linear alternate-reverse;
}

@keyframes neon-glitch {
    0% {
        clip-path: inset(80% 0 0 0);
        transform: translate(-2px, 2px);
    }

    10% {
        clip-path: inset(20% 0 80% 0);
        transform: translate(2px, -2px);
    }

    20% {
        clip-path: inset(80% 0 0 0);
        transform: translate(-2px, 2px);
    }

    30% {
        clip-path: inset(0 0 100% 0);
        /* Invisible */
        transform: translate(0, 0);
    }

    40% {
        clip-path: inset(40% 0 40% 0);
        transform: translate(2px, 2px);
    }

    50% {
        clip-path: inset(60% 0 30% 0);
        transform: translate(-2px, -2px);
    }

    60% {
        clip-path: inset(0 0 0 0);
        /* Full visible */
        transform: translate(0, 0);
    }

    100% {
        clip-path: inset(0 0 0 0);
        transform: translate(0, 0);
    }
}

/* Contact Section Uplink Cards */
.uplink-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px var(--accent-color);
    background: rgba(189, 0, 255, 0.1) !important;
}

/* Cyber Button (Shared Style) */
.cyber-btn {
    all: unset;
    background: transparent;
    border-width: 0;
    transform: scale(var(--btn-scale));
    transition:
        --bg-position 3s ease,
        --after-blur 0.3s ease,
        --before-opacity 0.3s ease,
        --btn-offset 0.3s ease,
        --btn-scale 0.2s cubic-bezier(.76, -0.25, .51, 1.13);
    cursor: pointer;
    font-family: "Mona Sans", sans-serif;
    text-decoration: none !important;
    display: inline-block;
}

.cyber-btn>div {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center content */
    gap: 10px;
    padding: 0.8em 1.2em;
    background: var(--btn-bg);
    color: white;
    font-weight: bold;
    border-radius: 8px;
    font-size: 14px;
    /* Scaled down from 22px to fit header */
    position: relative;
    cursor: pointer;
    min-width: 150px;
    /* Ensure uniform size */
}

.cyber-btn>div:not(:hover) {
    transition: --after-blur 0.3s ease;
}

.cyber-btn>div>span {
    background: linear-gradient(to right,
            var(--color-white),
            var(--color-white),
            var(--color-cyan),
            var(--color-blue),
            var(--color-purple),
            var(--color-pink),
            var(--color-red),
            var(--color-yellow),
            var(--color-lime),
            var(--color-white),
            var(--color-white)) no-repeat calc(var(--bg-position) * 1%) 0% / 900%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.15ch;
    font-weight: 600;
}

/* Ensure icons are white and not affected by text clip */
/* Ensure icons are white and not affected by text clip */
.cyber-btn>div>svg {
    width: 24px;
    height: 24px;
    object-fit: contain;
    fill: white;
}

.cyber-btn>div:after {
    display: block;
    position: absolute;
    content: "";
    width: 100%;
    height: 100%;
    background: var(--after-bg) no-repeat calc(var(--bg-position) * 1%) 0% / 900%;
    transform: translateY(calc(var(--after-pos-y) * 1px));
    left: 0;
    top: 0;
    z-index: -2;
    filter: blur(calc(var(--after-blur) * 1px));
    opacity: var(--after-opacity);
}

.cyber-btn>div:before {
    content: "";
    display: block;
    position: absolute;
    width: calc(100% + calc(calc(var(--btn-border-width) * 2) * 1px));
    height: calc(100% + calc(calc(var(--btn-border-width) * 2) * 1px));
    background: linear-gradient(to right,
            var(--color-white),
            var(--color-white),
            var(--color-cyan),
            var(--color-blue),
            var(--color-purple),
            var(--color-pink),
            var(--color-red),
            var(--color-yellow),
            var(--color-lime),
            var(--color-white),
            var(--color-white)) no-repeat calc(var(--bg-position) * 1%) 0% / 900%;
    border-radius: 9px;
    z-index: -1;
    top: calc(var(--btn-border-width) * -1px);
    left: calc(var(--btn-border-width) * -1px);
    opacity: var(--before-opacity);
}

@keyframes rainbow-move {
    0% {
        --bg-position: 0;
    }

    100% {
        --bg-position: 100;
    }
}

.cyber-btn:hover {
    --btn-scale: 1.05;
    /* Use animation for continuous movement */
    animation: rainbow-move 3s linear infinite;

    --after-bg: linear-gradient(to right,
            var(--color-white),
            var(--color-white),
            var(--color-cyan),
            var(--color-blue),
            var(--color-purple),
            var(--color-pink),
            var(--color-red),
            var(--color-yellow),
            var(--color-lime),
            var(--color-white),
            var(--color-white));
    --after-blur: 30;
    --after-opacity: 0.3;
    --after-pos-y: 0;
    --before-opacity: 1;
    --btn-offset: 5;
}

.cyber-btn:active {
    --btn-scale: 0.98;
    --after-blur: 15;
}

.toolkit-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin-top: 15px;
}

.tool-item {
    width: 60px;
    height: 60px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 1s cubic-bezier(0.25, 1, 0.5, 1);
    /* Slower, elegant spin */
    background: transparent;
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Specific filter classes for different logo types */
.invert-icon img {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.remove-white-bg img {
    mix-blend-mode: screen;
    filter: invert(1) grayscale(100%) brightness(1.5);
    /* Inverts white bg to black, then screens it out. Grayscale to keep it monochromatic white if desired, or remove grayscale for color */
}

.remove-white-bg-color img {
    mix-blend-mode: screen;
    filter: invert(1);
    /* Inverts white bg to black, screens it out. Icon colors invert too. */
}


/* Spotlight Glow Effect removed per request */
.tool-item::before {
    display: none;
}

.tool-item:hover {
    transform: translateY(-15px) scale(1.25) rotateY(360deg);
    /* Full Spin with extra scale */
    z-index: 10;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7),
        0 10px 20px rgba(189, 0, 255, 0.3);
    /* Added purple glow hint for uniqueness */
}

.tool-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: filter 0.3s;
}

/* Removed colored glow on hover */
.tool-item:hover img {
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.6));
}

.block__item:after {
    content: '';
    position: absolute;
    height: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    aspect-ratio: 1;
    border-left: var(--size-2) solid white;
    border-top: var(--size-2) solid white;
    border-radius: var(--radius-3);
    mask: linear-gradient(135deg, black, transparent 50%);
    opacity: 0.5;
}

:is(.block:hover, .block:focus-visible) {
    --lerp: var(--lerp-0);
    z-index: 5;
}

.block:has(+ :is(.block:hover, .block:focus-visible)),
:is(.block:hover, .block:focus-visible)+.block {
    --lerp: var(--lerp-1);
    z-index: 4;
}

.block:has(+ .block + :is(.block:hover, .block:focus-visible)),
:is(.block:hover, .block:focus-visible)+.block+.block {
    --lerp: var(--lerp-2);
    z-index: 3;
}

.block:has(+ .block + .block + :is(.block:hover, .block:focus-visible)),
:is(.block:hover, .block:focus-visible)+.block+.block+.block {
    --lerp: var(--lerp-3);
    z-index: 2;
}

.block:has(+ .block + .block + .block + :is(.block:hover, .block:focus-visible)),
:is(.block:hover, .block:focus-visible)+.block+.block+.block+.block {
    --lerp: var(--lerp-4);
    z-index: 1;
}

/* Animated Mail Icon */
.letter-image {
    position: relative;
    width: 200px;
    margin-top: 20px;
    background: transparent;
    /* Ensure hover area is solid */
    transform: scale(0.6);
}

.animated-mail {
    position: absolute;
    height: 150px;
    width: 200px;
    transition: .4s;
}

.animated-mail .body {
    position: absolute;
    bottom: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 100px 200px;
    border-color: transparent transparent #e95f55 transparent;
    z-index: 2;
}

.animated-mail .top-fold {
    position: absolute;
    top: 50px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 50px 100px 0 100px;
    transform-origin: 50% 0%;
    transition: transform .4s .4s, z-index .2s .4s;
    border-color: #cf4a43 transparent transparent transparent;
    z-index: 2;
}

.animated-mail .back-fold {
    position: absolute;
    bottom: 0;
    width: 200px;
    height: 100px;
    background: #cf4a43;
    z-index: 0;
}

.animated-mail .left-fold {
    position: absolute;
    bottom: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 50px 0 50px 100px;
    border-color: transparent transparent transparent #e15349;
    z-index: 2;
}

.animated-mail .letter {
    left: 20px;
    bottom: 0px;
    position: absolute;
    width: 160px;
    height: 60px;
    background: white;
    z-index: 1;
    overflow: hidden;
    transition: .4s .2s;
}

.animated-mail .letter .letter-border {
    height: 10px;
    width: 100%;
    background: repeating-linear-gradient(-45deg,
            #cb5a5e,
            #cb5a5e 8px,
            transparent 8px,
            transparent 18px);
}

.animated-mail .letter .letter-title {
    margin-top: 10px;
    margin-left: 5px;
    height: 10px;
    width: 40%;
    background: #cb5a5e;
}

.animated-mail .letter .letter-context {
    margin-top: 10px;
    margin-left: 5px;
    height: 10px;
    width: 20%;
    background: #cb5a5e;
}

.animated-mail .letter .letter-stamp {
    margin-top: 30px;
    margin-left: 120px;
    border-radius: 100%;
    height: 30px;
    width: 30px;
    background: #cb5a5e;
    opacity: 0.3;
}

.shadow {
    position: absolute;
    top: 200px;
    left: 50%;
    width: 400px;
    height: 30px;
    transition: .4s;
    transform: translateX(-50%);
    border-radius: 100%;
    background: radial-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.0), rgba(0, 0, 0, 0.0));
}

.letter-image:hover .animated-mail {
    transform: translateY(-50px);
}

.letter-image:hover .animated-mail .top-fold {
    transition: transform .4s, z-index .2s;
    transform: rotateX(180deg);
    z-index: 0;
}

.letter-image:hover .animated-mail .letter {
    height: 180px;
}

.letter-image:hover .shadow {
    width: 250px;
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   Target: Screens 768px and below
   ============================================ */

@media (max-width: 768px) {

    /* Global Mobile Padding */
    body {
        padding: 0 20px;
    }

    /* Force Navigation Wrap */
    nav ul {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 10px !important;
        padding: 0 !important;
        width: 100% !important;
    }

    nav a {
        font-size: 0.9rem;
        padding: 8px 12px;
        min-width: 80px;
    }

    /* Force Stack on Social Buttons */
    header>div>div:last-child,
    .header-actions {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
        width: 100% !important;
        margin-top: 20px !important;
    }

    .cyber-btn {
        width: 100% !important;
        max-width: 250px !important;
        display: block !important;
    }

    /* Center Header Elements */
    header>div {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }

    /* Hero Section - Centered Layout */
    .hero {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 40px 0;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px !important;
    }

    /* Profile Image - Centered and Scaled */
    .profile-pic {
        width: 200px !important;
        height: 200px !important;
        margin: 0 auto 20px auto;
    }

    /* Typography Scaling */
    h1 {
        font-size: clamp(2rem, 6vw, 2.5rem) !important;
        text-align: center !important;
    }

    h2 {
        font-size: clamp(1.5rem, 5vw, 2rem);
        text-align: center;
    }

    h3 {
        font-size: clamp(1.2rem, 4vw, 1.6rem);
    }

    /* About Section */
    .about-section,
    #about {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 30px 0;
    }

    /* Education Grid - Stack Vertically */
    .education-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .edu-card {
        width: 100%;
    }

    /* Experience Section */
    .experience-container {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* Projects Grid - Single Column */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Skills Grid - Stack Vertically */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Certifications - Stack Vertically */
    .cert-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Hall of Fame - Stack */
    .hall-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Technical Toolkit - Wrap Icons */
    .tool-icons {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .tool-icon {
        width: 40px;
        height: 40px;
    }

    /* Theme Toggle - Mobile Friendly */
    .theme-toggle-btn {
        width: 50px;
        height: 50px;
        min-width: 44px;
        min-height: 44px;
    }

    /* Loading Screen - Mobile Scaled */
    .handshake-svg {
        width: 300px;
        height: 150px;
    }

    .node {
        r: 12;
    }

    .data-line {
        stroke-width: 2;
    }

    .bit-stream {
        font-size: 1rem;
        gap: 10px;
        flex-wrap: wrap;
    }

    .handshake-status {
        font-size: 0.95rem;
        padding: 0 20px;
    }

    /* Contact Section */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Ensure images are responsive */
    img {
        max-width: 100%;
        height: auto;
    }
}

/* Extra Small Devices - 480px and below */
@media (max-width: 480px) {
    body {
        padding: 0 15px;
    }

    h1 {
        font-size: clamp(1.5rem, 7vw, 2rem) !important;
    }

    .cyber-btn {
        max-width: 100% !important;
        font-size: 0.9rem;
        padding: 10px 15px;
    }

    .handshake-svg {
        width: 250px;
        height: 125px;
    }

    .bit-stream {
        font-size: 0.9rem;
        gap: 8px;
    }

    nav a {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
}

/* --- Mobile Navigation & Header Refactor --- */

/* Base Header Styles (Desktop) */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
}

.brand-name {
    font-size: 1.8rem;
    margin: 0;
}

.main-nav {
    flex: 1;
    max-width: 60%;
}

.nav-links {
    display: flex;
    gap: 10px;
    list-style: none;
    margin: 0;
    justify-content: center;
    font-size: 0.85rem;
    white-space: nowrap;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Hamburger Button (Hidden on Desktop) */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    gap: 6px;
    z-index: 10001;
    /* Above nav overlay */
}

.hamburger-btn .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Mobile Media Query */
@media (max-width: 768px) {
    .header-container {
        padding: 15px 20px;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        align-items: center;
        gap: 10px;
    }

    .brand-name {
        order: 1;
        flex: 0 1 auto !important;
        font-size: 1.5rem;
        text-align: left !important;
        margin-right: auto;
    }

    .hamburger-btn {
        display: flex;
        order: 2;
        margin-left: 0;
        /* Let space-between handle it, or margin-left auto if needed */
    }

    .header-actions {
        order: 3;
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: flex-end !important;
        padding-top: 5px;
        gap: 5px;
        /* Reduce gap */
    }

    .header-actions .cyber-btn {
        padding: 6px 10px !important;
        font-size: 0.75rem !important;
        white-space: nowrap;
        flex: 0 1 auto;
    }

    .header-actions .cyber-btn div {
        gap: 5px;
        /* Reduce icon/text gap */
    }

    .header-actions .cyber-btn svg {
        width: 16px;
        height: 16px;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(5, 5, 5, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        z-index: 10000;
        display: flex;
        justify-content: center;
        align-items: center;
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        opacity: 0;
        pointer-events: none;
        max-width: 100%;
        flex: none;
    }

    /* Light Mode Mobile Nav Override */
    [data-theme="light"] .main-nav {
        background: rgba(255, 255, 255, 0.98);
    }

    .main-nav.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-links {
        flex-direction: column;
        gap: 30px;
        font-size: 1.5rem;
        text-align: center;
        width: 100%;
    }

    .nav-links li {
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.3s ease;
    }

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

    .main-nav.active .nav-links li:nth-child(1) {
        transition-delay: 0.1s;
    }

    .main-nav.active .nav-links li:nth-child(2) {
        transition-delay: 0.15s;
    }

    .main-nav.active .nav-links li:nth-child(3) {
        transition-delay: 0.2s;
    }

    .main-nav.active .nav-links li:nth-child(4) {
        transition-delay: 0.25s;
    }

    .main-nav.active .nav-links li:nth-child(5) {
        transition-delay: 0.3s;
    }

    .main-nav.active .nav-links li:nth-child(6) {
        transition-delay: 0.35s;
    }

    .main-nav.active .nav-links li:nth-child(7) {
        transition-delay: 0.4s;
    }

    .main-nav.active .nav-links li:nth-child(8) {
        transition-delay: 0.45s;
    }

    .main-nav.active .nav-links li:nth-child(9) {
        transition-delay: 0.5s;
    }

    /* Animated Hamburger Icon State */
    .hamburger-btn.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
        background-color: var(--accent-color);
    }

    .hamburger-btn.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger-btn.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -8px);
        background-color: var(--accent-color);
    }
}