/* ----------------------------------------------------
   PREMIUM PORTFOLIO DESIGN SYSTEM
   Dr. Roilhi Ibarra - Portfolio Redesign
   ---------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* Fonts */
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9F9F9;
    --bg-tertiary: #F3F3F3;
    
    --text-primary: #191919;
    --text-secondary: #595959;
    --text-muted: #8E8E8E;
    
    --accent: #A09880; /* Earthy muted gold */
    --accent-hover: #807860;
    --accent-light: rgba(160, 152, 128, 0.1); /* 10% opacity gold */
    
    --border-color: #E8E8E8;
    --card-bg: #FFFFFF;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.08);

    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-quick: all 0.2s ease;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.3;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition-quick);
}

a:hover {
    color: var(--accent-hover);
}

ul {
    list-style-position: inside;
}

/* ----------------------------------------------------
   HEADER & STICKY NAVIGATION
   ---------------------------------------------------- */
.horizontal-menu-box {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 40px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.horizontal-menu {
    width: 100%;
}

.horizontal-menu ul {
    list-style-type: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.horizontal-menu li {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
    position: relative;
    padding: 8px 0;
}

.horizontal-menu a {
    color: var(--text-secondary);
    text-transform: uppercase;
}

.horizontal-menu a:hover,
.horizontal-menu li.active a,
.horizontal-menu li.active {
    color: var(--accent) !important;
}

/* Underline Animation */
.horizontal-menu li::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: var(--transition-quick);
}

.horizontal-menu li:hover::after,
.horizontal-menu li.active::after {
    width: 100%;
}

/* Language Switcher */
.slider-container {
    display: flex;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    gap: 8px;
    white-space: nowrap;
}

.switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    border-radius: 20px;
    transition: var(--transition-quick);
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: var(--transition-quick);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

input:checked + .slider {
    background-color: var(--accent);
}

input:checked + .slider:before {
    transform: translateX(18px);
}

/* ----------------------------------------------------
   HOME / HERO SECTION
   ---------------------------------------------------- */
.background-container {
    background-color: var(--bg-secondary);
    min-height: calc(85vh - 70px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 10%;
    position: relative;
}

/* Modern Two Column Hero layout (when we update index.html) */
.hero-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    width: 100%;
    max-width: 1200px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
    animation: rotateSlow 20s linear infinite;
}

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

.hero-content h1 {
    font-size: 52px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.hero-content .subtitle {
    font-size: 20px;
    color: var(--accent);
    font-family: var(--font-heading);
    font-weight: 600;
    margin-bottom: 16px;
}

.hero-content .description {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 500px;
}

/* Profile Picture Frame Effect */
.prof-pic-container {
    position: relative;
    width: 320px;
    height: 320px;
    justify-self: center;
}

.prof-pic-frame {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent);
    border-radius: 24px;
    z-index: 1;
    transition: var(--transition-smooth);
}

.prof-pic-container:hover .prof-pic-frame {
    transform: translate(-8px, -8px);
    background-color: var(--accent-light);
}

.badge_image {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    border: 4px solid var(--bg-primary);
    box-shadow: var(--shadow-md);
    z-index: 2;
    transition: var(--transition-smooth);
}

.prof-pic-container:hover .badge_image {
    transform: translate(4px, 4px);
}

/* Social Icons */
.background-container ul,
.social-icons-list {
    list-style-type: none;
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.icon-container {
    width: 44px;
    height: 44px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.icon-container:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.icon {
    width: 20px;
    height: 20px;
    transition: var(--transition-quick);
}

.icon-container:hover .icon {
    filter: sepia(50%) saturate(1000%) hue-rotate(10deg); /* shift icon to goldish tint if black */
}

/* ----------------------------------------------------
   CONTAINERS & LAYOUT UTILITIES
   ---------------------------------------------------- */
.content-container,
.bio-container {
    max-width: 1100px;
    margin: 60px auto;
    padding: 0 40px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
}

@media screen and (max-width: 900px) {
    .grid-2, .grid-3, .hero-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .background-container {
        padding: 40px 20px;
    }
    .horizontal-menu-box {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }
}

/* ----------------------------------------------------
   TIMELINE (For Biography)
   ---------------------------------------------------- */
.timeline {
    position: relative;
    margin: 40px 0;
    padding-left: 30px;
    border-left: 2px solid var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -37px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--accent);
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 3px var(--accent-light);
    transition: var(--transition-quick);
}

.timeline-item:hover::before {
    background-color: var(--accent-hover);
    transform: scale(1.2);
}

.timeline-date {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 5px;
}

.timeline-title {
    font-size: 18px;
    margin-bottom: 5px;
}

.timeline-institution {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* ----------------------------------------------------
   CARDS (For Students, Projects, Courses)
   ---------------------------------------------------- */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.card .institution {
    font-weight: 600;
    color: var(--accent);
    font-size: 13px;
    margin-bottom: 8px;
}

/* ----------------------------------------------------
   TAGS & BADGES
   ---------------------------------------------------- */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.tag {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: var(--transition-quick);
}

.tag-accent {
    background-color: var(--accent-light);
    border: 1px solid rgba(160, 152, 128, 0.2);
    color: var(--accent-hover);
}

.tag:hover {
    background-color: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* ----------------------------------------------------
   BUTTONS
   ---------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 30px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    gap: 8px;
}

.btn-primary {
    background-color: var(--accent);
    color: white !important;
    box-shadow: 0 4px 12px rgba(160, 152, 128, 0.2);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(160, 152, 128, 0.3);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--accent);
    color: var(--accent) !important;
}

.btn-secondary:hover {
    background-color: var(--accent-light);
    transform: translateY(-2px);
}

/* Original numerical methods button override */
.button-6 {
    background: none;
    border: none;
    padding: 0;
}

/* ----------------------------------------------------
   PUBLICATIONS (For Research)
   ---------------------------------------------------- */
.section-title {
    font-size: 28px;
    margin-bottom: 25px;
    border-left: 4px solid var(--accent);
    padding-left: 15px;
}

.thesis-co-supervisor {
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0 0 18px 0;
    padding-left: 15px;
    border-left: 3px solid var(--accent);
}

.publication-list {
    list-style-type: none;
    margin: 20px 0 40px 0;
}

.publication-item {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-quick);
    position: relative;
    border-radius: 8px;
}

.publication-item:hover {
    background-color: var(--bg-secondary);
}

.pub-category {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 0.1em;
    margin-bottom: 6px;
    display: inline-block;
}

.publication-item h4 {
    font-size: 16px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.publication-item h4 a {
    color: var(--text-primary);
}

.publication-item h4 a:hover {
    color: var(--accent);
}

.pub-authors {
    font-size: 14px;
    color: var(--text-secondary);
}

.pub-meta {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 4px;
}

/* ----------------------------------------------------
   STUDY MATERIALS TABLE (For Course)
   ---------------------------------------------------- */
.table-responsive {
    overflow-x: auto;
    margin: 30px 0;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

table.study-materials {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

table.study-materials th {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 16px 20px;
    border-bottom: 2px solid var(--border-color);
    text-align: left;
}

table.study-materials td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition-quick);
}

table.study-materials tr:last-child td {
    border-bottom: none;
}

table.study-materials tr:hover td {
    background-color: var(--bg-secondary);
}

/* Pill styling inside tables */
.pill-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background-color: var(--accent-light);
    color: var(--accent-hover) !important;
    border: 1px solid rgba(160, 152, 128, 0.2);
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    transition: var(--transition-quick);
    margin-right: 5px;
    margin-bottom: 5px;
}

.pill-link:hover {
    background-color: var(--accent);
    color: white !important;
    transform: translateY(-1px);
}

.pill-link-video {
    background-color: rgba(220, 53, 69, 0.08);
    color: #dc3545 !important;
    border-color: rgba(220, 53, 69, 0.15);
}

.pill-link-video:hover {
    background-color: #dc3545;
    color: white !important;
    border-color: #dc3545;
}

/* ----------------------------------------------------
   FOOTER
   ---------------------------------------------------- */
footer {
    padding: 40px 20px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}
