/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg:            #0d0d0d;
    --body-bg:       #121212;
    --fg:            #33ff33;
    --fg-hover:      #66ff66;
    --header-bg:     #333333;
    --screen-border: #2d2d2d;
    --modal-bg:      #1a1a1a;
    --secondary:     #aaaaaa;
}

body {
    font-family: 'VT323', 'IBM Plex Mono', monospace;
    background-color: var(--body-bg);
    color: var(--fg);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
}

/* Laptop styling */
.laptop {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.laptop-screen {
    position: relative;
    height: 0;
    padding-bottom: 62.5%; /* 16:10 aspect ratio */
    background-color: var(--screen-border);
    border-radius: 10px 10px 0 0;
    border: 20px solid var(--header-bg);
    border-bottom: none;
}

.screen-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg);
    border-radius: 2px;
}

.laptop-base {
    height: 20px;
    background-color: var(--header-bg);
    border-radius: 0 0 20px 20px;
    position: relative;
}

.touchpad {
    width: 30%;
    height: 8px;
    background-color: #222;
    border-radius: 4px;
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
}

/* Terminal styling */
.terminal {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.terminal-header {
    background-color: var(--header-bg);
    padding: 5px 10px;
    display: flex;
    align-items: center;
}

.terminal-buttons {
    display: flex;
    margin-right: 20px;
}

.button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.close {
    background-color: #ff5f56;
}

.minimize {
    background-color: #ffbd2e;
}

.maximize {
    background-color: #27c93f;
}

.terminal-title {
    color: #ddd;
    font-size: 14px;
}

.terminal-body {
    flex: 1;
    background-color: var(--bg);
    padding: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.type-container {
    height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(16px + 1.5vw);
}

.prompt {
    color: var(--fg);
    margin-right: 10px;
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background-color: var(--fg);
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {
    from, to {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* Social links styling */
.social-links {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
    gap: 16px 28px;
}

.social-item {
    width: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.social-item.visible {
    opacity: 1;
}

.social-icon {
    font-size: 2rem;
    color: var(--fg);
    margin-top: 8px;
    transition: transform 0.3s ease;
}

.social-icon:hover {
    transform: scale(1.2);
    color: var(--fg-hover);
}

.social-text {
    display: block;
    text-align: center;
}

/* CRT effect */
.screen-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%,
        rgba(0, 0, 0, 0.1) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 10;
    opacity: 0.2;
}

.screen-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at center,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
    pointer-events: none;
    z-index: 11;
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--modal-bg);
    margin: 10% auto;
    padding: 20px;
    border: 1px solid var(--fg);
    width: 80%;
    max-width: 700px;
    border-radius: 4px;
    position: relative;
    color: var(--fg);
    font-family: 'IBM Plex Mono', monospace;
}

.close-modal {
    color: var(--secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--fg);
    text-decoration: none;
}

.modal-header {
    padding: 10px 0;
    border-bottom: 1px solid var(--fg);
    margin-bottom: 20px;
}

.certification {
    padding: 15px;
    border-left: 3px solid var(--fg);
    margin-bottom: 15px;
}

.certification p {
    color: var(--secondary);
    margin-top: 5px;
}

.ext-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--fg);
    text-decoration: none;
    font-size: 0.9rem;
}

.ext-link:hover {
    color: var(--fg-hover);
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0;
        height: 100vh;
    }

    .laptop {
        max-width: 100%;
        height: 100vh;
    }

    /* Drop the laptop frame — just show the terminal full-screen */
    .laptop-screen {
        height: 100vh;
        padding-bottom: 0;
        border: none;
        border-radius: 0;
    }

    .laptop-base {
        display: none;
    }

    .type-container {
        font-size: calc(20px + 3vw);
        height: 30vh;
    }

    .social-links {
        gap: 12px 20px;
    }

    .modal-content {
        width: 95%;
        margin: 20% auto;
    }
}

@media (max-width: 480px) {
    .terminal-body {
        padding: 10px;
    }
}
