/* ========================================
   CSS Variables & Reset
   ======================================== */
:root {
    --primary-color: #d4a574;
    --secondary-color: #f5e6d3;
    --accent-color: #c9a66b;
    --text-dark: #2d2d2d;
    --text-light: #666666;
    --bg-light: #faf8f5;
    --bg-white: #ffffff;
    --gradient-1: linear-gradient(135deg, #f5e6d3 0%, #d4a574 100%);
    --gradient-2: linear-gradient(135deg, #c9a66b 0%, #f5e6d3 100%);
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.08);
    --shadow-gold: 0 10px 40px rgba(212, 165, 116, 0.2);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.8;
    background-color: var(--bg-light);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: var(--text-dark);
    font-weight: 600;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

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

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 10px 0;
    background: rgba(255, 255, 255, 0.95);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 2px;
}

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

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-dark);
    transition: var(--transition);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: var(--bg-light);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    opacity: 0.1;
    z-index: 0;
}

.hero-container {
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text {
    padding-right: 40px;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-name {
    font-size: 4rem;
    line-height: 1.2;
    margin-bottom: 15px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title {
    font-size: 1.8rem;
    color: var(--text-light);
    margin-bottom: 25px;
    font-weight: 400;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 35px;
    max-width: 500px;
}

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

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(212, 165, 116, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--text-dark);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.btn-small {
    padding: 10px 24px;
    font-size: 0.85rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-wrapper {
    position: relative;
    width: 350px;
    height: 350px;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    box-shadow: var(--shadow-soft);
    animation: morph 8s ease-in-out infinite;
}

.image-decoration {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: var(--gradient-1);
    border-radius: 50%;
    opacity: 0.3;
    z-index: -1;
}

@keyframes morph {
    0%, 100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    25% {
        border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
    }
    50% {
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    }
    75% {
        border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
    }
}

/* ========================================
   Section Headers
   ======================================== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 15px;
}

/* ========================================
   About Section
   ======================================== */
.about {
    padding: 100px 0;
    background: var(--bg-white);
}

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

.about-card {
    background: var(--bg-light);
    padding: 50px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.about-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 2rem;
    color: white;
}

.about-card h3 {
    font-size: 1.8rem;
    margin-bottom: 25px;
}

.about-card p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.about-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Playfair Display', serif;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ========================================
   Projects Section
   ======================================== */
.projects {
    padding: 100px 0;
    background: var(--bg-light);
}

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

.project-card {
    background: var(--bg-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-gold);
}

.project-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(212, 165, 116, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: var(--transition);
}

.project-link:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.project-content {
    padding: 30px;
}

.project-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.project-description {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tech-badge {
    background: var(--secondary-color);
    color: var(--primary-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 10px;
}

/* ========================================
   Research Section
   ======================================== */
.research {
    padding: 100px 0;
    background: var(--bg-white);
}

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

.research-card {
    background: var(--bg-light);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(212, 165, 116, 0.2);
}

.research-card:hover {
    transform: translateY(-5px);
    background: white;
    box-shadow: var(--shadow-gold);
}

.research-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 1.8rem;
    color: white;
}

.research-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.research-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ========================================
   Skills Section
   ======================================== */
.skills {
    padding: 100px 0;
    background: var(--bg-light);
}

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

.skills-category {
    margin-bottom: 50px;
}

.category-title {
    font-size: 1.4rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary-color);
}

.category-title i {
    font-size: 1.2rem;
}

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

.skill-item {
    background: var(--bg-white);
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
}

.skill-name {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.skill-bar {
    width: 100%;
    height: 8px;
    background: var(--secondary-color);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 10px;
    transition: width 1.5s ease-out;
}

/* ========================================
   Contact Section
   ======================================== */
.contact {
    padding: 100px 0;
    background: var(--bg-white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.contact-description {
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 1.05rem;
}

.contact-links {
    display: flex;
    gap: 20px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--gradient-1);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}

.contact-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold);
}

.social-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.social-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 15px;
    transition: var(--transition);
    border: 1px solid rgba(212, 165, 116, 0.2);
}

.social-card:hover {
    background: white;
    box-shadow: var(--shadow-gold);
    transform: translateY(-5px);
}

.social-card i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.social-card span {
    font-weight: 500;
    color: var(--text-dark);
}

/* ========================================
   Footer
   ======================================== */
footer {
    padding: 40px 0;
    background: var(--bg-white);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
}

footer p {
    color: var(--text-light);
    font-size: 0.95rem;
}

footer i {
    color: var(--primary-color);
}

/* ========================================
   Scroll to Top Button
   ======================================== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-gold);
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
}

/* ========================================
   Animations
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays */
.fade-in:nth-child(1) { transition-delay: 0.1s; }
.fade-in:nth-child(2) { transition-delay: 0.2s; }
.fade-in:nth-child(3) { transition-delay: 0.3s; }
.fade-in:nth-child(4) { transition-delay: 0.4s; }
.fade-in:nth-child(5) { transition-delay: 0.5s; }
.fade-in:nth-child(6) { transition-delay: 0.6s; }

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        padding-right: 0;
    }

    .hero-description {
        margin: 0 auto 35px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .image-wrapper {
        width: 280px;
        height: 280px;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .social-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 30px;
        gap: 20px;
        box-shadow: var(--shadow-soft);
        transform: translateX(100%);
        transition: var(--transition);
    }

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

    .nav-toggle {
        display: flex;
    }

    .hero-name {
        font-size: 2.8rem;
    }

    .hero-title {
        font-size: 1.4rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

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

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

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

    .social-links {
        grid-template-columns: 1fr;
    }

    .about-stats {
        flex-direction: column;
        gap: 20px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

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

@media (max-width: 480px) {
    .hero-name {
        font-size: 2.2rem;
    }

    .image-wrapper {
        width: 220px;
        height: 220px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .about-card {
        padding: 30px 20px;
    }

    .project-card {
        margin: 0 10px;
    }

    .scroll-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

/* ========================================
   Additional Utilities
   ======================================== */
.highlight-text {
    color: var(--primary-color);
    font-weight: 600;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.animate-on-load {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Smooth Scroll Padding */
section {
    scroll-margin-top: 80px;
}
.project-image-link {
    display: block;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.dark-mode {
    --primary-color: #e0b98a;
    --secondary-color: #2c2c2c;
    --accent-color: #d8b07c;
    --text-dark: #f5f5f5;
    --text-light: #d0d0d0;
    --bg-light: #121212;
    --bg-white: #1b1b1b;
    --gradient-1: linear-gradient(135deg, #3a2c1f 0%, #c9a66b 100%);
    --gradient-2: linear-gradient(135deg, #c9a66b 0%, #3a2c1f 100%);
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.35);
    --shadow-gold: 0 10px 40px rgba(201, 166, 107, 0.25);
}

.dark-mode body,
body.dark-mode {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

body.dark-mode .navbar {
    background: rgba(20, 20, 20, 0.9);
}

body.dark-mode .navbar.scrolled {
    background: rgba(20, 20, 20, 0.96);
}

body.dark-mode .nav-links a,
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode .skill-name,
body.dark-mode .social-card span,
body.dark-mode .project-title,
body.dark-mode .category-title {
    color: var(--text-dark);
}

body.dark-mode .hero,
body.dark-mode .projects,
body.dark-mode .skills {
    background: var(--bg-light);
}

body.dark-mode .about,
body.dark-mode .research,
body.dark-mode .contact,
body.dark-mode footer {
    background: var(--bg-white);
}

body.dark-mode .about-card,
body.dark-mode .project-card,
body.dark-mode .skill-item,
body.dark-mode .research-card,
body.dark-mode .social-card {
    background: var(--bg-white);
    box-shadow: var(--shadow-soft);
}

body.dark-mode .project-description,
body.dark-mode .about-card p,
body.dark-mode .research-card p,
body.dark-mode .contact-description,
body.dark-mode footer p,
body.dark-mode .stat-label {
    color: var(--text-light);
}

body.dark-mode .nav-toggle span {
    background: var(--text-dark);
}

.dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--gradient-1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1200;
    box-shadow: var(--shadow-gold);
    transition: var(--transition);
}

.dark-mode-toggle:hover {
    transform: translateY(-3px) scale(1.03);
}