/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --terminal-bg: #000000;
    --terminal-text: #ffffff;
    --terminal-text-dim: #808080;
    --terminal-text-bright: #ffffff;
    --terminal-accent: #00ff00;
    --terminal-error: #ff0000;
    --terminal-warning: #ffff00;
    --terminal-success: #00ff00;
    --terminal-border: #333333;
    --terminal-cursor: #00ff00;
    --terminal-selection: #333333;
    --terminal-prompt: #00ff00;
    --terminal-command: #ffffff;
    --terminal-output: #ffffff;
    --terminal-link: #00ffff;
    --terminal-highlight: #ffff00;
    
    /* Rainbow gradient colors */
    --color-1: #f38ba8;
    --color-2: #fab387;
    --color-3: #f9e2af;
    --color-4: #a6e3a1;
    --color-5: #89dceb;
    --color-6: #89b4fa;
    --color-7: #cba6f7;
}

body {
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
    background: var(--terminal-bg);
    color: var(--terminal-text);
    line-height: 1.5;
    overflow-x: hidden;
    font-size: 14px;
    cursor: text;
}

/* Terminal Container */
.terminal-container {
    min-height: 100vh;
    padding: 20px;
    position: relative;
    background: var(--terminal-bg);
}

/* Terminal Header */
.terminal-header {
    background: var(--terminal-border);
    padding: 10px 20px;
    border-bottom: 1px solid var(--terminal-border);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 20px;
}

.terminal-controls {
    display: flex;
    gap: 10px;
}

.terminal-control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--terminal-error);
}

.terminal-control:nth-child(2) {
    background: var(--terminal-warning);
}

.terminal-control:nth-child(3) {
    background: var(--terminal-success);
}

/* Terminal Content */
.terminal-content {
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Welcome Message */
.welcome-message {
    color: var(--terminal-command);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 0.5;
    font-weight: bold;
}

/* Interactive Terminal Line */
.terminal-line {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
}

.prompt {
    color: var(--terminal-command);
    font-weight: bold;
    margin-right: 10px;
    white-space: nowrap;
}

.prompt::before {
    content: "root@portfolio:~$ ";
}

.input-container {
    position: relative;
    display: inline-block;
    flex: 1;
}

.terminal-input {
    background: transparent;
    border: none;
    color: var(--terminal-text);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    width: 100%;
    caret-color: var(--terminal-bg);
}

.terminal-input::placeholder {
    color: var(--terminal-text-dim);
}

.cursor {
    color: var(--terminal-text-bright);
    animation: blink 1s infinite;
    font-size: 21px;
    line-height: 1;
    visibility: visible;
    position: absolute;
    left: 0;
    top: -3px;
    pointer-events: none;
}

.cursor.hidden {
    visibility: hidden;
}

.cursor.typing {
    animation: none;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Command History */
#command-history {
    margin-top: 20px;
}

.command-entry {
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease-out;
}

.command-line-display {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.command-text {
    color: var(--terminal-command);
    margin-left: 10px;
}

.command-output {
    color: var(--terminal-output);
    margin-left: 20px;
    white-space: pre-wrap;
    line-height: 0.5;
}

/* Terminal Output Styling */
.terminal-output {
    margin-bottom: 10px;
}

/* Help Command Output */
.help-output {
    color: var(--terminal-command);
    line-height: 0.5;
}

.help-section {
    margin-bottom: 1px;
}

.help-title {
    color: var(--terminal-accent);
    font-weight: bold;
    margin-bottom: 1px;
}

.help-command {
    color: var(--terminal-text-bright);
    font-weight: bold;
}

.help-description {
    color: var(--terminal-text-dim);
    margin-left: 20px;
}

.help-row {
    margin-bottom: 1px;
}

/* About Command Output */
.about-output {
    color: var(--terminal-output);
    line-height: 1.6;
}

.about-title {
    color: var(--terminal-accent);
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.about-text {
    margin-bottom: 15px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--terminal-border);
    padding: 15px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: var(--terminal-accent);
    background: rgba(0, 255, 255, 0.1);
}

.stat-value {
    color: var(--terminal-accent);
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    color: var(--terminal-text-dim);
    font-size: 0.9rem;
}

/* Skills Command Output */
.skills-output {
    color: var(--terminal-output);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.skill-category {
    border: 1px solid var(--terminal-border);
    background: rgba(255, 255, 255, 0.02);
    padding: 15px;
    transition: all 0.3s ease;
}

.skill-category:hover {
    border-color: var(--terminal-accent);
    background: rgba(0, 255, 255, 0.05);
}

.category-title {
    color: var(--terminal-accent);
    font-weight: bold;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--terminal-border);
    padding-bottom: 5px;
}

.skill-list {
    list-style: none;
}

.skill-item {
    color: var(--terminal-output);
    margin-bottom: 5px;
    padding-left: 10px;
}

.skill-item::before {
    content: "> ";
    color: var(--terminal-success);
}

/* Projects Command Output */
.projects-output {
    color: var(--terminal-output);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.project-card {
    border: 1px solid var(--terminal-border);
    background: rgba(255, 255, 255, 0.02);
    padding: 20px;
    transition: all 0.3s ease;
}

.project-card:hover {
    border-color: var(--terminal-accent);
    background: rgba(0, 255, 255, 0.05);
}

.project-title {
    color: var(--terminal-text-bright);
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: bold;
}

.project-description {
    color: var(--terminal-output);
    margin-bottom: 15px;
    line-height: 1.5;
}

.project-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.project-link {
    color: var(--terminal-accent);
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid var(--terminal-border);
    background: transparent;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.project-link:hover {
    background: var(--terminal-accent);
    color: var(--terminal-bg);
    border-color: var(--terminal-accent);
}

/* Contact Command Output */
.contact-output {
    color: var(--terminal-output);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 15px;
}

.contact-info {
    color: var(--terminal-output);
}

.contact-info h3 {
    color: var(--terminal-text-bright);
    margin-bottom: 15px;
}

.contact-info p {
    margin-bottom: 20px;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.social-link {
    color: var(--terminal-accent);
    text-decoration: none;
    padding: 8px 12px;
    border: 1px solid var(--terminal-border);
    background: transparent;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.social-link:hover {
    background: var(--terminal-accent);
    color: var(--terminal-bg);
    border-color: var(--terminal-accent);
}

.contact-form {
    border: 1px solid var(--terminal-border);
    background: rgba(255, 255, 255, 0.02);
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    color: var(--terminal-text-dim);
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: var(--terminal-bg);
    border: 1px solid var(--terminal-border);
    color: var(--terminal-text);
    padding: 10px;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--terminal-accent);
    background: rgba(0, 255, 255, 0.05);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--terminal-text-dim);
}

.submit-btn {
    background: var(--terminal-accent);
    color: var(--terminal-bg);
    border: none;
    padding: 10px 20px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: var(--terminal-text-bright);
    color: var(--terminal-bg);
}

/* Error Messages */
.error-message {
    color: var(--terminal-error);
}

/* Success Messages */
.success-message {
    color: var(--terminal-success);
}

/* Warning Messages */
.warning-message {
    color: var(--terminal-warning);
}

/* Clear Command Output */
.clear-output {
    color: var(--terminal-text-dim);
    font-style: italic;
}

/* Terminal Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .terminal-content {
        padding: 0 10px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .terminal-input {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 12px;
    }
    
    .terminal-container {
        padding: 10px;
    }
    
    .welcome-message {
        font-size: 14px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--terminal-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--terminal-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--terminal-accent);
}

/* Selection Styling */
::selection {
    background: var(--terminal-selection);
    color: var(--terminal-text-bright);
}

/* Focus Styles */
*:focus {
    outline: 2px solid var(--terminal-bg);
    outline-offset: 2px;
}

/* Education Styles */
.education-output {
    padding: 10px 0;
}

.education-card {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--terminal-accent);
    padding: 15px;
    margin: 10px 0;
    border-radius: 4px;
}

.edu-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.edu-school {
    font-size: 18px;
    font-weight: bold;
    color: var(--terminal-accent);
    margin-bottom: 5px;
}

.edu-degree {
    font-size: 16px;
    color: var(--terminal-text-bright);
    margin-bottom: 5px;
}

.edu-period {
    color: var(--terminal-text-dim);
    font-size: 14px;
    white-space: nowrap;
}

.edu-location {
    color: var(--terminal-text-dim);
    margin-bottom: 10px;
}

.course-list {
    margin-top: 15px;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 5px;
    margin-top: 10px;
}

.course-item {
    color: var(--terminal-text);
    font-size: 13px;
}

/* Experience Styles */
.experience-output {
    padding: 10px 0;
}

.experience-card {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--terminal-success);
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.exp-title {
    font-size: 17px;
    font-weight: bold;
    color: var(--terminal-success);
    margin-bottom: 5px;
}

.exp-company {
    font-size: 15px;
    color: var(--terminal-text-bright);
}

.exp-period {
    color: var(--terminal-text-dim);
    font-size: 14px;
    white-space: nowrap;
}

.exp-location {
    color: var(--terminal-text-dim);
    margin-bottom: 10px;
}

.exp-highlights {
    margin: 10px 0 0 20px;
    padding: 0;
}

.exp-highlights li {
    color: var(--terminal-text);
    margin: 8px 0;
    line-height: 1.5;
}

/* Project Tech Stack */
.project-tech {
    margin: 10px 0;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-size: 13px;
    color: var(--terminal-text-dim);
}

/* Responsive updates for new sections */
@media (max-width: 768px) {
    .edu-header,
    .exp-header {
        flex-direction: column;
    }
    
    .edu-period,
    .exp-period {
        margin-top: 5px;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
}
/* Rainbow animation for special elements */
@keyframes rainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.welcome-message pre {
    animation: rainbow 3s linear infinite;
}

/* Glowing cursor effect */
@keyframes glow {
    0%, 100% { opacity: 1; text-shadow: 0 0 5px var(--terminal-cursor), 0 0 10px var(--terminal-cursor); }
    50% { opacity: 0.5; text-shadow: 0 0 2px var(--terminal-cursor); }
}

.cursor {
    animation: glow 1s ease-in-out infinite;
}

/* Colorful link hover effects */
a {
    transition: all 0.3s ease;
}

a:hover {
    text-shadow: 0 0 8px currentColor;
    transform: translateX(2px);
}
