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

:root {
    --black: #000000;
    --charcoal: #1a1a1a;
    --dark-gray: #333333;
    --mid-gray: #666666;
    --light-gray: #cccccc;
    --off-white: #fafafa;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 8px -1px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 35px -5px rgba(0, 0, 0, 0.2);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Newsreader', 'Georgia', serif;
    color: var(--charcoal);
    background-color: var(--white);
    line-height: 1.75;
    overflow-x: hidden;
    position: relative;
}

/* Subtle grain texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.03"/></svg>');
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: overlay;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Page Load Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes drawLine {
    from {
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.6s ease-out;
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
    background: rgba(255, 255, 255, 0.95);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
}

.logo {
    font-family: 'Fraunces', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--black);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.6;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--dark-gray);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.9375rem;
    transition: color 0.3s ease;
    position: relative;
    letter-spacing: 0.01em;
}

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

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

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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    background: var(--white);
    position: relative;
    overflow: hidden;
}

/* Botanical SVG decorations - animated on load */
.botanical-hero-left,
.botanical-hero-right {
    animation: fadeIn 1.2s ease-out 0.3s backwards, floatGentle 8s ease-in-out infinite;
}

.botanical-hero-left path,
.botanical-hero-right path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 2s ease-out 0.8s forwards;
}

@keyframes floatGentle {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.hero-greeting {
    font-size: 1rem;
    color: var(--mid-gray);
    font-weight: 400;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero-title {
    font-family: 'Fraunces', serif;
    font-size: clamp(3rem, 9vw, 6rem);
    font-weight: 600;
    color: var(--black);
    margin-bottom: 1.5rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: var(--dark-gray);
    font-weight: 400;
    margin-bottom: 2rem;
    font-style: italic;
    animation: fadeInUp 0.8s ease-out 0.6s backwards;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--mid-gray);
    margin-bottom: 2.5rem;
    max-width: 650px;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease-out 0.8s backwards;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 1s backwards;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    font-size: 0.9375rem;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--black);
    color: var(--white);
    border: 1px solid var(--black);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--white);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    color: var(--black);
}

.btn-primary span,
.btn-primary * {
    position: relative;
    z-index: 1;
}

.btn-secondary {
    background: transparent;
    color: var(--black);
    border: 1px solid var(--black);
}

.btn-secondary:hover {
    background: var(--black);
    color: var(--white);
}

/* Section Styles */
section {
    padding: 7rem 0;
    position: relative;
}

.section-title {
    font-family: 'Fraunces', serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 500;
    color: var(--black);
    margin-bottom: 4rem;
    text-align: center;
    position: relative;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.section-title::after {
    content: '';
    display: block;
    width: 1px;
    height: 60px;
    background: var(--black);
    margin: 2rem auto 0;
}

/* About Section */
.about {
    background: var(--off-white);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.125rem;
    color: var(--dark-gray);
    margin-bottom: 2rem;
    line-height: 1.9;
}

.skills {
    margin-top: 4rem;
}

.skills h3 {
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    color: var(--black);
    margin-bottom: 2rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    padding: 0.625rem 1.25rem;
    background: transparent;
    border: 1px solid var(--light-gray);
    border-radius: 0;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--dark-gray);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--black);
    transition: width 0.3s ease;
    z-index: 0;
}

.skill-tag:hover {
    border-color: var(--black);
    color: var(--white);
}

.skill-tag:hover::before {
    width: 100%;
}

/* Experience Section */
.experience {
    position: relative;
    background: var(--white);
}

/* Education Section */
.education {
    background: var(--off-white);
    position: relative;
}

.timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--light-gray);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }
.timeline-item:nth-child(6) { animation-delay: 0.6s; }
.timeline-item:nth-child(7) { animation-delay: 0.7s; }

.timeline-marker {
    position: absolute;
    left: -5px;
    top: 5px;
    width: 11px;
    height: 11px;
    background: var(--black);
    border: 2px solid var(--white);
    border-radius: 0;
    z-index: 1;
    transition: transform 0.3s ease;
}

.timeline-item:hover .timeline-marker {
    transform: scale(1.3);
}

.timeline-content h3 {
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    color: var(--black);
    margin-bottom: 0.5rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.timeline-content h4 {
    font-size: 1.125rem;
    color: var(--dark-gray);
    margin-bottom: 0.75rem;
    font-weight: 400;
    font-style: italic;
}

.timeline-date {
    font-size: 0.8125rem;
    color: var(--mid-gray);
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.timeline-content p {
    color: var(--mid-gray);
    line-height: 1.8;
}

/* Projects Section */
.projects {
    background: var(--white);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: var(--white);
    padding: 2.5rem;
    border: 1px solid var(--light-gray);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--black);
    transition: width 0.4s ease;
}

.project-card:hover::before {
    width: 100%;
}

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

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

.project-header h3 {
    font-family: 'Fraunces', serif;
    font-size: 1.375rem;
    color: var(--black);
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.project-link {
    color: var(--black);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    white-space: nowrap;
    transition: transform 0.3s ease;
    display: inline-block;
}

.project-link:hover {
    transform: translateX(4px);
}

.project-description {
    color: var(--mid-gray);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.375rem 0.875rem;
    background: transparent;
    border: 1px solid var(--light-gray);
    border-radius: 0;
    font-size: 0.75rem;
    color: var(--mid-gray);
    font-weight: 400;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}

/* Thoughts and Thimbles Section */
.thoughts {
    background: var(--off-white);
    position: relative;
}

.content-grid {
    max-width: 1000px;
    margin: 0 auto;
}

.content-intro {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.content-intro p {
    font-size: 1.125rem;
    color: var(--mid-gray);
    line-height: 1.9;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.blog-card {
    background: var(--white);
    padding: 2.5rem;
    border: 1px solid var(--light-gray);
    transition: all 0.4s ease;
    position: relative;
}

.blog-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 0;
    width: 1px;
    background: var(--black);
    transition: height 0.4s ease;
}

.blog-card:hover::after {
    height: 100%;
}

.blog-card:hover {
    border-color: var(--black);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.blog-card h3 {
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    color: var(--black);
    margin-bottom: 0.75rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.blog-date {
    font-size: 0.8125rem;
    color: var(--mid-gray);
    margin-bottom: 1.25rem;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-excerpt {
    color: var(--mid-gray);
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Data Intrigue Section */
.data-intrigue {
    background: var(--white);
    position: relative;
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.data-card {
    background: var(--white);
    padding: 2.5rem;
    border: 1px solid var(--light-gray);
    transition: all 0.4s ease;
    position: relative;
}

.data-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 1px;
    background: var(--black);
    transition: width 0.4s ease;
}

.data-card:hover::before {
    width: 100%;
}

.data-card:hover {
    border-color: var(--black);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.data-card h3 {
    font-family: 'Fraunces', serif;
    font-size: 1.375rem;
    color: var(--black);
    margin-bottom: 1.25rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.data-card p {
    color: var(--mid-gray);
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Recipes Section */
.recipes {
    background: var(--off-white);
    position: relative;
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.recipe-card {
    background: var(--white);
    padding: 2.5rem;
    border: 1px solid var(--light-gray);
    transition: all 0.4s ease;
    position: relative;
}

.recipe-card::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    height: 0;
    width: 1px;
    background: var(--black);
    transition: height 0.4s ease;
}

.recipe-card:hover::after {
    height: 100%;
}

.recipe-card:hover {
    border-color: var(--black);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.recipe-card h3 {
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    color: var(--black);
    margin-bottom: 1.25rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.recipe-card p {
    color: var(--mid-gray);
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Contact Section */
.contact {
    background: var(--white);
}

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

.contact-intro {
    font-size: 1.125rem;
    color: var(--mid-gray);
    margin-bottom: 3rem;
    line-height: 1.9;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 2.5rem;
    background: transparent;
    border: 1px solid var(--light-gray);
    color: var(--dark-gray);
    text-decoration: none;
    font-weight: 400;
    transition: all 0.3s ease;
    min-width: 320px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.contact-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: var(--black);
    transition: height 0.3s ease;
    z-index: 0;
}

.contact-link:hover::before {
    height: 100%;
}

.contact-link:hover {
    color: var(--white);
    border-color: var(--black);
}

.contact-link svg,
.contact-link span {
    position: relative;
    z-index: 1;
}

.contact-link svg {
    width: 20px;
    height: 20px;
    transition: stroke 0.3s ease;
}

/* Footer */
.footer {
    background: var(--black);
    color: var(--white);
    text-align: center;
    padding: 3rem 0;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.footer p {
    color: rgba(255, 255, 255, 0.6);
    position: relative;
    z-index: 1;
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero-cta {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .blog-grid,
    .data-grid,
    .recipe-grid {
        grid-template-columns: 1fr;
    }

    .contact-link {
        min-width: auto;
        width: 100%;
    }
}

/* Smooth Transitions */
a, button, .project-card, .skill-tag {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Botanical Decorative Elements - Black and White */
.botanical-accent {
    position: absolute;
    opacity: 0.06;
    pointer-events: none;
    stroke: var(--black);
}

.botanical-accent path,
.botanical-accent ellipse,
.botanical-accent circle {
    stroke: var(--black) !important;
    fill: var(--black) !important;
    opacity: 0.05 !important;
}

/* Minimal decorative elements */
.about::before {
    content: '';
    position: absolute;
    top: 10%;
    right: 8%;
    width: 200px;
    height: 200px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50,10 Q30,30 20,50 Q30,70 50,90" stroke="%23000000" stroke-width="0.5" fill="none" opacity="0.08"/><path d="M35,25 Q25,35 20,50" stroke="%23000000" stroke-width="0.3" fill="none" opacity="0.06"/></svg>') no-repeat center;
    background-size: contain;
    animation: gentle-sway 12s ease-in-out infinite;
    pointer-events: none;
}

.projects::after {
    content: '';
    position: absolute;
    bottom: 8%;
    left: 5%;
    width: 150px;
    height: 150px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="35" stroke="%23000000" stroke-width="0.5" fill="none" opacity="0.06"/><circle cx="50" cy="50" r="20" stroke="%23000000" stroke-width="0.3" fill="none" opacity="0.04"/></svg>') no-repeat center;
    background-size: contain;
    animation: gentle-float 15s ease-in-out infinite;
    pointer-events: none;
}

.data-intrigue::before {
    content: '';
    position: absolute;
    top: 12%;
    left: 7%;
    width: 180px;
    height: 180px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50,20 L50,80" stroke="%23000000" stroke-width="0.5" opacity="0.06"/><path d="M50,35 Q30,38 25,50" stroke="%23000000" stroke-width="0.3" opacity="0.04"/><path d="M50,45 Q70,47 75,60" stroke="%23000000" stroke-width="0.3" opacity="0.04"/></svg>') no-repeat center;
    background-size: contain;
    animation: gentle-sway 10s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes gentle-sway {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

@keyframes gentle-float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-12px) scale(1.02); }
}

/* Scroll to top button */
.scroll-top-btn {
    background: var(--black) !important;
    box-shadow: var(--shadow-md) !important;
    border-radius: 0 !important;
}

.scroll-top-btn:hover {
    box-shadow: var(--shadow-lg) !important;
    transform: scale(1.05) !important;
}
