/* ============================================
   KEILA VELLVEHÍ — PORTFOLIO
   Sunset Minimalist Design
   ============================================ */

/* ---------- Variables ---------- */
:root {
    /* Sunset Palette */
    --sun-100: #FFFBF5;
    --sun-200: #FFF7ED;
    --sun-300: #FFECD2;
    --sun-400: #FCB69F;
    --sun-500: #FF9A6C;
    --sun-600: #FF7E47;
    --sun-700: #E86835;
    --sun-800: #C4512A;

    /* Warm Neutrals */
    --warm-50: #FFFCF9;
    --warm-100: #F9F6F3;
    --warm-200: #EAE4DE;
    --warm-300: #D4CCC3;
    --warm-400: #9A918A;
    --warm-500: #6B6259;
    --warm-600: #4A433D;
    --warm-700: #332E2A;
    --warm-800: #1F1B18;

    /* Typography */
    --font-serif: 'Instrument Serif', Georgia, serif;
    --font-sans: 'Inter', -apple-system, sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    --space-3xl: 10rem;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --duration: 0.6s;
}

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

html {
    scroll-behavior: smooth;
    font-size: 17px;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    background: var(--warm-50);
    color: var(--warm-700);
    line-height: 1.7;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: -5vh;
    left: 0;
    width: 100%;
    height: 110vh;
    background: url('bg-nature.jpg') center/cover no-repeat;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: -5vh;
    left: 0;
    width: 100%;
    height: 110vh;
    background: linear-gradient(180deg,
            rgba(255, 252, 249, 0.4) 0%,
            rgba(255, 248, 240, 0.35) 50%,
            rgba(255, 245, 235, 0.3) 100%);
    z-index: -1;
}

::selection {
    background: var(--sun-400);
    color: var(--warm-800);
}

/* ---------- Ambient Background ---------- */
.ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.5;
    animation: drift 30s ease-in-out infinite;
}

.glow-1 {
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--sun-300) 0%, transparent 70%);
    top: -20vw;
    right: -10vw;
}

.glow-2 {
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--sun-400) 0%, transparent 70%);
    bottom: -20vw;
    left: -15vw;
    animation-delay: -15s;
    opacity: 0.3;
}

@keyframes drift {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, 20px) scale(1.05);
    }
}

/* ---------- Container ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ---------- Navigation ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: var(--space-xs) var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: background 0.3s ease, transform 0.3s ease;
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav.nav-hidden {
    transform: translateY(-100%);
}

.nav-logo {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--warm-800);
    text-decoration: none;
    font-style: italic;
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.nav-links a {
    font-size: 0.875rem;
    color: var(--warm-500);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--warm-800);
}

.nav-contact {
    padding: var(--space-xs) var(--space-md);
    background: transparent;
    color: var(--sun-600) !important;
    border-radius: 0;
}

.nav-contact:hover {
    color: var(--sun-700) !important;
}


/* ---------- Hero ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-3xl) var(--space-lg) var(--space-xl);
    position: relative;
}

.hero-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero-content {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--space-lg);
    padding: var(--space-xl);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

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

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--space-lg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-intro {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--sun-700);
    margin-bottom: var(--space-md);
    font-weight: 500;
}

.hero h1 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1;
    margin-bottom: var(--space-lg);
}

.hero-name {
    display: block;
    font-size: clamp(4rem, 12vw, 9rem);
    color: var(--warm-800);
    letter-spacing: -0.03em;
}

.hero-surname {
    display: block;
    font-size: clamp(4rem, 12vw, 9rem);
    font-style: italic;
    background: linear-gradient(135deg, var(--sun-600) 0%, var(--sun-500) 50%, var(--sun-400) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
}

.hero-bio {
    font-size: 1.25rem;
    color: var(--warm-500);
    max-width: 540px;
    margin-bottom: var(--space-lg);
    line-height: 1.8;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: var(--warm-400);
}

.btn-download-float {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(204, 110, 73);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: white;
    text-decoration: none;
    border-radius: 50%;
    box-shadow: 4px 10px 32px rgba(0, 0, 0, 0.623);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    z-index: 99;
}

.btn-download-float:hover {
    transform: translateY(-2px) scale(1.05);
    background: rgba(209, 118, 83, 0.849);
}

.btn-download-float svg {
    width: 24px;
    height: 24px;
}

.hero-meta .separator {
    color: var(--sun-500);
}

.hero-scroll {
    position: absolute;
    bottom: var(--space-xl);
    left: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--warm-400);
}

.scroll-line {
    width: 60px;
    height: 1px;
    background: var(--warm-300);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--sun-500);
    animation: scroll-hint 2s ease-in-out infinite;
}

@keyframes scroll-hint {
    0% {
        left: -100%;
    }

    50% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

/* ---------- Sections ---------- */
.section {
    padding: var(--space-3xl) 0;
}

.section .container {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--space-lg);
    padding: var(--space-xl);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.section-dark {
    background: transparent;
}

.section-dark .container {
    background: rgba(31, 27, 24, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--warm-100);
}

.section-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: var(--space-xl);
}

.section-label {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.label-number {
    display: block;
    font-family: var(--font-serif);
    font-size: 3rem;
    font-style: italic;
    color: var(--sun-500);
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.section-dark .label-number {
    color: var(--sun-400);
}

.label-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--warm-400);
    margin: 0;
    padding: 0;
    font-weight: 500;
}

.section-dark .label-text {
    color: var(--warm-400);
}

/* ---------- About Section ---------- */
.section-content p {
    margin-bottom: var(--space-md);
}

.large-text {
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--warm-600);
}

.large-text em {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--sun-700);
}

.section-dark .large-text {
    color: var(--warm-200);
}

.section-dark .large-text em {
    color: var(--sun-400);
}

.languages {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--warm-200);
}

.language {
    flex: 1;
    min-width: 150px;
}

.lang-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--warm-700);
    margin-bottom: 4px;
}

.lang-level {
    font-size: 0.8rem;
    color: var(--sun-600);
    font-weight: 500;
}

/* ---------- Experience ---------- */
.experience-list {
    display: flex;
    flex-direction: column;
}

.exp-item {
    padding: var(--space-lg) 0;
    padding-left: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    filter: brightness(0.85);
    transition: filter 0.3s linear, padding-left 0.3s linear !important;
}

.exp-item:first-child {
    padding-top: 0;
}

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

.exp-item:hover {
    filter: brightness(1);
    padding-left: var(--space-sm);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--space-xs);
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.exp-item h3 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--warm-100);
    font-style: italic;
}

.exp-date {
    font-size: 0.875rem;
    color: var(--sun-400);
    font-weight: 500;
}

.exp-role {
    font-size: 1rem;
    color: var(--warm-300);
    margin-bottom: var(--space-xs);
}

.exp-desc {
    font-size: 0.9rem;
    color: var(--warm-400);
    max-width: 500px;
}

.exp-badge {
    display: inline-block;
    margin-top: var(--space-sm);
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--sun-500), var(--sun-400));
    color: var(--warm-800);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 100px;
}

/* ---------- Education ---------- */
.edu-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.edu-item {
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--warm-200);
}

.edu-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.edu-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.edu-item h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--warm-700);
    font-style: italic;
}

.edu-status {
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--sun-500), var(--sun-400));
    color: var(--warm-800);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 100px;
}

.edu-date {
    font-size: 0.875rem;
    color: var(--sun-600);
    font-weight: 500;
}

.edu-institution {
    font-size: 1rem;
    color: var(--warm-500);
}

/* ---------- Footer ---------- */
.footer {
    padding: var(--space-3xl) 0 var(--space-xl);
    background: transparent;
}

.footer .container {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--space-lg);
    padding: var(--space-xl);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    padding-bottom: var(--space-2xl);
    border-bottom: 1px solid var(--warm-300);
}

.footer-cta {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--warm-500);
    margin-bottom: var(--space-sm);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
}

.contact-icon {
    color: var(--sun-600);
}

.footer-link {
    font-family: var(--font-serif);
    font-size: clamp(1.2rem, 3.5vw, 2.2rem);
    color: var(--warm-800);
    text-decoration: none;
    font-style: italic;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--sun-600);
}

.footer-location {
    text-align: right;
    font-size: 0.9rem;
    color: var(--warm-500);
    line-height: 1.8;
}

.footer-bottom {
    padding-top: var(--space-lg);
    font-size: 0.8rem;
    color: var(--warm-400);
}

/* ---------- Reveal Animation ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

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

.reveal:nth-child(1) {
    transition-delay: 0s;
}

.reveal:nth-child(2) {
    transition-delay: 0.08s;
}

.reveal:nth-child(3) {
    transition-delay: 0.16s;
}

.reveal:nth-child(4) {
    transition-delay: 0.24s;
}

.reveal:nth-child(5) {
    transition-delay: 0.32s;
}

.reveal:nth-child(6) {
    transition-delay: 0.4s;
}

.reveal:nth-child(7) {
    transition-delay: 0.48s;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .section-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .section-label {
        position: static;
        display: flex;
        align-items: baseline;
        gap: var(--space-sm);
    }

    .label-number {
        font-size: 2rem;
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 16px;
    }

    .nav-links {
        display: flex;
        position: static;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-end;
        align-items: center;
        gap: var(--space-sm);
        background: transparent;
        padding: 0;
        border: none;
        box-shadow: none;
        flex: 1;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links a {
        font-size: 0.75rem;
        color: var(--warm-600);
        font-family: var(--font-sans);
        padding: 0;
        border: none;
        white-space: nowrap;
    }

    .nav-links a:hover {
        color: var(--sun-600);
    }

    .nav-contact {
        color: var(--sun-600) !important;
        padding: 0 !important;
        font-weight: 600;
    }


    .hero {
        padding-top: var(--space-2xl);
    }

    .hero-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image {
        display: none;
    }

    .hero-content {
        max-width: 100%;
    }

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

    .hero-scroll {
        display: none;
    }

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

    .footer-location {
        text-align: left;
    }

    .languages {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-sm);
    }

    .section {
        padding: var(--space-xl) 0;
    }

    .section .container {
        padding: var(--space-md);
        border-radius: var(--space-md);
    }

    .hero-content {
        padding: var(--space-md);
    }

    .hero-name,
    .hero-surname {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

    .hero-bio {
        font-size: 1rem;
    }

    .hero-meta {
        font-size: 0.75rem;
        gap: var(--space-xs);
    }

    .hero-image img {
        max-width: 200px;
    }

    .btn-download-float {
        width: 50px;
        height: 50px;
        bottom: var(--space-md);
        right: var(--space-md);
    }

    .btn-download-float svg {
        width: 20px;
        height: 20px;
    }

    .exp-header,
    .edu-header {
        flex-direction: column;
        gap: var(--space-xs);
    }

    .exp-item h3 {
        font-size: 1.3rem;
    }

    .edu-item h3 {
        font-size: 1.2rem;
    }

    .footer-email {
        font-size: 1.2rem;
    }

    .nav {
        padding: var(--space-sm);
    }

    .nav-logo {
        font-size: 1.5rem;
    }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--warm-100);
}

::-webkit-scrollbar-thumb {
    background: var(--sun-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--sun-500);
}