:root {
    --bg-color: #050505;
    --text-main: #e0e0e0;
    --text-dim: #888;
    --accent: #00ff9d;
    /* Will be updated by JS */
    --accent-glow: rgba(0, 255, 157, 0.2);
    --card-bg: rgba(20, 20, 20, 0.6);
    --font-mono: 'Fira Code', monospace;
    --font-heading: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-mono);
    overflow-x: hidden;
}

/* Canvas Background */
#neural-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    will-change: filter;
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Vignette sits on top of canvas but below content */
    pointer-events: none;
    /* Let clicks pass through */
    background: radial-gradient(circle at center, transparent 0%, var(--bg-color) 120%);
}

.overlay {
    position: relative;
    z-index: 2;
    /* Content sits on top of vignette */
    width: 100%;
    min-height: 100vh;
    /* Removed background/gradient from here */
}

/* Typography & Layout */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    transition: background 0.3s, padding 0.3s, backdrop-filter 0.3s;
    gap: 2rem;
}

header.scrolled {
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--accent);
    font-size: 0.7rem;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: auto;
}

header.scrolled .header-status-indicator {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.header-profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
}

.hero-profile-pic {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
    flex-shrink: 0;
}

/* Spacer for fixed header */
main {
    padding-top: 80px;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -1px;
    color: var(--accent);
}

nav a {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.9rem;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent);
}

.icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem;
    border-radius: 4px;
    transition: all 0.3s;
    vertical-align: middle;
}

.icon-link:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.cta-btn {
    border: 1px solid var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 2px;
}

.cta-btn:hover {
    background: var(--accent-glow);
}

/* Sections */
.section {
    padding: 6rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.hero {
    height: 90vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content {
    max-width: 800px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3rem;
    /* Extra padding for hero presence */
    border-radius: 4px;
    backdrop-filter: blur(5px);
    /* Subtle glass effect since it's on top of canvas */
}

.status-indicator {
    color: var(--accent);
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
    display: block;
}

.blink {
    animation: blinker 1.5s linear infinite;
}

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

h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    /* Reduced from 4rem */
    line-height: 1.1;
    margin-bottom: 1rem;
    font-weight: 800;
}

.cert-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--accent);
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--text-main);
    margin-top: 1rem;
    text-decoration: none;
    transition: all 0.2s;
}

.cert-badge:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
    background: rgba(0, 255, 157, 0.05);
}

.highlight {
    color: white;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.sub-headline {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-bottom: 2.5rem;
    max-width: 500px;
    line-height: 1.6;
}

button {
    background: var(--text-main);
    color: var(--bg-color);
    border: none;
    padding: 1rem 2rem;
    font-family: var(--font-mono);
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

/* Cards */
h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 3rem;
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1400px;
}

@media (min-width: 1200px) {
    .project-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 4px;
    transition: border-color 0.3s, transform 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    /* Ensure clicks work on whole card */
}

.card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.card-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.card-disabled:hover {
    border-color: rgba(255, 255, 255, 0.05);
    transform: none;
}

.construction-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 165, 0, 0.2);
    border: 1px solid rgba(255, 165, 0, 0.5);
    color: #ffa500;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.sub-text {
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 1rem;
    font-style: italic;
    opacity: 0.8;
}

.tags {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags span {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    border-radius: 100px;
}

/* Stack Grid */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media(min-width: 768px) {
    .stack-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.stack-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.1rem;
    color: var(--text-dim);
}

/* Timeline styles */
.timeline {
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    padding-left: 2rem;
}

.timeline-item {
    margin-bottom: 2rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.35rem;
    top: 5px;
    width: 0.7rem;
    height: 0.7rem;
    background: var(--bg-color);
    border: 2px solid var(--accent);
    border-radius: 50%;
}

.timeline-item .time {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.timeline-item .role {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.timeline-item .details {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Custom Player */
.custom-player {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 800px;
}

.album-art {
    width: 100px;
    height: 100px;
    background: #222;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.art-placeholder {
    color: var(--text-dim);
    font-size: 0.7rem;
    font-weight: bold;
}

.player-controls {
    flex: 1;
}

.song-info {
    margin-bottom: 0.75rem;
}

.song-title {
    display: block;
    font-weight: 600;
    color: var(--text-main);
}

.artist {
    display: block;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.controls-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#play-btn {
    background: transparent;
    color: var(--accent);
    border: none;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    /* Prevent shrinking */
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0;
    line-height: 0;
    transition: transform 0.2s;
    position: relative;
    /* For absolute icon positioning */
}

#play-btn svg {
    fill: none;
    /* Wireframe style */
    stroke: currentColor;
    stroke-width: 1.5;
    /* Thin wireframe */
    width: 24px;
    height: 24px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.15s ease-out;
    /* Quick, strong, definite */
    opacity: 1;
}

/* Play State: Play Icon Visible, Pause Icon Hidden */
#play-btn .icon-play {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    opacity: 1;
}

#play-btn .icon-pause {
    transform: translate(-50%, -50%) scale(0) rotate(-90deg);
    opacity: 0;
    display: block !important;
    /* Override inline style if any */
}

/* Pause State (Music Playing): Play Icon Hidden, Pause Icon Visible */
#play-btn.is-playing .icon-play {
    transform: translate(-50%, -50%) scale(0) rotate(90deg);
    opacity: 0;
    display: block !important;
}

#play-btn.is-playing .icon-pause {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    opacity: 1;
    display: block !important;
}

#play-btn:hover {
    transform: scale(1.1);
    background: transparent;
    box-shadow: none;
    color: #fff;
    /* Brighten on hover */
}

#play-btn:active {
    transform: scale(0.95);
}

#current-time,
#duration {
    font-size: 0.7rem;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
    /* Monospace numbers preventing jitter */
    width: 45px;
    /* Fixed width for stability */
    text-align: center;
}

.progress-bar-bg {
    flex: 1;
    height: 24px;
    /* Even bigger as requested */
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    /* Increase hit area invisibly if needed, but 12px is fairly clicky */
}

.progress-fill {
    height: 100%;
    background: var(--text-dim);
    /* Will be updated to accent by JS if desired, or just text-dim */
    background: var(--accent);
    width: 0%;
    position: relative;
    border-radius: 0;
    /* Sharp corners */
}

.volume-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vol-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-dim);
}

.vol-icon svg {
    width: 20px;
    height: 20px;
}

/* Default show speaker, hide mute */
.vol-icon .icon-mute {
    display: none;
}

.vol-icon .icon-speaker {
    display: block;
}

/* Show mute on hover OR if parent has .is-muted class */
.vol-icon:hover .icon-speaker {
    display: none;
}

.vol-icon:hover .icon-mute {
    display: block;
    color: var(--accent);
}

.vol-icon.is-muted .icon-speaker {
    display: none;
}

.vol-icon.is-muted .icon-mute {
    display: block;
    color: #ff5555;
}

/* Red when actually muted */


.vol-icon:hover {
    color: var(--accent);
}

.vol-bar-bg {
    width: 100px;
    /* Slightly wider to balance the height */
    height: 24px;
    /* Match progress bar height */
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.vol-fill {
    height: 100%;
    background: var(--text-dim);
    border-radius: 0;
    /* Sharp corners */
    width: 100%;
    transition: width 0.1s;
    position: relative;
    /* For knob positioning */
}

.volume-controls:hover .vol-fill {
    background: var(--accent);
}

/* Collapsible Music Section */
.collapsible-header {
    cursor: pointer;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: color 0.3s;
}

.collapsible-header:hover h2 {
    color: var(--accent);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease-out, opacity 0.5s ease;
    padding-top: 1rem;
}

.music-grid {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.track {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.track:hover {
    background: rgba(255, 255, 255, 0.1);
}

.play-icon {
    color: var(--accent);
}

/* Simple Contact */
.big-link {
    font-size: 2rem;
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.contact-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    transition: all 0.3s;
}

.contact-icon-link:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

.contact-resume-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.contact-resume-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--accent-glow);
}

footer {
    padding: 3rem 5%;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-dim);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsiveness */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero {
        height: auto;
        min-height: 80vh;
        padding-top: 6rem;
        padding-bottom: 4rem;
    }

    .hero-content {
        padding: 2rem;
    }

    header {
        padding: 1.5rem 4%;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    header.scrolled {
        padding: 1rem 4%;
    }

    .header-status-indicator {
        font-size: 0.65rem;
        gap: 0.5rem;
    }

    .header-profile-pic {
        width: 28px;
        height: 28px;
    }

    .hero-profile-pic {
        width: 56px;
        height: 56px;
    }

    nav {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: flex-start;
        width: 100%;
    }

    nav a {
        margin-left: 0;
        margin-right: 0.5rem;
        font-size: 0.8rem;
    }

    .icon-link {
        padding: 0.3rem;
    }

    .icon-link svg {
        width: 18px;
        height: 18px;
    }

    .section {
        padding: 4rem 4%;
    }

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

    .custom-player {
        flex-direction: column;
        align-items: stretch;
    }

    .album-art {
        width: 100%;
        height: 200px;
    }

    .controls-row {
        flex-wrap: wrap;
    }

    .progress-bar-bg {
        min-width: 100%;
        order: 10;
        margin-top: 0.5rem;
    }

    .volume-controls {
        width: 100%;
        order: 11;
        margin-top: 0.5rem;
    }

    .vol-bar-bg {
        flex: 1;
        width: auto;
    }

    .big-link {
        font-size: 1.5rem;
        word-break: break-all;
    }

    .social-links {
        flex-direction: column;
        gap: 1rem;
    }

    .social-link {
        justify-content: center;
    }

    .collapsible-header {
        flex-direction: column;
    }
}