@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400;0,500;0,600;1,400&family=Instrument+Serif:ital@0;1&display=swap');

:root {
    /* Light Mode */
    --bg-color: #f2f2f2;
    --text-color: #111111;
    --accent-color: #0033cc;
    --sub-color: #666666;
    --line-color: rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.4);
    --noise-opacity: 0.03;
}

[data-theme="dark"] {
    /* Dark Mode */
    --bg-color: #0a0a0a;
    --text-color: #f0f0f0;
    --accent-color: #3366ff;
    --sub-color: #888888;
    --line-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(20, 20, 20, 0.4);
    --noise-opacity: 0.05;
}

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

body {
    font-family: 'Instrument Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.4;
    transition: background-color 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.5s ease;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Artistic & Stylized Overhaul */

:root {
    /* Light Mode */
    --bg-color: #f0f0f0;
    --text-color: #1a1a1a;
    --accent-color: #2a2a2a;
    /* Darker, more sophisticated accent */
    --sub-color: #555555;
    --line-color: rgba(0, 0, 0, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.2);
    --glass-border: rgba(255, 255, 255, 0.4);
    --noise-opacity: 0.04;
    --fluid-1: #e0e0e0;
    --fluid-2: #d4d4d4;
}

[data-theme="dark"] {
    /* Dark Mode */
    --bg-color: #080808;
    --text-color: #e0e0e0;
    --accent-color: #ffffff;
    --sub-color: #888888;
    --line-color: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(20, 20, 20, 0.3);
    --glass-border: rgba(255, 255, 255, 0.1);
    --noise-opacity: 0.06;
    --fluid-1: #111111;
    --fluid-2: #1a1a1a;
}

body {
    font-family: 'Instrument Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    transition: background-color 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.8s ease;
    overflow-x: hidden;
}

/* Typography Overhaul */
h1,
h2,
h3,
.section-title,
.hero-title {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-style: italic;
}

/* Noise Overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    opacity: var(--noise-opacity);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Dynamic Fluid Background */
.background-gradient {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, var(--fluid-1), transparent 40%),
        radial-gradient(circle at 80% 20%, var(--fluid-2), transparent 40%);
    filter: blur(80px);
    animation: fluidMove 20s infinite alternate ease-in-out;
    opacity: 0.6;
}

@keyframes fluidMove {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(-5%, -5%) rotate(5deg);
    }
}

/* Layout & Spacing */
.main-content {
    max-width: 1200px;
    /* Wider for editorial feel */
    margin: 0 auto;
    padding: 160px 40px 100px;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    z-index: 100;
    mix-blend-mode: difference;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: all 0.3s ease;
}

.logo-container:hover {
    background: none;
    box-shadow: none;
    transform: none;
}

.site-logo {
    height: 120px;
    /* Good size for the signature */
    width: auto;
    opacity: 1;
    transition: transform 0.3s ease;
}

.site-logo:hover {
    transform: scale(1.02);
}

/* Enhance Liquid Glass Container */
[data-theme="light"] .logo-container {
    background: none;
    border: none;
    box-shadow: none;
}

[data-theme="light"] .site-logo {
    /* Invert for light mode if the image is white-based to make it visible */
    filter: invert(1) hue-rotate(180deg);
    opacity: 1;
}

.theme-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px;
    border-radius: 8px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.theme-btn .icon-sun {
    display: block;
}

.theme-btn .icon-moon {
    display: none;
}

[data-theme="light"] .theme-btn .icon-sun {
    display: none;
}

[data-theme="light"] .theme-btn .icon-moon {
    display: block;
}

.theme-btn svg {
    transition: transform 0.3s ease;
}

.theme-btn:active svg {
    transform: rotate(180deg);
}


/* Hero */
.hero-section {
    margin-bottom: 60px;
    /* Reduced to bring bio closer */
    position: relative;
}

.hero-profile {
    width: 1em;
    height: 1em;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.hero-title {
    font-size: clamp(4rem, 15vw, 11rem);
    line-height: 0.85;
    letter-spacing: -0.03em;
    margin-bottom: 40px;
    color: var(--text-color);
    mix-blend-mode: exclusion;
    /* Artistic blending */
}

.hero-sub {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--sub-color);
    font-weight: 400;
    display: flex;
    gap: 10px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 10px;
    right: -20px;
    width: 40px;
    height: 1px;
    background: var(--accent-color);
    transform: rotate(-15deg);
}

/* Glass Cards for Content */
.info-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    margin-top: 4rem;
}

.info-column {
    grid-column: span 4;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 4px;
    /* Minimal radius */
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.info-column:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.info-column h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    border-bottom: none;
}

/* Experience Section - Editorial Timeline */
.experience-list {
    position: relative;
    padding-left: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
}

.experience-item {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 40px;
    border-left: none;
    padding-left: 0;
    align-items: baseline;
    transition: opacity 0.5s ease;
}

.experience-item:hover {
    opacity: 0.8;
}

.exp-header {
    text-align: right;
    position: relative;
}

.exp-header::after {
    content: '';
    position: absolute;
    top: 10px;
    right: -25px;
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
    /* Dot on the timeline */
}

.experience-item h3 {
    font-size: 2rem;
    margin: 0;
    line-height: 1;
}

.experience-item .company {
    font-family: 'Instrument Sans', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 10px;
    display: block;
}

.experience-item .date {
    font-family: 'Instrument Sans', sans-serif;
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 5px;
}

.experience-item p {
    font-size: 1.1rem;
    max-width: 600px;
    font-weight: 300;
}

/* Links */
.text-link {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: 1.2rem;
    color: var(--text-color);
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
    transition: color 0.3s ease;
}

.text-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

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

.text-link:hover::after {
    width: 100%;
}

/* Animations */
.reveal-text {
    opacity: 0;
    transform: translateY(20px);
    animation: reveal 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

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

/* Responsive Adjustments */
@media (max-width: 900px) {
    .info-column {
        grid-column: span 12;
    }

    .experience-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .exp-header {
        text-align: left;
        padding-left: 20px;
        border-left: 1px solid var(--accent-color);
    }

    .exp-header::after {
        display: none;
    }

    .hero-sub {
        flex-direction: column;
        gap: 0;
    }
}

/* Hero */
.hero-section {
    margin-bottom: 60px;
    /* Reduced to bring bio closer */
}

.bio-section {
    margin-bottom: 100px;
    max-width: 900px;
}

.bio-section .lead-text {
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 300;
    line-height: 1.6;
    color: var(--text-color);
    opacity: 0.8;
}

/* Footer / Contact */
.contact-section {
    margin-top: 100px;
    padding-top: 60px;
    border-top: 1px solid var(--line-color);
    text-align: center;
}

.contact-email {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2rem, 6vw, 4rem);
    text-decoration: none;
    color: var(--text-color);
    transition: opacity 0.3s;
}

/* Former Section */
.former-list {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 3rem;
}

.former-item {
    transition: opacity 0.3s ease;
}

.former-item:hover {
    opacity: 0.8;
}

.former-item h3 {
    font-family: 'Instrument Serif', serif;
    font-size: 0.95rem;
    font-style: italic;
    margin-bottom: 0.3rem;
    color: var(--text-color);
    line-height: 1.2;
}

.former-item .year {
    font-family: 'Instrument Sans', sans-serif;
    font-size: 0.7rem;
    font-style: normal;
    color: var(--accent-color);
    margin-left: 6px;
    font-weight: 500;
}

.former-item p {
    font-family: 'Instrument Sans', sans-serif;
    font-size: 0.8rem;
    color: var(--sub-color);
    line-height: 1.4;
}

/* Like Button */
.like-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.like-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--line-color);
    border-radius: 50px;
    color: var(--text-color);
    font-family: 'Instrument Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.like-btn:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    transform: translateY(-2px);
    border-color: var(--accent-color);
}

.like-btn:active {
    transform: translateY(0);
}

.like-btn.liked {
    background: var(--accent-color);
    color: var(--bg-color);
    border-color: var(--accent-color);
}

.like-btn.liked svg path {
    fill: var(--bg-color);
}

.like-btn svg {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

.like-count {
    font-family: 'Instrument Sans', sans-serif;
    font-size: 0.9rem;
    color: var(--sub-color);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Portfolio Section */
.portfolio-section {
    margin-top: 100px;
    padding-top: 60px;
    border-top: 1px solid var(--line-color);
}

.portfolio-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 40px;
    cursor: pointer;
}

.portfolio-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--line-color);
    backdrop-filter: blur(10px);
    padding: 8px;
    border-radius: 8px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-toggle:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    border-color: var(--accent-color);
}

.portfolio-toggle svg {
    transition: transform 0.3s ease;
}

.portfolio-toggle.collapsed svg {
    transform: rotate(-90deg);
}

/* Masonry Gallery estilo Pinterest */
.portfolio-gallery {
    column-count: 3;
    column-gap: 20px;
    max-height: 10000px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.portfolio-gallery.collapsed {
    max-height: 0;
    opacity: 0;
}

.portfolio-item {
    break-inside: avoid;
    margin-bottom: 20px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--glass-bg);
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.portfolio-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

/* Modal de Visualização */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(20px);
}

.image-modal.active {
    display: flex;
}

.modal-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 12px;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Responsivo */
@media (max-width: 1024px) {
    .portfolio-gallery {
        column-count: 2;
    }
}

@media (max-width: 640px) {
    .portfolio-gallery {
        column-count: 1;
    }

    .modal-image {
        max-width: 95%;
        max-height: 95%;
    }

    .modal-close {
        top: 20px;
        right: 20px;
    }
}