:root {
    --espresso: #2c1e16;     
    --dark-roast: #3b2820;  
    --medium-roast: #5d4037;  
    --light-roast: #7b5d52;   
    --mocha: #9c7b65;         
    --caramel: #d4a574;       
    --cream: #f4e8d0;       
    --latte: #f8f2e4;        
    --cinnamon: #cd956b;    
    --hazelnut: #b8855a;     
    --vanilla: #faf5ed;       
    --chocolate: #4a3429;     
    --text: #f4e8d0;         
    --subtext1: #d4a574;      
    --subtext0: #b8967a;      
    --overlay2: #8d6e5c;     
    --overlay1: #7b5d52;
    --overlay0: #6b5046;
    --surface2: #4a3d35;      
    --surface1: #3f332a;      
    --surface0: #342920;     
    --base: #2a1f18;          
    --mantle: #241a14;        
    --crust: #1e1610;         
    --accent: #e6b17a;        
    --red: #f38b8b;
    --maroon: #eba0ac;
    --peach: #fab387;
    --yellow: #f9e2af;
    --green: #a6e3a1;
    --mauve: #cba6f7;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--mantle) 0%, var(--base) 100%);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

h2 {
    font-size: 2.2rem;
    color: var(--text);
}

h3 {
    font-size: 1.5rem;
    color: var(--subtext1);
    margin-bottom: 1.25rem;
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--subtext0);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--caramel);
}

.gradient-text {
    background: linear-gradient(45deg, var(--accent), var(--caramel), var(--cinnamon));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientFlow 4s ease-in-out infinite;
}

@keyframes gradientFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    position: relative;
    z-index: 100;
    background: rgba(26, 20, 16, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    margin: 1rem 0;
    padding: 1rem 2rem;
    border: 1px solid var(--surface1);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--subtext1);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-links a:hover {
    color: var(--text);
    background: rgba(212, 165, 116, 0.1);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 60%;
}

.nav-links a.active {
    color: var(--accent);
    background: rgba(212, 165, 116, 0.15);
}

.hero {
    padding: 4rem 0 6rem;
    position: relative;
}

.hero::before {
    content: "";
    position: absolute;
    top: -100px;
    right: -200px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent) 0%, transparent 60%);
    opacity: 0.08;
    filter: blur(60px);
    z-index: -1;
}

.hero::after {
    content: "";
    position: absolute;
    bottom: -150px;
    left: -200px;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--cinnamon) 0%, transparent 60%);
    opacity: 0.06;
    filter: blur(50px);
    z-index: -1;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.hero-text {
    flex: 1;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.badge {
    display: inline-block;
    background: rgba(212, 165, 116, 0.15);
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(212, 165, 116, 0.3);
    backdrop-filter: blur(10px);
}

.subtitle {
    font-size: 1.3rem;
    color: var(--subtext0);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--cinnamon));
    color: var(--espresso);
    box-shadow: 0 4px 15px rgba(230, 177, 122, 0.25);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(230, 177, 122, 0.4);
    color: var(--espresso);
}

.btn-outline {
    border: 2px solid var(--accent);
    color: var(--accent);
    background: rgba(230, 177, 122, 0.05);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--espresso);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(230, 177, 122, 0.3);
}

.avatar-container {
    position: relative;
    width: 280px;
    height: 280px;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    object-fit: cover;
    border: 3px solid var(--surface1);
    box-shadow: 0 15px 40px rgba(17, 17, 27, 0.6);
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.avatar:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 50px rgba(17, 17, 27, 0.8);
}

.avatar-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    background: linear-gradient(45deg, var(--accent), var(--cinnamon));
    top: 12px;
    left: 12px;
    z-index: 1;
    opacity: 0.6;
    filter: blur(3px);
}

section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-divider {
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--cinnamon));
    margin: 1rem auto 0;
    border-radius: 4px;
}

.about-section {
    position: relative;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    background: rgba(52, 41, 32, 0.8);
    backdrop-filter: blur(15px);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(17, 17, 27, 0.3);
    border: 1px solid var(--surface1);
}

.about-content p {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--subtext0);
}

.skills-section {
    background: linear-gradient(135deg, var(--base) 0%, var(--surface0) 100%);
    position: relative;
    overflow: hidden;
}

.skills-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, var(--accent) 0%, transparent 70%);
    opacity: 0.03;
    z-index: 0;
}

.skills-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.skill-category h3 {
    font-family: 'Fira Code', monospace;
    color: var(--accent);
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: rgba(52, 41, 32, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent);
    box-shadow: 0 4px 15px rgba(17, 17, 27, 0.2);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
}

.skill-item {
    background: rgba(52, 41, 32, 0.8);
    backdrop-filter: blur(10px);
    padding: 1.2rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--surface1);
}

.skill-item:hover {
    transform: translateY(-5px);
    background: rgba(63, 51, 42, 0.9);
    box-shadow: 0 8px 25px rgba(17, 17, 27, 0.3);
    border-color: var(--accent);
}

.skill-item i {
    color: var(--accent);
    font-size: 1.3rem;
}

.skill-item span {
    color: var(--text);
    font-weight: 500;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.project-card {
    background: rgba(52, 41, 32, 0.8);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(17, 17, 27, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid var(--surface1);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(17, 17, 27, 0.3);
    border-color: var(--accent);
}

.project-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.project-badge.popular {
    background: rgba(230, 177, 122, 0.2);
    color: var(--accent);
    border: 1px solid rgba(230, 177, 122, 0.5);
}

.project-badge.new {
    background: rgba(205, 149, 107, 0.2);
    color: var(--cinnamon);
    border: 1px solid rgba(205, 149, 107, 0.5);
}

.project-card h3 {
    color: var(--text);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.project-card p {
    color: var(--subtext0);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tech span {
    background: rgba(63, 51, 42, 0.8);
    color: var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: 'Fira Code', monospace;
    font-weight: 500;
}

.project-link {
    color: var(--accent);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.project-link:hover {
    color: var(--caramel);
    text-decoration: underline;
}

.contact-section {
    position: relative;
}

.social-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(52, 41, 32, 0.8);
    backdrop-filter: blur(15px);
    padding: 1rem 2rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--surface1);
    color: var(--text);
    font-weight: 500;
}

.social-link i, .social-link img {
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(17, 17, 27, 0.3);
    border-color: var(--accent);
    color: var(--accent);
}

.main-footer {
    background: linear-gradient(135deg, var(--crust) 0%, var(--mantle) 100%);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
    border-top: 1px solid var(--surface0);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--surface0);
    margin-bottom: 1.5rem;
}

.footer-content p {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--subtext0);
}

.footer-content i.fa-heart {
    color: var(--red);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--subtext1);
    font-weight: 500;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    margin-bottom: 0;
    font-size: 0.9rem;
    color: var(--overlay1);
}

.footer-license {
    font-size: 0.9rem;
    color: var(--overlay1);
    transition: all 0.3s ease;
}

.footer-license:hover {
    color: var(--subtext1);
    text-decoration: underline;
}

/* Enhanced mobile responsiveness */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 3rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .footer-content, .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .main-nav {
        padding: 1rem 1.5rem;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .main-nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .social-links {
        flex-direction: column;
        align-items: center;
    }

    .avatar-container {
        width: 240px;
        height: 240px;
    }

    .about-content {
        padding: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .hero {
        padding: 2rem 0 4rem;
    }

    .nav-links {
        gap: 0.7rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .avatar-container {
        width: 200px;
        height: 200px;
    }

    .about-content {
        padding: 1.5rem;
    }

    section {
        padding: 3rem 0;
    }
}