:root {
    /* Minimalist / Brutalist Palette */
    --bg-color: #ededed; /* Slight off-white like old paper or concrete */
    --text-color: #1a1a1a;
    --text-muted: #555555;
    --accent-color: #1a1a1a; /* Using black as accent */
    --card-bg: #ececec;
    --border-color: #1a1a1a; /* Sharp, high contrast borders */
    --shadow: 4px 4px 0px rgba(0, 0, 0, 1); /* Hard shadow, no blur */
    
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Poppins', sans-serif;
    --font-mono: 'Courier New', monospace; /* For tech details */
}

[data-theme="dark"] {
    --bg-color: #050505;
    --text-color: #f0f0f0;
    --text-muted: #888888;
    --accent-color: #f0f0f0;
    --card-bg: #111111;
    --border-color: #f0f0f0;
    --shadow: 4px 4px 0px rgba(255, 255, 255, 0.9);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: crosshair; /* Technical/Precise cursor feel */
}

/* Noise Texture for Old Aesthetic */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.05;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* TERMINAL OVERLAY */
#terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: black;
    color: #00ff00; /* Classic hacker green */
    font-family: 'Courier New', monospace;
    z-index: 10001; /* Above everything */
    display: flex; /* Flex to center content if needed, but we'll use padding */
    padding: 50px;
    box-sizing: border-box;
    font-size: 1.5rem;
    overflow: hidden;
}

.terminal-content {
    width: 100%;
    height: 100%;
}

.cursor-blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Red Overlay for Heartbeat */
@keyframes pulse-red {
    0% { box-shadow: inset 0 0 0 red; opacity: 0; }
    50% { box-shadow: inset 0 0 150px red; opacity: 1; }
    100% { box-shadow: inset 0 0 0 red; opacity: 0; }
}

body.heartbeat-overlay::before {
    content: "";
    position: fixed;
    top: 0; 
    left: 0;
    width: 100vw; 
    height: 100vh;
    pointer-events: none;
    z-index: 9997; /* High visibility */
    animation: pulse-red 0.4s ease-in-out forwards;
}

/* Shake Animation */
@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.shake-screen {
    animation: shake 0.5s; /* Run for 0.5s */
    animation-iteration-count: 1; 
}

/* Cursor Trail */
.cursor-trail {
    position: fixed;
    width: 8px;
    height: 8px;
    background: #FF0000; /* Bright red */
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    mix-blend-mode: normal; /* Stick to normal to ensure visibility on both themes */
    opacity: 0.8;
    box-shadow: 0 0 8px red; /* Glowing effect */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    letter-spacing: -0.02em; /* Tighter tracking for modern look */
}

/* Selection Style */
::selection {
    background: var(--text-color);
    color: var(--bg-color);
}

/* Typography Overrides */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

/* Navbar: Floating Brutalist Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--bg-color);
    border-bottom: 2px solid var(--border-color);
    padding: 15px 0;
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: none; /* Removed blur for sharpness */
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 0; /* Sharp corners */
    border: 2px solid var(--border-color);
    filter: grayscale(100%);
    transition: filter 0.3s;
}

.nav-avatar img:hover {
    filter: grayscale(0%);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid transparent; /* Prepare for hover */
    transition: all 0.2s;
}

.nav-links a:hover {
    border-bottom: 1px solid var(--text-color);
}

.theme-toggle {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-color);
    font-size: 1rem;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 140px 20px 60px; /* More top padding for navbar */
}

/* Hero Section */
.hero-section {
    text-align: left; /* Align left for professional feel */
    margin-bottom: 100px;
    border-left: 4px solid var(--border-color);
    padding-left: 30px;
}

.hero-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 0; /* No circle */
    border: 2px solid var(--border-color);
    object-fit: cover;
    margin-bottom: 30px;
    filter: grayscale(100%) contrast(120%);
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.hero-avatar img:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px var(--text-color);
}

.hero-title {
    font-size: 3.5rem; /* Larger */
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--text-color);
}

.text-muted {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 400;
    display: block;
    margin-top: 10px;
    letter-spacing: 0;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-color);
    max-width: 650px;
    margin: 0 0 40px 0;
    font-weight: 300;
}

/* Tech Badges: Minimal Tags */
.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.badge {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background-color: transparent;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-color);
    border-radius: 0;
}
/* Override specific colors to monochrome */
.badge i { margin-right: 5px; }
.badge.blue, .badge.white, .badge.yellow, .badge.green { color: var(--text-color); border-color: var(--border-color); }

/* Buttons: Solid & Sharp */
.cta-buttons {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    margin-bottom: 40px;
}

.btn {
    padding: 14px 28px;
    border-radius: 0;
    text-decoration: none;
    font-family: var(--font-mono);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s ease;
    border: 2px solid var(--border-color);
    position: relative;
    top: 0;
    left: 0;
}

.btn-primary {
    background-color: var(--text-color);
    color: var(--bg-color);
}

.btn-primary:hover {
    background-color: var(--bg-color);
    color: var(--text-color);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
    box-shadow: var(--shadow);
}

.btn-full {
    width: 100%;
    justify-content: center;
    margin-top: 20px;
}

/* Social Links */
.social-links {
    margin-bottom: 20px;
}

.social-links a {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-right: 20px;
    transition: opacity 0.2s;
}

.social-links a:hover {
    opacity: 0.6;
}

/* Section Styling */
section {
    margin-bottom: 120px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    display: inline-block;
}

.featured-text {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 10px;
}

/* Cards: Brutalist Layout */
.experience-card, .project-card, .gear-item, .contact-box {
    border: 2px solid var(--border-color);
    background: var(--bg-color); /* Match bg */
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 0;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.experience-card:hover, .project-card:hover, .gear-item:hover, .contact-box:hover {
    transform: translate(-3px, -3px);
    box-shadow: var(--shadow);
}

/* Experience Specifics */
.company-logo {
    display: none; /* Hide logos for cleaner text look, or make monochrome */
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 15px;
    border-bottom: 1px dotted var(--border-color);
    padding-bottom: 10px;
}

.exp-title h3 {
    font-size: 1.3rem;
}

.exp-date {
    text-align: right;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.tech-list {
    display: flex;
    gap: 8px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.tech-pill {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    background: var(--text-color);
    color: var(--bg-color);
    padding: 2px 6px;
}

.exp-desc-list {
    margin-top: 15px;
    padding-left: 20px;
}

.exp-desc-list li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* Project Grid */
.projects-grid, .gears-list, .contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 2px solid var(--border-color);
    filter: grayscale(100%);
    transition: filter 0.3s;
}

.project-card:hover .project-thumbnail img {
    filter: grayscale(0%);
}

.project-content {
    margin-top: 15px;
}

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

.project-title h3 {
    font-size: 1.2rem;
}

.project-links a {
    color: var(--text-color);
    margin-left: 10px;
    font-size: 1.1rem;
}

.project-desc {
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.status-badge {
    margin-top: 15px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--text-color); /* Blink animation optionally */
    border-radius: 0; /* Square dot */
}

/* Gear / Skills Items */
.gear-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.gear-icon {
    font-size: 1.5rem;
    color: var(--text-color);
}

.contact-info-list {
    margin: 20px 0;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

footer {
    text-align: center;
    padding: 60px 0;
    border-top: 2px solid var(--border-color);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.quote {
    font-style: italic;
    margin-bottom: 20px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-color);
}

/* Glitch Effect */
.glitch-text {
    position: relative;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit; /* Match background to hide original */
}

.glitch-text::before {
    left: 2px;
    text-shadow: -1px 0 red;
    clip-path: inset(0 0 50% 0); /* Top half */
    animation: noise-anim-1 2s infinite linear alternate-reverse;
}
.glitch-text::after {
    left: -2px;
    text-shadow: 1px 0 blue;
    clip-path: inset(50% 0 0 0); /* Bottom half */
    animation: noise-anim-2 3s infinite linear alternate-reverse;
}

@keyframes noise-anim-1 {
  0% { clip-path: inset(80% 0 10% 0); transform: skew(0.5deg); }
  20% { clip-path: inset(10% 0 80% 0); transform: skew(-0.5deg); }
  40% { clip-path: inset(50% 0 30% 0); transform: skew(0.2deg); }
  60% { clip-path: inset(20% 0 60% 0); transform: skew(-0.2deg); }
  80% { clip-path: inset(60% 0 10% 0); transform: skew(0.5deg); }
  100% { clip-path: inset(40% 0 40% 0); transform: skew(-0.1deg); }
}

@keyframes noise-anim-2 {
  0% { clip-path: inset(15% 0 60% 0); transform: skew(-0.5deg); }
  20% { clip-path: inset(80% 0 5% 0); transform: skew(0.3deg); }
  40% { clip-path: inset(30% 0 20% 0); transform: skew(-0.3deg); }
  60% { clip-path: inset(10% 0 80% 0); transform: skew(0.2deg); }
  80% { clip-path: inset(50% 0 10% 0); transform: skew(-0.5deg); }
  100% { clip-path: inset(20% 0 50% 0); transform: skew(0.3deg); }
}

/* Horror Effects */
.horror-flicker {
    animation: flicker-invert 0.2s 3 alternate;
    filter: invert(1) hue-rotate(180deg);
}

@keyframes flicker-invert {
    0% { filter: invert(0); opacity: 1; }
    50% { filter: invert(1); opacity: 0.8; }
    100% { filter: invert(0); opacity: 1; }
}

/* Horror Watcher Eyes */
#watcher-eyes {
    position: fixed;
    z-index: 100;
    width: 60px;
    height: 30px;
    display: flex;
    justify-content: space-between;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
}

.eye {
    width: 24px;
    height: 24px;
    background: #000;
    border-radius: 50%;
    position: relative;
    border: 2px solid white;
    /* Red glow for horror */
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

/* Pupil */
.eye::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: red;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 2px red;
}

[data-theme="dark"] .eye {
    background: #fff;
    border: 2px solid #000;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 100px 20px 40px; /* Adjust top padding for mobile */
    }
    
    .hero-section {
        border-left: none; /* Remove border for mobile */
        padding-left: 0;
        text-align: center; /* Center align for mobile */
    }

    .hero-avatar {
        display: flex;
        justify-content: center;
        margin-bottom: 20px;
    }

    .hero-avatar img {
        width: 120px; /* Make it visible and slightly larger */
        height: 120px;
        margin: 0 auto 20px;
    }

    .hero-title {
        font-size: 2rem; /* Slightly smaller */
    }
    .navbar {
        padding: 10px 0;
    }
    
    /* Make nav links smaller or hide/stack */
    .nav-links {
        display: none; 
    }

    /* Stack CTA buttons and full width */
    .cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .btn {
        width: 100%; /* Full width on mobile for better touch target */
        padding: 12px 15px; /* Reduce padding */
        font-size: 0.9rem; /* Reduce font size */
        text-align: center;
        display: flex; /* Center icon and text */
        justify-content: center;
        align-items: center;
        white-space: nowrap; /* Prevent wrapping unless we want it */
    }

    .btn i {
        margin-right: 8px;
    }

    .section-title {
        font-size: 2rem;
    }
    
    /* Ensure project/experience cards aren't too wide */
    .experience-card, .project-card, .gear-item, .contact-box {
        padding: 15px;
    }

    /* Remove glowing/glitch effect on name for mobile */
    .glitch-text::before,
    .glitch-text::after {
        display: none;
    }
}

/* Skills Section Styling */
.skills-category {
    margin-bottom: 30px;
    border: 2px solid var(--border-color);
    padding: 20px;
}

.skills-category h4 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    text-transform: uppercase;
    font-family: var(--font-heading);
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 10px;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skills-list .badge {
    font-size: 0.85rem;
    padding: 8px 16px;
    border-width: 2px;
}
/* Ensure badges have hover effect */
.skills-list .badge:hover {
    transform: translateY(-2px);
    box-shadow: 2px 2px 0 var(--text-color);
    background: var(--bg-color);
}

