/* =========================================
   1. LOCAL FONTS (GDPR COMPLIANT)
   ========================================= */

/* Instrument Serif */
@font-face {
    font-family: 'Instrument Serif';
    font-style: normal;
    font-weight: 400;
    src: url('fonts/InstrumentSerif-Regular.woff2') format('woff2');
    font-display: swap;
}
@font-face {
    font-family: 'Instrument Serif';
    font-style: italic;
    font-weight: 400;
    src: url('fonts/InstrumentSerif-Italic.woff2') format('woff2');
    font-display: swap;
}

/* Space Grotesk */
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 300;
    src: url('fonts/SpaceGrotesk-Light.woff2') format('woff2');
    font-display: swap;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 500;
    src: url('fonts/SpaceGrotesk-Medium.woff2') format('woff2');
    font-display: swap;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 700;
    src: url('fonts/SpaceGrotesk-Bold.woff2') format('woff2');
    font-display: swap;
}

/* Material Icons (Local) */
@font-face {
  font-family: 'Material Icons';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/MaterialIcons-Regular.woff2') format('woff2'); 
  font-display: block;
}

.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'liga';
}

/* =========================================
   2. GLOBAL VARIABLES & RESET
   ========================================= */
:root {
    --bg-color: #F9F7F2;
    --card-bg: #FFFFFF;
    --text-main: #2A2A2A;
    --text-light: #555555;
    --accent: #D4A373;
    
    --font-serif: 'Instrument Serif', serif;
    --font-grotesk: 'Space Grotesk', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-grotesk);
    padding-top: 100px;
    overflow-x: hidden;
}

/* =========================================
   3. ANIMATIONS
   ========================================= */
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* =========================================
   4. NAVIGATION (STICKY HEADER)
   ========================================= */
.sticky-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(249, 247, 242, 0.98);
    border-bottom: 1px solid #E0DED5;
    z-index: 1000;
    backdrop-filter: blur(5px);
    padding: 15px 0;
}

.header-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.top-nav { display: flex; gap: 25px; }

.top-nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 5px 0;
    position: relative;
}

.top-nav a::after {
    content: '';
    position: absolute;
    width: 0; height: 2px;
    bottom: 0; left: 0;
    background-color: var(--accent);
    transition: width 0.3s;
}
.top-nav a:hover::after { width: 100%; }

.lang-switch a { text-decoration: none; color: #888; margin-left: 10px; font-size: 0.85rem; }
.lang-switch .active { font-weight: bold; color: var(--text-main); border-bottom: 2px solid var(--accent); }

/* --- Mobile Menu Adjustments --- */
@media (max-width: 700px) {
    body { padding-top: 110px; }

    .header-inner {
        flex-direction: column; 
        align-items: center; 
        gap: 5px; 
        padding: 5px 15px;
    }
    
    .lang-switch {
        width: 100%;
        text-align: center;
        font-size: 0.75rem;
        border-bottom: 1px solid #eee;
        padding-bottom: 5px;
        margin-bottom: 5px;
    }

    .top-nav {
        width: 100%;
        justify-content: flex-start;
        gap: 20px;
        overflow-x: auto; /* Horizontal Scroll */
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0;
    }
    .top-nav::-webkit-scrollbar { display: none; }
    
    .top-nav a { font-size: 0.85rem; padding: 5px 0; }
}

/* =========================================
   5. LAYOUT & COMPONENTS
   ========================================= */
.container { max-width: 1000px; margin: 0 auto; padding: 0 20px 50px 20px; width: 100%; }

h1 { font-family: var(--font-serif); font-size: 3rem; margin-bottom: 1rem; font-style: italic; line-height: 1.1; }
h2 { font-family: var(--font-serif); font-size: 2rem; margin-bottom: 1rem; }
h3 { font-family: var(--font-serif); font-size: 1.5rem; margin-bottom: 0.5rem; }
p { line-height: 1.6; margin-bottom: 1rem; }

/* Hero Image */
.hero-img-container {
    width: 100%;
    height: 350px;
    background-color: #E0DED5;
    margin-bottom: 2rem;
    overflow: hidden;
    border-radius: 4px;
}
.hero-img-container img { width: 100%; height: 100%; object-fit: cover; }

/* Human Tiles Grid */
.human-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 3rem 0;
}
@media (max-width: 768px) { .human-grid { grid-template-columns: 1fr; } }

.tile {
    background: var(--card-bg);
    padding: 1.5rem;
    border-top: 3px solid var(--accent);
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.tile small { display: block; color: #888; font-size: 0.7rem; letter-spacing: 1px; margin-bottom: 5px; text-transform: uppercase;}
.tile-content { font-family: var(--font-serif); font-size: 1.2rem; }

/* Skills Accordion (Smooth) */
.skill-item { 
    background: white; margin-bottom: 10px; border: 1px solid #ddd; overflow: hidden; 
}
.skill-header { 
    padding: 15px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; font-weight: 600; 
    transition: background-color 0.2s;
}
.skill-header:hover { background-color: #fafafa; }
.skill-title-group { display: flex; align-items: center; gap: 10px; }
.material-icons { font-size: 20px; color: var(--accent); }

.skill-content { 
    max-height: 0; 
    opacity: 0;
    padding: 0 15px;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, padding 0.5s ease;
    color: #555;
    background: #fafafa;
}
.skill-item.active .skill-content { 
    max-height: 800px; 
    opacity: 1;
    padding: 15px; 
    border-top: 1px solid #eee; 
}

/* --- Personality Tiles (About Page) --- */
.personality-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 3rem 0;
}
@media (max-width: 600px) { .personality-grid { grid-template-columns: 1fr; } }

.pers-tile {
    background: #fff;
    border: 1px solid #E0DED5;
    padding: 1.5rem;
    text-align: center;
    border-radius: 4px;
}

/* 1. Style the Icon explicitly */
.pers-tile .material-icons {
    font-size: 32px;
    color: var(--accent);
    margin-bottom: 10px;
    /* Ensure the global rule doesn't override this */
    text-transform: none !important; 
}

.pers-tile strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

/* 2. Style the Description (BUT ignore the icon) */
.pers-tile span:not(.material-icons) {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block; /* Ensures it sits on its own line */
}

/* CV Grid & Tooltips */
.cv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }

.cv-item { 
    background: white; padding: 20px; border: 1px solid #ddd; position: relative; cursor: help; 
    transition: transform 0.2s, box-shadow 0.2s, z-index 0s;
    z-index: 1;
}
.cv-item:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); z-index: 10; }

.cv-tooltip { 
    position: absolute; left: 0; right: 0; top: 100%; margin-top: -5px;
    background: white; padding: 15px; border: 1px solid #ddd; border-top: 3px solid var(--accent);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); font-size: 0.9rem; color: #555; 
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); pointer-events: none;
}
.cv-item:hover .cv-tooltip { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }

/* Gallery */
.gallery-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 2rem;
}
.gallery-item { aspect-ratio: 1/1; background-color: #eee; overflow: hidden; border-radius: 4px; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.05); }

/* Footer */
footer a { color: inherit; text-decoration: none; }
footer a:hover { text-decoration: underline; }