/**
 * Portfolio - Retro Windows Style
 * Electric Blue Theme with Windows 95/98 Aesthetic
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    --bg-primary: #1a237e;
    --bg-dark: #0d1654;
    --accent: #3f51b5;
    --white: #FFFFFF;
    --black: #000000;
    --window-bg: #1e1e2e;
    --window-header: linear-gradient(90deg, #000080 0%, #1084D0 100%);
    --window-border-light: #45475a;
    --window-border-dark: #11111b;
    --text-primary: #FFFFFF;
    --text-muted: rgba(255, 255, 255, 0.7);
    --header-height: 40px;
    --grid-gap: 16px;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes windowOpen {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes windowSlideIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes floatCloud {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100vw);
    }
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary) url('images/bliss-bg.jpg') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--window-header);
    height: var(--header-height);
}

.site-header .retro-window-header {
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
}

.header-nav {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-link {
    color: white;
    font-size: 12px;
    transition: opacity 0.2s;
}

.nav-link:hover {
    opacity: 0.8;
}

.lang-switch {
    display: flex;
    gap: 4px;
    margin-left: 16px;
}

.lang-btn {
    width: auto !important;
    padding: 2px 8px !important;
    font-size: 11px !important;
}

.lang-btn.active {
    background: #0078D4 !important;
    color: white !important;
}

.header-spacer {
    height: var(--header-height);
}

/* ==========================================================================
   Retro Window Component
   ========================================================================== */
.retro-window {
    background: var(--window-bg);
    border: 2px solid;
    border-color: var(--window-border-light) var(--window-border-dark) var(--window-border-dark) var(--window-border-light);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.retro-window-header {
    background: var(--window-header);
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.retro-window-title {
    color: white;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.retro-window-title svg {
    width: 16px;
    height: 16px;
}

.retro-window-controls {
    display: flex;
    gap: 2px;
}

.retro-btn {
    width: 16px;
    height: 14px;
    background: #C0C0C0;
    border: 1px solid;
    border-color: #DFDFDF #808080 #808080 #DFDFDF;
    font-size: 10px;
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.retro-btn:active {
    border-color: #808080 #DFDFDF #DFDFDF #808080;
}

.retro-window-body {
    padding: 12px;
    color: var(--white);
    font-size: 13px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    max-width: 1000px;
    width: 100%;
}

.window-about {
    grid-column: 1 / 5;
    grid-row: 1 / 3;
    animation: windowOpen 0.4s ease-out 0.1s both;
}

.window-skills {
    grid-column: 5 / 9;
    grid-row: 1 / 2;
    animation: windowOpen 0.4s ease-out 0.2s both;
}

.window-photo {
    grid-column: 9 / 13;
    grid-row: 1 / 3;
    animation: windowOpen 0.4s ease-out 0.3s both;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 8px;
}

.skill-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.skill-badge {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: 600;
}

.skill-icon span {
    font-size: 10px;
    color: var(--white);
}

/* Photo Window */
.photo-body {
    padding: 8px;
    background: #000;
}

.photo-body img {
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: contain;
    border: 2px solid #333;
}

/* ==========================================================================
   Works Section
   ========================================================================== */
.works-section {
    padding: 40px 24px;
}

.works-window {
    max-width: 1200px;
    margin: 0 auto;
}

.works-window .retro-window-body {
    padding: 20px;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--grid-gap);
}

/* IE Window Cards */
.work-card-ie {
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: windowSlideIn 0.5s ease-out both;
}

.work-card-ie:nth-child(1) {
    animation-delay: 0.1s;
}

.work-card-ie:nth-child(2) {
    animation-delay: 0.2s;
}

.work-card-ie:nth-child(3) {
    animation-delay: 0.3s;
}

.work-card-ie:nth-child(4) {
    animation-delay: 0.4s;
}

.work-card-ie:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.ie-window {
    background: #C0C0C0;
    border: 2px solid;
    border-color: #DFDFDF #808080 #808080 #DFDFDF;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.ie-toolbar {
    background: linear-gradient(90deg, #000080 0%, #1084D0 100%);
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ie-title {
    color: white;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ie-btns {
    display: flex;
    gap: 2px;
}

.ie-btns span {
    width: 16px;
    height: 14px;
    background: #C0C0C0;
    border: 1px solid;
    border-color: #DFDFDF #808080 #808080 #DFDFDF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #000;
}

.ie-address {
    background: #C0C0C0;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    border-bottom: 1px solid #808080;
}

.ie-address span {
    color: #000;
    font-weight: 500;
}

.ie-url {
    background: white;
    padding: 2px 8px;
    flex: 1;
    border: 1px solid;
    border-color: #808080 #DFDFDF #DFDFDF #808080;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #000080;
}

.ie-content {
    background: white;
    height: 200px;
    overflow: hidden;
}

.ie-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-section {
    padding: 40px 24px;
}

.contact-window {
    max-width: 600px;
    margin: 0 auto;
}

.contact-body {
    text-align: center;
    padding: 24px;
}

.contact-body p {
    font-size: 16px;
    margin-bottom: 20px;
}

.contact-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-link {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.contact-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    padding: 40px 24px;
    text-align: center;
}

.footer-logo {
    font-size: 18px;
    font-weight: 600;
    display: block;
    margin-bottom: 12px;
    color: white;
}

.footer-logo span {
    opacity: 0.7;
}

.site-footer p {
    font-size: 13px;
    opacity: 0.7;
}

/* ==========================================================================
   Clouds Animation
   ========================================================================== */
.clouds-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.cloud {
    position: absolute;
    background: white;
    border-radius: 0;
    opacity: 0.9;
    image-rendering: pixelated;
    box-shadow:
        20px 0 0 white,
        40px 0 0 white,
        10px -20px 0 white,
        30px -20px 0 white,
        50px -20px 0 white,
        0 -40px 0 white,
        20px -40px 0 white,
        40px -40px 0 white,
        60px -40px 0 white,
        10px -60px 0 white,
        30px -60px 0 white,
        50px -60px 0 white;
}

.cloud-1 {
    width: 20px;
    height: 20px;
    top: 12%;
    animation: floatCloud 50s linear infinite;
    animation-delay: 0s;
}

.cloud-2 {
    width: 25px;
    height: 25px;
    top: 25%;
    animation: floatCloud 65s linear infinite;
    animation-delay: -20s;
}

.cloud-3 {
    width: 18px;
    height: 18px;
    top: 40%;
    animation: floatCloud 55s linear infinite;
    animation-delay: -35s;
}

/* ==========================================================================
   CRT Scanlines
   ========================================================================== */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.15) 0px,
            rgba(0, 0, 0, 0.15) 1px,
            transparent 1px,
            transparent 2px);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
    }

    .window-about,
    .window-skills,
    .window-photo {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .works-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 600px) {
    .header-nav {
        gap: 12px;
    }

    .nav-link {
        font-size: 11px;
    }

    .skills-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }
}