/* ============================================
   RESET & BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'JetBrains Mono', monospace;
    color: #ffffff;
    background-color: #000000;
    /* Fade-in animation for entire page */
    animation: fadeIn 1s ease-in;
}

/* ============================================
   FADE-IN ANIMATION
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ============================================
   CV HERO SECTION
   ============================================ */

.cv-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Background Video */
.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    min-width: 100%;
    min-height: 100%;
}

/* Fallback background image */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/landing_background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    display: none;
    pointer-events: none;
}

/* ============================================
   NAVIGATION BAR
   ============================================ */

.cv-nav {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 2rem 1.5rem 2rem;
    flex-wrap: wrap;
}

.nav-link {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    position: relative;
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 0;
    transition: transform 0.3s ease, color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Animated gradient glow background */
.nav-link:before {
    content: '';
    background: linear-gradient(45deg, #ffffff, #000000, #ffffff, #000000, #ffffff, #000000, #ffffff, #000000, #ffffff);
    position: absolute;
    top: -2px;
    left: -2px;
    background-size: 400%;
    z-index: -1;
    filter: blur(5px);
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    animation: glowing 20s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    border-radius: 4px;
}

.nav-link:hover {
    transform: translateY(-2px);
}

.nav-link:hover:before {
    opacity: 1;
}

.nav-link:active {
    transform: translateY(0);
    color: #000000;
}

.nav-link:active:after {
    background: transparent;
}

.nav-link:after {
    z-index: -1;
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: transparent;
    left: 0;
    top: 0;
    border-radius: 4px;
}

/* Active CV link styling */
.cv-active {
    background: rgba(255, 255, 255, 0.2);
}

.cv-white {
    color: #ffffff;
}

/* Projects link special styling */
.projects-link {
    display: inline-flex;
    align-items: baseline;
}

.projects-white {
    color: #ffffff;
    transition: text-shadow 0.3s ease;
}

.projects-black {
    color: #000000;
    background: #ffffff;
    padding: 2px 4px;
    border-radius: 2px;
    margin-left: -2px;
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

.projects-link:hover .projects-black {
    box-shadow: 
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 255, 255, 0.6),
        0 0 30px rgba(255, 255, 255, 0.4);
}

.projects-link:before {
    content: '';
    background: linear-gradient(45deg, #ffffff, #000000, #ffffff, #000000, #ffffff, #000000, #ffffff, #000000, #ffffff);
    position: absolute;
    top: -2px;
    left: -2px;
    background-size: 400%;
    z-index: -1;
    filter: blur(5px);
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    animation: glowing 20s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    border-radius: 4px;
}

.projects-link:hover:before {
    opacity: 1;
}

/* Navigation dividers */
.nav-divider {
    color: #ffffff;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    font-weight: 300;
    user-select: none;
}

/* Glowing animation */
@keyframes glowing {
    0% { background-position: 0 0; }
    50% { background-position: 400% 0; }
    100% { background-position: 0 0; }
}

/* ============================================
   DOWNLOAD CV BUTTON
   ============================================ */

.cv-download-container {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 2rem 1rem 2rem;
}

.cv-download-btn {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 12px 24px;
    border-radius: 6px;
    z-index: 0;
    transition: transform 0.3s ease, color 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Animated gradient glow background */
.cv-download-btn:before {
    content: '';
    background: linear-gradient(45deg, #ffffff, #000000, #ffffff, #000000, #ffffff, #000000, #ffffff, #000000, #ffffff);
    position: absolute;
    top: -2px;
    left: -2px;
    background-size: 400%;
    z-index: -1;
    filter: blur(5px);
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    animation: glowing 20s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    border-radius: 6px;
}

.cv-download-btn:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.5);
}

.cv-download-btn:hover:before {
    opacity: 1;
}

.cv-download-btn:active {
    transform: translateY(-1px);
    color: #000000;
}

.cv-download-btn:active:after {
    background: transparent;
}

.cv-download-btn:after {
    z-index: -1;
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    left: 0;
    top: 0;
    border-radius: 6px;
}

.download-icon {
    font-size: 1.3em;
    line-height: 1;
    transition: transform 0.3s ease;
}

.cv-download-btn:hover .download-icon {
    transform: translateY(2px);
}

.download-text {
    position: relative;
    z-index: 1;
}

/* ============================================
   CV CONTAINER
   ============================================ */

.cv-container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    min-height: calc(100vh - 100px);
}

/* ============================================
   LEFT COLUMN (Dark Background)
   ============================================ */

.cv-left-column {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 100%);
    padding: 3rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Header Section */
.cv-header {
    margin-bottom: 0.5rem;
}

.cv-name {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.cv-contact {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    color: #ffffff;
    line-height: 1.6;
}

/* Divider */
.cv-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    margin: 1rem 0;
}

/* Section Styling */
.cv-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cv-section-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

/* Personal Profile */
.cv-profile-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.85rem, 1.1vw, 1rem);
    color: #ffffff;
    line-height: 1.8;
}

/* CV Item Styling */
.cv-item {
    margin-bottom: 2rem;
}

.cv-item-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.cv-item-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    font-weight: 600;
    color: #ffffff;
    line-height: 1.4;
    flex: 1;
    min-width: 200px;
}

.cv-item-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    color: #ffffff;
    font-weight: 400;
    white-space: nowrap;
    flex-shrink: 0;
}

.cv-item-list {
    list-style: none;
    padding-left: 0;
    margin-top: 0.5rem;
}

.cv-item-list li {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    color: #ffffff;
    line-height: 1.8;
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.cv-item-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #ffffff;
    font-weight: bold;
    font-size: 1.2em;
}

/* ============================================
   RIGHT COLUMN (Light Background)
   ============================================ */

.cv-right-column {
    background: linear-gradient(to left, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.5) 100%);
    padding: 3rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-self: start;
}

.cv-right-column .cv-section-title {
    color: #000000;
}

.cv-right-column .cv-subsection-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    font-weight: 600;
    color: #000000;
    margin-bottom: 0.75rem;
}

.cv-right-column .cv-item-list li {
    color: #000000;
}

.cv-right-column .cv-item-list li::before {
    color: #000000;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet Styles */
@media (max-width: 1024px) {
    .cv-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1.5rem;
    }
    
    .cv-left-column,
    .cv-right-column {
        padding: 2rem;
    }
    
    .cv-right-column {
        margin-top: 0;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .cv-nav {
        padding: 1.5rem 1rem 1rem 1rem;
        gap: 0.5rem;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .cv-nav::-webkit-scrollbar {
        display: none;
    }
    
    .nav-link {
        font-size: clamp(0.7rem, 3vw, 0.85rem);
        padding: 3px 6px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .nav-divider {
        font-size: clamp(0.7rem, 3vw, 0.85rem);
        flex-shrink: 0;
    }
    
    .cv-download-container {
        padding: 0 1rem 1rem 1rem;
    }
    
    .cv-download-btn {
        font-size: clamp(0.85rem, 3vw, 1rem);
        padding: 10px 20px;
        gap: 0.5rem;
    }
    
    .cv-container {
        padding: 1rem;
        gap: 1.5rem;
    }
    
    .cv-left-column,
    .cv-right-column {
        padding: 1.5rem;
    }
    
    .cv-name {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
    
    .cv-contact {
        font-size: clamp(0.85rem, 3vw, 1rem);
    }
    
    .cv-section-title {
        font-size: clamp(1.1rem, 4vw, 1.3rem);
    }
    
    .cv-item-title {
        font-size: clamp(0.95rem, 3vw, 1.1rem);
    }
    
    .cv-item-date {
        font-size: clamp(0.8rem, 2.5vw, 0.95rem);
    }
    
    .cv-item-list li {
        font-size: clamp(0.8rem, 2.5vw, 0.95rem);
        padding-left: 1.2rem;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .cv-nav {
        padding: 1rem 0.75rem 0.75rem 0.75rem;
        gap: 0.4rem;
    }
    
    .nav-link {
        font-size: clamp(0.65rem, 2.5vw, 0.75rem);
        padding: 2px 4px;
    }
    
    .cv-download-container {
        padding: 0 0.75rem 0.75rem 0.75rem;
    }
    
    .cv-download-btn {
        font-size: clamp(0.75rem, 3vw, 0.9rem);
        padding: 8px 16px;
        gap: 0.4rem;
    }
    
    .download-icon {
        font-size: 1.2em;
    }
    
    .cv-container {
        padding: 0.75rem;
    }
    
    .cv-left-column,
    .cv-right-column {
        padding: 1.25rem;
    }
    
    .cv-name {
        font-size: clamp(1.5rem, 10vw, 2rem);
    }
    
    .cv-item-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .cv-item-date {
        white-space: normal;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.nav-link:focus-visible,
.cv-download-btn:focus-visible,
.mobile-menu ul li a:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    top: -48px;
    left: 0;
    background: #000000;
    color: #ffffff;
    padding: 10px 18px;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    z-index: 10001;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}
