/* ==========================================
   ROOT VARIABLES
   ========================================== */
:root {
    --bg-color: #f9f7f2;
    --text-color: #1a1a1a;
    --text-light: #555;
    --text-lighter: #777;
    --accent-color: #8fa194;
    --accent-hover: #7c8f83;
    --white: #ffffff;
    --dark-bg: #2f2f2f;
    --dark-card: #3a3a3a;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* ==========================================
   RESET & BASE
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

/* ==========================================
   CONTAINER
   ========================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================
   HEADER
   ========================================== */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 5%;
    background-color: var(--bg-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.logo-link {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
    text-transform: capitalize;
    line-height: 1.2;
}

.sub-logo {
    display: block;
    font-size: 0.55rem;
    letter-spacing: 2px;
    font-weight: 400;
    margin-top: 2px;
    text-align: right;
    opacity: 0.7;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    z-index: 1002;
    position: relative;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    align-items: center;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: var(--transition);
    display: block;
}

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

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

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

/* ==========================================
   NAVIGATION
   ========================================== */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: clamp(20px, 3vw, 35px);
}

.main-nav a {
    font-size: 0.75rem;
    letter-spacing: 1px;
    font-weight: 500;
    text-transform: uppercase;
    opacity: 0.7;
    position: relative;
    transition: opacity 0.3s ease;
    padding: 8px 0;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    opacity: 1;
}

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

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
    padding: 80px 0;
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f9f7f2 0%, #f0ede5 50%, #f9f7f2 100%);
    position: relative;
}

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

.hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.15;
    margin-bottom: 24px;
    font-weight: 700;
}

.hero-content p {
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 32px;
    max-width: 540px;
}

.hero-image {
    text-align: center;
    position: relative;
}

.hero-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(143, 161, 148, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-image img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 12px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.1));
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--white);
    padding: 16px 36px;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 50px;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(143, 161, 148, 0.3);
}

.btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(143, 161, 148, 0.4);
}

/* ==========================================
   PROFILE SECTION
   ========================================== */
.profile-section {
    background: var(--dark-bg);
    padding: 100px 0;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--white);
    margin-bottom: 60px;
    text-align: center;
}

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

.profile-card {
    background: var(--dark-card);
    border-radius: 16px;
    padding: 36px 28px;
    transition: var(--transition);
}

.profile-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.profile-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 12px;
}

.profile-card p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #d6d6d6;
}

/* ==========================================
   SECTIONS (Works, Books, Experience, etc.)
   ========================================== */
.works-section,
.books-section,
.experience-section,
.references-section,
.contact-section,
.media-section,
.international-section {
    padding: 100px 0;
    background-color: var(--bg-color);
}

.works-section .section-title,
.books-section .section-title,
.experience-section .section-title,
.references-section .section-title,
.contact-section .section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--text-color);
    margin-bottom: 60px;
    text-align: center;
}

/* Works List */
.works-list {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.work-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 32px;
    align-items: flex-start;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border-color);
}

.work-item:last-child {
    border-bottom: none;
}

.work-year {
    font-size: 0.875rem;
    letter-spacing: 1px;
    color: var(--text-lighter);
    font-weight: 600;
}

.work-item p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color);
}

/* Media & International */
.media-section,
.international-section {
    border-top: 1px solid var(--border-color);
    padding: 80px 0;
}

.media-container,
.international-container {
    max-width: 800px;
    margin: 0 auto;
}

.sub-section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 28px;
    color: var(--text-color);
}

.media-text,
.international-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 24px;
}

.country-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin-top: 32px;
}

.country-list li {
    font-size: 0.875rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-lighter);
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
}

/* Books */
.books-container {
    max-width: 900px;
    margin: 0 auto;
}

.book-item {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 48px;
    align-items: center;
    margin-bottom: 80px;
    padding-bottom: 60px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.book-item:last-child {
    border-bottom: none;
}

.book-item:hover {
    transform: translateX(8px);
}

.book-cover {
    transition: var(--transition);
}

.book-item:hover .book-cover {
    transform: scale(1.05) rotate(-2deg);
}

.book-cover img {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.book-item:hover .book-cover img {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.book-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    margin-bottom: 12px;
    color: var(--text-color);
    transition: color 0.3s ease;
}

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

.book-meta {
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    color: var(--text-lighter);
    margin-bottom: 20px;
}

.book-buy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: var(--accent-color);
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 50px;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(143, 161, 148, 0.25);
    text-decoration: none;
}

.book-buy-btn svg {
    width: 16px;
    height: 16px;
}

.book-buy-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(143, 161, 148, 0.35);
}

.book-buy-btn-disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.book-buy-btn-disabled:hover {
    background-color: #ccc;
    transform: none;
    box-shadow: 0 4px 12px rgba(143, 161, 148, 0.25);
}

/* Experience */
.experience-container {
    max-width: 900px;
    margin: 0 auto;
}

.experience-item {
    margin-bottom: 60px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border-color);
}

.experience-item:last-child {
    border-bottom: none;
}

.experience-company {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.35rem, 3vw, 1.9rem);
    margin-bottom: 10px;
    color: var(--text-color);
}

.experience-meta {
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    color: var(--text-lighter);
}

/* References */
.references-container {
    max-width: 1000px;
    margin: 0 auto;
}

.references-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.reference-item {
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    color: var(--text-color);
    padding: 20px 24px;
    border: 1px solid var(--border-color);
    background-color: var(--white);
    border-radius: 8px;
    transition: var(--transition);
}

.reference-item:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.reference-wide {
    grid-column: 1 / -1;
}

/* Contact */
.contact-container {
    max-width: 700px;
    margin: 0 auto;
}

.contact-item {
    margin-bottom: 48px;
}

.contact-label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-lighter);
    margin-bottom: 12px;
    font-weight: 600;
}

.contact-link {
    font-size: 1.125rem;
    color: var(--text-color);
    transition: color 0.3s ease;
}

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

.contact-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color);
}

/* ==========================================
   APPOINTMENT CTA (WhatsApp Button)
   ========================================== */
.appointment-cta {
    position: fixed;
    right: 28px;
    bottom: 28px;
    padding: 16px 28px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 50px;
    box-shadow: 0 12px 28px rgba(37, 211, 102, 0.4);
    z-index: 50;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.appointment-cta svg {
    width: 20px;
    height: 20px;
}

.appointment-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(37, 211, 102, 0.5);
}

/* ==========================================
   FOOTER
   ========================================== */
.main-footer {
    background: var(--dark-bg);
    color: var(--white);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-info h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.footer-info p {
    color: #d6d6d6;
    font-size: 0.9rem;
}

.footer-contact p {
    margin-bottom: 8px;
}

.footer-contact a {
    color: #d6d6d6;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: #999;
    font-size: 0.85rem;
}

/* ==========================================
   INSTAGRAM ICON - FIXED
   ========================================== */
.social-instagram {
    display: flex;
    align-items: center;
}

.social-instagram a {
    display: flex;
    align-items: center;
    padding: 8px;
}

.social-instagram img {
    width: 16px;
    height: 16px;
    display: block;
    opacity: 0.7;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.social-instagram a:hover img {
    opacity: 1;
    transform: scale(1.1);
}

.social-instagram a::after {
    display: none;
}

/* ==========================================
   RESPONSIVE - TABLET
   ========================================== */
@media (max-width: 900px) {
    .main-header {
        padding: 24px 5%;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .work-item {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .book-item {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .book-cover img {
        margin: 0 auto;
        max-width: 200px;
    }
}

/* ==========================================
   RESPONSIVE - MOBILE
   ========================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .main-header {
        padding: 20px 5%;
    }

    /* Mobile Menu */
    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 200;
        padding: 80px 32px 32px;
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .main-nav li {
        border-bottom: 1px solid var(--border-color);
    }

    .main-nav a {
        display: block;
        padding: 18px 0;
        font-size: 0.85rem;
    }

    .social-instagram a {
        padding: 18px 0;
    }

    body.menu-open {
        overflow: hidden;
    }

    /* Sections */
    .works-section,
    .books-section,
    .experience-section,
    .references-section,
    .contact-section,
    .profile-section {
        padding: 60px 0;
    }

    .media-section,
    .international-section {
        padding: 50px 0;
    }

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

    .profile-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

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

    .appointment-cta {
        right: 16px;
        bottom: 16px;
        padding: 14px 22px;
        font-size: 0.85rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 32px;
    }
}

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

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

    .work-year {
        font-size: 0.8rem;
    }

    .country-list {
        gap: 12px;
    }

    .country-list li {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
}
