/* Avermex Research Division - Professional Research Website Styles */
/* Author: Francisco Molina-Burgos */

:root {
    /* Color Palette - Professional Academic */
    --primary-dark: #0a1628;
    --primary-mid: #1a2744;
    --primary-light: #2a3f5f;
    --accent-gold: #c9a227;
    --accent-gold-light: #e6c65c;
    --accent-blue: #4a90d9;
    --accent-cyan: #00b4d8;
    --text-primary: #e8e8e8;
    --text-secondary: #a0a0a0;
    --text-muted: #6c6c6c;
    --surface: #12203a;
    --surface-elevated: #1a2d4d;
    --border: #2a4060;

    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Source Code Pro', 'Fira Code', monospace;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    --space-xxl: 8rem;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--primary-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

a {
    color: var(--accent-gold);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-gold-light);
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

section {
    padding: var(--space-xxl) 0;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: var(--space-md) 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.nav-brand img {
    height: 40px;
    width: auto;
}

.nav-brand span {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: var(--space-sm) 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: width var(--transition-normal);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-background {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(74, 144, 217, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(201, 162, 39, 0.08) 0%, transparent 50%),
        linear-gradient(180deg, var(--primary-dark) 0%, var(--primary-mid) 100%);
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(74, 144, 217, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 144, 217, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: var(--space-lg);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text .tagline {
    font-size: 1.5rem;
    color: var(--accent-gold);
    font-style: italic;
    margin-bottom: var(--space-lg);
}

.hero-text .description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hexagon-container {
    position: relative;
    width: 400px;
    height: 400px;
}

.hexagon {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: rotate 60s linear infinite;
}

.hexagon svg {
    width: 100%;
    height: 100%;
}

.hexagon-inner {
    animation: pulse 4s ease-in-out infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-header h2 {
    position: relative;
    display: inline-block;
    padding-bottom: var(--space-md);
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-blue));
}

.section-header p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: var(--space-md) auto 0;
}

/* Research Areas Grid */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.research-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: var(--space-lg);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.research-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-blue));
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.research-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-gold);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.research-card:hover::before {
    opacity: 1;
}

.research-card .icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.research-card h3 {
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.research-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Publications Section */
#publications {
    background: var(--primary-mid);
}

.publications-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.publication-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: var(--space-lg);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--space-lg);
    align-items: start;
    transition: all var(--transition-normal);
}

.publication-card:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.publication-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-gold);
    opacity: 0.5;
    line-height: 1;
}

.publication-content h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.publication-content .abstract {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.publication-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-gold);
    color: var(--primary-dark);
}

.btn-primary:hover {
    background: var(--accent-gold-light);
    color: var(--primary-dark);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* Equations Section */
.equations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-lg);
}

.equation-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: var(--space-lg);
    text-align: center;
}

.equation-card h4 {
    color: var(--accent-gold);
    margin-bottom: var(--space-md);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.equation-box {
    background: var(--primary-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--text-primary);
    overflow-x: auto;
}

.equation-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* About Section */
#about {
    background: var(--primary-mid);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-xl);
    align-items: start;
}

.about-image {
    text-align: center;
}

.about-avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    font-size: 4rem;
    color: var(--primary-dark);
}

.about-image h3 {
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.about-image p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.about-text h2 {
    margin-bottom: var(--space-lg);
}

.about-text p {
    margin-bottom: var(--space-md);
    text-align: justify;
}

.credentials {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.credential {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--surface);
    padding: var(--space-sm) var(--space-md);
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 0.9rem;
}

.credential-icon {
    color: var(--accent-gold);
}

/* Contact Section */
.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.contact-item:hover {
    border-color: var(--accent-gold);
}

.contact-item .icon {
    font-size: 1.5rem;
    color: var(--accent-gold);
}

/* Footer */
.footer {
    background: var(--primary-dark);
    border-top: 1px solid var(--border);
    padding: var(--space-xl) 0 var(--space-lg);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.footer-brand img {
    height: 30px;
}

.footer-brand span {
    font-family: var(--font-display);
    font-weight: 600;
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--accent-gold);
}

.footer-bottom {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text .description {
        margin: 0 auto;
    }

    .hexagon-container {
        width: 300px;
        height: 300px;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-image {
        margin-bottom: var(--space-lg);
    }

    .publication-card {
        grid-template-columns: 1fr;
    }

    .publication-number {
        font-size: 2rem;
    }

    .publication-actions {
        flex-direction: row;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .nav-links {
        display: none;
    }

    h1 {
        font-size: 2.5rem;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    section {
        padding: var(--space-xl) 0;
    }

    .footer-content {
        flex-direction: column;
        gap: var(--space-lg);
    }
}

/* Print Styles */
@media print {
    .nav, .footer {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .hero {
        min-height: auto;
        padding: var(--space-lg) 0;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus states */
a:focus, button:focus {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: var(--accent-gold);
    color: var(--primary-dark);
}
