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

/* Root Variables */
:root {
    --bg-color: #faf8f5; /* Warm off-white/cream */
    --text-primary: #3a3a3a; /* Soft charcoal */
    --text-secondary: #5a5a5a; /* Slightly lighter gray */
    --accent-color: #6b6b6b; /* For email link */
    --accent-hover: #4a4a4a; /* Darker on hover */
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Tetris block colors - muted and warm */
    --tetris-red: #e8a4a4;
    --tetris-blue: #a4c7e8;
    --tetris-green: #a4e8c7;
    --tetris-yellow: #e8e4a4;
    --tetris-purple: #c7a4e8;
    --tetris-orange: #e8c7a4;
    --tetris-cyan: #a4e8e4;
}

/* Body and Container */
body {
    font-family: 'Kinetika', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.6;
    font-weight: 400;
    overflow: hidden;
}

.container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

/* Tetris Animation Container */
.tetris-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.tetris-block {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    opacity: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.block-logo-container {
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.block-logo-img {
    width: 12px;
    height: 12px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    display: none;
}

.block-logo-text {
    color: white;
    font-size: 8px;
    font-weight: bold;
    font-family: 'Kinetika', monospace;
    text-align: center;
    line-height: 1;
    display: block;
}

@keyframes fall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 0;
    }
    5% {
        opacity: 0.6;
    }
    95% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(calc(100vh + 50px)) rotate(360deg);
        opacity: 0;
    }
}

/* Main Content */
.content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 600px;
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Typography */
.headline {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.title {
    font-size: clamp(1.3rem, 3.5vw, 1.8rem);
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 1rem;
    opacity: 0.9;
    letter-spacing: 0.02em;
}

.subtext {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.5;
    opacity: 0.8;
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 1.5rem;
}

.contact-text {
    font-size: clamp(0.85rem, 1.8vw, 0.95rem);
    color: var(--text-secondary);
    opacity: 0.7;
}

.email-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    opacity: 1;
}

.email-link:hover {
    color: var(--accent-hover);
    opacity: 0.8;
}

.email-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.email-link:hover::after {
    width: 100%;
}

.email-link:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content {
        margin: 1rem;
        padding: 1.5rem;
        max-width: calc(100% - 2rem);
    }
    
    .headline {
        margin-bottom: 0.8rem;
    }
    
    .subtext {
        margin-bottom: 1.5rem;
    }
    
    
    .tetris-block {
        width: 16px;
        height: 16px;
    }
    
    .block-logo-container {
        width: 10px;
        height: 10px;
    }
    
    .block-logo-img {
        width: 10px;
        height: 10px;
    }
    
    .block-logo-text {
        font-size: 7px;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 1.2rem;
    }
    
    .tetris-block {
        width: 14px;
        height: 14px;
    }
    
    .block-logo-container {
        width: 8px;
        height: 8px;
    }
    
    .block-logo-img {
        width: 8px;
        height: 8px;
    }
    
    .block-logo-text {
        font-size: 6px;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .tetris-block {
        animation: none;
        opacity: 0.3;
    }
    
    .content {
        transition: none;
    }
    
}

/* DevOps Background Effects */
.devops-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.container:hover .devops-background {
    opacity: 1;
}

.devops-term {
    position: absolute;
    font-family: 'Kinetika', monospace;
    font-weight: 400;
    color: var(--text-secondary);
    opacity: 0;
    pointer-events: none;
    user-select: none;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateY(20px) scale(0.9);
}

.container:hover .devops-term {
    opacity: 0.10;
    transform: translateY(0) scale(1);
}

.devops-term.large {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 600;
    opacity: 0;
}

.container:hover .devops-term.large {
    opacity: 0.06;
}

.devops-term.medium {
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    font-weight: 500;
}

.container:hover .devops-term.medium {
    opacity: 0.09;
}

.devops-term.small {
    font-size: clamp(0.8rem, 1.5vw, 1.2rem);
    font-weight: 400;
}

.container:hover .devops-term.small {
    opacity: 0.11;
}

.devops-term.floating {
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(1deg);
    }
    50% {
        transform: translateY(-5px) rotate(-0.5deg);
    }
    75% {
        transform: translateY(-15px) rotate(0.5deg);
    }
}

/* Enhanced content hover effects */
.content {
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.container:hover .content {
    transform: translateY(-5px);
    z-index: 10;
}

.headline {
    transition: all 0.4s ease;
}

.container:hover .headline {
    color: var(--text-primary);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.title {
    transition: all 0.4s ease;
}

.title:hover {
    color: var(--text-primary);
    opacity: 1;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #2a2a2a;
        --text-secondary: #3a3a3a;
        --accent-color: #000000;
        --accent-hover: #000000;
    }
    
}
