:root {
    --primary: #00ffff;
    --primary-dark: #00c8c8;
    --secondary: #ff00ff;
    --dark: #121212;
    --darker: #0a0a0a;
    --light: #efefef;
    --font-mono: 'Space Mono', monospace;
    --font-sans: 'Montserrat', sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Noise overlay effect */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAMbklEQVR4nO1aWY8c13X+7lJr7z093T0LZ+UMZzgLlxmKkixTlCXZkWwZdhIkQJAESF4C5C1/IX8hQJ6CAHlIHoIEiA0DceAEtmXZkixTtihKFCmJy3A4nH3r6e7prbqrbtU934NnKNsSxVqkcKRbmO7qulXfd853zvnu0gR3AOJOD3CnIO70AHcKfyBA1muf4/l3BZCZmQdGBEgcx5BSQinVe0EIAAB5IcBYN02l1KExXNdFLpfD2NgYSqXSmblcbqZQKMzk8/k73vfXvd8rQADg1VdfRRRF6HQ6aDQavbfTtg+sKwRyuRzG77oLh00LR8cdTE1NXQTwQrFYXCwUCguldZw/aL8XgIydWb4MADO01lBaQ0qJKIoQhiGCIEAQBL1FCAEpJZRSYIyBMQbGGMbjCaFSCi+Oj+PGUQc77+zAtu1n8/n8DwuFwuNPPPHEYKHQO3M3Admq3QTT02tgeh9cvXr1nFLqXxhjz5bL5eKVK1d6IrxVfFsAQcjIv33zJigFjDFwzoG9Ak6vAzRjI7YABEEAIQQYMZ5C9b+4/ykFGGOwLAsPf+hh5PPuLsuynrAs61estTZx3L9fY0sAGTvzyeUrqNXOMB6Pi1hLAICSEpwxo/Q+HQEAQggYHZHxwDl7BVhfeTDGoCWw+dEns4eA6yMglGrEWiF+BRoIAI8//jhef+MVJOk3YRgORgBorWGZNFJqhLVYW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KLZbCIIAkgpezMnpQShhBKAyJTJR2L8Tl+D9H/Qm+SkB1/P/P6VBfDu6y8jDEPz68f7vL9PZPZQzDkTXrAg5/I4WP0lDu6/DmI9APgulOVCORaU60I5LrRtQzsOpONAOw6UbZtjy4JmDEkYI+X8VprlytTy2K8AxtgzURQ9yxjr3O7rX+vNP4DzL+A1Nd7T+ysF/9NweLRtdsvfBcDgfQDFBwDI+wDkQwAtFoP4A0jt9w/I/wEf0N0RvF0G7wAAAABJRU5ErkJggg==');
    opacity: 0.05;
    z-index: 1000;
    pointer-events: none;
    animation: noise 0.5s steps(8) infinite;
}

@keyframes noise {
    0% { background-position: 0 0; }
    100% { background-position: 100% 100%; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* Hero Section */
.hero {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 80px 0;
    position: relative;
}

.glitch-container {
    position: relative;
    margin-bottom: 20px;
    transform: translateZ(0);
}

.glitch {
    font-size: 5rem;
    font-weight: 900;
    text-transform: uppercase;
    position: relative;
    letter-spacing: 5px;
    animation: glow 2s ease-in-out infinite alternate;
    color: var(--light);
    transform: translateZ(0);
}

@keyframes glow {
    from {
        text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px var(--primary), 0 0 20px var(--primary), 0 0 25px var(--primary);
    }
    to {
        text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px var(--primary), 0 0 40px var(--primary), 0 0 50px var(--primary);
    }
}

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

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--secondary);
    animation: glitch-1 2s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: 2px 0 var(--primary);
    animation: glitch-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-1 {
    0% {
        clip-path: inset(30% 0 40% 0);
    }
    20% {
        clip-path: inset(80% 0 1% 0);
    }
    40% {
        clip-path: inset(43% 0 27% 0);
    }
    60% {
        clip-path: inset(25% 0 58% 0);
    }
    80% {
        clip-path: inset(13% 0 75% 0);
    }
    100% {
        clip-path: inset(63% 0 38% 0);
    }
}

@keyframes glitch-2 {
    0% {
        clip-path: inset(15% 0 49% 0);
    }
    20% {
        clip-path: inset(40% 0 30% 0);
    }
    40% {
        clip-path: inset(63% 0 17% 0);
    }
    60% {
        clip-path: inset(23% 0 57% 0);
    }
    80% {
        clip-path: inset(58% 0 42% 0);
    }
    100% {
        clip-path: inset(35% 0 25% 0);
    }
}

.tagline {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 40px;
    font-family: var(--font-mono);
}

/* 3D Model Showcase */
.model-showcase {
    width: 100%;
    height: 500px;
    position: relative;
    margin: 40px 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#model-container {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#model-container canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.highlight {
    color: var(--primary);
    position: relative;
    display: inline-block;
    transform: translateZ(0);
}

/* Terminal Effect */
.terminal {
    width: 100%;
    max-width: 600px;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    overflow: hidden;
    margin: 40px auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    font-family: var(--font-mono);
    height: 300px;
    display: flex;
    flex-direction: column;
}

.terminal-header {
    background-color: #333;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    background-color: #ff5f56;
}

.terminal-button:nth-child(2) {
    background-color: #ffbd2e;
}

.terminal-button:nth-child(3) {
    background-color: #27c93f;
}

.terminal-title {
    margin-left: 20px;
    font-size: 12px;
    color: #aaa;
}

.terminal-body {
    padding: 15px;
    font-size: 14px;
    line-height: 1.5;
    color: #f8f8f2;
    overflow-y: auto;
    flex: 1;
    background-color: rgba(0, 0, 0, 0.9);
    position: relative;
    text-align: left;
}

.terminal-body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    background: rgba(0, 255, 255, 0.03);
    z-index: 2;
}

.terminal-body.flash::after {
    opacity: 1;
    animation: terminal-flash 1.2s ease-in-out;
}

@keyframes terminal-flash {
    0% { opacity: 0; }
    20% { opacity: 0.1; }
    40% { opacity: 0.05; }
    60% { opacity: 0.15; }
    80% { opacity: 0.05; }
    100% { opacity: 0; }
}

.line {
    display: flex;
    margin-bottom: 6px;
    white-space: pre-wrap;
    word-break: break-word;
}

.prompt {
    color: var(--primary);
    margin-right: 8px;
    font-weight: bold;
    user-select: none;
}

.command {
    color: #f8f8f2;
}

.output-line {
    margin-bottom: 5px;
    opacity: 0;
    animation: fade-in 0.3s forwards;
    text-align: left;
}

.output-line:last-child {
    margin-bottom: 15px;
}

.cursor {
    margin-left: 2px;
    animation: blink 1s infinite;
    color: var(--primary);
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* Navigation */
.navigation {
    margin: 40px 0;
}

.navigation ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 30px;
    flex-wrap: wrap;
}

/* Base nav link style - single implementation */
.nav-link {
    position: relative;
    display: inline-block;
    color: var(--light);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    padding: 5px 10px;
    text-decoration: none;
    z-index: 1;
}

/* Hidden blue text that only appears on hover */
.nav-link::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: var(--primary);
    padding: 5px 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

/* Show blue text on hover */
.nav-link:hover::before {
    opacity: 1;
}

/* Underline effect */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: right;
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Opera-specific fixes for nav links */
@media all and (-webkit-min-device-pixel-ratio: 0) {
    .nav-link::before {
        opacity: 0 !important;
    }
    
    .nav-link:hover::before {
        opacity: 1 !important;
    }
}

/* Edge and other Webkit browsers */
@supports (-webkit-appearance:none) {
    .nav-link::before {
        opacity: 0 !important;
    }
    
    .nav-link:hover::before {
        opacity: 1 !important;
    }
}

/* Additional fixes for headers and "PROJECTS" text with specific Opera fix */
h1, h2, h3, h4, h5, h6 {
    position: relative;
}

/* Fix selection styles */
::selection {
    background-color: rgba(0, 255, 255, 0.3);
    color: inherit;
}

::-moz-selection {
    background-color: rgba(0, 255, 255, 0.3);
    color: inherit;
}

/* Opera browser fix for selections */
@supports (-o-appearance: none) or (-webkit-min-device-pixel-ratio:0) {
    *::selection {
        background-color: rgba(0, 255, 255, 0.3) !important;
        color: inherit !important;
    }
    
    *::-moz-selection {
        background-color: rgba(0, 255, 255, 0.3) !important;
        color: inherit !important;
    }
}

/* Container elements - ensure they don't apply transforms that might affect selection */
.container, .hero, section, article, aside, header, footer, nav {
    transform: none !important;
}

/* Disable clip-path during selection to avoid highlight issues */
*:has(::selection) .glitch::before,
*:has(::selection) .glitch::after {
    clip-path: none !important;
    animation: none !important;
    opacity: 0 !important;
}

/* Updated About Teaser Section */
.about-teaser {
    padding: 40px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background-color: rgba(10, 10, 10, 0.7);
    border: 1px solid var(--primary-dark);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 0; /* Removed margin since we're using grid gap */
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
    transition: all 0.3s ease;
    height: 100%; /* Make all cards same height */
    display: flex;
    flex-direction: column;
}

.card:hover {
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
    transform: translateY(-5px);
}

.card h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary);
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    padding-bottom: 10px;
    font-family: var(--font-mono);
    letter-spacing: 2px;
}

.card p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.7;
    flex-grow: 1; /* Allow paragraph to expand to fill space */
}

.card-footer {
    text-align: right;
    margin-top: auto; /* Push footer to bottom of card */
}

.btn-glow {
    display: inline-block;
    padding: 10px 20px;
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 4px;
    text-decoration: none;
    font-family: var(--font-mono);
    font-weight: 700;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-glow:hover {
    background-color: var(--primary);
    color: var(--darker);
    box-shadow: 0 0 15px var(--primary);
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 255, 255, 0.4),
        transparent
    );
    transition: all 0.6s ease;
}

.btn-glow:hover::before {
    left: 100%;
}

/* Footer */
footer {
    padding: 40px 0;
    background-color: var(--darker);
    margin-top: 60px;
    border-top: 1px solid rgba(0, 255, 255, 0.2);
}

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

.credit a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.credit a:hover {
    text-decoration: underline;
    color: var(--secondary);
}

/* Responsive adjustments for cards */
@media (max-width: 768px) {
    .about-teaser {
        grid-template-columns: 1fr;
        padding: 30px 20px;
    }
    
    .card {
        margin-bottom: 30px;
    }
}

/* Matrix Mode (Konami Code Easter Egg) */
.matrix-mode {
    background-color: #000 !important;
    color: #0F0 !important;
    position: relative;
    z-index: 999;
}

.matrix-mode * {
    color: #0F0 !important;
    border-color: #0F0 !important;
}

.matrix-mode .glitch,
.matrix-mode .highlight {
    text-shadow: 0 0 5px #0F0, 0 0 10px #0F0 !important;
}

.matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Additional Animation Classes */
.scrolled {
    animation: none !important;
}

.scrolled::before,
.scrolled::after {
    animation-duration: 0.5s !important;
}

.intensify::before,
.intensify::after {
    animation-duration: 0.2s !important;
    opacity: 1;
}

/* Scroll Reveal Animations */
.card, .terminal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.card.visible, .terminal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Improved Button Effects */
.btn-glow:active {
    transform: scale(0.95);
}

/* Prevent Transform Conflicts */
.hero {
    transition: transform 0.2s ease-out;
    will-change: transform;
}

/* Terminal Glitch Effects */
@keyframes terminal-glitch {
    0% {
        text-shadow: 0.5px 0 0 rgba(244, 67, 54, 0.1), -0.5px 0 0 rgba(33, 150, 243, 0.1);
    }
    20% {
        text-shadow: 0.5px 0 0 rgba(244, 67, 54, 0.3), -0.5px 0 0 rgba(33, 150, 243, 0.3);
    }
    40% {
        text-shadow: 1px 0 0 rgba(244, 67, 54, 0.5), -1px 0 0 rgba(33, 150, 243, 0.5);
    }
    60% {
        text-shadow: 1.5px 0 0 rgba(244, 67, 54, 0.7), -1.5px 0 0 rgba(33, 150, 243, 0.7);
    }
    80% {
        text-shadow: 2px 0 0 rgba(244, 67, 54, 0.8), -2px 0 0 rgba(33, 150, 243, 0.8);
    }
    90% {
        text-shadow: 2.5px 0 0 rgba(244, 67, 54, 0.9), -2.5px 0 0 rgba(33, 150, 243, 0.9);
    }
    100% {
        text-shadow: 3px 0 0 rgba(244, 67, 54, 1), -3px 0 0 rgba(33, 150, 243, 1);
    }
}

.terminal-glitching {
    position: relative;
    animation: terminal-glitch 7s ease-in-out;
}

.terminal-glitching::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(transparent, rgba(0, 255, 255, 0.1), transparent);
    z-index: 1;
    animation: terminal-scan 1.2s ease-in-out;
}

@keyframes terminal-scan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* Glitch text specific styling */
.glitch-text {
    opacity: 0;
    animation: fade-in 0.8s forwards;
    margin-top: 5px;
    position: relative;
    text-align: left;
}

.glitch-artifact {
    opacity: 0;
    animation: fade-in 0.3s forwards, flicker 0.2s infinite;
    text-align: left;
}

.system-message {
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
    animation: pulse 1s infinite alternate;
    text-align: left;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes flicker {
    0% { opacity: 0.3; }
    50% { opacity: 0.7; }
    100% { opacity: 0.5; }
}

@keyframes pulse {
    from { color: rgba(255, 50, 50, 0.5); }
    to { color: rgba(255, 50, 50, 0.9); }
}

/* Complete rewrite of the text selection styles */

/* Remove default selection styling first */
*::selection {
    background-color: rgba(0, 255, 255, 0.3);
    color: inherit;
}

*::-moz-selection {
    background-color: rgba(0, 255, 255, 0.3);
    color: inherit;
}

/* Opera browser fix for selections */
@supports (-o-appearance: none) or (-webkit-min-device-pixel-ratio:0) {
    *::selection {
        background-color: rgba(0, 255, 255, 0.3) !important;
        color: inherit !important;
    }
    
    *::-moz-selection {
        background-color: rgba(0, 255, 255, 0.3) !important;
        color: inherit !important;
    }
}

/* Opera browser specific styles */
.opera-browser .nav-link::before {
    opacity: 0 !important;
    color: var(--primary) !important;
}

.opera-browser .nav-link:hover::before {
    opacity: 1 !important;
}

/* Reset any transforms for Opera browser */
.opera-browser .nav-link,
.opera-browser .nav-link::before,
.opera-browser .nav-link::after {
    transform: none !important;
    -o-transform: none !important;
}

/* Opera selection fix */
.opera-browser ::selection {
    background-color: rgba(0, 255, 255, 0.3) !important;
    color: inherit !important;
    text-shadow: none !important;
}

/* Social links styling */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    justify-content: flex-end;
}

.social-link {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    letter-spacing: 1px;
    padding: 8px 16px;
    border: 1px solid var(--primary);
    border-radius: 4px;
    transition: all 0.3s ease;
    background-color: rgba(0, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.social-link:hover {
    background-color: var(--primary);
    color: var(--darker);
    box-shadow: 0 0 10px var(--primary);
}

.social-link::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: -100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
}

.social-link:hover::before {
    left: 100%;
}

/* Responsive adjustments for social links */
@media (max-width: 768px) {
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .social-links {
        flex-direction: column;
        align-items: stretch;
    }
    
    .social-link {
        text-align: center;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .glitch {
        font-size: 3rem;
    }
    
    .tagline {
        font-size: 1.2rem;
    }
    
    .navigation ul {
        gap: 15px;
    }
    
    .nav-link {
        font-size: 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .about-teaser {
        grid-template-columns: 1fr;
        padding: 30px 20px;
    }
    
    .card {
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .glitch {
        font-size: 2rem;
    }
    
    .navigation ul {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .card {
        padding: 20px;
    }
    
    .card h2 {
        font-size: 1.5rem;
    }
} 