/* ============================================
   VARIABLES JAPANDI
   ============================================ */
:root {
    --bg-primary: #FAF8F5;
    --bg-secondary: #F3F0EB;
    --bg-card: #FFFFFF;
    --text-primary: #2C2C2C;
    --text-secondary: #5A5A5A;
    --text-muted: #8A8A8A;
    --text-light: #B0A89E;
    --accent: #A89585;
    --accent-light: #C4B5A5;
    --accent-dark: #7A6B5D;
    --accent-hover: #968575;
    --border: #E8E2DA;
    --border-light: #F0EBE4;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.06);
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s ease;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   PAGE WRAPPER
   ============================================ */
.page-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-xl);
}

/* ============================================
   HEADER
   ============================================ */
.header {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl) var(--space-2xl);
    margin-bottom: var(--space-2xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-light), var(--accent), var(--accent-light), transparent);
    opacity: 0.6;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

.photo-container {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--border);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.photo-container:hover {
    border-color: var(--accent-light);
    box-shadow: var(--shadow-lg);
    transform: scale(1.02);
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.name {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.title {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--accent-dark);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tagline {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-style: italic;
    color: var(--text-muted);
    font-weight: 300;
}

/* ============================================
   CV SECTIONS
   ============================================ */
.cv-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.cv-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.cv-section:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border);
}

.section-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    padding: 0 var(--space-sm);
    letter-spacing: 0.02em;
}

.section-content {
    padding: 0 var(--space-sm);
}

/* ============================================
   INFO GRID
   ============================================ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    transition: var(--transition);
}

.info-item:hover {
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
}

.info-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.info-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 400;
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
    position: relative;
    padding-left: var(--space-xl);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--accent-light), var(--accent), var(--accent-light), transparent);
}

.timeline-item {
    position: relative;
    padding-bottom: var(--space-xl);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-date {
    position: absolute;
    left: calc(-1 * var(--space-xl) + 6px);
    top: 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.date-period {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-dark);
    background: var(--bg-secondary);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.date-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg-card);
    box-shadow: 0 0 0 1px var(--accent-light);
    flex-shrink: 0;
}

.timeline-content {
    padding-top: var(--space-sm);
}

.job-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.job-company {
    font-size: 0.9rem;
    color: var(--accent-dark);
    font-weight: 500;
    margin-bottom: var(--space-sm);
    letter-spacing: 0.02em;
}

.job-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-sm);
}

.job-achievements {
    list-style: none;
    padding: 0;
}

.job-achievements li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: var(--space-xs) 0;
    padding-left: var(--space-md);
    position: relative;
}

.job-achievements li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--accent-light);
}

/* ============================================
   SKILLS
   ============================================ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
}

.skill-category {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.skill-category-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-primary);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-light);
}

.skill-bars {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.skill-bar {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.skill-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skill-name {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.skill-level {
    font-size: 0.75rem;
    color: var(--accent-dark);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.bar-container {
    width: 100%;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-light), var(--accent));
    border-radius: 2px;
    transition: width 1s ease;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.tag {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: var(--space-xs) var(--space-md);
    border-radius: 20px;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.tag:hover {
    background: var(--bg-primary);
    border-color: var(--accent-light);
    color: var(--accent-dark);
}

/* ============================================
   CERTIFICATIONS
   ============================================ */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-md);
}

.cert-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.cert-item:hover {
    background: var(--bg-primary);
    border-color: var(--accent-light);
    box-shadow: var(--shadow-sm);
}

.cert-name {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.cert-year {
    font-size: 0.75rem;
    color: var(--accent-dark);
    font-weight: 400;
}

/* ============================================
   PROJECTS
   ============================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-lg);
}

.project-card {
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.project-card:hover {
    background: var(--bg-primary);
    border-color: var(--accent-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.project-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.project-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.project-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-sm);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.tech-tag {
    font-size: 0.7rem;
    color: var(--accent-dark);
    background: var(--bg-primary);
    padding: var(--space-xs) var(--space-sm);
    border-radius: 4px;
    border: 1px solid var(--border-light);
}

/* ============================================
   INTERESTS
   ============================================ */
.interests-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.interest-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.interest-item:hover {
    background: var(--bg-primary);
    border-color: var(--accent-light);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.interest-icon {
    font-size: 1.2rem;
}

.interest-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ============================================
   PARAGRAPHS
   ============================================ */
.paragraph {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.paragraph:last-child {
    margin-bottom: 0;
}

/* ============================================
   SOCIAL BUTTONS
   ============================================ */
.social-section {
    margin-top: var(--space-3xl);
    padding: var(--space-2xl);
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.social-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--space-xl);
    letter-spacing: 0.02em;
}

.buttons-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.buttons-row:last-child {
    margin-bottom: 0;
}

/* Social buttons con icono */
.social-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.social-btn:hover {
    background: var(--bg-primary);
    border-color: var(--accent-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    color: var(--accent-dark);
}

.social-btn:active {
    transform: translateY(-1px);
}

.btn-icon {
    width: 32px;
    height: 32px;
    fill: currentColor;
    transition: var(--transition);
}

.social-btn:hover .btn-icon {
    fill: var(--accent);
}

.btn-label {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Text buttons */
.text-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.text-btn:hover {
    background: var(--bg-primary);
    border-color: var(--accent-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    color: var(--accent-dark);
}

.text-btn:active {
    transform: translateY(-1px);
}

.btn-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.08em;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    text-align: center;
    padding: var(--space-2xl) 0;
    margin-top: var(--space-xl);
}

.footer-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: var(--space-sm);
}

.footer-zen {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--accent-light);
    font-style: italic;
    letter-spacing: 0.1em;
}

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rippleEffect {
    to {
        transform: scale(2);
        opacity: 0;
    }
}

.cv-section {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.cv-section:nth-child(1) { animation-delay: 0.05s; }
.cv-section:nth-child(2) { animation-delay: 0.1s; }
.cv-section:nth-child(3) { animation-delay: 0.15s; }
.cv-section:nth-child(4) { animation-delay: 0.2s; }
.cv-section:nth-child(5) { animation-delay: 0.25s; }
.cv-section:nth-child(6) { animation-delay: 0.3s; }
.cv-section:nth-child(7) { animation-delay: 0.35s; }
.cv-section:nth-child(8) { animation-delay: 0.4s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .page-wrapper {
        padding: var(--space-md);
    }
    .header {
        padding: var(--space-xl) var(--space-lg);
    }
    .name {
        font-size: 2.2rem;
    }
    .photo-container {
        width: 110px;
        height: 110px;
    }
    .cv-section {
        padding: var(--space-lg);
    }
    .buttons-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .info-grid {
        grid-template-columns: 1fr;
    }
    .skills-grid {
        grid-template-columns: 1fr;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .certifications-grid {
        grid-template-columns: 1fr;
    }
    .timeline {
        padding-left: var(--space-lg);
    }
}

@media (max-width: 480px) {
    .name {
        font-size: 1.8rem;
    }
    .title {
        font-size: 0.9rem;
    }
    .buttons-row {
        grid-template-columns: 1fr;
    }
    .social-btn,
    .text-btn {
        padding: var(--space-md);
    }
    .section-title {
        font-size: 1.3rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    body {
        background: white;
    }
    .page-wrapper {
        max-width: 100%;
        padding: 0;
    }
    .cv-section {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    .social-section {
        display: none;
    }
    .cv-section {
        animation: none;
        opacity: 1;
    }
}
