* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.terminal {
    width: 100%;
    max-width: 900px;
    background: #0c0c0c;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 255, 0, 0.15);
    overflow: hidden;
    border: 1px solid #1a3a1a;
}

.terminal-header {
    background: #1a1a1a;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #2a2a2a;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
    margin-right: 15px;
}

.btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.btn.close {
    background: #ff5f57;
}

.btn.minimize {
    background: #ffbd2e;
}

.btn.maximize {
    background: #28ca42;
}

.terminal-title {
    color: #888;
    font-size: 13px;
    flex: 1;
}

.lang-switcher {
    margin-left: auto;
}

.lang-button {
    background: transparent;
    border: 1px solid #00ff00;
    color: #00ff00;
    padding: 4px 12px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.3s;
}

.lang-button:hover {
    background: #00ff00;
    color: #0c0c0c;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.terminal-body {
    padding: 20px;
    min-height: 500px;
    max-height: 70vh;
    overflow-y: auto;
    background: #0c0c0c;
}

#terminal-content {
    color: #00ff00;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.output-line {
    margin: 5px 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.command {
    color: #00ff00;
    margin: 10px 0 5px 0;
}

.command::before {
    content: 'visitor@portfolio:~$ ';
    color: #4a9eff;
}

.output {
    color: #d0d0d0;
    margin: 5px 0;
}

.output.header {
    color: #00ff00;
    font-weight: bold;
    font-size: 16px;
    margin: 15px 0 10px 0;
}

.output.subheader {
    color: #4a9eff;
    font-style: italic;
    margin: 10px 0;
}

.output.highlight {
    color: #ffbd2e;
}

.output.error {
    color: #ff5f57;
}

.input-line {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.prompt {
    color: #4a9eff;
    font-size: 14px;
    white-space: nowrap;
}

#terminal-input {
    background: transparent;
    border: none;
    outline: none;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    flex: 1;
    caret-color: transparent;
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: #00ff00;
    animation: blink 1s step-end infinite;
    position: absolute;
    left: 195px;
}

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

.typing {
    overflow: hidden;
    border-right: 2px solid #00ff00;
    white-space: nowrap;
    animation: typing 2s steps(40) 1s forwards, blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    50% {
        border-color: transparent;
    }
}

/* Scrollbar styling */
.terminal-body::-webkit-scrollbar {
    width: 8px;
}

.terminal-body::-webkit-scrollbar-track {
    background: #0c0c0c;
}

.terminal-body::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 4px;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
    background: #3a3a3a;
}

/* ASCII Art */
.ascii-art {
    color: #00ff00;
    font-size: 12px;
    line-height: 1.2;
    margin: 15px 0;
}

/* Links */
a {
    color: #4a9eff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: #00ff00;
}

/* Clickable commands */
.clickable-command {
    color: #ffbd2e;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s;
}

.clickable-command:hover {
    color: #00ff00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

/* Responsive */

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease-in;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.modal-terminal {
    width: 90%;
    max-width: 600px;
    background: #0c0c0c;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 255, 0, 0.3);
    border: 1px solid #1a3a1a;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-body {
    padding: 30px;
    color: #00ff00;
}

.modal-title {
    color: #00ff00;
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
}

.contact-info {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    color: #d0d0d0;
    font-size: 13px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.info-text {
    line-height: 1.5;
}

.form-divider {
    text-align: center;
    color: #4a9eff;
    font-size: 12px;
    margin-bottom: 20px;
    font-style: italic;
}

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

.form-group label {
    display: block;
    color: #4a9eff;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    color: #00ff00;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #00ff00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.error-message {
    display: block;
    color: #ff5f57;
    font-size: 12px;
    margin-top: 5px;
    min-height: 18px;
}

.form-group input.error,
.form-group textarea.error {
    border-color: #ff5f57;
    box-shadow: 0 0 10px rgba(255, 95, 87, 0.3);
}

.form-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.btn-submit,
.btn-cancel {
    background: transparent;
    border: 2px solid #00ff00;
    color: #00ff00;
    padding: 10px 25px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-submit:hover {
    background: #00ff00;
    color: #0c0c0c;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-cancel {
    border-color: #ff5f57;
    color: #ff5f57;
}

.btn-cancel:hover {
    background: #ff5f57;
    color: #0c0c0c;
    box-shadow: 0 0 20px rgba(255, 95, 87, 0.5);
}

/* Portfolio Modal */
.portfolio-modal {
    max-width: 1000px;
}

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

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #2a2a2a;
    transition: transform 0.3s, box-shadow 0.3s;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 0, 0.2);
    border-color: #00ff00;
}

.portfolio-link {
    display: block;
    position: relative;
    text-decoration: none;
}

.portfolio-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    color: #00ff00;
    font-size: 20px;
    margin-bottom: 10px;
}

.portfolio-overlay p {
    color: #d0d0d0;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .terminal {
        max-width: 100%;
    }
    
    .terminal-body {
        font-size: 12px;
        padding: 15px;
        min-height: 400px;
    }
    
    .cursor {
        left: 170px;
    }
    
    .modal.active {
        align-items: flex-start;
        overflow-y: auto;
        padding: 20px 0;
    }
    
    .modal-terminal {
        width: 95%;
        margin: 0 auto;
        max-height: none;
    }
    
    .modal-body {
        padding: 20px;
        max-height: none;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    .btn-submit,
    .btn-cancel {
        width: 100%;
    }
    
    .portfolio-modal {
        max-width: 95%;
        margin: 0;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

/* CV Modal Styles */
.cv-modal-terminal {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.cv-modal-body {
    max-height: calc(90vh - 45px);
    overflow-y: auto;
    padding: 20px 30px;
}

.cv-content {
    color: #00ff00;
}

.cv-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #1a3a1a;
    margin-bottom: 30px;
}

.cv-header h1 {
    color: #00ff00;
    font-size: 28px;
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.cv-tagline {
    color: #4a9eff;
    font-size: 16px;
    margin-bottom: 15px;
}

.cv-contact-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #888;
}

.cv-section {
    margin-bottom: 30px;
}

.cv-section h2 {
    color: #ffbd2e;
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #2a2a2a;
}

.cv-section p {
    color: #d0d0d0;
    line-height: 1.6;
    margin-bottom: 10px;
}

.cv-item {
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 2px solid #1a3a1a;
}

.cv-item:last-child {
    margin-bottom: 0;
}

.cv-item h3 {
    color: #00ff00;
    font-size: 16px;
    margin-bottom: 5px;
}

.cv-meta {
    color: #4a9eff;
    font-size: 13px;
    margin-bottom: 10px;
}

.cv-item ul {
    list-style: none;
    padding-left: 0;
}

.cv-item ul li {
    color: #d0d0d0;
    margin-bottom: 5px;
    padding-left: 20px;
    position: relative;
}

.cv-item ul li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #00ff00;
}

.cv-skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.cv-skill-category {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    padding: 15px;
}

.cv-skill-category h4 {
    color: #ffbd2e;
    font-size: 14px;
    margin-bottom: 10px;
    border-bottom: 1px solid #2a2a2a;
    padding-bottom: 5px;
}

.cv-skill-category ul {
    list-style: none;
    padding-left: 0;
}

.cv-skill-category ul li {
    color: #d0d0d0;
    font-size: 13px;
    margin-bottom: 5px;
    padding-left: 15px;
    position: relative;
}

.cv-skill-category ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28ca42;
}

/* CV Modal Responsive */
@media (max-width: 768px) {
    .cv-modal-terminal {
        max-width: 95%;
        margin: 0;
        max-height: none;
    }
    
    .cv-modal-body {
        padding: 15px 20px;
        max-height: none;
    }
    
    .cv-header h1 {
        font-size: 22px;
    }
    
    .cv-tagline {
        font-size: 14px;
    }
    
    .cv-contact-info {
        flex-direction: column;
        gap: 8px;
        font-size: 12px;
    }
    
    .cv-section h2 {
        font-size: 16px;
    }
    
    .cv-skills-grid {
        grid-template-columns: 1fr;
    }
}
