body {
    font-family: 'Courier Prime', monospace;
    background-color: #d2d2d2;
    color: #4a3f36;
    text-shadow: 0 0 2px rgba(74, 63, 54, 0.3);
    transition: background-color 0.3s, color 0.3s;
}

#network-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.15;
}

.terminal-container {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    height: 95vh;
}

#terminal,
#gui-mode {
    position: relative;
    background-color: #d2d2d2;
    transition: background-color 0.3s;
    flex-grow: 1;
    overflow-y: auto;
    min-height: 0;
}

#terminal {
    animation: flicker 0.15s infinite;
    scrollbar-width: none;
}

#terminal::-webkit-scrollbar {
    display: none;
}

#scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    pointer-events: none;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 2px, rgba(74, 63, 54, 0.1) 3px, rgba(74, 63, 54, 0.1) 4px);
}

@keyframes flicker {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.98;
    }
}

#terminal-input {
    background: transparent;
    border: none;
    outline: none;
    color: #4a3f36;
    font-family: 'Courier Prime', monospace;
    caret-color: transparent;
    word-break: break-all;
    -webkit-user-modify: read-write-plaintext-only;
    flex-grow: 1;
    position: relative;
}

#terminal-input:focus {
    outline: none;
    box-shadow: none;
}

.prompt-live {
    color: #665e52;
    white-space: nowrap;
}

#terminal-input {
    display: inline;
    min-width: 1ch;
}

.command {
    color: #d9742b;
}

.link {
    color: #4a3f36;
    text-decoration: underline;
}

.link:hover {
    color: #28201a;
}

.ascii-art {
    white-space: pre;
    font-family: 'Courier Prime', monospace;
    line-height: 1.0;
    font-size: 4px;
    text-align: center;
    transform: scaleY(1.1);
    margin: 2rem 0;
    margin-top: 0rem;
}

.ascii-art-bg {
    display: inline-block;
    color: #28201a;
    background-color: #d2d2d2;
}

#contact-icons-wrapper {
    position: relative;
    z-index: 10;
    pointer-events: none;
    flex-shrink: 0;
}

#contact-icons-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#contact-icons {
    display: flex;
    gap: 0.75rem;
    pointer-events: auto;
    align-items: center;
    padding: 1rem;
}

#contact-icons a,
#contact-icons .icon-button {
    color: #4a3f36;
    transition: opacity 0.2s ease-in-out;
    cursor: pointer;
}

#contact-icons a:hover,
#contact-icons .icon-button:hover {
    opacity: 0.6;
}

#contact-icons svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.output-entry {
    margin-bottom: 0.75rem;
}

.skills-category-title {
    color: #d9742b;
    margin-bottom: 0.5rem;
    font-weight: bold;
    font-size: 1.15em;
}

.skills-subcategory-title {
    font-weight: bold;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.skill-box {
    background-color: rgba(74, 63, 54, 0.08);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
    border: 1px solid rgba(74, 63, 54, 0.15);
}

#clock {
    font-size: 0.9rem;
    opacity: 0.7;
}

#weather-display {
    pointer-events: auto;
}

#footer {
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.6;
    padding-top: 1rem;
    padding-bottom: 0.5rem;
}

body.dark {
    background-color: #282828;
    color: #ebdbb2;
    text-shadow: 0 0 2px rgba(235, 219, 178, 0.1);
}

body.dark #terminal,
body.dark #gui-mode {
    background-color: #282828;
}

body.dark #terminal-input {
    caret-color: transparent;
}

body.dark .link,
body.dark #contact-icons a,
body.dark #contact-icons .icon-button {
    color: #ebdbb2;
    caret-color: #ebdbb2;
}

body.dark .link:hover {
    color: #d5c4a1;
}

body.dark .prompt-live {
    color: #a89984;
}

body.dark .command,
body.dark .skills-category-title {
    color: #fe8019;
}

body.dark .skill-box {
    background-color: rgba(235, 219, 178, 0.05);
    border-color: rgba(235, 219, 178, 0.1);
}

#moon-icon {
    display: none;
}

body.dark #sun-icon {
    display: none;
}

body.dark #moon-icon {
    display: block;
}

.prompt-line-wrapper>.prompt-live {
    padding-right: 0.5ch;
}

.prompt-line-wrapper>#terminal-input {
    outline: none;
}

#gui-mode {
    display: none;
    background-color: #d2d2d2;
    transition: background-color 0.3s;
}

#gui-mode .gui-item {
    margin-bottom: 1.5rem;
}

#gui-mode .gui-item-title {
    font-weight: bold;
}

#gui-mode ul {
    list-style-type: disc;
    padding-left: 2rem;
}

#gui-footer {
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.6;
    padding-top: 1rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(74, 63, 54, 0.2);
}

body.dark #gui-footer {
    border-top-color: rgba(235, 219, 178, 0.2);
}

#terminal-input::after {
    content: '';
    display: inline-block;
    width: 0.15ch;
    height: 1.1em;
    background-color: currentColor;
    vertical-align: middle;
    margin-top: -0.2em;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.gui-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(74, 63, 54, 0.2);
    margin-bottom: 2rem;
}

body.dark .gui-tabs-nav {
    border-bottom-color: rgba(235, 219, 178, 0.2);
}

.tab-button {
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    border: none;
    background: transparent;
    color: inherit;
    opacity: 0.6;
    transition: opacity 0.2s, border-bottom-color 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tab-button:hover {
    opacity: 1;
}

.tab-button.active {
    opacity: 1;
    font-weight: bold;
    color: #d9742b;
    border-bottom-color: #d9742b;
}

body.dark .tab-button.active {
    color: #fe8019;
    border-bottom-color: #fe8019;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

#terminal,
#gui-mode {
    scrollbar-width: thin;
    scrollbar-color: #4a3f36 #d2d2d2;
}

body.dark #terminal,
body.dark #gui-mode {
    scrollbar-color: #fe8019 #282828;
}

#terminal::-webkit-scrollbar,
#gui-mode::-webkit-scrollbar {
    width: 8px;
}

#terminal::-webkit-scrollbar-track,
#gui-mode::-webkit-scrollbar-track {
    background: transparent;
}

#terminal::-webkit-scrollbar-thumb,
#gui-mode::-webkit-scrollbar-thumb {
    background-color: #4a3f36;
    border-radius: 4px;
    border: 2px solid #d2d2d2;
}

body.dark #terminal::-webkit-scrollbar-thumb,
body.dark #gui-mode::-webkit-scrollbar-thumb {
    background-color: #fe8019;
    border-color: #282828;
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .terminal-container {
        height: 90vh;
    }

    #contact-icons-container {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    #contact-icons {
        justify-content: center;
        width: 100%;
        padding: 0.5rem 0;
    }
    
    #status-bar {
        margin-left: 0;
        justify-content: center;
        width: 100%;
    }

    #terminal {
        padding: 0.75rem;
    }

    .output-entry {
        margin-bottom: 0.5rem;
    }

    .prompt-live {
        white-space: normal;
        word-break: break-all;
    }
    
    #terminal-input {
        min-width: 0;
    }
}