/* Windows 98 Desktop Styles */

/* CSS Custom Properties for viewport handling */
:root {
    --vh: 1vh;
    --dvh: 1dvh;
}

/* Set dynamic viewport height for mobile devices */
@supports (height: 100dvh) {
    :root {
        --vh: 1dvh;
    }
}

@font-face {
    font-family: 'Windows Regular';
    src: url('fonts/Windows Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

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

body {
    font-family: 'Windows Regular', 'MS Sans Serif', 'Microsoft Sans Serif', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #008080 0%, #0080C4 100%);
    height: 100vh;
    height: calc(100 * var(--vh)); /* Use dynamic viewport height */
    overflow: hidden;
    cursor: default;
}

.desktop {
    width: 100vw;
    height: 100vh;
    height: calc(100 * var(--vh)); /* Use dynamic viewport height */
    position: relative;
    background-image: 
        url('images/Linko logo Win98.svg'),
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-position: 
        bottom 80px right 40px,
        0 0,
        0 0;
    background-repeat: 
        no-repeat,
        repeat,
        repeat;
    background-size: 
        120px auto,
        50px 50px,
        50px 50px;
}

/* Start Bar */
.start-bar {
    padding: 4px;
    box-shadow: inset 2px 0 #fff;
    display: flex;
    align-items: center;
    background-color: silver;
    bottom: 0;
    left: 0;
    right: 0;
    border-top: 2px solid #f4f4f4;
    border-bottom: 2px solid #4e4e4e;
    position: fixed;
    z-index: 99999;
    height: 44px;
}

.start-bar-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.start-bar-right {
    display: flex;
    align-items: center;
}

.start-button-wrapper {
    float: left;
    margin-left: 4px;
    margin-bottom: 4px;
    margin-top: 4px;
    vertical-align: middle;
    display: inline-block;
    padding: 2px 6px 3px;
    background-color: silver;
    border-top: 1px solid #fff;
    border-left: 1px solid #fff;
    border-right: 1px solid gray;
    border-bottom: 1px solid gray;
    box-shadow: inset 1px 1px #dfdfdf, 1px 0 #000, 0 1px #000, 1px 1px #000;
    min-width: 59px;
    margin-right: 6px;
    color: #000;
}

.start-button {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    user-select: none;
    color: #000;
}

.start-button img {
    width: 20px;
    height: 20px;
    padding: 2px;
}

.time-widget {
    vertical-align: middle;
    line-height: 22px;
    border-top: 2px solid gray;
    border-left: 2px solid gray;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    padding: 4px 8px;
    font-family: Arial;
    font-weight: 400;
    color: #000;
}

.start-bar-window {
    vertical-align: middle;
    line-height: 22px;
    border-top: 2px solid gray;
    border-left: 2px solid gray;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    padding: 4px 8px;
    font-family: Arial;
    font-weight: 400;
    color: #000;
    background-color: #d4d4d4;
    margin-right: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

/* Desktop Icons */
.desktop-icons {
    padding: 20px;
    display: flex;
    flex-direction: row;
    gap: 80px;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding-bottom: 80px; /* Account for larger taskbar */
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    border-radius: 6px;
    user-select: none;
    max-width: 150px;
    text-align: center;
    transition: background-color 0.2s ease;
}

.desktop-icon:hover {
    background-color: rgba(0, 0, 255, 0.1);
}

.desktop-icon:active {
    background-color: rgba(0, 0, 255, 0.2);
}

.icon {
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon img {
    width: 96px;
    height: 96px;
}

.icon-label {
    font-size: 20px;
    color: white;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.8);
    line-height: 1.2;
    word-wrap: break-word;
    font-weight: bold;
}

/* Windows */
.window {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 500px;
    width: 90vw;
    max-width: 700px;
    background: #c0c0c0;
    border: 3px outset #c0c0c0;
    box-shadow: 6px 6px 12px rgba(0, 0, 0, 0.3);
    z-index: 100;
    cursor: default;
    max-height: 80vh;
    max-height: calc(80 * var(--vh)); /* Use dynamic viewport height */
    overflow: hidden;
}

.window-header {
    background: linear-gradient(to right, #000080 0%, #0000ff 100%);
    color: white;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.window-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 22px;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    line-height: 1;
    margin-right: 10px;
}

.window-title img {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.title-container {
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.title-text {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
}

/* Desktop - show full text when there's space */
@media (min-width: 769px) {
    .title-text {
        text-overflow: clip;
        max-width: none;
    }
    
    /* Override mobile height constraints on desktop when window is resized */
    .window {
        max-height: 80vh !important; /* Restore desktop height */
    }
    
    .window-content {
        max-height: calc(80vh - 60px) !important; /* Restore desktop content height */
    }
}

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

.window-controls button {
    width: 36px;
    height: 36px;
    border: 2px outset #c0c0c0;
    background: #c0c0c0;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.window-controls button:active {
    border: 2px inset #c0c0c0;
}

.close-btn {
    background: #c0c0c0 !important;
}

.close-btn:hover {
    background: #ff0000 !important;
    color: white;
}

.window-content {
    padding: 30px;
    max-height: calc(80vh - 60px); /* Account for header height */
    max-height: calc(80 * var(--vh) - 60px); /* Use dynamic viewport height */
    overflow-y: auto;
}

/* Profile Sections */
.profile-section h2 {
    color: #000080;
    font-size: 40px;
    margin-bottom: 10px;
    font-weight: bold;
}

.profile-section h3 {
    color: #666;
    font-size: 24px;
    margin-bottom: 30px;
    font-weight: normal;
}

.bio-section, .skills-section, .contact-section {
    margin-bottom: 25px;
}

.profile-section h4 {
    color: #000080;
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: bold;
    border-bottom: 2px solid #808080;
    padding-bottom: 8px;
}

.profile-section p {
    color: #333;
    line-height: 1.6;
    margin-bottom: 18px;
    font-size: 18px;
}

.profile-section ul {
    list-style: none;
    padding-left: 0;
}

.profile-section li {
    color: #333;
    padding: 6px 0;
    position: relative;
    padding-left: 24px;
    font-size: 18px;
}

.profile-section li:before {
    content: "•";
    color: #000080;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* LinkedIn Link */
.linkedin-link {
    display: inline-block;
    background: #3579A8;
    border: 3px outset #c0c0c0;
    padding: 16px 20px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.2s ease;
}

.linkedin-link:hover {
    background: linear-gradient(to bottom, #d0d0d0 0%, #b0b0b0 100%);
}

.linkedin-link:active {
    border: 2px inset #c0c0c0;
}

.linkedin-link img {
    width: 28px;
    height: 28px;
}

/* Scrollbar Styling */
.window-content::-webkit-scrollbar {
    width: 16px;
}

.window-content::-webkit-scrollbar-track {
    background: #c0c0c0;
    border: 1px solid #808080;
}

.window-content::-webkit-scrollbar-thumb {
    background: #808080;
    border: 1px outset #c0c0c0;
}

.window-content::-webkit-scrollbar-thumb:hover {
    background: #606060;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Remove the problematic 1.2x scaling that was causing overflow */
    .desktop {
        transform: none;
        width: 100vw;
        height: 100vh;
        height: calc(100 * var(--vh));
    }
    
    .window {
        min-width: 300px;
        max-width: calc(100vw - 20px); /* Less margin for more space */
        width: calc(100vw - 20px);
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        max-height: calc(85 * var(--vh)); /* Account for start bar */
        overflow: hidden;
        margin: 0;
    }
    
    .window-content {
        max-height: calc(85vh - 60px); /* Account for header */
        max-height: calc(85 * var(--vh) - 60px); /* Account for start bar */
        overflow-y: auto;
        padding: 20px;
        padding-bottom: 40px; /* Extra padding at bottom for better scrolling */
    }
    
    .desktop-icons {
        padding: 20px;
        gap: 40px;
        flex-direction: column;
        height: auto;
        align-items: flex-start;
        justify-content: flex-start;
        padding-top: 20px;
        padding-bottom: 80px; /* Account for start bar */
        margin-top: 0;
    }
    
    .icon-label {
        font-size: 20px; /* Same as desktop */
    }
    
    .icon {
        width: 96px; /* Same as desktop */
        height: 96px; /* Same as desktop */
    }
    
    .icon img {
        width: 96px; /* Same as desktop */
        height: 96px; /* Same as desktop */
    }
    
    .desktop {
        background-size: 
            120px auto,
            50px 50px,
            50px 50px;
        background-position: 
            bottom 60px right 45px, /* Increased bottom distance to clear start bar */
            0 0,
            0 0;
    }
    
    /* Android-specific adjustments for logo positioning */
    @supports (height: 100dvh) {
        .desktop {
            background-position: 
                bottom 60px right 37.5px, /* Increased bottom distance to clear start bar */
                0 0,
                0 0;
        }
    }
    
    /* Additional Android-specific adjustments */
    @media screen and (max-width: 768px) and (orientation: portrait) {
        .desktop {
            background-position: 
                bottom 60px right 37.5px, /* Increased bottom distance to clear start bar */
                0 0,
                0 0;
        }
    }
    
    /* Keep desktop text sizes on mobile */
    .profile-section h2 {
        font-size: 40px; /* Same as desktop */
    }
    

    
    /* Mobile title scrolling */
    .window-title {
        overflow: hidden;
    }
    
    .title-container {
        overflow: hidden;
        max-width: 200px;
    }
    
    .title-text {
        max-width: none;
        text-overflow: clip;
        animation: scrollTitle 8s linear infinite;
        padding-left: 0;
        white-space: nowrap;
        line-height: 1;
        vertical-align: middle;
    }
    
    @keyframes scrollTitle {
        0%, 15% {
            transform: translateX(0);
        }
        85%, 100% {
            transform: translateX(-100%);
        }
    }
    
    .profile-section h3 {
        font-size: 24px; /* Same as desktop */
    }
    
    .profile-section h4 {
        font-size: 24px; /* Same as desktop */
    }
    
    .profile-section p,
    .profile-section li {
        font-size: 18px; /* Same as desktop */
    }
    
    .linkedin-link {
        display: inline-block;
        max-width: 100%;
        box-sizing: border-box;
        font-size: 18px; /* Same as desktop */
        padding: 16px 20px; /* Same as desktop */
    }
}

@media (max-width: 480px) {
    /* Remove the problematic 1.2x scaling that was causing overflow */
    .desktop {
        transform: none;
        width: 100vw;
        height: 100vh;
        height: calc(100 * var(--vh));
    }
    
    .window {
        min-width: 280px;
        max-width: calc(100vw - 10px); /* Minimal margin for maximum space */
        width: calc(100vw - 10px);
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        max-height: calc(80 * var(--vh)); /* Account for start bar */
        margin: 0;
    }
    
    .window-content {
        padding: 15px;
        padding-bottom: 40px; /* Extra padding at bottom for better scrolling */
        max-height: calc(80vh - 60px);
        max-height: calc(80 * var(--vh) - 60px); /* Account for start bar */
    }
    
    .desktop {
        background-size: 
            100px auto,
            50px 50px,
            50px 50px;
        background-position: 
            bottom 60px right 45px, /* Increased bottom distance to clear start bar */
            0 0,
            0 0;
    }
    
    /* Android-specific adjustments for very small screens */
    @supports (height: 100dvh) {
        .desktop {
            background-position: 
                bottom 60px right 37.5px, /* Increased bottom distance to clear start bar */
                0 0,
                0 0;
        }
    }
    
    /* Additional Android-specific adjustments for very small screens */
    @media screen and (max-width: 480px) and (orientation: portrait) {
        .desktop {
            background-position: 
                bottom 60px right 37.5px, /* Increased bottom distance to clear start bar */
                0 0,
                0 0;
        }
    }
    
    /* Keep desktop text sizes on very small screens too */
    .profile-section h2 {
        font-size: 40px; /* Same as desktop */
    }
    
    .profile-section h3 {
        font-size: 24px; /* Same as desktop */
    }
    
    .profile-section h4 {
        font-size: 24px; /* Same as desktop */
    }
    
    .profile-section p,
    .profile-section li {
        font-size: 18px; /* Same as desktop */
    }
    
    .linkedin-link {
        padding: 16px 20px; /* Same as desktop */
        font-size: 18px; /* Same as desktop */
        display: inline-block;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Adjust spacing for very small screens */
    .desktop-icons {
        padding: 15px;
        gap: 30px;
        padding-top: 15px;
        margin-top: 0;
    }
    
    /* Very small screen title scrolling */
    .title-container {
        max-width: 150px;
    }
    
    .title-text {
        max-width: none;
        text-overflow: clip;
        animation: scrollTitle 6s linear infinite;
        line-height: 1;
        vertical-align: middle;
    }
}

/* Animation for window opening */
@keyframes windowOpen {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.window {
    animation: windowOpen 0.3s ease-out;
}

/* Linko Team Facts Easter Egg */
.linko-fact-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #c0c0c0;
    border: 3px outset #c0c0c0;
    box-shadow: 6px 6px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    min-width: 400px;
    max-width: 500px;
    animation: windowOpen 0.3s ease-out;
}

.fact-header {
    background: linear-gradient(to right, #000080 0%, #0000ff 100%);
    color: white;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 16px;
}

.fact-content {
    padding: 20px;
    color: #333;
    font-size: 18px;
    line-height: 1.6;
}

.fact-content p {
    margin: 0;
}

.fact-footer {
    padding: 12px 20px;
    text-align: right;
    border-top: 2px solid #808080;
}

.fact-footer button {
    background: #c0c0c0;
    border-top: 1px solid #fff;
    border-left: 1px solid #fff;
    border-right: 1px solid gray;
    border-bottom: 1px solid gray;
    box-shadow: inset 1px 1px #dfdfdf, 1px 0 #000, 0 1px #000, 1px 1px #000;
    padding: 6px 16px;
    font-family: 'Windows Regular', 'MS Sans Serif', sans-serif;
    font-size: 14px;
    cursor: pointer;
    min-width: 60px;
}

.fact-footer button:active {
    border-top: 1px solid gray;
    border-left: 1px solid gray;
    border-right: 1px solid #fff;
    border-bottom: 1px solid #fff;
    box-shadow: inset 1px 1px #808080;
}

/* Mobile responsive for fact box */
@media (max-width: 768px) {
    .linko-fact-box {
        min-width: 320px;
        max-width: 90vw;
        /* Remove margin to fix centering */
    }
    
    .fact-content {
        padding: 15px;
        font-size: 16px;
    }
}

/* Desktop window resize fixes */
@media (min-width: 769px) and (min-height: 600px) {
    /* Ensure desktop windows maintain proper height even when resized to mobile width */
    .window {
        max-height: 85vh !important;
        max-height: calc(85 * var(--vh)) !important;
    }
    
    .window-content {
        max-height: calc(85vh - 60px) !important;
        max-height: calc(85 * var(--vh) - 60px) !important;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .window {
        max-height: calc(85 * var(--vh)); /* Account for start bar on iOS */
    }
    
    .window-content {
        max-height: calc(85 * var(--vh) - 60px); /* Account for start bar on iOS */
    }
    
    .desktop {
        height: calc(100 * var(--vh)); /* Ensure iOS uses dynamic viewport */
    }
}

/* Version number */
.version-number {
    position: fixed;
    top: 10px;
    right: 10px;
    color: rgba(255, 255, 255, 0.3);
    font-family: 'Windows Regular', 'MS Sans Serif', sans-serif;
    font-size: 12px;
    z-index: 1000;
    user-select: none;
    pointer-events: none;
} 