:root {
    --bg-color: #050505;
    --text-color: #f0f0f0;
    --accent-1: #ff0055; /* Magenta */
    --accent-2: #00f2ff; /* Cyan */
    --font-main: 'Outfit', sans-serif;
}

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

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

/* --- OVERLAYS --- */

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0) 50%,
        rgba(0, 0, 0, 0.1) 50%
    );
    background-size: 100% 4px;
    z-index: 100;
    pointer-events: none;
    opacity: 0.3;
}

.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://media.giphy.com/media/oEI9uWUicKgR6MvUzt/giphy.gif'); /* Static noise overlay */
    opacity: 0.03;
    z-index: 99;
    pointer-events: none;
}

/* --- HERO SECTION --- */

.hero {
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    position: relative;
}

.glitch-container {
    position: relative;
}

.glitch {
    font-size: 8rem;
    font-weight: 900;
    text-transform: uppercase;
    position: relative;
    letter-spacing: 0.5rem;
    animation: glitch-skew 1s infinite linear alternate-reverse;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--accent-1);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--accent-2), 2px 2px #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 1s infinite linear alternate-reverse;
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.3rem;
    opacity: 0.8;
    margin-top: -1rem;
    color: var(--accent-2);
}

.equation-box {
    margin-top: 4rem;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border-radius: 4px;
    position: relative;
}

.equation {
    font-size: 2rem;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
}

.label {
    position: absolute;
    top: -10px;
    left: 20px;
    background: var(--bg-color);
    padding: 0 10px;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--accent-1);
}

/* --- CONTENT SECTION --- */

.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.image-wrapper {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

#dirac-portrait {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    filter: grayscale(1) contrast(1.2);
    transition: filter 0.3s ease;
}

.image-wrapper:hover #dirac-portrait {
    filter: grayscale(0) contrast(1);
}

.image-glitch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 242, 255, 0.05) 2px,
        rgba(0, 242, 255, 0.05) 4px
    );
    pointer-events: none;
}

.card {
    background: rgba(255, 255, 255, 0.03);
    padding: 2.5rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent-1);
    transition: transform 0.3s ease, background 0.3s ease;
}

.card:hover {
    transform: translateX(10px);
    background: rgba(255, 255, 255, 0.05);
}

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
    color: var(--accent-2);
}

/* --- FOOTER --- */

footer {
    text-align: center;
    padding: 4rem;
    opacity: 0.4;
    font-size: 0.8rem;
    letter-spacing: 4px;
}

/* --- ANIMATIONS --- */

@keyframes glitch-anim {
    0% { clip: rect(65px, 9999px, 86px, 0); transform: skew(0.85deg); }
    5% { clip: rect(10px, 9999px, 57px, 0); transform: skew(0.12deg); }
    10% { clip: rect(44px, 9999px, 85px, 0); transform: skew(0.3deg); }
    15% { clip: rect(21px, 9999px, 67px, 0); transform: skew(0.5deg); }
    20% { clip: rect(81px, 9999px, 15px, 0); transform: skew(0.1deg); }
    25% { clip: rect(31px, 9999px, 34px, 0); transform: skew(0.7deg); }
    30% { clip: rect(55px, 9999px, 42px, 0); transform: skew(0.2deg); }
    35% { clip: rect(18px, 9999px, 29px, 0); transform: skew(0.6deg); }
    40% { clip: rect(72px, 9999px, 94px, 0); transform: skew(0.4deg); }
    45% { clip: rect(36px, 9999px, 12px, 0); transform: skew(0.8deg); }
    50% { clip: rect(90px, 9999px, 53px, 0); transform: skew(0.9deg); }
    55% { clip: rect(25px, 9999px, 78px, 0); transform: skew(0.1deg); }
    60% { clip: rect(48px, 9999px, 21px, 0); transform: skew(0.3deg); }
    65% { clip: rect(67px, 9999px, 44px, 0); transform: skew(0.5deg); }
    70% { clip: rect(15px, 9999px, 81px, 0); transform: skew(0.7deg); }
    75% { clip: rect(88px, 9999px, 63px, 0); transform: skew(0.2deg); }
    80% { clip: rect(34px, 9999px, 31px, 0); transform: skew(0.6deg); }
    85% { clip: rect(59px, 9999px, 18px, 0); transform: skew(0.4deg); }
    90% { clip: rect(12px, 9999px, 72px, 0); transform: skew(0.8deg); }
    95% { clip: rect(94px, 9999px, 36px, 0); transform: skew(0.1deg); }
    100% { clip: rect(87px, 9999px, 14px, 0); transform: skew(0.44deg); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(12px, 9999px, 93px, 0); transform: skew(0.3deg); }
    5% { clip: rect(88px, 9999px, 21px, 0); transform: skew(0.7deg); }
    10% { clip: rect(34px, 9999px, 65px, 0); transform: skew(0.2deg); }
    15% { clip: rect(72px, 9999px, 18px, 0); transform: skew(0.9deg); }
    20% { clip: rect(15px, 9999px, 44px, 0); transform: skew(0.4deg); }
    23% { clip: rect(44px, 9999px, 78px, 0); transform: skew(0.1deg); }
    25% { clip: rect(67px, 9999px, 31px, 0); transform: skew(0.8deg); }
    30% { clip: rect(21px, 9999px, 88px, 0); transform: skew(0.5deg); }
    35% { clip: rect(94px, 9999px, 12px, 0); transform: skew(0.3deg); }
    40% { clip: rect(55px, 9999px, 59px, 0); transform: skew(0.6deg); }
    45% { clip: rect(36px, 9999px, 94px, 0); transform: skew(0.1deg); }
    50% { clip: rect(18px, 9999px, 36px, 0); transform: skew(0.4deg); }
    55% { clip: rect(81px, 9999px, 72px, 0); transform: skew(0.7deg); }
    60% { clip: rect(42px, 9999px, 15px, 0); transform: skew(0.2deg); }
    65% { clip: rect(63px, 9999px, 81px, 0); transform: skew(0.9deg); }
    70% { clip: rect(29px, 9999px, 48px, 0); transform: skew(0.5deg); }
    75% { clip: rect(78px, 9999px, 25px, 0); transform: skew(0.1deg); }
    80% { clip: rect(10px, 9999px, 67px, 0); transform: skew(0.8deg); }
    85% { clip: rect(53px, 9999px, 90px, 0); transform: skew(0.3deg); }
    90% { clip: rect(90px, 9999px, 53px, 0); transform: skew(0.6deg); }
    95% { clip: rect(31px, 9999px, 10px, 0); transform: skew(0.4deg); }
    100% { clip: rect(56px, 9999px, 22px, 0); transform: skew(0.9deg); }
}

@keyframes glitch-skew {
    0% { transform: skew(1deg); }
    10% { transform: skew(-1deg); }
    20% { transform: skew(2deg); }
    30% { transform: skew(-2deg); }
    40% { transform: skew(0.5deg); }
    50% { transform: skew(-0.5deg); }
    60% { transform: skew(1.5deg); }
    70% { transform: skew(-1.5deg); }
    80% { transform: skew(0.2deg); }
    90% { transform: skew(-0.2deg); }
    100% { transform: skew(0deg); }
}

/* --- CONTRIBUTIONS SECTION --- */

.contributions {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.featured-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 3rem;
    margin-bottom: 4rem;
    border-left: 4px solid var(--accent-1);
    border-right: 4px solid var(--accent-2);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, background 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(0, 242, 255, 0.05), transparent);
    z-index: -1;
}

.featured-card h2 {
    font-size: 2rem;
    color: var(--accent-1);
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
}

.featured-card .sub-heading {
    font-size: 1.2rem;
    color: var(--accent-2);
    opacity: 0.9;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.featured-card p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    letter-spacing: 4px;
    color: var(--accent-2);
    margin-bottom: 3rem;
    text-transform: uppercase;
}

.contributions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.contributions-grid .card {
    margin-bottom: 0;
    height: 100%;
}

.contributions-grid .card h3 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .glitch { font-size: 4rem; }
    .content { grid-template-columns: 1fr; }
    .hero { height: auto; padding: 6rem 1rem; }
}

/* --- ACCESSIBILITY --- */
@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;
    }
    .noise, .scanlines {
        display: none !important;
    }
}
