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

:root {
    --text-color: #1a1a1a;
    --text-secondary: #4a4a4a;
    --link-color: #2563eb;
    --link-hover: #1e40af;
    --bg-start: #ffffff;
    --bg-end: #f8fafc;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background: var(--bg-start);
    transition: background-color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    min-height: 100vh;
}

/* Header */
header {
    margin-bottom: 4rem;
    animation: fadeIn 1s ease-out;
}

h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.subtitle {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.01em;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
}

/* Typing Effect */
.typing-text {
    display: inline-block;
    min-width: 1ch;
}

.typing-cursor {
    display: inline-block;
    color: var(--link-color);
    animation: blink 1s step-end infinite;
    margin-left: 2px;
    font-weight: 300;
}

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

/* Bio Section */
.bio {
    margin-bottom: 4rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.intro {
    margin-bottom: 3rem;
    padding: 2rem;
    background: rgba(37, 99, 235, 0.03);
    border-left: 4px solid var(--link-color);
    border-radius: 0 8px 8px 0;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
}

.intro p {
    font-size: clamp(1.125rem, 2.8vw, 1.25rem);
    line-height: 1.75;
    margin: 0;
    opacity: 1 !important;
    animation: none !important;
}

.intro strong {
    color: var(--text-color);
    font-weight: 600;
}

.story p {
    font-size: clamp(1.0625rem, 2.5vw, 1.1875rem);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.story p:nth-child(1) { animation-delay: 0.4s; }
.story p:nth-child(2) { animation-delay: 0.45s; }
.story p:nth-child(3) { animation-delay: 0.5s; }
.story p:nth-child(4) { animation-delay: 0.55s; }
.story p:nth-child(5) { animation-delay: 0.6s; }
.story p:nth-child(6) { animation-delay: 0.65s; }
.story p:nth-child(7) { animation-delay: 0.7s; }
.story p:nth-child(8) { animation-delay: 0.75s; }
.story p:nth-child(9) { animation-delay: 0.8s; }
.story p:nth-child(10) { animation-delay: 0.85s; }
.story p:nth-child(11) { animation-delay: 0.9s; }

.bio em {
    font-style: italic;
    color: var(--text-secondary);
}

/* Accessibility - Visually Hidden */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Footer */
footer {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid #e5e7eb;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.social-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    justify-content: center;
}

.social-links a {
    font-size: 1.0625rem;
    color: var(--link-color);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
    font-weight: 500;
}

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

.social-links a:hover {
    color: var(--link-hover);
}

.social-links a:hover::after {
    width: 100%;
    background-color: var(--link-hover);
}

.copyright {
    text-align: center;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1.25rem;
    }

    header {
        margin-bottom: 3rem;
    }

    .bio {
        margin-bottom: 3rem;
    }

    .intro {
        padding: 1.5rem;
        margin-bottom: 2.5rem;
    }

    .social-links {
        gap: 1.5rem;
        justify-content: center;
    }

    footer {
        margin-top: 4rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1.5rem 1rem;
    }

    header {
        margin-bottom: 2.5rem;
    }

    .intro {
        padding: 1.25rem;
        margin-bottom: 2rem;
        border-left-width: 3px;
    }

    .story p {
        margin-bottom: 1.25rem;
    }

    .social-links {
        gap: 1.25rem;
        flex-direction: row;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .social-links a::after {
        display: none;
    }

    a {
        color: inherit;
        text-decoration: underline;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-color: #000000;
        --link-color: #0000ee;
    }
}
