*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    overflow: hidden;
    height: 100%;
}

body {
    height: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Mono', monospace;
    font-size: 1.25rem;
    transition: background-color 0.5s, color 0.5s;
    box-sizing: border-box;
    overflow: hidden;
    color: #0f172a;
    background-color: #f0f9ff;
    background-image: linear-gradient(to right bottom, #f0f9ff, #e0f2fe, #bae6fd);
}

ul {
    margin: 0;
}

main {
    flex-grow: 1;
    min-width: 0;
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 0.75rem;
    padding: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

img.profile {
    border-color: #0ea5e9;
}

a {
    font-weight: bold;
    text-decoration: none;
    border-bottom: 2px solid;
    transition: color 0.3s, border-color 0.3s, transform 0.3s ease;
    display: inline-block;
}

a:hover, a:active {
    transform: translateY(-2px);
}

a, a:visited, #cursor, .prompt-char {
    color: #0ea5e9;
}

a:hover, a:active {
    color: #0284c7;
    transform: translateY(-2px);
}

.red { background-color: #ff5f56; }
.yellow { background-color: #ffbd2e; }
.green { background-color: #27c93f; }

.portfolio-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    max-width: 1100px;
    width: 100%;
    box-sizing: border-box;
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.profile-image-container {
    flex-shrink: 0;
}

img.profile {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    border: 4px solid;
    object-fit: cover;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

img.profile:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.terminal-header {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.terminal-button {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

#container {
    text-align: left;
    padding: 1rem;
    box-sizing: border-box;
    max-height: 300px;
    min-height: 300px;
    overflow-y: scroll;
}

#cursor {
    display: inline;
    animation: blink 500ms infinite alternate;
}

#skip {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: #888;
    font-family: 'Inter', sans-serif;
}

@media (prefers-color-scheme: dark) {
    body {
        color: #e2e8f0;
        background-color: #0f172a;
        background-image: linear-gradient(to right bottom, #1e293b, #1c2738, #1a2535);
    }
    main {
        background-color: rgba(0, 0, 0, 0.5);
        border-color: rgba(255, 255, 255, 0.1);
    }
    .terminal-header {
        background-color: rgba(255, 255, 255, 0.05);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    img.profile { border-color: #22d3ee; }
    a, a:visited, #cursor, .prompt-char { color: #22d3ee; }
    a:hover, a:active {
        color: #06b6d4;
        transform: translateY(-2px);
    }
}

@media (max-width: 768px) {
    body {
        font-size: 1.1rem;
    }
    .portfolio-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 1rem;
    }
    .profile-image-container {
        align-self: center;
    }
    main {
        width: 100%;
    }
    #container {
        text-align: left;
        width: 100%;
    }
    img.profile {
        width: 150px;
        height: 150px;
    }

    div#skip {
        top: 1rem;
        bottom: unset;
    }
}

.profile-image-container {
    flex-shrink: 0;
    cursor: pointer;
}

#terminal {
    transition: height 1.5s, width 1.5s, opacity 1.5s;
}

#terminal.minimized {
    animation: minimize 1.5s ease-in-out both;
}

#terminal.maximized {
    animation: maximize 1.5s ease-in-out both;
}

#terminal.closed {
    animation: close 1.5s linear both;
}

#command-input {
    background: transparent;
    border: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    width: calc(100% - 2rem);
    padding: 0;
    margin: 0;
}

#command-input:focus {
    outline: none;
}

.prompt-line {
    display: flex;
    align-items: center;
}

#command-input {
    margin-left: 0.5rem;
}

.error-message {
    color: #ff5f56;
}

.terminal-text {
    width: 100%;
    font-size: 12px;
}

@keyframes minimize {
    0% {
        scale: 1;
    }
    50% {
        scale: 0.01;
    }
    90% {
        scale: 1.1;
    }
    100% {
        scale: 1;
    }
}

@keyframes maximize {
    0% {
        scale: 1;
    }
    50% {
        scale: 3.0;
    }
    90% {
        scale: 0.8;
    }
    100% {
        scale: 1;
    }
}

@keyframes close {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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