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

body {
    font-family:  'Comic Sans MS', 'Comic Neue', cursive, sans-serif;
    /* The rainbow background is replaced by the Matrix canvas */
    /* background: linear-gradient(45deg, #ff00ff, #00ffff, #ffff00, #ff0000); */
    /* background-size: 400% 400%; */
    /* animation: rainbowBackground 8s ease infinite; */
    background-color: #000; /* A solid black fallback */
    color: #000;
    overflow-x: hidden;
    cursor: url('cur1156.ani'), auto; /* The new custom cursor */
}

#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Place it behind all other content */
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border: 5px solid #ff0000;
    box-shadow: 0 0 20px #ff00ff;
    animation: borderGlow 2s ease-in-out infinite alternate;
}

/* --- Header --- */
.header {
    background: linear-gradient(90deg, #000080, #800080);
    color: #ffff00;
    text-align: center;
    padding: 20px;
    border-bottom: 5px dashed #ff0000;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: "⭐✨💫⭐✨💫⭐✨💫⭐✨💫⭐✨💫";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    animation: sparkleScroll 5s linear infinite;
    font-size: 20px;
}

.title {
    font-family: 'Orbitron', monospace;
    font-size: 3em;
    font-weight: 900;
    text-shadow: 3px 3px 0 #ff0000, 6px 6px 0 #00ff00;
    animation: titlePulse 2s ease-in-out infinite;
    margin: 20px 0;
}

.subtitle {
    font-size: 1.2em;
    color: #00ffff;
    text-shadow: 2px 2px 0 #000;
    margin-bottom: 10px;
}

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

.music-player {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px; /* Adds space between the buttons */
}

/* --- Navigation --- */
.navigation {
    background: #ffff00;
    border: 3px solid #ff0000;
    margin: 10px;
    text-align: center;
    padding: 10px;
}

.nav-link {
    display: inline-block;
    margin: 0 10px;
    padding: 8px 15px;
    background: linear-gradient(45deg, #ff0000, #ff00ff);
    color: white;
    text-decoration: none;
    border: 2px solid #000;
    border-radius: 20px;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
    transition: all 0.3s;
}

.nav-link:hover, .nav-link:focus {
    transform: rotate(5deg) scale(1.1);
    background: linear-gradient(45deg, #00ff00, #00ffff);
    animation: wiggle 0.5s ease-in-out;
    outline: 3px solid #000080;
}

/* --- Content & Sections --- */
.content {
    padding: 20px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 50 50"><rect width="50" height="50" fill="%23fff"/><circle cx="25" cy="25" r="2" fill="%23ff0000"/></svg>');
}

.section {
    margin: 20px 0;
    padding: 15px;
    border: 3px solid;
    border-image: linear-gradient(45deg, #ff0000, #00ff00, #0000ff, #ffff00) 1;
    background: rgba(255, 255, 255, 0.8);
    position: relative;
}

.section-title {
    font-family: 'Orbitron', monospace;
    font-size: 2em;
    color: #800080;
    text-shadow: 2px 2px 0 #ffff00;
    margin-bottom: 15px;
    text-align: center;
}

.section p {
    line-height: 1.6;
}

.highlight-text {
    color: #ff0000;
    font-weight: bold;
}

.about-details {
    margin-top: 15px;
    font-size: 1.1em;
}

/* --- Skills --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.skill-item {
    background: linear-gradient(135deg, #ff00ff, #00ffff);
    color: white;
    padding: 10px;
    border: 2px solid #000;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    text-shadow: 1px 1px 0 #000;
    animation: skillFloat 3s ease-in-out infinite;
    animation-delay: calc(var(--delay) * 0.2s);
}

/* --- Experience --- */
.experience-item {
    background: linear-gradient(90deg, #ffff00, #ff00ff);
    margin: 10px 0;
    padding: 15px;
    border: 2px dashed #000;
    border-radius: 15px;
}

.job-title {
    font-weight: bold;
    font-size: 1.2em;
    color: #000080;
    text-shadow: 1px 1px 0 #fff;
}

.company {
    font-style: italic;
    color: #800000;
    margin: 5px 0;
}

.experience-item--foundational {
    background: linear-gradient(90deg, #cccccc, #e6e6e6);
}
.experience-item--foundational .job-title {
    color: #333;
}
.foundational-text {
    color: #333;
    font-style: italic;
}

/* --- Contact --- */
.contact-section {
    background: linear-gradient(45deg, #00ff00, #ffff00);
    text-align: center;
    padding: 20px;
    border: 5px solid #ff0000;
    margin: 20px 0;
}

.contact-intro {
    margin-top: 15px;
    font-weight: bold;
    font-size: 1.2em;
}

.contact-info {
    font-size: 1.2em;
    font-weight: bold;
    margin: 10px 0;
    text-shadow: 1px 1px 0 #000;
}

.contact-link {
    color: #000080;
}

.spinning-at {
    display: inline-block;
    animation: spin 2s linear infinite;
}

.contact-cta {
    margin-top: 20px;
    font-weight: bold;
    font-size: 1.3em;
}

/* --- Misc & Footer --- */
.marquee {
    background: #000;
    color: #00ff00;
    padding: 10px;
    white-space: nowrap;
    overflow: hidden;
    font-family: 'Courier New', monospace;
}

.marquee-content {
    display: inline-block;
    padding-left: 100%;
    animation: marqueeScroll 20s linear infinite;
}

.construction-banner {
    text-align: center;
    margin: 20px 0;
}

.footer {
    background: #000080;
    color: #ffff00;
    text-align: center;
    padding: 20px;
    border-top: 5px solid #ff0000;
}

.visitor-counter {
    background: #000;
    color: #00ff00;
    display: inline-block;
    padding: 5px 10px;
    border: 2px solid #00ff00;
    font-family: 'Courier New', monospace;
    margin: 10px;
}

.footer-credits {
    margin-top: 10px;
}

/* --- Terminal Button --- */
.terminal-button-container {
    text-align: center;
    padding: 20px;
}

#terminal-btn {
    background: linear-gradient(45deg, #ff0000, #b30000);
    border: 3px solid #ffff00;
    font-family: 'Orbitron', monospace;
    font-size: 1em;
    animation: titlePulse 1.5s ease-in-out infinite;
}

#terminal-btn:hover {
    background: linear-gradient(45deg, #ff6666, #ff0000);
    transform: scale(1.1); /* Keep hover effect simple */
}

/* --- Animation Keyframes --- */
@keyframes rainbowBackground { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes borderGlow { from { box-shadow: 0 0 20px #ff00ff; } to { box-shadow: 0 0 40px #00ffff; } }
@keyframes sparkleScroll { 0% { left: -100%; } 100% { left: 100%; } }
@keyframes titlePulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes blinker { 50% { opacity: 0; } }
@keyframes wiggle { 0%, 100% { transform: rotate(5deg) scale(1.1); } 25% { transform: rotate(-5deg) scale(1.1); } 75% { transform: rotate(10deg) scale(1.1); } }
@keyframes skillFloat { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-10px); } }
@keyframes marqueeScroll {
  0% {
    transform: translateX(0); /* Start ON-screen */
  }
  100% {
    transform: translateX(-100%); /* End OFF-screen */
  }
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Accessibility: Reduce Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Responsiveness */
@media (max-width: 768px) {
    .title { font-size: 2.5em; }
    .section-title { font-size: 1.8em; }
    .skills-grid { grid-template-columns: 1fr; }
    .nav-link { display: block; margin: 5px auto; }
}