/* 
    Styles for Personal Website
    Minimalist, Apple-level design, white/light background, clean typography.
*/

:root {
    --bg-color: #fafdff; /* Very slight cool off-white */
    --bg-offset: #ebedf0; /* Slightly darker for section contrast */
    --bg-dark: #12151c; /* Almost black for vision section */
    --text-primary: #1a1a1e;
    --text-secondary: #5e646d;
    --text-light: #e5e7eb;
    --accent: #C5A059; /* Subtle Masonic Gold accent */
    --border-subtle: rgba(0,0,0,0.05);
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    
    --spacing-section: 120px 0;
    --spacing-container: 0 5%;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--text-primary);
}

.eyebrow {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.lead-text {
    font-size: 1.25rem;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

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

.section-spacing {
    padding: var(--spacing-section);
}

.bg-offset {
    background-color: var(--bg-offset);
}

.bg-dark {
    background-color: var(--bg-dark);
    color: var(--text-light);
}
.bg-dark h2 {
    color: #fff;
}
.bg-dark blockquote {
    color: #fff;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}
.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-top: -2rem;
    margin-bottom: 4rem;
}

.bg-white {
    background-color: #fff;
}

/* Subtle Sacred Geo Background Layer */
.sacred-geo-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.7;
}
/* Mosaic Pavement (checkerboard perspective) at the bottom */
.sacred-geo-bg::before {
    content: '';
    position: absolute;
    bottom: -20vh;
    left: 50%;
    transform: translateX(-50%) perspective(600px) rotateX(80deg);
    width: 200vw;
    height: 150vh;
    background-image: 
        linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
}
/* Subtle overlapping arcs resembling the compass */
.sacred-geo-bg::after {
    content: '';
    position: absolute;
    top: -20vh;
    left: 50%;
    transform: translateX(-50%);
    width: 1200px;
    height: 1200px;
    border-radius: 50%;
    border: 1px solid rgba(197, 160, 89, 0.08); /* Gold accent subtle */
    box-shadow: 
        0 0 0 150px rgba(0,0,0,0.01),
        inset 0 0 0 150px rgba(0,0,0,0.01),
        inset 0 0 0 300px rgba(197, 160, 89, 0.03);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(250, 253, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-primary-small {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.btn-primary-small {
    padding: 0.5rem 1.2rem;
    background: var(--text-primary);
    color: #fff !important;
    font-size: 0.85rem;
}

.btn-primary {
    background: var(--text-primary);
    color: #fff;
    box-shadow: 0 4px 14px 0 rgba(0,0,0,0.1);
}

.btn-primary:hover, .btn-primary-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    background: #000;
}

.btn-secondary {
    background: #fff;
    color: var(--text-primary);
    border: 1px solid rgba(0,0,0,0.1);
}

.btn-secondary:hover {
    border-color: rgba(0,0,0,0.3);
    background: var(--bg-offset);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px; 
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 2rem;
    line-height: 1.05;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    max-width: 90%;
}

.hero-image-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: var(--bg-offset);
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5; /* Professional portrait ratio */
}

#profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-image-wrapper:hover #profile-img {
    transform: scale(1.05);
}

.hero-image-placeholder {
    width: 100%;
    height: auto;
}

.hero-image-placeholder img {
    max-width: 100%;
    width: 100%;
    height: auto !important;
    display: block;
    object-fit: contain;
    image-orientation: from-image; /* Respeta los metadatos EXIF si fue tomada en vertical */
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-image-wrapper:hover .hero-image-placeholder img {
    transform: scale(1.05);
}

.hero-image-wrapper::after {
    /* Geometric frame detail */
    content: '';
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 12px;
    pointer-events: none;
}

/* Bio / Who I Am */
.bio-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}
.bio-header {
    position: sticky;
    top: 100px;
}
.bio-text {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}
.bio-text p {
    margin: 0;
}

@media (max-width: 992px) {
    .bio-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .bio-header {
        position: relative;
        top: 0;
    }
}

/* About / Research */
.research-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.research-pillars {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.pillar-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 32px rgba(0,0,0,0.03);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.pillar-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.08);
}

.pillar-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

/* SafeSchool */
.framework-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.framework-list {
    list-style: none;
    margin-top: 2rem;
}

.framework-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.framework-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--text-primary);
}

.framework-list strong {
    color: var(--text-primary);
}

.abstract-shape {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
    opacity: 0.1;
}

.abstract-shape svg {
    width: 60%;
    height: 60%;
    animation: slowSpin 60s linear infinite;
}

@keyframes slowSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

.blog-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 32px rgba(0,0,0,0.03);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.08);
}

.category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
}

.post-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.view-all {
    text-align: center;
}

/* Ventures */
.ventures-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.venture-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 32px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    text-decoration: none;
    color: inherit;
}

.venture-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.06);
}

.venture-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    transition: all 0.4s ease;
}

.venture-card:hover .venture-icon {
    color: var(--accent);
    transform: scale(1.1);
}

.venture-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.venture-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* Vision */
.vision-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.vision blockquote {
    font-size: 2.5rem;
    line-height: 1.2;
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 3rem;
}
.vision p {
    font-size: 1.25rem;
}

/* Contact */
.contact-desc {
    font-size: 1.5rem;
    max-width: 600px;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.contact-links {
    display: flex;
    gap: 1rem;
}

/* Footer */
footer {
    padding: 3rem 5%;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-small {
    font-size: 0.85rem;
    margin: 0;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
    .hero-content, .research-grid, .framework-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .hero-title { font-size: 3rem; }
    .hero-image-wrapper { max-width: 500px; margin: 0 auto; }
}

@media (max-width: 768px) {
    .nav-links { display: none; } /* Simplified mobile for now */
    .blog-grid, .ventures-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 2.5rem; }
    .vision blockquote { font-size: 1.8rem; }
}
