/* RESET & BASE */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

img,
video {
    max-width: 100%;
    /* height: auto;  <-- REMOVED to avoid conflict with fixed height gallery */
    display: block;
}

body {
    font-family: 'Comic Sans MS', 'Chalkboard SE', sans-serif;
    /* Intentionally ugly font choice for "professionalism" */
    background-color: #000;
    color: #0f0;
    /* Matrix Green */
    overflow-x: hidden;
    text-align: center;
}

/* BACKGROUND ANIMATION */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    opacity: 0.3;
    /* Make it subtle so text is readable */
}

#cursor-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    /* On top of everything */
    pointer-events: none;
    /* Let clicks pass through */
}

/* MARQUEE */
.marquee-container {
    background: #ff0000;
    color: yellow;
    font-weight: bold;
    padding: 5px 0;
    white-space: nowrap;
    overflow: hidden;
    border-bottom: 3px solid white;
}

.marquee {
    display: inline-block;
    padding-left: 100%;
    animation: scroll-left 15s linear infinite;
    font-size: 1.2rem;
    text-transform: uppercase;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* HEADER */
.profile-header {
    padding: 2rem;
    border-bottom: 2px dashed #0f0;
}

.profile-pic {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 5px solid #0f0;
    object-fit: cover;
    box-shadow: 0 0 10px #0f0;
    animation: breathingLight 9s infinite;
    /* Longer cycle for 3 colors */
}

@keyframes breathingLight {

    /* GREEN PHASE */
    0% {
        border-color: #004400;
        box-shadow: 0 0 10px #004400;
        transform: scale(1);
    }

    16% {
        border-color: #00ff00;
        box-shadow: 0 0 60px #00ff00, 0 0 20px #fff;
        transform: scale(1.02);
    }

    /* Peak Green */
    33% {
        border-color: #004400;
        box-shadow: 0 0 10px #004400;
        transform: scale(1);
    }

    /* BLUE PHASE */
    33.1% {
        border-color: #000044;
        box-shadow: 0 0 10px #000044;
    }

    /* Switch to Blue Dim */
    49% {
        border-color: #4169E1;
        box-shadow: 0 0 60px #4169E1, 0 0 20px #fff;
        transform: scale(1.02);
    }

    /* Peak Blue */
    66% {
        border-color: #000044;
        box-shadow: 0 0 10px #000044;
        transform: scale(1);
    }

    /* GRAY PHASE */
    66.1% {
        border-color: #333;
        box-shadow: 0 0 10px #333;
    }

    /* Switch to Gray Dim */
    83% {
        border-color: #ccc;
        box-shadow: 0 0 60px #ccc, 0 0 20px #fff;
        transform: scale(1.02);
    }

    /* Peak Gray */
    100% {
        border-color: #333;
        box-shadow: 0 0 10px #333;
        transform: scale(1);
    }
}

h1 {
    font-size: 3rem;
    color: gold;
    text-shadow: 2px 2px #ff0000;
    margin-top: 10px;
}

h2 {
    font-size: 1.2rem;
    color: white;
}

.blink {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

/* NAVIGATION */
nav {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tab-btn {
    background: #e0e0e0;
    /* Medium Grey */
    border: 2px solid #fff;
    /* White border */
    color: #333;
    /* Dark text */
    padding: 10px 20px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.tab-btn:hover {
    background: #fff;
    /* White on hover */
    color: #000;
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5);
}

.tab-btn.active {
    background: #fff;
    /* Active is white */
    color: #000;
    border-color: #ccc;
    box-shadow: inset 1px 1px 5px rgba(0, 0, 0, 0.2);
}

/* CONTENT AREA */
main {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.tab-content {
    display: none;
    /* Hidden by default */
    animation: fadeIn 0.5s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CARDS */
/* CARDS */
.card {
    background: rgba(255, 255, 255, 0.3);
    /* 30% opacity (70% transparency) */
    border: 1px solid rgba(255, 255, 255, 0.6);
    /* Aero glass border */
    border-top: 1px solid rgba(255, 255, 255, 0.9);
    /* Highlight top */
    padding: 30px;
    border-radius: 15px;
    text-align: left;
    color: #000;
    /* Darker black for contrast against transparent bg */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.3);
    /* Glass depth */
    backdrop-filter: blur(15px);
    /* Strong blur for Vista effect */
    font-weight: bold;
    /* Thicker text */
}

.card h3 {
    border-bottom: 3px solid #4169E1;
    /* Royal Blue separator */
    padding-bottom: 10px;
    margin-bottom: 15px;
    color: #4169E1;
    /* Royal Blue title */
    font-family: 'Verdana', sans-serif;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    font-weight: 900;
    /* Extra bold */
}

/* Specific Yellow Title for Bio Section as requested */
#bio .card h3 {
    color: yellow;
    text-shadow: 0 0 10px yellow;
    border-bottom-color: yellow;
}

.card p {
    font-family: 'Open Sans', 'Arial', sans-serif;
    line-height: 1.6;
    font-size: 1.1rem;
    color: #000;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
    /* Better readability on glass */
}

/* METER BARS for SKILLS */
.skills-bar {
    margin-top: 20px;
}

.bar {
    width: 100%;
    background: #333;
    height: 20px;
    margin-bottom: 15px;
    border: 1px solid white;
}

.fill {
    height: 100%;
    background: repeating-linear-gradient(45deg, #00BFFF, #00BFFF 10px, #00008B 10px, #00008B 20px);
    /* Light Blue & Dark Blue stripes */
}

/* PROJECTS GRID */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.project-card {
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 10px;
    background: rgba(255, 255, 255, 0.3);
    /* 70% Transparent */
    color: #000;
    backdrop-filter: blur(5px);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.project-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-bottom: 3px solid #4169E1;
    /* Royal Blue */
    margin-bottom: 10px;
}

/* GALLERY */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.photo-frame {
    background: rgba(255, 255, 255, 0.3);
    /* 70% Transparent */
    padding: 15px;
    color: #000;
    /* Black text */
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    transform: rotate(0deg);
    /* Remove rotation for cleaner look */
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(5px);
    border-radius: 10px;
}

.photo-frame:hover {
    transform: scale(1.05);
    /* Simple zoom */
    z-index: 10;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.6);
    border-color: gold;
    /* Touch of "luxury" on hover */
}

.photo-frame img,
.photo-frame video {
    width: 100%;
    height: 250px;
    /* Fixed height for consistency */
    object-fit: cover;
    /* Crop to fit without distorting */
    border: 1px solid #333;
    border-radius: 5px;
    background: #000;
    /* Fallback */
}

.photo-frame p {
    font-family: 'Verdana', sans-serif;
    /* Clearer font as requested */
    margin-top: 10px;
    font-size: 1rem;
    font-weight: bold;
    text-shadow: 1px 1px 1px black;
}

/* BUTTONS */
.btn-shaking {
    background: red;
    color: white;
    font-size: 1.2rem;
    padding: 10px 20px;
    margin-top: 10px;
    cursor: pointer;
    border: 3px solid white;
}

.btn-shaking:hover {
    animation: shake 0.5s infinite;
}

@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);
    }
}