/* =========================================================================
   VARIABLES & RESET
   ========================================================================= */
:root {
    /* Colors */
    --bg-main: #FDFCF0;     /* Warm off-white / Beige claro */
    --bg-light: #FFFFFF;    /* Pure white */
    --text-main: #1A1A1A;   /* Deep dark */
    --text-muted: #666666;  /* Gray */
    --accent: #B08D5B;      /* Sophisticated gold / brass */
    --accent-dark: #8A6D44;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
    
    /* Layout */
    --container-width: 1100px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-main);
    overflow-x: hidden;
}

ul { list-style: none; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
.bg-light { background-color: var(--bg-light); }
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================================================
   TYPOGRAPHY & GLOBALS
   ========================================================================= */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--text-main);
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.divider {
    height: 3px;
    width: 60px;
    background-color: var(--accent);
    margin: 15px auto 25px;
    border-radius: 2px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 28px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--text-main);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border-color: var(--text-main);
}

.btn-secondary:hover {
    background-color: var(--text-main);
    color: #fff;
    transform: translateY(-3px);
}

/* =========================================================================
   HEADER & NAVIGATION
   ========================================================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(253, 252, 240, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.header.scrolled {
    padding: 10px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -1px;
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

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

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

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

/* =========================================================================
   HERO SECTION
   ========================================================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px; /* Offset nav */
}

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

.subtitle {
    font-size: 1.2rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 10px;
}

.title {
    font-size: 4.5rem;
    margin-bottom: 15px;
    line-height: 1.1;
}

.dynamic-text {
    font-size: 2rem;
    font-family: var(--font-body);
    font-weight: 300;
    margin-bottom: 25px;
    color: var(--text-muted);
}

.typed-text {
    color: var(--accent);
    font-weight: 500;
}

.description {
    font-size: 1.1rem;
    margin-bottom: 40px;
    color: var(--text-muted);
    font-style: italic;
    border-left: 4px solid var(--accent);
    padding-left: 20px;
}

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

.hero-image {
    position: relative;
    padding: 20px;
}

.img-wrapper {
    position: relative;
    z-index: 2;
    border-radius: 20px 100px 20px 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.profile-img {
    width: 100%;
    border-radius: 20px 100px 20px 20px;
    transform: scale(1.05);
    transition: transform 0.8s ease;
}

.img-wrapper:hover .profile-img {
    transform: scale(1);
}

.img-decoration {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100%;
    height: 100%;
    border: 2px dashed var(--accent);
    border-radius: 20px 100px 20px 20px;
    z-index: -1;
}

/* =========================================================================
   ABOUT 
   ========================================================================= */
.about-text {
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.skills-wrapper {
    margin-top: 50px;
    text-align: center;
}

.skills-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.skill-tag {
    background-color: var(--text-main);
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 1px;
    transition: var(--transition);
}

.skill-tag:hover {
    background-color: var(--accent);
    transform: translateY(-3px);
}

/* =========================================================================
   TIMELINE (EXPERIENCE)
   ========================================================================= */
.timeline-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 2px;
    background-color: rgba(0,0,0,0.1);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 50px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 14px;
    top: 5px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--accent);
    border: 3px solid var(--bg-main);
    box-shadow: 0 0 0 4px rgba(176, 141, 91, 0.2);
}

.timeline-content {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.timeline-content:hover {
    transform: translateX(10px);
    border-left-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.timeline-date {
    display: inline-block;
    padding: 5px 15px;
    background-color: rgba(176, 141, 91, 0.1);
    color: var(--accent);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.timeline-role {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.timeline-company {
    font-weight: 600;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-style: italic;
    margin-bottom: 15px;
}

/* =========================================================================
   PORTFOLIO (PROJECTS)
   ========================================================================= */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.portfolio-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.portfolio-img-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.85); /* Dark overlay */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px;
    opacity: 0;
    transition: var(--transition);
    backdrop-filter: blur(3px);
}

.portfolio-item:hover .portfolio-img,
.portfolio-item.touch-hover .portfolio-img {
    transform: scale(1.1);
}

.portfolio-item:hover .portfolio-overlay,
.portfolio-item.touch-hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    color: #fff;
    font-size: 1.5rem;
    transform: translateY(20px);
    transition: var(--transition);
    transition-delay: 0.1s;
}

.portfolio-overlay p {
    color: #eee;
    font-size: 0.9rem;
    margin-bottom: 20px;
    transform: translateY(20px);
    transition: var(--transition);
    transition-delay: 0.2s;
}

.portfolio-link {
    width: 50px;
    height: 50px;
    background-color: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
    transform: translateY(20px);
    transition: var(--transition);
    transition-delay: 0.3s;
}

.portfolio-item:hover h3,
.portfolio-item.touch-hover h3,
.portfolio-item:hover p,
.portfolio-item.touch-hover p,
.portfolio-item:hover .portfolio-link,
.portfolio-item.touch-hover .portfolio-link {
    transform: translateY(0);
}

.portfolio-link:hover {
    background-color: #fff;
    color: var(--accent);
}

/* =========================================================================
   EDUCATION
   ========================================================================= */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.edu-card {
    background: var(--bg-light);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.edu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.edu-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.edu-card:hover::before {
    transform: scaleX(1);
}

.edu-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.edu-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.edu-school {
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 10px;
}

.edu-detail {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 15px;
}

.edu-year {
    display: inline-block;
    padding: 5px 15px;
    background-color: rgba(0,0,0,0.05);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* =========================================================================
   CONTACT
   ========================================================================= */
.contact-wrapper {
    max-width: 600px;
    margin: 0 auto;
    background: var(--text-main);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
    overflow: hidden;
}

.contact-info {
    padding: 40px;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--accent);
    margin-top: 5px;
}

.info-item h4 {
    color: #fff;
    margin-bottom: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
}

.info-item p {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-icon:hover {
    background-color: var(--accent);
    transform: translateY(-3px);
}



/* =========================================================================
   FOOTER
   ========================================================================= */
.footer {
    background-color: var(--text-main);
    color: #fff;
    padding: 30px 0;
    text-align: center;
}

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

.footer p {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}

.scroll-top-btn {
    width: 45px;
    height: 45px;
    background-color: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-top-btn:hover {
    background-color: #fff;
    color: var(--accent);
    transform: translateY(-3px);
}

/* =========================================================================
   RESPONSIVE DESIGN (MOBILE / TABLET)
   ========================================================================= */
@media (max-width: 992px) {
    .title { font-size: 3.5rem; }
    .hero-container { gap: 30px; }
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-toggle { display: block; }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background-color: var(--text-main);
        padding: 80px 30px;
        transition: 0.4s ease;
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    }
    
    .main-nav.active { right: 0; }
    
    .nav-list {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-link { 
        color: #fff; 
        font-size: 1.1rem;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-buttons { justify-content: center; }
    .description { border-left: none; padding-left: 0; }
    
    .img-wrapper { max-width: 400px; margin: 0 auto; }
    
    .timeline-container::before { left: 5px; }
    .timeline-dot { left: -1px; width: 12px; height: 12px; }
    .timeline-item { padding-left: 30px; }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .title { font-size: 2.8rem; }
    .dynamic-text { font-size: 1.5rem; }
    .section { padding: 70px 0; }
    .hero { padding-top: 100px; }
    .contact-info, .contact-form-container { padding: 30px 20px; }
}
