/* Base Reset & Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --cream: #faf8f3;
    --cream-dark: #f5f2eb;
    --charcoal: #2d2d2d;
    --text-primary: #1a1a1a;
    --text-secondary: #5c5c5c;
    --text-tertiary: #8a8a8a;
    --accent: #c9a87c;
    --accent-light: #e8dcc8;
    --accent-hover: #b8956a;
    --border: rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.08);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    background-color: var(--cream);
    line-height: 1.7;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 32px;
}

/* Navigation */
nav {
    padding: 32px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(250, 248, 243, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.3px;
    color: var(--text-primary);
}

.logo:hover {
    color: var(--accent-hover);
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    position: relative;
    padding: 4px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--accent);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Main content spacing for fixed nav */
main {
    padding-top: 100px;
}

/* Hero Section */
.hero {
    padding: 80px 0 100px;
    min-height: 85vh;
    display: flex;
    align-items: center;
}

.hero .container {
    width: 100%;
}

.hero-greeting {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 20px;
}

.hero h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 56px;
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 32px;
    letter-spacing: -1.5px;
    color: var(--text-primary);
}

.hero h1 .name {
    font-style: italic;
    color: var(--accent-hover);
}

/* Typewriter Effect */
.typewriter-cursor {
    color: var(--accent);
    font-weight: 400;
    margin-left: 2px;
    opacity: 1;
}

.cursor-blink {
    animation: cursorBlink 0.7s ease-in-out infinite;
}

@keyframes cursorBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* 
   Reveal Logic:
   1. .reveal-hidden -> Used for generic blocks (Social, Projects)
   2. .split-target -> Used for text parent containers (Subtitle, Bio paragraphs). Hidden initially (opacity 0).
   3. .reveal-word -> Used for individual words inside split-target. Hidden initially.
*/

.reveal-hidden {
    opacity: 0;
    transform: translateY(40px);
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    /* Faster (was 0.9s) */
}

.reveal-visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    pointer-events: auto;
}

/* Text Parent Container - Hidden by default */
.split-target {
    opacity: 0;
    transition: opacity 0.1s ease;
    /* Fade in parent instantly when needed so we see children animating */
}

/* Individual Words */
.reveal-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(15px);
    filter: blur(4px);
    transition: all 0.4s cubic-bezier(0.2, 1, 0.3, 1);
    /* Faster (was 0.6s) */
    will-change: transform, opacity, filter;
    margin-right: 0.25em;
}

.reveal-word.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.hero .subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 540px;
    line-height: 1.7;
}

.hero .bio {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.85;
    max-width: 580px;
}

.hero .bio p {
    margin-bottom: 24px;
}

.highlight {
    font-weight: 500;
    color: var(--text-primary);
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--accent-light);
    z-index: -1;
    transition: height 0.3s ease;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 16px;
    margin-top: 48px;
}

.social-link {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--cream-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
}

.social-link:hover {
    background: var(--text-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.social-link svg {
    width: 20px;
    height: 20px;
    fill: var(--text-secondary);
    transition: fill 0.3s ease;
}

.social-link:hover svg {
    fill: var(--cream);
}

/* Section Styles */
section {
    padding: 100px 0;
}

.section-header {
    margin-bottom: 48px;
}

.section-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: 16px;
}

.section-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 36px;
    font-weight: 400;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.project-card {
    background: var(--cream);
    border: 1px solid var(--border);
    padding: 32px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-light);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.project-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 22px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.project-icon {
    width: 24px;
    height: 24px;
    fill: var(--accent);
}

.project-desc {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.project-tag {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--cream-dark);
    padding: 4px 12px;
    border-radius: 100px;
    border: 1px solid var(--border);
}

/* Blog Posts */
.blog-list {
    list-style: none;
}

.blog-item {
    padding: 28px 0;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.blog-item:first-child {
    border-top: 1px solid var(--border);
}

.blog-item:hover {
    padding-left: 16px;
}

.blog-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.blog-title {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.blog-item:hover .blog-title {
    color: var(--accent-hover);
}

.blog-date {
    font-size: 14px;
    color: var(--text-tertiary);
    white-space: nowrap;
    font-weight: 500;
}

/* Contact Section */
#contact {
    background: linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%);
    border-radius: 32px 32px 0 0;
    margin-top: 40px;
}

.contact-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-content p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
}

.contact-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-btn:hover {
    background: var(--text-primary);
    color: var(--cream);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.contact-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Footer */
footer {
    padding: 40px 0;
    background: var(--cream-dark);
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-text {
    font-size: 14px;
    color: var(--text-tertiary);
}

.footer-links a {
    font-size: 14px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--accent-hover);
}

/* Decorative Elements */
.decoration {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-light) 0%, transparent 70%);
    opacity: 0.4;
    pointer-events: none;
    z-index: -1;
}

.decoration-1 {
    top: -100px;
    right: -100px;
}

.decoration-2 {
    bottom: 20%;
    left: -150px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 24px;
    }

    nav {
        padding: 20px 0;
    }

    .nav-links {
        gap: 24px;
    }

    .nav-links a {
        font-size: 13px;
    }

    main {
        padding-top: 80px;
    }

    .hero {
        padding: 60px 0 80px;
        min-height: auto;
    }

    .hero h1 {
        font-size: 40px;
    }

    .hero .subtitle {
        font-size: 18px;
    }

    .hero .bio {
        font-size: 16px;
    }

    .social-links {
        gap: 12px;
    }

    .social-link {
        width: 44px;
        height: 44px;
    }

    section {
        padding: 80px 0;
    }

    .section-title {
        font-size: 28px;
    }

    .blog-item a {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .blog-item:hover {
        padding-left: 8px;
    }

    .contact-social {
        gap: 12px;
    }

    .contact-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    footer .container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .decoration {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 32px;
    }

    .hero-greeting {
        font-size: 13px;
    }

    .nav-links {
        gap: 16px;
    }

    .logo {
        font-size: 18px;
    }
}

/* Contact Form Styling */
.contact-wrapper {
    width: 100%;
}

.contact-intro {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 32px;
    text-align: center;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

.contact-form {
    margin-bottom: 48px;
    text-align: left;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.form-group {
    position: relative;
    margin-bottom: 24px;
}

.form-group label {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 15px;
    transition: all 0.3s ease;
    pointer-events: none;
    background: transparent;
    padding: 0 4px;
}

.form-group textarea+label {
    top: 24px;
    transform: none;
}

/* Input Focus States */
.form-group input:focus+label,
.form-group input:not(:placeholder-shown)+label,
.form-group textarea:focus+label,
.form-group textarea:not(:placeholder-shown)+label {
    top: 0;
    transform: translateY(-50%) scale(0.9);
    color: var(--accent);
    background: var(--cream);
    font-weight: 500;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    color: var(--text-primary);
    transition: all 0.3s ease;
    /* Hide default placeholder so custom label works */
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: transparent;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(201, 168, 124, 0.1);
    background: var(--cream);
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--text-primary);
    color: var(--cream);
    border: none;
    border-radius: 100px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.submit-btn:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.send-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.submit-btn:hover .send-icon {
    transform: translateX(4px) translateY(-4px);
}

.social-label {
    text-align: center;
    font-size: 14px;
    color: var(--text-tertiary);
    margin-bottom: 24px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.social-label::before,
.social-label::after {
    content: '';
    height: 1px;
    background: var(--border);
    width: 60px;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Success/Error States */
.form-status {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    display: none;
}

.form-status.success {
    display: block;
    background: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.form-status.error {
    display: block;
    background: rgba(211, 47, 47, 0.1);
    color: #c62828;
    border: 1px solid rgba(211, 47, 47, 0.2);
}