/* This file can be used for styles that are not theme-dependent,
   or for styles for other pages like the resume.html page.
   The terminal styles are now handled by the theme files in /css/themes/
*/

:root {
    --void-black: #0a0a0a;
    --dark-grey: #1a1a1a;
    --medium-grey: #333;
    --light-grey: #ccc;
    --white: #FFFFFF;
    --phosphor-green: #0F0;
    --havoc-red: #d94545;
    --mauve: #7d5b9e;
    --sky-blue: #61afef;
}

/* --- Styles for non-terminal pages (like blog/resume) --- */
body:not(.terminal-page) {
    background-color: var(--void-black);
    color: var(--light-grey);
    font-family: 'IBM Plex Mono', monospace;
}

/* For resume.html, etc. */
.header_section, footer {
    background: var(--dark-grey);
    padding: 15px 0;
    border-bottom: 1px solid var(--medium-grey);
    color: var(--light-grey);
}
footer {
    border-top: 1px solid var(--medium-grey);
    border-bottom: none;
}
.page-title {
    padding: 40px 0;
    background-color: var(--dark-grey);
    border-bottom: 1px solid var(--medium-grey);
}
.blog-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--phosphor-green);
}
.page-title p, .page-title a {
    color: var(--light-grey);
}
.page-title a:hover, .footer-text a:hover {
    color: var(--white);
}
.footer-text a {
    color: var(--phosphor-green);
}

a {
    color: var(--phosphor-green);
}
a:hover {
    text-decoration: underline;
}
/* etc. */

/* This class will be added to the body of the terminal page to scope the no-scroll rule */
.terminal-page {
    overflow: hidden;
}

/* --- Security Scan Styles --- */
.scan-output {
    margin: 20px 0;
}

.scan-header {
    color: var(--phosphor-green);
    margin: 5px 0;
}

.scan-title {
    color: var(--phosphor-green);
    text-align: center;
    font-weight: bold;
    text-shadow: 0 0 10px var(--phosphor-green);
}

.scan-line {
    margin: 8px 0;
    display: flex;
    align-items: center;
}

.scan-text {
    color: var(--light-grey);
    flex-grow: 1;
}

.scan-spinner {
    color: var(--sky-blue);
    margin-left: 10px;
    font-family: monospace;
}

.scan-success {
    color: var(--phosphor-green);
    margin-left: 10px;
}

.scan-complete {
    color: var(--phosphor-green);
    margin-left: 10px;
}

.scan-result {
    text-align: center;
    margin: 15px 0;
    font-weight: bold;
}

.scan-status-secure {
    color: var(--phosphor-green);
    text-shadow: 0 0 5px var(--phosphor-green);
}

.scan-score {
    text-align: center;
    margin: 10px 0;
}

.scan-score-value {
    color: var(--phosphor-green);
    font-weight: bold;
    font-size: 1.2em;
}

.scan-recommendation {
    color: var(--sky-blue);
    text-align: center;
    font-style: italic;
}

/* --- Whoami Styles --- */
.whoami-output {
    margin: 20px 0;
}

.whoami-header {
    color: var(--sky-blue);
    margin: 0;
}

.whoami-title {
    color: var(--sky-blue);
    text-align: center;
    font-weight: bold;
    margin: 0;
}

.whoami-label {
    color: var(--sky-blue);
    font-weight: bold;
    display: inline-block;
    width: 150px;
}

.whoami-value {
    color: var(--phosphor-green);
}

.whoami-footer {
    color: var(--sky-blue);
    margin-top: 10px;
}

.whoami-warning {
    color: var(--light-grey);
    font-style: italic;
    text-align: center;
    font-size: 0.9em;
}

/* --- Projects Command Styles --- */
.projects-output {
    margin: 20px 0;
}

.projects-header {
    color: var(--phosphor-green);
    margin: 0;
    font-family: monospace;
}

.projects-title {
    color: var(--phosphor-green);
    text-align: center;
    font-weight: bold;
    margin: 0;
    text-shadow: 0 0 10px var(--phosphor-green);
}

.project-item {
    margin: 20px 0;
}

.project-ascii {
    color: var(--sky-blue);
    margin: 10px 0;
    font-size: 0.8em;
    line-height: 1.2;
}

.project-name {
    color: var(--phosphor-green);
    font-weight: bold;
    font-size: 1.1em;
    margin: 10px 0;
}

.project-tech {
    color: var(--light-grey);
    margin: 5px 0;
}

.tech-stack {
    color: var(--sky-blue);
}

.project-desc {
    color: var(--light-grey);
    margin: 5px 0;
    padding-left: 20px;
}

.project-status {
    margin: 5px 0;
    padding-left: 20px;
}

.status-active {
    color: var(--phosphor-green);
    font-weight: bold;
}

.status-production {
    color: #00ff00;
    font-weight: bold;
    text-shadow: 0 0 5px #00ff00;
}

.status-beta {
    color: var(--sky-blue);
    font-weight: bold;
}

.project-separator {
    color: var(--medium-grey);
    margin: 15px 0;
}

.projects-footer {
    color: var(--phosphor-green);
    margin-top: 20px;
}

.projects-note {
    text-align: center;
    color: var(--light-grey);
    font-style: italic;
    margin-top: 10px;
}

/* --- Styles from other files to be consolidated --- */
body:not(.terminal-page) {
    background-color: var(--void-black); /* Dark theme as default */
    color: var(--light-grey);
}

.navbar-brand img {
    width: 150px;
}
.overlay {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    background-color: rgba(0,0,0, 0.95);
    overflow-x: hidden;
    transition: 0.5s;
}
.overlay-content {
    position: relative;
    top: 25%;
    width: 100%;
    text-align: center;
    margin-top: 30px;
}
.overlay a {
    padding: 8px;
    text-decoration: none;
    font-size: 36px;
    color: #818181;
    display: block;
    transition: 0.3s;
}
.overlay a:hover, .overlay a:focus {
    color: var(--phosphor-green);
}
.overlay .closebtn {
    position: absolute;
    top: 20px;
    right: 45px;
    font-size: 60px;
}
.custom_menu-btn {
    z-index: 1001;
    position: absolute;
    right: 15px;
    top: 15px;
}
.custom_menu-btn button {
    margin-top: 22px;
    outline: none;
    border: none;
    background-color: transparent;
}
.custom_menu-btn span {
    display: block;
    width: 35px;
    height: 4px;
    background-color: var(--light-grey);
    margin: 7px 0;
    transition: .3s;
}

.all-blogs, .single-blog-container {
    padding: 80px 0;
    background-color: var(--void-black);
}
.blog-box {
    margin-bottom: 30px;
    background-color: var(--dark-grey);
    border: 1px solid var(--medium-grey);
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}
.blog-box .img-box img {
    width: 100%;
}
.blog-box .detail-box {
    padding: 25px;
}
.blog-box .detail-box h5 {
    font-size: 20px;
    font-weight: 600;
    color: var(--white);
}
.blog-box .detail-box p {
    color: var(--light-grey);
}
.blog-box .detail-box a {
    color: var(--phosphor-green);
    font-weight: 600;
}

.single-blog-area .title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--white);
}
.single-blog-area ul {
    padding: 0;
    list-style: none;
    margin-bottom: 15px;
    color: var(--light-grey);
}
.sidebar-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--phosphor-green);
}

.hidden { display: none !important; }

#matrix-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

main {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-section {
    text-align: center;
}
.boot-text-wrapper {
    display: inline-block;
    text-align: left;
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: var(--phosphor-green);
}
.boot-text-wrapper .bright-text {
    color: var(--phosphor-green);
    text-shadow: 0 0 7px var(--phosphor-green);
}
.cursor {
    display: inline-block;
    width: 10px;
    height: 1.4rem;
    background-color: var(--light-grey);
    animation: blink 1s step-end infinite;
    align-items: center;
}
@keyframes blink {
    50% { opacity: 0; }
}

/* --- Main Terminal --- */
.terminal-container {
    width: 100%;
    height: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.terminal-window {
    width: 100%;
    max-width: 1000px;
    height: 90vh;
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid var(--dark-grey);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    /* Initial animation states */
    transform: scaleY(0);
    transform-origin: top;
    opacity: 0;
}
.terminal-header {
    background: var(--medium-grey, #333);
    color: var(--header-color, var(--phosphor-green));
    padding: 5px 10px;
    border-bottom: 1px solid var(--dark-grey);
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}
.terminal-body {
    flex-grow: 1;
    padding: 1rem;
    overflow-y: auto;
    font-size: 0.95rem;
}
.terminal-body p { margin-bottom: 0.2rem; }
.terminal-prompt {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--dark-grey);
}
.prompt-user { color: var(--prompt-color, var(--phosphor-green)); }
.prompt-dir { color: var(--mauve); }
.prompt-char { color: var(--light-grey); margin-left: 5px; margin-right: 5px;}

.terminal-input {
    background: transparent;
    border: none;
    color: var(--main-fg, var(--light-grey));
    font-family: 'IBM Plex Mono', monospace;
    font-size: inherit;
    flex-grow: 1;
    padding-left: 0.5rem;
}
.terminal-input::placeholder {
    color: var(--medium-grey, #555);
    opacity: 0.7;
}

.terminal-input:focus { outline: none; }

/* Output styling */
.command-output { white-space: pre-wrap; margin-bottom: 1rem;}
.log-entry { margin-bottom: 4px; }
.log-level.info { color: var(--sky-blue); }
.log-level.success { color: var(--phosphor-green); }
.log-level.warn { color: var(--havoc-red); }

.details {
    padding-left: 20px;
    border-left: 2px solid var(--medium-grey);
    margin: 8px 0 12px 10px;
}
.details p { margin: 2px 0; }
.help-command { color: var(--sky-blue); width: 100px; display: inline-block; }

.terminal-container a {
    color: var(--link-color, var(--phosphor-green));
    text-decoration: none;
}
.terminal-container a:hover {
    text-decoration: underline;
}

.resume-header {
    font-weight: bold;
    color: #fafafa;
}

.success {
    color: #23d18b; /* Bright Green */
    font-weight: bold;
}

.error {
    color: var(--error-color, var(--havoc-red));
}

.spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.package-name {
    color: #f9a825; /* Amber */
    font-weight: bold;
}

.resume-output h2 {
    color: #34dbeb; /* Bright Cyan */
    text-transform: uppercase;
    margin-top: 1em;
    margin-bottom: 0.5em;
    font-size: 1.1em;
}

.animation-output .video-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    margin: 1em 0;
    border: 1px solid #333;
}

.animation-output iframe {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.command-name {
    font-weight: bold;
    color: var(--command-color, var(--phosphor-green));
}

ul.help-list {
    list-style-type: none;
    padding-left: 0;
}

ul.help-list li {
    margin-bottom: 5px;
}

/* Contact Form */
.contact-output form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 1em;
}

.contact-output label {
    font-weight: bold;
    color: #34dbeb; /* Bright Cyan */
}

.contact-output input,
.contact-output textarea {
    background-color: #1a1a1a;
    border: 1px solid #444;
    color: #e0e0e0;
    padding: 8px;
    border-radius: 4px;
    font-family: 'IBM Plex Mono', monospace;
}

.contact-output input:focus,
.contact-output textarea:focus {
    outline: none;
    border-color: #ff7300;
}

.contact-output button {
    background-color: #ff7300;
    color: #141414;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.contact-output button:hover {
    background-color: #ff9900;
}

.honeypot {
    display: none;
}

#form-status {
    margin-top: 1em;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    #main-content {
        padding: 10px;
    }

    .terminal-window {
        font-size: 14px;
        max-width: 100%;
        height: 95vh; /* Adjust height for mobile */
    }

    .terminal-prompt {
        flex-wrap: wrap; /* Allow prompt to wrap on small screens */
    }

    .prompt-user, .prompt-dir, .prompt-char {
        word-break: break-all; /* Prevent long strings from overflowing */
    }

    .resume-output h2 {
        font-size: 1em;
    }

    .contact-output form {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .terminal-window {
        font-size: 12px;
    }

    body, .terminal-input {
        font-size: 12px; /* Ensure consistency */
    }
    
    .terminal-header span {
        font-size: 10px;
    }
}

#terminal-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

#terminal {
    background: var(--terminal-bg, var(--void-black));
    border: 1px solid var(--medium-grey, #333);
    width: 90vw;
    max-width: 1200px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    overflow: hidden;
    position: relative;
}

/* CRT Screen Effect */
#terminal::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.25) 50%
    );
    background-size: 100% 2px;
    z-index: 2;
    pointer-events: none;
    animation: scanlines 8s linear infinite;
}

#terminal::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at center,
        rgba(0, 255, 0, 0.02) 0%,
        rgba(0, 0, 0, 0.1) 100%
    );
    pointer-events: none;
    z-index: 1;
}

@keyframes scanlines {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 10px;
    }
}

#terminal-header {
    background: var(--medium-grey, #333);
    color: var(--header-color, var(--phosphor-green));
    padding: 5px 10px;
    font-size: 0.9em;
    font-weight: bold;
}

#terminal-body {
    padding: 10px;
    flex-grow: 1;
    overflow-y: auto;
    word-wrap: break-word;
    white-space: pre-wrap;
    position: relative;
    z-index: 3;
}

#terminal-body::-webkit-scrollbar {
  width: 10px;
}
#terminal-body::-webkit-scrollbar-track {
  background: var(--dark-grey);
}
#terminal-body::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-color, var(--phosphor-green));
  border-radius: 6px;
  border: 2px solid var(--dark-grey);
}

.terminal-line {
    display: flex;
    align-items: center;
}

.prompt {
    display: flex;
    align-items: center;
}

#prompt-user {
    font-weight: bold;
    color: var(--prompt-color, var(--phosphor-green));
}
.prompt-dir { 
    font-weight: bold;
    color: var(--mauve); 
}

#prompt-symbol {
    font-weight: bold;
    color: var(--prompt-color, var(--phosphor-green));
    margin: 0 5px;
}

#terminal-input-container {
    display: flex;
    flex-grow: 1;
}

#terminal-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--main-fg, var(--light-grey));
    font-family: inherit;
    font-size: inherit;
    outline: none;
}
#terminal-input:disabled {
    cursor: not-allowed;
}

.command-output {
    margin-bottom: 10px;
}

.command-output a {
    color: var(--link-color, var(--phosphor-green));
    text-decoration: underline;
}
.command-output a:hover {
    color: var(--link-hover-color, #99ffee);
}

.help-list {
    list-style: none;
    padding-left: 0;
}
.help-list li {
    margin-bottom: 5px;
}
.command-name {
    font-weight: bold;
    color: var(--command-color, var(--phosphor-green));
}

.error {
    color: var(--error-color, var(--havoc-red));
    font-weight: bold;
}

.bright-text {
    color: var(--header-color, var(--phosphor-green));
    font-weight: bold;
    text-shadow: var(--text-shadow, 0 0 5px var(--phosphor-green));
}
/* --- BOOT SEQUENCE --- */
#boot-sequence {
    font-family: 'IBM Plex Mono', monospace;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--main-fg, var(--light-grey));
    text-align: left;
    width: 80%;
    max-width: 600px;
    font-size: 1.1em;
}

/* --- Theme Overrides --- */

/* Amber Theme */
body.theme-amber { --matrix-color: #FFB800; }
body.theme-amber #terminal-header,
body.theme-amber .prompt-user,
body.theme-amber #prompt-symbol,
body.theme-amber .command-name,
body.theme-amber .bright-text,
body.theme-amber .command-output a,
body.theme-amber #terminal-body::-webkit-scrollbar-thumb {
    color: #FFB800;
}
body.theme-amber .bright-text { text-shadow: 0 0 5px #FFB800; }
body.theme-amber .command-output a:hover { color: #ffd466; }
body.theme-amber #terminal-body::-webkit-scrollbar-thumb { background-color: #FFB800; }

/* Blue Theme */
body.theme-blue { --matrix-color: #00BFFF; }
body.theme-blue #terminal-header,
body.theme-blue .prompt-user,
body.theme-blue #prompt-symbol,
body.theme-blue .command-name,
body.theme-blue .bright-text,
body.theme-blue .command-output a {
    color: #00BFFF;
}
body.theme-blue .bright-text { text-shadow: 0 0 5px #00BFFF; }
body.theme-blue .command-output a:hover { color: #66d9ff; }
body.theme-blue #terminal-body::-webkit-scrollbar-thumb { background-color: #00BFFF; }

/* White (Light) Theme */
body.theme-white {
    --matrix-color: #666;
    background-color: #f5f5f5;
    color: #333;
}
body.theme-white #terminal,
body.theme-white #terminal-header {
    background-color: #f5f5f5;
    border-color: #ccc;
}
body.theme-white #terminal-header,
body.theme-white #prompt-user,
body.theme-white #prompt-symbol,
body.theme-white .command-name,
body.theme-white .bright-text {
    color: #000;
}
body.theme-white #terminal-body::-webkit-scrollbar-track { background: #ccc; }
body.theme-white #terminal-body::-webkit-scrollbar-thumb { background-color: #333; border-color: #ccc; }
body.theme-white #terminal-input { color: #333; }
body.theme-white .bright-text { text-shadow: none; }
body.theme-white .command-output a { color: #0000ff; }
body.theme-white .command-output a:hover { color: #ff00ff; }
body.theme-white .error { color: #d8000c; }

/* Security Profile Styling for /init command */
.security-profile {
    margin: 20px 0;
    padding: 20px;
    border: 2px solid var(--terminal-green);
    background-color: rgba(0, 255, 0, 0.05);
}

.security-header {
    color: var(--terminal-green);
    font-weight: bold;
    font-size: 1.2em;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 0 0 10px var(--terminal-green);
}

.security-warning {
    color: #ff6b6b;
    text-align: center;
    font-size: 0.9em;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.security-section {
    margin: 15px 0;
    padding: 10px;
    border-left: 3px solid var(--terminal-green);
    padding-left: 15px;
}

.security-title {
    color: var(--terminal-green);
    font-size: 1.1em;
    margin-bottom: 10px;
    font-weight: bold;
}

.security-footer {
    color: var(--terminal-green);
    font-weight: bold;
    text-align: center;
    margin-top: 20px;
    text-shadow: 0 0 10px var(--terminal-green);
}

.system-message {
    color: #00ff00;
    font-style: italic;
}

/* --- Styles from other files to be consolidated --- */
body:not(.terminal-page) {
    background-color: var(--void-black); /* Dark theme as default */
    color: var(--light-grey);
} 