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

:root {
    --vh: 1vh;
}

body {
    font-family: 'Courier New', monospace;
    background: #000;
    color: #00FF41;
    overflow-x: hidden;
    cursor: crosshair;
}

#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.65;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.glitch {
    animation: glitch 1s infinite;
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

.intro {
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.intro h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 0 10px #00FF41, 0 0 20px #00FF41;
}

.intro .tagline {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    opacity: 0.8;
}

.pills {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pill {
    padding: 15px 40px;
    border: 2px solid #00FF41;
    background: rgba(0, 0, 0, 0.75);
    color: #00FF41;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Courier New', monospace;
    position: relative;
    overflow: hidden;
    border-radius: 50px;
}

@keyframes vibrate {
    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); }
}

.pill:hover {
    background: #00FF41;
    color: #000;
    box-shadow: 0 0 20px #00FF41;
    transform: scale(1.05);
    animation: vibrate 0.4s infinite;
}

.pill.red {
    border-color: #FF0000;
    color: #FF0000;
}

.pill.red:hover {
    background: #FF0000;
    box-shadow: 0 0 20px #FF0000;
    color: white;
}

.pill.blue {
    border-color: #0088FF;
    color: #0088FF;
}

.pill.blue:hover {
    background: #0088FF;
    box-shadow: 0 0 20px #0088FF;
    color: white;
}

.section {
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
    padding: 80px 20px;
    display: none;
}

.section.active {
    display: block;
}

.terminal {
    background: rgba(0, 20, 0, 0.9);
    border: 2px solid #00FF41;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.3);
}

.terminal-header {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #00FF41;
}

.terminal-btn {
    border-radius: 50%;
    width: 12px;
    height: 12px;
    background: #00FF41;
}

.terminal-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #00FF41;
    color: white;
}

.terminal-content p {
    line-height: 1.8;
    margin-bottom: 15px;
}

.nav-terminal {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 20, 0, 0.98);
    border: 2px solid #00FF41;
    padding: 15px;
    display: none;
    z-index: 10000;
    max-width: 220px;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
}

.nav-terminal.show {
    display: block;
}

.nav-terminal button {
    display: block;
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    background: transparent;
    border: 1px solid #00FF41;
    color: #00FF41;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-terminal button:hover {
    background: #00FF41;
    color: #000;
}

/* Experience Section Styles */
.exp-item {
    background: rgba(0, 30, 0, 0.6);
    border: 1px solid #00FF41;
    padding: 20px;
    margin-bottom: 20px;
}

.exp-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.exp-title span:first-child {
    font-size: 1.3rem;
    color: white;
    font-weight: bold;
}

.exp-date {
    opacity: 0.8;
    font-size: 1rem;
    color: #00FF41;
}

.exp-item ul {
    list-style: none;
    padding-left: 0;
}

.exp-item ul li {
    padding-left: 20px;
    margin-bottom: 10px;
    position: relative;
    line-height: 1.6;
}

.exp-item ul li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: #00FF41;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.project-card {
    background: rgba(0, 20, 0, 0.8);
    border: 2px solid #00FF41;
    padding: 25px;
    transition: all 0.3s;
    position: relative;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.5);
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: white;
}

.project-card p {
    margin-bottom: 15px;
    opacity: 0.9;
}

.project-card .tech {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 15px;
}

.load-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid #00FF41;
    color: #00FF41;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    transition: all 0.3s;
}

.load-btn:hover {
    background: #00FF41;
    color: #000;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.skill-item {
    background: rgba(0, 20, 0, 0.8);
    border: 1px solid #00FF41;
    padding: 20px;
}

.skill-name {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.skill-bar {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #00FF41;
    position: relative;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: #00FF41;
    box-shadow: 0 0 10px #00FF41;
    animation: loadSkill 2s ease-out forwards;
    transform-origin: left;
}

@keyframes loadSkill {
    from { width: 0; }
}

.contact-info {
    margin-top: 30px;
}

.contact-item {
    margin: 15px 0;
    font-size: 1.2rem;
}

.contact-item a {
    color: #00FF41;
    text-decoration: none;
    border-bottom: 1px solid #00FF41;
    transition: all 0.3s;
    word-break: break-word;
}

.contact-item a:hover {
    text-shadow: 0 0 10px #00FF41;
}

.typing::after {
    content: '▋';
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Mouse hover effects */
.cursor-glow {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid #FF0000;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 0 20px #FF0000;
    animation: pulse 1.5s infinite;
    transition: transform 0.1s ease;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.4;
    }
}

/* Mouse trail effect */
.trail {
    position: fixed;
    color: #FF0000;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    pointer-events: none;
    z-index: 9998;
    animation: trailFade 1s ease-out forwards;
}

@keyframes trailFade {
    0% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.5) rotate(360deg);
    }
}

/* Click ripple effect */
.ripple {
    position: fixed;
    border: 2px solid #FF0000;
    border-radius: 50%;
    pointer-events: none;
    animation: rippleEffect 1s ease-out;
    z-index: 9997;
}

@keyframes rippleEffect {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* Particle burst on click */
.particle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: #FF0000;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9996;
    box-shadow: 0 0 5px #FF0000;
}

/* Text selection styling */
::selection {
    background: #00FF41;
    color: #000;
}

::-moz-selection {
    background: #00FF41;
    color: #000;
}

/* Glitch effects for blue pill */
.glitch-intense {
    animation: glitchIntense 0.2s infinite;
}

@keyframes glitchIntense {
    0% { transform: translate(0); filter: hue-rotate(0deg); }
    10% { transform: translate(-10px, 5px); filter: hue-rotate(90deg); }
    20% { transform: translate(10px, -5px); filter: hue-rotate(180deg); }
    30% { transform: translate(-10px, -5px); filter: hue-rotate(270deg); }
    40% { transform: translate(10px, 5px); filter: hue-rotate(360deg); }
    50% { transform: translate(0); filter: hue-rotate(180deg); }
    60% { transform: translate(-5px, 10px); filter: hue-rotate(90deg); }
    70% { transform: translate(5px, -10px); filter: hue-rotate(270deg); }
    80% { transform: translate(-5px, -10px); filter: hue-rotate(180deg); }
    90% { transform: translate(5px, 10px); filter: hue-rotate(90deg); }
    100% { transform: translate(0); filter: hue-rotate(0deg); }
}

.screen-distort {
    animation: screenDistort 0.5s infinite;
}

@keyframes screenDistort {
    0%, 100% { 
        filter: contrast(1) brightness(1);
    }
    25% { 
        filter: contrast(3) brightness(0.5) saturate(0);
    }
    50% { 
        filter: contrast(0.5) brightness(1.5) saturate(3);
    }
    75% { 
        filter: contrast(2) brightness(0.8) saturate(0.5);
    }
}

.matrix-breakdown {
    animation: breakdown 1s ease-out;
}

@keyframes breakdown {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 0.1; }
}

/* White screen effect */
.white-screen {
    background: #FFFFFF !important;
    color: #000000 !important;
    transition: all 1s ease-out;
}

.white-screen * {
    color: #000000 !important;
    border-color: #000000 !important;
}

.white-screen #matrix-bg {
    display: none !important;
}

.white-screen-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    padding: 20px;
    background: #FFFFFF;
    animation: fadeInWhite 2s ease-in;
}

@keyframes fadeInWhite {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

.white-screen-title {
    font-size: 4rem;
    margin-bottom: 2rem;
    font-family: 'Courier New', monospace;
    color: #000000 !important;
    text-shadow: none !important;
    animation: glitchText 0.5s infinite;
}

@keyframes glitchText {
    0%, 100% { transform: translate(0); }
    25% { transform: translate(-2px, 2px); }
    50% { transform: translate(2px, -2px); }
    75% { transform: translate(-2px, -2px); }
}

.white-screen-text {
    font-size: 1.5rem;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    color: #333333 !important;
    line-height: 1.8;
}

.restart-btn {
    padding: 20px 50px;
    border: 3px solid #000000;
    background: #FFFFFF;
    color: #000000 !important;
    font-size: 1.5rem;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    margin-top: 30px;
    transition: all 0.3s;
    border-radius: 0;
}

.restart-btn:hover {
    background: #000000 !important;
    color: #FFFFFF !important;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Memory wipe effect */
#memory-wipe {
    position: fixed;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    color: #000000;
    opacity: 0;
    letter-spacing: 4px;
    transition: opacity 2s ease;
    pointer-events: none;
    z-index: 9999;
    text-shadow: 0 0 10px #000000;
}

.fade-reality * {
    opacity: 0 !important;
    filter: blur(10px) !important;
    transition: opacity 2s ease, filter 2s ease !important;
}

.glitch-return {
    animation: glitchReturn 0.25s steps(2) infinite;
}

@keyframes glitchReturn {
    0% { clip-path: inset(0 0 80% 0); }
    25% { clip-path: inset(20% 0 60% 0); }
    50% { clip-path: inset(40% 0 30% 0); }
    75% { clip-path: inset(10% 0 50% 0); }
    100% { clip-path: inset(0 0 0 0); }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #00FF41;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00cc33;
}

/* Mobile NAV toggle button */
#nav-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10001;
    padding: 15px 20px;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: #00FF41;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #00FF41;
    cursor: pointer;
    display: none;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.6);
    border-radius: 5px;
    transition: all 0.3s;
}

#nav-toggle:hover {
    background: #00FF41;
    color: #000;
    transform: scale(1.05);
}

#nav-toggle:active {
    transform: scale(0.95);
}

/* ============================================
   MOBILE RESPONSIVE DESIGN - COMPREHENSIVE
   ============================================ */

/* Tablets and small laptops */
@media (max-width: 1024px) {
    .container {
        max-width: 95%;
        padding: 15px;
    }
    
    .nav-terminal {
        top: 15px;
        right: 15px;
        max-width: 200px;
    }
}

/* Tablets portrait and large phones */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 10px;
    }
    
    /* Show mobile menu toggle */
    #nav-toggle {
        display: block;
    }
    
    /* Center navigation on mobile */
    .nav-terminal {
        top: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
        max-width: 280px;
        width: 90%;
    }
    
    .nav-terminal.show {
        display: block;
    }
    
    /* Intro section */
    .intro {
        padding: 60px 20px 20px;
    }
    
    .intro h1 {
        font-size: 2.5rem;
        margin-bottom: 0.8rem;
    }
    
    .intro .tagline {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .intro p {
        font-size: 1rem !important;
    }
    
    /* Pills */
    .pills {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        padding: 0 20px;
    }
    
    .pill {
        width: 100%;
        max-width: 320px;
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    /* Navigation buttons */
    .nav-terminal button {
        padding: 8px;
        font-size: 0.85rem;
        margin: 3px 0;
    }
    
    /* Section spacing */
    .section {
        padding: 70px 15px 40px;
    }
    
    /* Terminal */
    .terminal {
        padding: 15px;
        margin: 15px 0;
    }
    
    .terminal-content h2 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .terminal-content h3 {
        font-size: 1.2rem !important;
    }
    
    .terminal-content p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    /* Experience */
    .exp-item {
        padding: 15px;
    }
    
    .exp-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .exp-title span:first-child {
        font-size: 1.05rem;
        line-height: 1.4;
        word-break: break-word;
    }
    
    .exp-date {
        font-size: 0.85rem;
    }
    
    .exp-item ul li {
        font-size: 0.9rem;
    }
    
    /* Skills */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .skill-item {
        padding: 15px;
    }
    
    /* Projects */
    .project-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .project-card {
        padding: 20px;
    }
    
    .project-card h3 {
        font-size: 1.3rem;
    }
    
    /* Contact */
    .contact-item {
        font-size: 1rem;
        margin: 12px 0;
    }
    
    /* White screen */
    .white-screen-title {
        font-size: 2rem;
    }
    
    .white-screen-text {
        font-size: 1rem;
    }
    
    .restart-btn {
        font-size: 1rem;
        padding: 15px 30px;
    }
    
    /* Memory wipe */
    #memory-wipe {
        font-size: 0.95rem;
        bottom: 10%;
        letter-spacing: 2px;
        max-width: 90%;
    }
    
    /* Reduce effects on mobile */
    .cursor-glow {
        width: 15px;
        height: 15px;
    }
    
    .trail {
        font-size: 12px;
    }
    
    #matrix-bg {
        opacity: 0.5;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    body {
        font-size: 13px;
    }
    
    #nav-toggle {
        padding: 12px 16px;
        font-size: 0.9rem;
        bottom: 15px;
        right: 15px;
    }
    
    .intro {
        padding: 50px 15px 20px;
    }
    
    .intro h1 {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .intro .tagline {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .intro p {
        font-size: 0.9rem !important;
    }
    
    .pills {
        padding: 0 15px;
        gap: 0.8rem;
    }
    
    .pill {
        max-width: 280px;
        padding: 10px 25px;
        font-size: 0.9rem;
    }
    
    .nav-terminal {
        max-width: 260px;
        padding: 12px;
    }
    
    .nav-terminal button {
        padding: 6px;
        font-size: 0.75rem;
        margin: 2px 0;
    }
    
    .section {
        padding: 60px 10px 30px;
    }
    
    .terminal {
        padding: 12px;
        margin: 12px 0;
    }
    
    .terminal-btn {
        width: 10px;
        height: 10px;
    }
    
    .terminal-content h2 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .terminal-content h3 {
        font-size: 1.05rem !important;
    }
    
    .terminal-content p {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    .exp-item {
        padding: 12px;
    }
    
    .exp-title span:first-child {
        font-size: 0.95rem;
    }
    
    .exp-date {
        font-size: 0.8rem;
    }
    
    .exp-item ul li {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }
    
    .skill-item {
        padding: 12px;
    }
    
    .skill-name {
        font-size: 0.95rem;
    }
    
    .skill-bar {
        height: 16px;
    }
    
    .project-card {
        padding: 15px;
    }
    
    .project-card h3 {
        font-size: 1.1rem;
    }
    
    .project-card p {
        font-size: 0.85rem;
    }
    
    .project-card .tech {
        font-size: 0.8rem;
    }
    
    .load-btn {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
    
    .contact-item {
        font-size: 0.9rem;
    }
    
    .white-screen-content {
        padding: 15px;
    }
    
    .white-screen-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .white-screen-text {
        font-size: 0.9rem;
    }
    
    .restart-btn {
        font-size: 0.9rem;
        padding: 12px 25px;
    }
    
    #memory-wipe {
        font-size: 0.8rem;
        bottom: 8%;
        letter-spacing: 1px;
    }
    
    /* Disable heavy effects on mobile */
    .cursor-glow {
        display: none;
    }
    
    .trail {
        display: none;
    }
    
    .particle {
        display: none;
    }
    
    #matrix-bg {
        opacity: 0.4;
    }
}

/* Very small phones */
@media (max-width: 360px) {
    .intro h1 {
        font-size: 1.5rem;
    }
    
    .intro .tagline {
        font-size: 0.85rem;
    }
    
    .pill {
        font-size: 0.85rem;
        padding: 8px 20px;
    }
    
    .nav-terminal {
        max-width: 240px;
    }
    
    .nav-terminal button {
        font-size: 0.7rem;
        padding: 5px;
    }
    
    .terminal-content h2 {
        font-size: 1.1rem;
    }
    
    .terminal-content p {
        font-size: 0.8rem;
    }
}

/* Landscape mode fixes */
@media (max-height: 500px) and (orientation: landscape) {
    .intro {
        height: auto;
        min-height: 100vh;
        padding: 30px 20px;
    }
    
    .intro h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .intro .tagline {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .pills {
        margin-top: 1rem;
        gap: 0.5rem;
    }
    
    .pill {
        padding: 8px 20px;
    }
}

/* Touch optimization */
@media (hover: none) and (pointer: coarse) {
    .pill {
        min-height: 44px;
    }
    
    .nav-terminal button {
        min-height: 40px;
    }
    
    .load-btn {
        min-height: 40px;
    }
    
    .pill:hover {
        animation: none;
    }
    
    .contact-item a {
        padding: 5px 0;
        display: inline-block;
}
}
/* Performance optimization */
@media (max-width: 768px) {
.glitch {
animation: none;
}
.glitch-intense {
    animation-duration: 0.3s;
}
}
/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
* {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
.glitch,
.glitch-intense,
.vibrate {
    animation: none !important;
}
}
