/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #0891b2;
    --accent-color: #059669;
    --success-color: #16a34a;
    --warning-color: #d97706;
    --error-color: #dc2626;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-light: #64748b;
    --text-white: #ffffff;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-overlay: rgba(0, 0, 0, 0.05);
    
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    
    --gradient-primary: linear-gradient(135deg, #2563eb, #0891b2);
    --gradient-secondary: linear-gradient(135deg, #0891b2, #059669);
    --gradient-accent: linear-gradient(135deg, #16a34a, #0891b2);
    --gradient-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --border-radius-full: 9999px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--gradient-bg);
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f8fafc;
        --text-secondary: #cbd5e1;
        --text-light: #94a3b8;
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --bg-tertiary: #334155;
        --bg-card: #1e293b;
        --border-color: #334155;
        --border-light: #475569;
        --gradient-bg: linear-gradient(135deg, #020617 0%, #0f172a 50%, #1e293b 100%);
    }
}

/* Container */
.container {
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 80px 20px;
    overflow: hidden;
    width: 100vw;
}

.hero-content {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.hero-text {
    max-width: 800px;
}

/* Text Animation Styles */
.text-animation {
    overflow: hidden;
}

.text-animation h1,
.text-animation p {
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 0.8s ease-out forwards;
}

.text-animation .greeting {
    animation-delay: 0.2s;
}

.text-animation .name {
    animation-delay: 0.4s;
}

/* Hero description is now part of hero-actions, so it inherits the same timing */

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typewriter effect for the name */
.name {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    font-family: 'Atkinson Hyperlegible Mono', 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-weight: 400;
}

.name::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--primary-color);
    animation: blink 1s infinite;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
}

.greeting {
    display: block;
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 8px;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out 2.5s forwards;
    text-align: center;
}

.button-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--bg-card);
    color: #ffffff;
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    border-color: #0077b5;
    color: #0077b5;
    transform: translateY(-2px);
}

/* Typewriter Animation for All Text */
.typewriter-text {
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--primary-color);
    animation: typewriter 2s steps(40, end) forwards;
}

.typewriter-text:nth-child(1) {
    animation-delay: 0.5s;
}

.typewriter-text:nth-child(2) {
    animation-delay: 1.5s;
}

.typewriter-text:nth-child(3) {
    animation-delay: 2.5s;
}

.typewriter-text:nth-child(4) {
    animation-delay: 3.5s;
}

.typewriter-text:nth-child(5) {
    animation-delay: 4.5s;
}

.typewriter-text:nth-child(6) {
    animation-delay: 5.5s;
}

.typewriter-text:nth-child(7) {
    animation-delay: 6.5s;
}

.typewriter-text:nth-child(8) {
    animation-delay: 7.5s;
}

@keyframes typewriter {
    from {
        width: 0;
        opacity: 1;
    }
    to {
        width: 100%;
        opacity: 1;
    }
}

/* Hero Background */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(8, 145, 178, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(5, 150, 105, 0.1) 0%, transparent 50%);
    filter: blur(40px);
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        opacity: 0.8;
    }
    33% { 
        transform: scale(1.1) rotate(1deg);
        opacity: 1;
    }
    66% { 
        transform: scale(0.9) rotate(-1deg);
        opacity: 0.6;
    }
}

/* Section Styles */
section {
    padding: 80px 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 0.8s ease-out forwards;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.section-divider {
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 0 auto;
    border-radius: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.btn:focus,
.social-card:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Intersection Observer for scroll-triggered animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}