/* Variables */
:root {
    --primary-color: #00ff00;
    --secondary-color: #008000;
    --bg-color: #0a0a0a;
    --text-color: #ffffff;
    --card-bg: #111111;
    --purple-accent: #9333ea;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Courier New', monospace;
    line-height: 1.6;
}

/* Terminal Intro Styles */
#terminal-intro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    font-family: 'Courier New', monospace;
}

.terminal-content {
    width: 80%;
    max-width: 800px;
    height: 60vh;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #333;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.2);
    padding: 0;
    position: relative;
    overflow: hidden;
    transform-origin: center center;
    display: flex;
    flex-direction: column;
    will-change: transform;
}

.terminal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: #333;
    border-bottom: 1px solid #444;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

.terminal-content::after {
    content: 'Terminal';
    position: absolute;
    top: 5px;
    left: 10px;
    color: #fff;
    font-size: 14px;
}

.close-button {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 0 5px;
    transition: color 0.3s;
    z-index: 1;
}

.close-button:hover {
    color: #f00;
}

#terminal-intro.collapse {
    animation: techFadeOut 0.8s forwards;
    pointer-events: none;
}

@keyframes techFadeOut {
    0% {
        transform: scale(1);
        opacity: 1;
        filter: brightness(1) contrast(1);
    }
    20% {
        transform: scale(0.95);
        opacity: 0.9;
        filter: brightness(1.2) contrast(1.2);
    }
    40% {
        transform: scale(0.9);
        opacity: 0.8;
        filter: brightness(1.5) contrast(1.5);
    }
    60% {
        transform: scale(0.8);
        opacity: 0.6;
        filter: brightness(2) contrast(2);
    }
    80% {
        transform: scale(0.6);
        opacity: 0.3;
        filter: brightness(3) contrast(3);
    }
    100% {
        transform: scale(0);
        opacity: 0;
        filter: brightness(4) contrast(4);
        display: none;
    }
}

#terminal-intro.collapse .terminal-content {
    animation: glitchOut 0.8s forwards;
}

@keyframes glitchOut {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    15% {
        transform: scale(0.95) translateX(2px);
        opacity: 0.9;
    }
    30% {
        transform: scale(0.9) translateX(-2px);
        opacity: 0.8;
    }
    45% {
        transform: scale(0.8) translateX(3px);
        opacity: 0.6;
    }
    60% {
        transform: scale(0.6) translateX(-3px);
        opacity: 0.4;
    }
    75% {
        transform: scale(0.4) translateX(4px);
        opacity: 0.2;
    }
    90% {
        transform: scale(0.2) translateX(-4px);
        opacity: 0.1;
    }
    100% {
        transform: scale(0);
        opacity: 0;
        display: none;
    }
}

#terminal-text {
    margin-top: 40px;
    color: #0f0;
    font-size: 16px;
    line-height: 1.5;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
    padding: 20px;
    flex: 1;
    position: relative;
    white-space: pre-wrap;
    transform-origin: inherit;
    will-change: transform;
    overflow: hidden;
}

.terminal-cursor {
    display: inline-block;
    width: 12px;
    height: 20px;
    background: #0f0;
    animation: blink 1s infinite;
    position: absolute;
    top: 0;
    left: 0;
}

.typing-cursor {
    position: relative;
    display: inline-block;
}

.typing-cursor::after {
    content: '|';
    position: absolute;
    right: -5px;
    color: #0f0;
    animation: blink 1s infinite;
}

.enter-prompt {
    margin-top: 20px;
    color: #0f0;
    font-size: 18px;
    animation: pulse 2s infinite;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
    padding: 20px;
    text-align: center;
}

@keyframes pulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

/* Falling Letters Animation */
.falling-letter {
    position: absolute;
    color: #0f0;
    animation: fall 2s forwards;
    pointer-events: none;
}

@keyframes fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Layout */
#main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    opacity: 0;
    position: relative;
    z-index: 1;
    visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#main-content:not(.hidden) {
    opacity: 1;
    visibility: visible;
    animation: quickReveal 0.3s forwards;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 4rem;
}

#glitch-name {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: glitch 3s infinite;
}

.subtitle {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Section Headers */
section h2 {
    color: var(--primary-color);
    font-size: 2rem;
    font-family: 'Courier New', monospace;
    max-width: 900px;
    width: 100%;
    margin: 0 auto 2rem;
    text-align: left;
}

/* Common Container Styles */
.container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    position: relative;
}

/* About Section */
#about {
    width: 100%;
    margin-bottom: 4rem;
}

#about .container {
    display: flex;
    align-items: stretch;
    gap: 3rem;
    margin: 0 auto;
    max-width: 900px;
    width: 100%;
    padding: 0;
    min-height: 350px;
}

.pixelated-image {
    position: relative;
    width: 350px;
    height: 350px;
    flex-shrink: 0;
    border: 2px solid var(--primary-color);
    overflow: hidden;
}

.pixelated-image::after {
    content: '';
    position: absolute;
    inset: -2px;
    box-shadow: 0 0 15px var(--primary-color);
    pointer-events: none;
}

.pixelated-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(110%) brightness(95%);
}

.pixel-overlay {
    display: none;
}

.about-text {
    flex: 1;
    display: flex;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    opacity: 0.9;
}

/* Projects Section */
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
    max-width: 900px;
    width: 100%;
}

.project-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border: 1px solid var(--primary-color);
    transition: transform 0.3s;
    min-height: 250px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    line-height: 1.4;
}

.status-tag {
    font-size: 0.8rem;
    color: var(--primary-color);
    opacity: 0.8;
    font-style: italic;
    margin-left: 0.5rem;
}

.project-card p {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 2rem;
    flex-grow: 1;
    overflow-y: auto;
    max-height: 150px;
}

.project-links {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
}

.project-links a {
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: color 0.3s;
}

.project-links a:hover {
    color: var(--secondary-color);
}

.coming-soon {
    color: var(--primary-color);
    opacity: 0.7;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}

/* Buttons Section */
#buttons-container {
    width: 100%;
    margin-bottom: 4rem;
}

#buttons-container .container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.buttons-wrapper {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin: 2rem auto;
    max-width: 600px;
    position: relative;
    z-index: 3;
}

.cyber-button {
    background: var(--bg-color);
    padding: 20px 40px;
    text-decoration: none;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
    min-width: 200px;
    text-transform: uppercase;
}

.cyber-button:first-child {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.cyber-button:last-child {
    border: 2px solid var(--purple-accent);
    color: var(--purple-accent);
}

.cyber-button::before {
    content: '';
    position: absolute;
    inset: -2px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cyber-button:first-child::before {
    box-shadow: 0 0 15px var(--primary-color);
}

.cyber-button:last-child::before {
    box-shadow: 0 0 15px var(--purple-accent);
}

.cyber-button:hover {
    transform: translateY(-2px);
}

.cyber-button:first-child:hover {
    background: transparent;
    color: var(--primary-color);
}

.cyber-button:last-child:hover {
    background: transparent;
    color: var(--purple-accent);
}

.cyber-button:hover::before {
    opacity: 1;
}

/* Dad Joke Terminal */
#joke-terminal {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 0;
    opacity: 0;
    background: var(--bg-color);
    border: 2px solid var(--primary-color);
    margin-top: 2rem;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 2;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
}

#joke-terminal.active {
    height: 200px;
    opacity: 1;
}

.joke-header {
    background: var(--primary-color);
    color: var(--bg-color);
    padding: 8px 15px;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    text-align: center;
}

#joke-text {
    padding: 20px;
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.joke-countdown {
    padding: 8px 15px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--primary-color);
    text-align: center;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid var(--primary-color);
    background: transparent;
}

/* Footer */
footer {
    position: relative;
    z-index: 1;
    background: var(--bg-color);
    padding: 1rem 0;
    transition: transform 0.3s ease, margin-top 0.3s ease;
}

footer.shift-down {
    margin-top: 200px;
    transform: translateY(0);
}

#contact {
    position: relative;
    z-index: 1;
    margin-top: 2rem;
    padding: 2rem 0;
}

.contact-heading {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-family: 'Courier New', monospace;
    text-align: center;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 30px;
    justify-content: center;
    position: relative;
    z-index: 3;
    padding: 0.5rem 0;
}

.social-icon {
    color: var(--primary-color);
    font-size: 24px;
    transition: 0.3s;
}

.social-icon:hover {
    transform: scale(1.2);
    color: var(--secondary-color);
}

/* Animations */
@keyframes quickReveal {
    0% { transform: scale(0.98); }
    100% { transform: scale(1); }
}

@keyframes glitch {
    0% { transform: none; opacity: 1; }
    7% { transform: skew(-0.5deg, -0.9deg); opacity: 0.75; }
    10% { transform: none; opacity: 1; }
    27% { transform: none; opacity: 1; }
    30% { transform: skew(0.8deg, -0.1deg); opacity: 0.75; }
    35% { transform: none; opacity: 1; }
    52% { transform: none; opacity: 1; }
    55% { transform: skew(-1deg, 0.2deg); opacity: 0.75; }
    50% { transform: none; opacity: 1; }
    100% { transform: none; opacity: 1; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    #main-content { max-width: 1200px; }
    #about .container,
    .project-grid { max-width: 800px; }
    .pixelated-image {
        width: 220px;
        height: 320px;
    }
}

@media (max-width: 768px) {
    #about .container {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .pixelated-image {
        width: 180px;
        height: 260px;
        margin: 0 auto;
    }
    
    .about-text {
        padding-top: 2rem;
        max-width: 100%;
        text-align: center;
    }
    
    #glitch-name { font-size: 3rem; }
    
    .project-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-card { min-height: 200px; }
    
    #about h2 {
        text-align: center;
        padding: 0 1rem;
    }
    
    .buttons-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
} 