/**
 * CV Website Styles
 * cv.mikki.tech
 *
 * Color scheme: Navy/Magenta with dark glassmorphism
 */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --primary: navy;
    --secondary: magenta;
    --light: #ecf0f1;
    --dark: navy;
    --bg-dark: #121212;
    --bg-card: #1e1e1e;
    --text-primary: #f0f0f0;
    --text-secondary: #d0d0d0;
    --transition: all 0.3s ease;
    --border-radius: 10px;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* ============================================
   Reset & Base
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

/* Desktop: make room for chat sidebar */
@media (min-width: 1025px) {
    body {
        margin-right: 320px;
    }
}

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

a:hover {
    color: var(--light);
    text-decoration: underline;
}

/* ============================================
   Video Background
   ============================================ */
#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.3;
}

/* ============================================
   Layout
   ============================================ */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.cv-content {
    padding: 60px 0;
}

/* ============================================
   Glass Card Component
   ============================================ */
.glass-card {
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 40px;
    margin-bottom: 40px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* Gradient underline on hover */
.glass-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.glass-card:hover::after {
    transform: scaleX(1);
}

/* ============================================
   Header & Navigation
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 320px;
    z-index: 100;
    background: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 1024px) {
    .site-header {
        right: 0;
    }
}

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

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: var(--text-primary);
    font-weight: 500;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
    text-decoration: none;
}

.language-switcher {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
    border-radius: 20px;
}

.lang-btn {
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.lang-btn.active {
    background: var(--secondary);
    color: white;
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    padding-top: 100px;
    text-align: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.profile-container {
    position: relative;
    width: 150px;
    height: 150px;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid var(--secondary);
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.moray-bubble {
    position: absolute;
    bottom: -15px;
    right: -35px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--secondary);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    cursor: pointer;
    background-color: #2c3e50;
}

.moray-bubble:hover {
    transform: scale(1.2) rotate(15deg);
}

.moray-bubble img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-text h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-text .subtitle {
    font-size: 1.4rem;
    color: var(--text-secondary);
}

/* ============================================
   Section Titles
   ============================================ */
.glass-card h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #444;
    color: var(--text-primary);
}

.glass-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 10px;
}

/* ============================================
   About & Personal Sections
   ============================================ */
.about-section p,
.personal-section p {
    margin-bottom: 1em;
    color: var(--text-secondary);
}

.personal-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.personal-text {
    flex: 1;
}

.moray-container {
    flex-shrink: 0;
}

.moray-image {
    width: 120px;
    height: auto;
    border-radius: 50%;
    border: 3px solid var(--secondary);
    transition: transform 0.3s ease;
}

.moray-image:hover {
    transform: scale(1.1) rotate(10deg);
}

/* ============================================
   Experience Section (Timeline)
   ============================================ */
.jobs-list {
    position: relative;
    padding-left: 40px;
}

.jobs-list::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background-color: var(--secondary);
    border-radius: 3px;
}

.job-item {
    position: relative;
    padding-bottom: 30px;
    margin-bottom: 20px;
}

.job-item:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Timeline dot */
.job-item::before {
    content: '';
    position: absolute;
    left: -44px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--bg-dark);
    border: 4px solid var(--secondary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.job-item:hover::before {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
}

.job-header {
    margin-bottom: 15px;
}

.job-period {
    display: inline-block;
    background-color: var(--secondary);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.job-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.job-company {
    color: var(--secondary);
    font-size: 1rem;
}

.job-description {
    list-style: none;
    padding-left: 0;
}

.job-description li {
    color: var(--text-secondary);
    padding-left: 20px;
    position: relative;
    margin-bottom: 8px;
}

.job-description li::before {
    content: '\2022';
    color: var(--secondary);
    position: absolute;
    left: 0;
}

/* ============================================
   Education Section
   ============================================ */
.schools-list {
    display: grid;
    gap: 20px;
}

.school-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--secondary);
}

.school-header {
    margin-bottom: 10px;
}

.school-date {
    display: inline-block;
    background-color: var(--secondary);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.school-name {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0;
}

.school-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ============================================
   Skills Section
   ============================================ */
.skills-graph-container {
    width: 100%;
    height: 600px;
    background: radial-gradient(circle at center, #1a1a1a 0%, #0f0f0f 100%);
    border-radius: var(--border-radius);
    border: 1px solid #333;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

.network-node {
    cursor: pointer;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.6));
    transition: all 0.3s ease;
}

.network-node:hover {
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.9));
}

.network-link {
    stroke-opacity: 0.4;
    stroke-width: 2px;
    transition: all 0.3s ease;
}

.network-link.highlighted {
    stroke-opacity: 0.9;
    stroke-width: 4px;
}

.node-label {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 11px;
    font-weight: 600;
    fill: #f0f0f0;
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.main-topic-label {
    font-size: 16px;
    font-weight: 800;
    fill: var(--secondary);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.sub-topic-label {
    font-size: 13px;
    font-weight: 700;
    fill: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.9);
}

.detail-label {
    font-size: 10px;
    font-weight: 600;
    fill: #f8f9fa;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

.bridge-label {
    font-size: 14px;
    font-weight: 700;
    fill: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.9);
}

.skills-hint {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 15px;
    font-style: italic;
}

/* ============================================
   Other Section (Languages & Certs)
   ============================================ */
.other-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.other-column h3 {
    margin-bottom: 15px;
}

.language-list,
.cert-list {
    list-style: none;
}

.language-list li,
.cert-list li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    color: var(--text-secondary);
}

.language-list li::before,
.cert-list li::before {
    content: '\2713';
    color: var(--secondary);
    position: absolute;
    left: 0;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: linear-gradient(45deg, rgba(0, 0, 128, 0.9), rgba(128, 0, 128, 0.8));
    padding: 40px 20px;
    text-align: center;
    margin-top: 40px;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    margin-bottom: 15px;
}

.contact-link {
    color: white;
    margin: 0 5px;
}

.separator {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 10px;
}

.location {
    color: rgba(255, 255, 255, 0.9);
}

.social-links {
    margin-bottom: 20px;
}

.social-link {
    display: inline-block;
    color: white;
    padding: 8px 16px;
    margin: 0 5px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    transition: var(--transition);
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    text-decoration: none;
}

.fun-fact {
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
}

.chat-invite {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.easter-egg-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.easter-egg-btn:hover {
    background-color: #c0392b;
    transform: scale(1.05);
}

.easter-egg-btn.pressed {
    background-color: #2c3e50;
}

/* ============================================
   Access Gate
   ============================================ */
.access-gate {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 100;
}

.access-card {
    max-width: 450px;
    width: 100%;
    text-align: center;
}

.access-card h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.access-card .subtitle {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.access-form h2 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    border-bottom: none;
    padding-bottom: 0;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

.form-group input:focus {
    outline: 2px solid var(--secondary);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.skip-link {
    display: block;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.skip-link:hover {
    color: var(--text-primary);
}

.error-message {
    color: #ff6b6b;
    margin-bottom: 15px;
}

/* ============================================
   Chat Sidebar
   ============================================ */
.chat-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh;
    background: linear-gradient(135deg, rgba(0, 0, 128, 0.95), rgba(128, 0, 128, 0.95));
    backdrop-filter: blur(10px);
    border-left: 2px solid var(--secondary);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

.chat-toggle {
    display: none;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-weight: 600;
}

.chat-close {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.chat-widget-container {
    flex: 1;
    overflow: hidden;
}

/* Mobile floating action button */
.chat-fab {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: rgba(192, 57, 42, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.chat-fab:hover {
    transform: scale(1.1);
    background: rgba(192, 57, 42, 1);
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 1024px) {
    body {
        margin-right: 0;
        padding-bottom: 100px;
    }

    .chat-sidebar {
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        right: 0;
        width: 100%;
        height: 70vh;
        border-left: none;
        border-top: 2px solid var(--secondary);
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }

    .chat-sidebar.open {
        transform: translateY(0);
    }

    .chat-close {
        display: block;
    }

    .chat-fab {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        gap: 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    .main-container {
        padding: 0 15px;
    }

    .glass-card {
        padding: 25px 15px;
    }

    .glass-card h2 {
        font-size: 1.3rem;
    }

    .hero-text h1 {
        font-size: 1.8rem;
    }

    .hero-text .subtitle {
        font-size: 1rem;
    }

    .hero-section {
        padding-top: 80px;
    }

    /* Simplified timeline for mobile */
    .jobs-list {
        padding-left: 0;
    }

    .jobs-list::before,
    .job-item::before {
        display: none;
    }

    .job-item {
        border-bottom: 1px solid #333;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }

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

    .personal-content {
        flex-direction: column;
        align-items: center;
    }

    .moray-image {
        width: 100px;
    }

    /* Hide full nav on small screens */
    .nav-links {
        display: none;
    }

    .main-nav {
        justify-content: flex-end;
    }

    /* Skills graph on mobile */
    .skills-graph-container {
        height: 450px;
    }
    .main-topic-label { font-size: 11px; }
    .sub-topic-label { font-size: 9px; }
    .detail-label { font-size: 7px; }
    .bridge-label { font-size: 10px; }
}

/* ============================================
   Animations
   ============================================ */
@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

/* ============================================
   Utilities
   ============================================ */
.hidden {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
