/**
 * Portfolio - Pedro Braga
 * Main Stylesheet
 * 
 * Structure:
 * 1. Design Tokens (CSS Custom Properties)
 * 2. Reset & Base Styles
 * 3. Utility Classes
 * 4. Components (Header, Hero, Sections, Cards, Footer)
 * 5. Animations & Micro-interactions
 * 6. Responsive Breakpoints
 * 7. Accessibility
 */

/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */

:root {
    /* Color Palette - Light Mode */
    --bg-warm: #D4C4B0;
    --bg-cream: #F5F0E8;
    --bg-dark: #1A1A1A;
    --bg-darker: #0D0D0D;
    --text-dark: #1A1A1A;
    --text-medium: #3D3D3D;
    /* WCAG AA contrast ratio 7:1 on cream bg */
    --text-light: #F5F0E8;
    --accent-brown: #8B7355;
    --accent-hover: #6B5A47;
    --card-bg: #FFFFFF;
    --card-shadow: rgba(0, 0, 0, 0.08);
    --border-light: rgba(0, 0, 0, 0.08);

    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Playfair Display', Georgia, serif;

    /* Spacing */
    --section-padding: clamp(80px, 12vh, 140px);
    --container-max: 1100px;
    --container-padding: clamp(16px, 6vw, 48px);

    /* Motion */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
}

/* Dark Mode Theme */
[data-theme="dark"] {
    --bg-warm: #1E1E1E;
    --bg-cream: #121212;
    --bg-dark: #000000;
    --bg-darker: #050505;

    /* Text Colors - ensures legibility on dark backgrounds */
    --text-dark: #F5F0E8;
    /* Main text becomes light */
    --text-medium: #CCCCCC;
    /* Secondary text becomes light gray */
    --text-light: #E0E0E0;
    /* Tertiary text REMAINS light for dark backgrounds */

    --accent-brown: #Eebb77;
    /* Brighter gold for better contrast on dark */
    --accent-hover: #F5D095;

    --card-bg: #1E1E1E;
    --card-shadow: rgba(0, 0, 0, 0.5);
    --border-light: rgba(255, 255, 255, 0.15);
}

/* Dark Mode Component Overrides */
[data-theme="dark"] .project-card__btn--primary {
    background: var(--accent-brown);
    color: var(--bg-darker);
}

[data-theme="dark"] .project-card__btn--primary:hover {
    background: var(--accent-hover);
}

[data-theme="dark"] .project-card__cta {
    background: var(--accent-brown);
    color: var(--bg-darker);
}

[data-theme="dark"] .skills__item {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-dark);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .skills__item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-brown);
}

[data-theme="dark"] .testimonial-card__quote svg {
    opacity: 0.8;
    /* Increased opacity for visibility */
}

[data-theme="dark"] .contact__input,
[data-theme="dark"] .contact__textarea {
    background: #1E1E1E;
    border-color: var(--border-light);
    color: var(--text-dark);
}

[data-theme="dark"] .contact__input:focus,
[data-theme="dark"] .contact__textarea:focus {
    border-color: var(--accent-brown);
    background: #252525;
}

/* ==========================================================================
   2. RESET & BASE STYLES
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-cream);
    color: var(--text-dark);
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul,
ol {
    list-style: none;
}

/* ==========================================================================
   3. UTILITY CLASSES
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-brown);
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   4. COMPONENTS
   ========================================================================== */

/* Header & Navigation
   ---------------------------------------- */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem 0;
    background: transparent;
    transition: background var(--transition-medium), box-shadow var(--transition-medium);
}

.header.scrolled {
    background: rgba(245, 240, 232, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .header.scrolled {
    background: rgba(18, 18, 18, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav__list {
    display: flex;
    gap: 2.5rem;
}

.nav__link {
    position: relative;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-medium);
    transition: color var(--transition-fast);
}

.nav__link:hover,
.nav__link.active {
    color: var(--text-dark);
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent-brown);
    transition: width var(--transition-fast);
}

.nav__link:hover::after,
.nav__link.active::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-dark);
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

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

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

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Theme Toggle */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    position: relative;
}

.theme-toggle:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(15deg);
}

[data-theme="dark"] .theme-toggle {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.theme-toggle__icon {
    width: 20px;
    height: 20px;
    color: var(--text-dark);
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-toggle__icon--sun {
    opacity: 1;
    transform: rotate(0deg);
}

.theme-toggle__icon--moon {
    opacity: 0;
    transform: rotate(-90deg);
}

[data-theme="dark"] .theme-toggle__icon--sun {
    opacity: 0;
    transform: rotate(90deg);
}

[data-theme="dark"] .theme-toggle__icon--moon {
    opacity: 1;
    transform: rotate(0deg);
}

/* Hero Section
   ---------------------------------------- */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--section-padding) 0;
    background: var(--bg-warm);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 70% 20%, rgba(139, 115, 85, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.hero__content {
    max-width: 600px;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #050505;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.8s ease forwards;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    transition: all 0.3s ease;
}

.hero__badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 1);
}

[data-theme="dark"] .hero__badge {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-dark);
}

.hero__badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #22C55E;
    border-radius: 50%;
}

.hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 9vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    animation: fadeUp 0.8s ease 0.1s forwards;
    opacity: 0;
}

.hero__subtitle {
    font-size: 1.125rem;
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    animation: fadeUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.75rem;
    background: var(--text-dark);
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-fast);
    animation: fadeUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

.hero__cta:hover {
    background: var(--accent-brown);
    transform: translateY(-2px);
}

[data-theme="dark"] .hero__cta {
    background: var(--accent-brown);
    color: var(--bg-darker);
}

[data-theme="dark"] .hero__cta:hover {
    background: var(--accent-hover);
}

.hero__cta svg {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
}

.hero__cta:hover svg {
    transform: translateX(3px);
}

.hero__cta-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

@media (max-width: 768px) {
    .hero__cta-group {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero .hero__cta-group {
        flex-direction: column !important;
        width: 100%;
        gap: 1rem;
    }

    .hero__cta {
        width: 100%;
        justify-content: center;
    }
}

.hero__cta--secondary {
    background: transparent;
    border: 1px solid var(--text-dark);
    color: var(--text-dark);
}

.hero__cta--secondary:hover {
    background: rgba(0, 0, 0, 0.05);
    /* inline override removed */
    transform: translateY(-2px);
}

[data-theme="dark"] .hero__cta--secondary {
    background: transparent;
    border-color: var(--accent-hover);
    color: var(--accent-hover);
}

[data-theme="dark"] .hero__cta--secondary:hover {
    background: rgba(238, 187, 119, 0.1);
    color: #FFFFFF;
    border-color: #FFFFFF;
}

/* Hero Photo */
.hero__photo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__photo-wrapper {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 3/4;
    height: auto;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--bg-cream) 0%, #E8DFD6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.hero__photo-wrapper.animate-fade-in-up {
    animation: fadeInUp 1s ease 0.5s forwards;
    opacity: 0;
}

.hero__photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__photo-placeholder {
    font-size: 4rem;
    color: var(--accent-brown);
    opacity: 0.5;
}

/* About Section
   ---------------------------------------- */

.about {
    padding: var(--section-padding) 0;
    background: var(--bg-cream);
}

.about .container {
    max-width: 800px;
}

.about__text {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-medium);
    margin-bottom: 1.5rem;
    max-width: 70ch;
    margin-inline: auto;
}

.about__text strong {
    color: var(--text-dark);
    font-weight: 600;
}

.about__signature {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-top: 2rem;
}

/* Stats Section
   ---------------------------------------- */

.stats {
    padding: 4rem 0;
    background: var(--bg-dark);
}

.stats__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .stats__grid {
        gap: 2rem;
    }
}

.stats__item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stats__number {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 4.5rem);
    font-weight: 700;
    color: var(--accent-brown);
    line-height: 1;
}

[data-theme="dark"] .stats__number {
    color: var(--accent-brown);
}

.stats__plus {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--accent-brown);
}

[data-theme="dark"] .stats__plus {
    color: var(--accent-brown);
}

.stats__label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Services Section
   ---------------------------------------- */

.services {
    padding: var(--section-padding) 0;
    background: var(--bg-cream);
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 900px) {
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .services__grid {
        grid-template-columns: 1fr;
    }
}

.service-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--card-shadow);
    border: 1px solid rgba(0, 0, 0, 0.15);
    transition: all var(--transition-medium);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-brown);
}

.service-card__icon {
    width: 64px;
    height: 64px;
    background: rgba(193, 161, 108, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent-brown);
    transition: background var(--transition-medium), color var(--transition-medium);
}

.service-card:hover .service-card__icon {
    background: var(--accent-brown);
    color: var(--bg-darker);
}

.service-card__icon svg {
    width: 32px;
    height: 32px;
}

.service-card__title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.service-card__description {
    font-size: 0.95rem;
    color: var(--text-medium);
    line-height: 1.6;
}

.services__cta-wrapper {
    text-align: center;
}

/* Button Utility */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    transition: all var(--transition-medium);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.btn--primary {
    background: var(--text-dark);
    color: var(--text-light);
    border: 1px solid var(--text-dark);
}

.btn--primary:hover {
    background: var(--accent-brown);
    border-color: var(--accent-brown);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 168, 108, 0.3);
}

[data-theme="dark"] .btn--primary {
    background: var(--accent-brown);
    color: var(--bg-darker);
    border-color: var(--accent-brown);
}

[data-theme="dark"] .btn--primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* Dark Mode Overrides for Services */
[data-theme="dark"] .service-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .service-card:hover {
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-brown);
}

/* Testimonials Section
   ---------------------------------------- */

.testimonials {
    padding: var(--section-padding) 0;
    background: var(--bg-cream);
}

.testimonials__header {
    margin-bottom: 3rem;
}

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

.testimonial-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px var(--card-shadow);
    transition: transform var(--transition-medium);
}

.testimonial-card:hover {
    transform: translateY(-4px);
}

.testimonial-card--placeholder {
    opacity: 0.6;
    border: 2px dashed var(--border-light);
}

.testimonial-card__quote {
    margin-bottom: 1rem;
}

.testimonial-card__quote svg {
    width: 32px;
    height: 32px;
    color: var(--accent-brown);
    opacity: 0.3;
}

.testimonial-card__text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-medium);
    font-style: italic;
    margin-bottom: 1.5rem;
}

.testimonial-card__author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-card__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-warm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--accent-brown);
}

.testimonial-card__name {
    font-weight: 600;
    color: var(--text-dark);
    display: block;
}

.testimonial-card__role {
    font-size: 0.85rem;
    color: var(--text-medium);
}

/* Case Study Modal
   ---------------------------------------- */

.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal__content {
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    background: var(--card-bg);
    border-radius: 24px 24px 0 0;
    padding: 2.5rem;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.active .modal__content {
    transform: translateY(0);
}

.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.modal__close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg-warm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal__close:hover {
    background: var(--accent-brown);
    color: var(--text-light);
}

.modal__section {
    margin-bottom: 2rem;
}

.modal__section-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal__section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--accent-brown);
    border-radius: 2px;
}

.modal__text {
    color: var(--text-medium);
    line-height: 1.7;
}

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

.modal__image-placeholder {
    aspect-ratio: 16/9;
    background: var(--bg-warm);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-medium);
    font-size: 0.85rem;
}

.modal__image {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    object-fit: cover;
    background: var(--bg-warm);
    cursor: zoom-in;
    aspect-ratio: 16/9;
}

.modal__image:hover {
    transform: scale(1.02);
}

/* Lightbox
   ---------------------------------------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox__content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox.active .lightbox__content {
    transform: scale(1);
}

.lightbox__image {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.lightbox__close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 3001;
}

.lightbox__close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Skills Section
   ---------------------------------------- */

.skills {
    padding: var(--section-padding) 0;
    background: var(--bg-warm);
}

.skills__header {
    margin-bottom: 3rem;
}

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

.skills__column {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px var(--card-shadow);
    border: 1px solid rgba(0, 0, 0, 0.08);
    /* Added subtle border */
    cursor: pointer;
    transition: transform var(--transition-medium), box-shadow var(--transition-medium), border-color 0.3s ease;
}

.skills__column:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(139, 115, 85, 0.08);
    border-color: var(--accent-brown);
}

.skills__column-icon {
    width: 44px;
    height: 44px;
    background: var(--bg-warm);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.skills__column-icon svg {
    width: 22px;
    height: 22px;
    color: var(--accent-brown);
}

.skills__column-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

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

@media (min-width: 1024px) {
    .skills__list {
        grid-template-columns: repeat(3, 1fr);
    }
}

.skills__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    background: #FFFFFF;
    border: 1px solid rgba(139, 115, 85, 0.2);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-medium);
    transition: background var(--transition-fast);
}

.skills__item:hover {
    background: rgba(255, 255, 255, 0.8);
}

.skills__item::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-brown);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Projects Section
   ---------------------------------------- */

.projects {
    padding: var(--section-padding) 0;
    background: var(--bg-cream);
}

.projects__header {
    margin-bottom: 3rem;
}

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

/* Project Card */
.project-card {
    position: relative;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--card-shadow);
    cursor: pointer;
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 115, 85, 0.03) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-medium);
    pointer-events: none;
    z-index: 1;
}

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

.project-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 24px rgba(139, 115, 85, 0.1);
}

.project-card__preview {
    width: 100%;
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.project-card__gradient {
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: grayscale(1) brightness(0.6);
}

.project-card:hover .project-card__gradient {
    transform: scale(1.05);
    filter: grayscale(0) brightness(1);
}

.project-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: grayscale(1) brightness(0.6);
}

.project-card:hover .project-card__image {
    transform: scale(1.05);
    filter: grayscale(0) brightness(1);
}

.project-card__gradient--purple {
    background: linear-gradient(135deg, #1A1A2E 0%, #16213E 50%, #0F3460 100%);
}

.project-card__gradient--green {
    background: linear-gradient(135deg, #1A2F1A 0%, #234A23 50%, #2D5A2D 100%);
}

.project-card__gradient--amber {
    background: linear-gradient(135deg, #2D2A1A 0%, #4A3F23 50%, #5A4A2D 100%);
}

.project-card__gradient--blue {
    background: linear-gradient(135deg, #1A1A2E 0%, #1E3A5F 50%, #2E4A6F 100%);
}

.project-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 26, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.project-card__cta {
    padding: 0.75rem 1.5rem;
    background: var(--text-light);
    color: var(--text-dark);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.project-card:hover .project-card__cta {
    transform: translateY(0);
}

.project-card__content {
    padding: 1.5rem;
}

.project-card__tag {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background: var(--bg-warm);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    color: var(--accent-brown);
}

.project-card__title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.625rem;
    color: var(--text-dark);
}

.project-card__description {
    font-size: 0.875rem;
    color: var(--text-medium);
    line-height: 1.6;
}

.project-card__tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-badge {
    padding: 0.25rem 0.5rem;
    background: rgba(139, 115, 85, 0.1);
    border: 1px solid rgba(139, 115, 85, 0.2);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-brown);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.project-card__links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.project-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-fast);
}

.project-card__btn--primary {
    background: var(--text-dark);
    color: var(--text-light);
}

.project-card__btn--primary:hover {
    background: var(--accent-brown);
}

.project-card__btn--secondary {
    background: transparent;
    color: var(--text-dark);
    border: 1px solid var(--border-light);
}

.project-card__btn--secondary:hover {
    border-color: var(--accent-brown);
    color: var(--accent-brown);
}

.project-card__btn svg {
    width: 14px;
    height: 14px;
}

/* Education Section
   ---------------------------------------- */

.education {
    padding: var(--section-padding) 0;
    background: var(--bg-cream);
}

.education__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    align-items: stretch;
}

.education__item {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: 0 4px 20px var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    cursor: pointer;
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
    height: 100%;
}

.education__item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}


.education__icon {
    width: 48px;
    height: 48px;
    background: var(--bg-warm);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.education__icon svg {
    width: 24px;
    height: 24px;
    color: var(--accent-brown);
}

.education__content h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.education__content p {
    font-size: 0.9rem;
    color: var(--text-medium);
    line-height: 1.5;
}

.education__badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: #22C55E20;
    color: #16A34A;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

/* Expanded Degree Card */
.education__item--degree {
    justify-content: flex-start;
}

.education__university {
    font-size: 0.9rem;
    color: var(--text-medium);
    line-height: 1.5;
    margin-bottom: 0.25rem;
}

.education__details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.education__detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-medium);
}

.education__detail-item svg {
    color: var(--accent-brown);
    flex-shrink: 0;
}

.education__focus {
    margin-top: 1rem;
}

.education__focus-title {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

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

.education__tag {
    padding: 0.25rem 0.75rem;
    background: var(--bg-cream);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--text-medium);
    transition: all var(--transition-fast);
}

.education__tag:hover {
    border-color: var(--accent-brown);
    color: var(--accent-brown);
}

[data-theme="dark"] .education__tag {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .education__details {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Institution Logos */
.education__header-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.education__logo {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.education__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.education__logo--alura {
    background: #0D1117;
}

/* Progress Bar */
.education__progress-wrapper {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.education__progress {
    height: 8px;
    background: var(--bg-cream);
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.education__progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-brown), #D4A56A);
    border-radius: 50px;
    transition: width 0.8s ease-out;
}

.education__progress-label {
    font-size: 0.75rem;
    color: var(--text-medium);
    font-weight: 500;
}

[data-theme="dark"] .education__progress {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .education__progress-wrapper {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Credential Logo Icon */
.credential-logo {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: var(--bg-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
}

.credential-logo--alura {
    background: #0D1117;
    color: #00C8FF;
}

.credential-logo--efset {
    background: #E31837;
    color: white;
}

/* Credential Hours */
.credential-hours {
    font-size: 0.7rem;
    color: var(--text-medium);
    margin-left: auto;
    padding: 0.1rem 0.4rem;
    background: var(--bg-cream);
    border-radius: 4px;
}

[data-theme="dark"] .credential-hours {
    background: rgba(255, 255, 255, 0.08);
}

/* Highlighted Credential (English C1) */
.credential-link--highlight {
    border-color: var(--accent-brown);
    border-width: 2px;
    background: rgba(201, 166, 107, 0.05);
}

.credential-link--highlight::before {
    content: '🌐';
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 16px;
}

.credential-link--highlight .credential-title {
    color: var(--accent-brown);
}

/* Enhanced Hover on Credential Cards */
.credential-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Fixed: Keep content aligned to start */
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-cream);

    border: 1px solid var(--border-light);
    border-radius: 8px;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.credential-link:hover {
    background: rgba(139, 115, 85, 0.08);
    border-color: var(--accent-brown);
    transform: translateX(4px);
}

.credential-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
    gap: 0.25rem;
}

.credential-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
}


.credential-institution {
    font-size: 0.85rem;
    color: var(--text-medium);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


/* Credential Logo Images */
.credential-logo-img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: contain;
    flex-shrink: 0;
    background: white;
    padding: 2px;
}

[data-theme="dark"] .credential-logo-img {
    background: rgba(255, 255, 255, 0.9);
}


/* Credentials List (LinkedIn-style) */
.education__item--credentials {
    align-items: flex-start;
}

.credentials-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.credential-item {
    border-radius: 8px;
    transition: background var(--transition-fast);
}

.credential-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-cream);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.credential-link:hover {
    border-color: var(--accent-brown);
    background: rgba(139, 115, 85, 0.08);
    transform: translateX(4px);
}

.credential-link:hover .credential-title {
    color: var(--accent-brown);
}

.credential-link:hover .credential-icon {
    color: var(--accent-brown);
}

.credential-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.credential-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
    transition: color var(--transition-fast);
}

.credential-institution {
    font-size: 0.8rem;
    color: var(--text-medium);
}

.credential-icon {
    width: 16px;
    height: 16px;
    color: var(--text-medium);
    flex-shrink: 0;
    transition: color var(--transition-fast);
}

/* Dark Mode Credentials */
[data-theme="dark"] .credential-link {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .credential-link:hover {
    background: rgba(238, 187, 119, 0.1);
    border-color: var(--accent-brown);
}

/* Credential Badge (Em andamento) */
.credential-badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    background: rgba(34, 197, 94, 0.15);
    color: #16A34A;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

[data-theme="dark"] .credential-badge {
    background: rgba(34, 197, 94, 0.2);
    color: #22C55E;
}

.credential-link--progress {
    border-left: 3px solid #22C55E;
}


/* Testimonial Avatar with Photo Support */
.testimonial-card__avatar--photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-brown);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.testimonial-card__avatar--photo .avatar-initial {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.testimonial-card__avatar--photo .avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* When photo is present, hide initial */
.testimonial-card__avatar--photo:has(.avatar-image) .avatar-initial {
    display: none;
}

/* Contact Subtitle */
.contact__subtitle {
    color: var(--text-medium);
    max-width: 500px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.6;
}


/* Contact Section
   ---------------------------------------- */

.contact {
    padding: clamp(40px, 6vh, 80px) 0;
    background: var(--bg-warm);
}

.contact .container {
    max-width: 700px;
}

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

.contact__form {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 30px var(--card-shadow);
}

.contact__row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact__field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact__field.full {
    grid-column: 1 / -1;
}

.contact__label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dark);
}

.contact__input,
.contact__textarea,
.contact__select {
    padding: 0.875rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    background-color: var(--bg-cream);
}

.contact__input:focus,
.contact__textarea:focus,
.contact__select:focus {
    outline: none;
    border-color: var(--accent-brown);
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

.contact__textarea {
    min-height: 140px;
    resize: vertical;
}

.contact__select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233D3D3D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2em;
    padding-right: 2.5rem;
}

.contact__select option {
    background: var(--bg-cream);
    color: var(--text-dark);
}

.contact__submit {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--text-dark);
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-fast);
    margin-top: 1rem;
}

.contact__submit:hover {
    background: var(--accent-brown);
    transform: translateY(-2px);
}

.contact__email-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-medium);
}

.contact__email-link a {
    color: var(--accent-brown);
    font-weight: 600;
}

.contact__email-link a:hover {
    text-decoration: underline;
}

/* Contact Form High Visibility (Dark Mode) */
[data-theme="dark"] .contact__form {
    background: #252529;
    border: 1px solid rgba(238, 187, 119, 0.25);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .contact__input,
[data-theme="dark"] .contact__textarea,
[data-theme="dark"] .contact__select {
    background-color: #18181B;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #E0E0E0;
}

[data-theme="dark"] .contact__select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23E0E0E0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

[data-theme="dark"] .contact__select option {
    background: #18181B;
    color: #E0E0E0;
}

[data-theme="dark"] .contact__input:focus,
[data-theme="dark"] .contact__textarea:focus,
[data-theme="dark"] .contact__select:focus {
    border-color: var(--accent-brown);
    box-shadow: 0 0 0 3px rgba(238, 187, 119, 0.1);
}

[data-theme="dark"] .contact__submit {
    background: var(--accent-brown);
    color: var(--bg-darker);
    border: none;
    font-weight: 700;
}

[data-theme="dark"] .contact__submit:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(238, 187, 119, 0.2);
}

/* WhatsApp Float Button */
/* Glassmorphism WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--accent-brown);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 990;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background: #25D366;
    color: white;
    border-color: #25D366;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.35);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

/* Dark mode glassmorphism adjustment */
[data-theme="dark"] .whatsapp-float {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--accent-brown);
}


@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 50px;
        height: 50px;
    }

    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
}

/* Contact Methods */
.contact__methods {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 2.5rem;
}

@media (min-width: 600px) {
    .contact__methods {
        flex-direction: row;
        justify-content: center;
        gap: 2rem;
    }
}

.contact__method {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.75rem;
    background: var(--bg-cream);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.contact__method:hover {
    border-color: var(--accent-brown);
    color: var(--accent-brown);
    transform: translateY(-2px);
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.contact__method svg {
    color: var(--accent-brown);
}

/* Dark mode for Contact Methods */
[data-theme="dark"] .contact__method {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

[data-theme="dark"] .contact__method:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-brown);
    color: var(--accent-brown);
}

/* Footer
   ---------------------------------------- */

.footer {
    background: var(--bg-dark);
    padding: 4rem 0 2.5rem;
}

.footer__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
}

.footer__logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-light);
}

.footer__social {
    display: flex;
    gap: 0.75rem;
}

.footer__social-link {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.footer__social-link:hover {
    background: var(--accent-brown);
    transform: translateY(-2px);
}

.footer__social-link svg {
    width: 18px;
    height: 18px;
    color: var(--text-light);
}

.footer__divider {
    width: 60px;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
}

.footer__bottom {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer__bottom p {
    margin-bottom: 0.25rem;
}

/* ==========================================================================
   5. ANIMATIONS & MICRO-INTERACTIONS
   ========================================================================== */

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-brown), #A68B5B);
    z-index: 1001;
    transition: width 0.1s ease-out;
}

/* Reveal on Scroll */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

.reveal-delay-4 {
    transition-delay: 0.4s;
}

/* Keyframe Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Ripple Effect for Buttons */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

/* ==========================================================================
   6. RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media (max-width: 768px) {
    .nav__list {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-cream);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right var(--transition-medium);
    }

    .nav__list.active {
        right: 0;
    }

    .nav__link {
        font-size: 1.125rem;
        color: var(--text-dark);
    }

    .menu-toggle {
        display: flex;
    }

    .hero .container {
        text-align: center;
        gap: 2rem;
    }

    .hero__content {
        margin: 0 auto;
    }

    .hero__title {
        font-size: 2.25rem;
    }

    .hero__subtitle {
        margin-bottom: 1.5rem;
    }

    .hero__badge {
        margin-bottom: 1rem;
    }

    .hero__photo-wrapper {
        max-width: 240px;
        margin: 0 auto;
    }

    .skills__grid,
    .projects__grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        text-align: left;
    }

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

/* ==========================================================================
   7. ACCESSIBILITY
   ========================================================================== */

/* Focus States */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent-brown);
    outline-offset: 3px;
    border-radius: 4px;
}

.nav__link:focus-visible {
    outline-offset: 6px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .scroll-progress {
        display: none;
    }
}

/* Minimum Touch Target (44x44px) */
@media (max-width: 768px) {

    .hero__cta,
    .contact__submit,
    .project-card__btn {
        min-height: 44px;
        min-width: 44px;
    }

    .nav__link {
        padding: 0.5rem;
    }

    .footer__social-link {
        width: 44px;
        height: 44px;
    }
}

/* Form Feedback States */
.contact__form.submitting .contact__submit {
    opacity: 0.7;
    cursor: wait;
}

.contact__form.submitting .contact__submit::after {
    content: '...';
}

.form-success {
    background: #22C55E20;
    color: #16A34A;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 1rem;
    font-weight: 500;
}

.form-error {
    background: #EF444420;
    color: #DC2626;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 1rem;
    font-weight: 500;
}

/* Form Validation States */
.contact__input.invalid,
.contact__textarea.invalid {
    border-color: #DC2626;
    background: #FEF2F2;
}

.contact__input.invalid:focus,
.contact__textarea.invalid:focus {
    border-color: #DC2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

/* ==========================================================================
   11. TERMINAL TYPING EFFECT
   ========================================================================== */

.txt-type {
    color: var(--accent-brown);
    position: relative;
    border-right: 0.1em solid var(--accent-brown);
    padding-right: 5px;
    animation: blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: var(--accent-brown)
    }
}

/* Adjust title size for typing effect to prevent layout shift */
@media (min-width: 768px) {
    .hero__title {
        min-height: 1.2em;
    }
}

/* ==========================================================================
   12. STACK MARQUEE
   ========================================================================== */
.tech-marquee-wrapper {
    overflow: hidden;
    padding: 2rem 0;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.tech-marquee {
    display: flex;
    overflow: hidden;
    user-select: none;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.tech-track {
    flex-shrink: 0;
    display: flex;
    gap: 2rem;
    min-width: 100%;
    animation: scroll 30s linear infinite;
}

.marquee--reverse .tech-track {
    animation-direction: reverse;
}

.tech-item {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-medium);
    padding: 0.75rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

[data-theme='dark'] .tech-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

@keyframes scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-100% - 2rem));
    }
}


/* ==========================================================================
   13. LIVE STATUS WIDGET
   ========================================================================== */
.status-widget {
    position: absolute;
    top: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

[data-theme='dark'] .status-widget {
    background: rgba(30, 30, 30, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.status-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.status-widget__dot {
    width: 8px;
    height: 8px;
    background: #22C55E;
    border-radius: 50%;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* Status Modal */
.status-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.status-modal.active {
    opacity: 1;
    pointer-events: all;
}

.status-modal__content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    border: 1px solid var(--border-light);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.status-modal.active .status-modal__content {
    transform: translateY(0);
}

.status-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    font-size: 0.9rem;
}

[data-theme='dark'] .status-item {
    background: rgba(255, 255, 255, 0.05);
}

.status-value {
    font-family: monospace;
    color: var(--accent-brown);
    font-weight: 600;
}

/* ==========================================================================
   14. PROJECT HOVER EFFECTS
   ========================================================================== */
.project-card__preview {
    position: relative;
    overflow: hidden;
}

.project-card__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.4s ease;
}

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

.project-card__overlay {
    z-index: 2;
    /* Keep overlay on top of video */
}


/* Marquee Icon Alignment */
.tech-item i,
.tech-item svg {
    font-size: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
    vertical-align: middle;
    margin-right: 0.5rem;
    position: relative;
    top: -1px;
    display: inline-block;
}



/* Ensure button contrast */
.hero__cta {
    color: var(--accent-brown);
    font-weight: 600;
}

/* ==========================================================================
   15. LANGUAGE TOGGLE
   ========================================================================== */

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dark);
    transition: all var(--transition-fast);
}

.lang-toggle:hover {
    background: var(--accent-brown);
    border-color: var(--accent-brown);
    color: white;
}

.lang-toggle svg {
    width: 14px;
    height: 14px;
}

[data-theme="dark"] .lang-toggle {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

/* ==========================================================================
   16. BLOG & STATS SECTION
   ========================================================================== */

.blog {
    padding: var(--section-padding) 0;
    background: var(--bg-warm);
}

.blog__header {
    margin-bottom: 3rem;
}

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

.blog__posts,
.blog__github,
.blog__wakatime {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px var(--card-shadow);
}

.blog__section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.blog__section-title svg {
    color: var(--accent-brown);
}

/* Coming Soon Badge */
.blog__coming-soon {
    text-align: center;
    padding: 1.5rem 0;
}

.blog__coming-badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    background: rgba(139, 115, 85, 0.15);
    color: var(--accent-brown);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.blog__coming-soon p {
    color: var(--text-medium);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.blog__topics {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.blog__topics li {
    padding: 0.35rem 0.75rem;
    background: var(--bg-cream);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-medium);
}

[data-theme="dark"] .blog__topics li {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

/* GitHub Stats */
.github-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.github-stats img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* WakaTime */
.wakatime-stats {
    text-align: center;
}

.wakatime-stats img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.wakatime-note {
    font-size: 0.8rem;
    color: var(--text-medium);
}

.wakatime-note a {
    color: var(--accent-brown);
    text-decoration: none;
}

.wakatime-note a:hover {
    text-decoration: underline;
}

.blog__cta-hint {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-medium);
}

.blog__cta-hint a {
    color: var(--accent-brown);
    font-weight: 600;
    text-decoration: none;
}

.blog__cta-hint a:hover {
    text-decoration: underline;
}


/* Responsive */
@media (max-width: 768px) {
    .blog__grid {
        grid-template-columns: 1fr;
    }

    .lang-toggle {
        order: -1;
    }
}