/* ===================================
   RESET & BASE STYLES
   =================================== */

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

:root {
    --ivory: #fffef9;
    --cream: #faf7f0;
    --warm-beige: #f0ebe3;
    --sand: #e8dfd0;
    --clay: #d4b9a1;
    --terracotta: #b8927a;
    --rust: #9d7860;
    --olive: #8a9b7a;
    --sage: #a8b89d;
    --charcoal: #3a3632;
    --coffee: #5a4f47;
    --espresso: #2d2621;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Urbanist', sans-serif;
    background: var(--ivory);
    color: var(--charcoal);
    line-height: 1.7;
    overflow-x: hidden;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><circle cx="10" cy="10" r="8" fill="%23d4b9a1" opacity="0.5"/></svg>') 10 10, auto;
}

::selection {
    background: var(--terracotta);
    color: var(--ivory);
}

/* ===================================
   NAVIGATION
   =================================== */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 254, 249, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 185, 161, 0.15);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

nav.scrolled {
    padding: 1.25rem 4rem;
    background: rgba(255, 254, 249, 0.95);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.logo {
    font-family: 'Crimson Pro', serif;
    font-size: 1.75rem;
    font-weight: 600;
    font-style: italic;
    color: var(--espresso);
    letter-spacing: -0.02em;
}

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

.nav-links a {
    color: var(--coffee);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    position: relative;
    transition: color 0.3s ease;
}

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

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

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

/* ===================================
   HERO SECTION
   =================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--ivory) 0%, var(--cream) 50%, var(--warm-beige) 100%);
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.texture-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(58, 54, 50, 0.01) 2px, rgba(58, 54, 50, 0.01) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(58, 54, 50, 0.01) 2px, rgba(58, 54, 50, 0.01) 4px);
    opacity: 0.6;
}

.organic-blob {
    position: absolute;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    opacity: 0.06;
    filter: blur(70px);
    animation: morphBlob 35s ease-in-out infinite;
}

.blob-1 {
    width: 550px;
    height: 550px;
    background: linear-gradient(135deg, var(--clay), var(--terracotta));
    top: -10%;
    right: 5%;
    animation-delay: 0s;
}

.blob-2 {
    width: 480px;
    height: 480px;
    background: linear-gradient(135deg, var(--sage), var(--olive));
    bottom: -8%;
    left: 8%;
    animation-delay: 12s;
}

.blob-3 {
    width: 420px;
    height: 420px;
    background: linear-gradient(135deg, var(--rust), var(--clay));
    top: 45%;
    left: -5%;
    animation-delay: 24s;
}

@keyframes morphBlob {
    0%, 100% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    25% {
        border-radius: 70% 30% 50% 50% / 30% 60% 70% 40%;
        transform: translate(35px, -35px) scale(1.1) rotate(90deg);
    }
    50% {
        border-radius: 50% 50% 30% 70% / 50% 30% 60% 40%;
        transform: translate(-25px, 25px) scale(0.95) rotate(180deg);
    }
    75% {
        border-radius: 30% 70% 60% 40% / 70% 40% 50% 60%;
        transform: translate(30px, 30px) scale(1.05) rotate(270deg);
    }
}

.deco-frame {
    position: absolute;
    border: 1px solid var(--clay);
    opacity: 0.15;
}

.frame-1 {
    width: 280px;
    height: 280px;
    top: 12%;
    right: 10%;
    animation: floatFrame 25s ease-in-out infinite;
}

.frame-2 {
    width: 200px;
    height: 200px;
    bottom: 18%;
    left: 8%;
    transform: rotate(45deg);
    animation: floatFrame 30s ease-in-out infinite reverse;
}

@keyframes floatFrame {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(-20px, -20px);
    }
}

.ornament {
    position: absolute;
    font-size: 3rem;
    color: var(--clay);
    opacity: 0.08;
    animation: gentleFloat 20s ease-in-out infinite;
}

.ornament-1 {
    top: 25%;
    right: 15%;
    animation-delay: 0s;
}

.ornament-2 {
    bottom: 30%;
    left: 12%;
    animation-delay: 7s;
}

@keyframes gentleFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-25px) rotate(10deg);
    }
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 1200px;
    padding: 0 3rem;
}

.hero-divider {
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--terracotta), transparent);
    margin: 0 auto 3rem;
    position: relative;
    animation: fadeIn 1.5s ease-out;
}

.hero-divider::before,
.hero-divider::after {
    content: '';
    position: absolute;
    width: 5px;
    height: 5px;
    background: var(--terracotta);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.hero-divider::before { left: -8px; }
.hero-divider::after { right: -8px; }

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

.hero-label {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    color: var(--rust);
    background: rgba(184, 146, 122, 0.08);
    padding: 0.85rem 2.5rem;
    border-radius: 50px;
    margin-bottom: 3rem;
    display: inline-block;
    letter-spacing: 5px;
    text-transform: uppercase;
    border: 1px solid rgba(184, 146, 122, 0.15);
    animation: slideUp 1s ease-out 0.3s both;
}

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

.hero h1 {
    font-family: 'Crimson Pro', serif;
    font-size: clamp(4rem, 11vw, 9.5rem);
    font-weight: 400;
    margin-bottom: 2rem;
    line-height: 0.95;
    letter-spacing: -0.025em;
    color: var(--espresso);
    font-style: italic;
    animation: slideUp 1.2s ease-out 0.5s both;
}

.hero h1::after {
    content: '';
    display: block;
    width: 160px;
    height: 3px;
    background: linear-gradient(90deg, var(--terracotta), var(--sage));
    margin: 2rem auto 0;
}

.hero-subtitle {
    font-family: 'Crimson Pro', serif;
    font-size: clamp(1.75rem, 4vw, 3rem);
    color: var(--coffee);
    margin-bottom: 3rem;
    font-weight: 300;
    font-style: italic;
    animation: slideUp 1s ease-out 0.7s both;
}

.hero-description {
    font-size: 1.35rem;
    color: var(--coffee);
    max-width: 820px;
    margin: 0 auto 4rem;
    line-height: 2;
    font-weight: 300;
    animation: slideUp 1s ease-out 0.9s both;
}

.cta-container {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: slideUp 1s ease-out 1.1s both;
}

.btn {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 1.5rem 3.5rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--terracotta), var(--rust));
    color: var(--ivory);
    border: none;
    box-shadow: 0 15px 45px rgba(184, 146, 122, 0.25);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--rust), var(--terracotta));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 60px rgba(184, 146, 122, 0.35);
}

.btn-primary:hover::before {
    opacity: 1;
}

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

.btn-secondary {
    background: transparent;
    color: var(--charcoal);
    border: 2px solid var(--clay);
}

.btn-secondary:hover {
    background: var(--clay);
    color: var(--ivory);
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(212, 185, 161, 0.3);
}

.scroll-hint {
    position: absolute;
    bottom: 4rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: gentleBounce 3s ease-in-out infinite;
}

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

.scroll-hint span {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    color: var(--coffee);
    letter-spacing: 4px;
    text-transform: uppercase;
}

.scroll-line {
    width: 1.5px;
    height: 60px;
    background: linear-gradient(to bottom, var(--terracotta), transparent);
}

/* ===================================
   SECTION STYLES
   =================================== */

section {
    padding: 10rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.section-ornament {
    text-align: center;
    margin-bottom: 2rem;
}

.section-ornament::before {
    content: '✦';
    font-size: 1.25rem;
    color: var(--terracotta);
    opacity: 0.5;
}

.section-number {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--terracotta);
    margin-bottom: 1.5rem;
    font-weight: 500;
    letter-spacing: 5px;
    text-transform: uppercase;
}

.section-title {
    font-family: 'Crimson Pro', serif;
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 400;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
    color: var(--espresso);
    font-style: italic;
    line-height: 1.1;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 2px;
    background: var(--terracotta);
    margin-top: 2rem;
}

.section-subtitle {
    font-size: 1.35rem;
    color: var(--coffee);
    max-width: 750px;
    line-height: 1.9;
    font-weight: 300;
    margin-bottom: 5rem;
}

/* ===================================
   ABOUT SECTION
   =================================== */

#about {
    background: var(--cream);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 6rem;
    align-items: center;
}

.about-text {
    font-size: 1.65rem;
    line-height: 2.1;
    color: var(--coffee);
    font-weight: 300;
    padding-left: 4rem;
    border-left: 3px solid var(--terracotta);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

.stat-item {
    background: white;
    padding: 3rem 2.5rem;
    border: 1px solid rgba(212, 185, 161, 0.15);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(184, 146, 122, 0.03), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.stat-item:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.08);
    border-color: var(--terracotta);
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-number {
    font-family: 'Crimson Pro', serif;
    font-size: 3.5rem;
    color: var(--terracotta);
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-style: italic;
    line-height: 1;
}

.stat-label {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--coffee);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 500;
}

/* ===================================
   EDUCATION SECTION
   =================================== */

#education {
    background: var(--warm-beige);
}

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

.timeline {
    position: relative;
    padding-left: 4rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--terracotta), var(--sage));
}

.timeline-item {
    position: relative;
    margin-bottom: 5rem;
    padding-left: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -4.5rem;
    top: 0;
    width: 18px;
    height: 18px;
    background: var(--terracotta);
    border: 4px solid var(--warm-beige);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(184, 146, 122, 0.15);
}

.timeline-card {
    background: white;
    padding: 4rem;
    border: 1px solid rgba(212, 185, 161, 0.15);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.timeline-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--terracotta), var(--sage));
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-card:hover {
    transform: translateX(20px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.08);
}

.timeline-card:hover::after {
    width: 100%;
}

.timeline-card h3 {
    font-family: 'Crimson Pro', serif;
    font-size: 2.25rem;
    margin-bottom: 1rem;
    color: var(--espresso);
    font-weight: 600;
    font-style: italic;
}

.timeline-meta {
    color: var(--terracotta);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    font-weight: 400;
}

.timeline-period {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--coffee);
    letter-spacing: 2px;
}

/* ===================================
   SKILLS SECTION
   =================================== */

#skills {
    background: var(--sand);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 3rem;
}

.skill-card {
    background: white;
    padding: 4rem;
    border: 1px solid rgba(212, 185, 161, 0.15);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(184, 146, 122, 0.06), transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.skill-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.1);
    border-color: var(--terracotta);
}

.skill-card:hover::before {
    opacity: 1;
}

.skill-icon {
    width: 75px;
    height: 75px;
    background: linear-gradient(135deg, var(--terracotta), var(--rust));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: white;
    position: relative;
    z-index: 1;
}

.skill-card h3 {
    font-family: 'Crimson Pro', serif;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--espresso);
    font-weight: 600;
    font-style: italic;
    position: relative;
    z-index: 1;
}

.skill-card p {
    color: var(--coffee);
    line-height: 1.9;
    font-size: 1.2rem;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

/* ===================================
   PROJECTS SECTION
   =================================== */

#projects {
    background: var(--cream);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}

.project-card {
    background: white;
    border: 1px solid rgba(212, 185, 161, 0.15);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    position: relative;
}

.project-header {
    height: 280px;
    background: linear-gradient(135deg, var(--terracotta), var(--sage));
    position: relative;
    overflow: hidden;
}

.project-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.1), transparent);
}

.project-number {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-family: 'Crimson Pro', serif;
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.15);
    font-weight: 700;
    font-style: italic;
    line-height: 1;
}

.project-body {
    padding: 3.5rem;
}

.project-card:hover {
    transform: translateY(-18px);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.12);
}

.project-card:hover .project-header {
    background: linear-gradient(135deg, var(--sage), var(--rust));
}

.project-card h3 {
    font-family: 'Crimson Pro', serif;
    font-size: 2.25rem;
    margin-bottom: 1.25rem;
    color: var(--espresso);
    font-weight: 600;
    font-style: italic;
}

.project-card p {
    color: var(--coffee);
    line-height: 1.85;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

.project-link {
    color: var(--terracotta);
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.project-link::after {
    content: ' →';
    transition: transform 0.3s ease;
    display: inline-block;
}

.project-card:hover .project-link::after {
    transform: translateX(8px);
}

/* ===================================
   CONTACT SECTION
   =================================== */

#contact {
    background: var(--warm-beige);
    text-align: center;
}

.contact-grid {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 4rem;
}

.contact-card {
    background: white;
    border: 1px solid rgba(212, 185, 161, 0.15);
    padding: 3.5rem 4.5rem;
    text-decoration: none;
    color: var(--charcoal);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--terracotta), var(--rust));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.contact-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.1);
    border-color: var(--terracotta);
}

.contact-card:hover::before {
    opacity: 0.08;
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

.contact-label {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 500;
    color: var(--coffee);
}

/* ===================================
   FOOTER
   =================================== */

footer {
    text-align: center;
    padding: 6rem 4rem;
    background: var(--sand);
    border-top: 1px solid rgba(212, 185, 161, 0.15);
}

footer::before {
    content: '✦';
    display: block;
    font-size: 1.5rem;
    color: var(--terracotta);
    margin-bottom: 2rem;
    opacity: 0.5;
}

.footer-text {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    color: var(--coffee);
    letter-spacing: 4px;
    text-transform: uppercase;
}

.footer-highlight {
    color: var(--terracotta);
    font-weight: 600;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 1024px) {
    nav {
        padding: 1.5rem 2rem;
    }

    nav.scrolled {
        padding: 1rem 2rem;
    }

    .nav-links {
        display: none;
    }

    section {
        padding: 6rem 2rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .about-text {
        padding-left: 2rem;
    }

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

@media (max-width: 768px) {
    .hero-content {
        padding: 0 1.5rem;
    }

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

    .timeline {
        padding-left: 2.5rem;
    }

    .timeline-item {
        padding-left: 2rem;
    }

    .timeline-card {
        padding: 2.5rem;
    }

    .contact-grid {
        flex-direction: column;
        align-items: stretch;
    }

    .contact-card {
        width: 100%;
    }
}