/* Terminal Animation Effect */
.terminal-animation {
    position: relative;
    display: inline-block;
}

.terminal-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-terminal);
    animation: terminalCursor 0.8s steps(1) infinite;
    z-index: 1;
}

.project-card {
    height: 200px;
}

.terminal-animation.typing::before {
    animation: terminalTyping 3s steps(30, end);
}

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

@keyframes terminalTyping {
    from { 
        width: 100%;
    }
    to { 
        width: 0;
    }
}

/* Matrix Animation for Name Hover */
.matrix-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    overflow: hidden;
}

.name:hover + .matrix-animation,
.name:hover .matrix-animation {
    opacity: 1;
}

.matrix-char {
    position: absolute;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    transform: translateY(-100%);
    animation: matrixDrop 2s linear infinite;
}

@keyframes matrixDrop {
    from {
        transform: translateY(-100%);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* More compact and techy elements */
.logo .ascii-logo {
    font-size: 0.9rem;
    letter-spacing: 0px;
    text-transform: lowercase;
}

.title {
    text-transform: lowercase;
    letter-spacing: 1px;
    font-size: 1.2rem;
    padding: 4px 8px;
}

.content {
    position: relative;
}

.content::after {
    content: '}';
    position: absolute;
    bottom: -30px;
    left: 0;
    color: var(--text-secondary);
}

/* Blinking cursor effects on elements */
.blink-cursor {
    animation: blink 1s infinite;
    color: var(--accent);
}

.blink-cursor:empty::after {
    content: '|';
}

/* Command line styling */
.cmd-line {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.cmd-prompt {
    color: var(--accent);
    margin-right: 8px;
}

.cmd-text {
    color: var(--text-primary);
}

/* Tech background patterns */
.tech-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(var(--accent) 1px, transparent 1px),
        radial-gradient(var(--accent) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: 0 0, 25px 25px;
    opacity: 0.03;
    pointer-events: none;
}

/* More compact spacings */
p {
    margin-bottom: 15px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.projects-grid {
    gap: 20px;
}

.project-card {
    height: 280px;
}

.social-links {
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
}

/* Glitch effect on hover */
.glitch-hover:hover {
    animation: glitch 0.3s ease;
    position: relative;
}

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

.glitch-hover:hover::before {
    color: var(--accent);
    z-index: -1;
    animation: glitch-anim 0.3s infinite;
}

.glitch-hover:hover::after {
    color: var(--accent-alt);
    z-index: -2;
    animation: glitch-anim2 0.3s infinite;
}

/* Auto-glitch effect classes */
.glitch-auto {
    position: relative;
    display: inline-block;
}

.glitch-auto.glitch-active {
    animation: glitch 0.3s ease;
}

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

.glitch-auto.glitch-active::before {
    color: var(--accent);
    z-index: -1;
    animation: glitch-anim 0.3s infinite;
}

.glitch-auto.glitch-active::after {
    color: var(--accent-alt);
    z-index: -2;
    animation: glitch-anim2 0.3s infinite;
}

@keyframes glitch-anim {
    0% { transform: translate(-2px, 2px); }
    25% { transform: translate(2px, -2px); }
    50% { transform: translate(-2px, -2px); }
    75% { transform: translate(2px, 2px); }
    100% { transform: translate(-2px, 2px); }
}

@keyframes glitch-anim2 {
    0% { transform: translate(2px, -2px); }
    25% { transform: translate(-2px, 2px); }
    50% { transform: translate(2px, 2px); }
    75% { transform: translate(-2px, -2px); }
    100% { transform: translate(2px, -2px); }
}

/* Compact form styling */
.form-group {
    margin-bottom: 15px;
}

.form-group input,
.form-group textarea {
    padding: 10px;
    font-size: 0.85rem;
}

.btn {
    padding: 8px 15px;
    font-size: 0.85rem;
}
