/* Clean Developer Portfolio Design System */

:root {
    --bg-dark: #0f1013;
    --bg-card: rgba(24, 25, 29, 0.65);
    --bg-navbar: rgba(15, 16, 19, 0.75);
    
    --primary: #10b981; /* Emerald / Soft Green */
    --primary-glow: rgba(16, 185, 129, 0.35);
    --secondary: #14b8a6; /* Sea Green / Teal */
    --secondary-glow: rgba(20, 184, 166, 0.2);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-header: #ffffff;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(16, 185, 129, 0.4);
    
    --font-global: 'Outfit', sans-serif;
    
    --container-width: 1140px;
    --transition-speed: 0.3s;
}

/* Reset & Global styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.4; /* Faint and ambient */
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-global);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-global);
    color: var(--text-header);
    font-weight: 600;
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--bg-navbar);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: padding var(--transition-speed);
    padding: 20px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo {
    font-family: var(--font-global);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-header);
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition-speed);
}

.nav-link:hover {
    color: var(--primary);
}

.nav-toggle {
    display: none;
    font-size: 1.3rem;
    color: var(--text-main);
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: var(--font-global);
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: 1px solid var(--primary);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 160px 0 100px 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-glow {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(0,0,0,0) 70%);
    z-index: 1;
    pointer-events: none;
}

.hero-container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    z-index: 2;
}

.hero-content {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.hero-subtitle {
    display: inline-block;
    color: var(--secondary);
    font-family: var(--font-global);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-description {
    color: var(--text-muted);
    font-size: 1.15rem;
    margin-bottom: 30px;
}

.hero-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 35px;
    justify-content: center;
}

.hero-socials {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.hero-socials a {
    color: var(--text-muted);
    font-size: 1.4rem;
    transition: color var(--transition-speed);
}

.hero-socials a:hover {
    color: var(--primary);
}

/* General Section headers */
.section-title {
    font-size: 2.25rem;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.section-desc {
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* About Section */
.about-section {
    padding: 80px 0;
    background-color: rgba(255, 255, 255, 0.01);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
}

.about-info h3, .about-timeline h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.about-info p {
    color: var(--text-muted);
    margin-bottom: 15px;
}

/* Timeline */
.timeline {
    position: relative;
    border-left: 2px solid var(--border-color);
    padding-left: 20px;
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
}

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

.timeline-date {
    display: block;
    color: var(--secondary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.timeline-item h4 {
    font-size: 1.05rem;
    font-weight: 600;
}

.timeline-company {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Skills Section */
.skills-section {
    padding: 80px 0;
}

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

.skills-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    transition: transform var(--transition-speed), border-color var(--transition-speed);
}

.skills-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
}

.skills-icon {
    font-size: 2.2rem;
    color: var(--secondary);
    margin-bottom: 15px;
}

.skills-card h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Featured Section */
.featured-section {
    padding: 80px 0;
    background-color: rgba(255, 255, 255, 0.01);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
    gap: 30px;
}

.featured-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: border-color var(--transition-speed), transform var(--transition-speed);
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
}

.featured-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
}

.featured-card-content {
    padding: 35px;
}

.project-category {
    display: block;
    color: var(--secondary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.featured-card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.featured-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.project-tags .tag {
    background-color: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.project-link {
    color: var(--text-header);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color var(--transition-speed);
}

.project-link:hover {
    color: var(--primary);
}

.project-link i {
    transition: transform var(--transition-speed);
}

.project-link:hover i {
    transform: translateX(4px);
}

/* Project Directory */
.projects-section {
    padding: 80px 0;
}

.directory-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.search-bar {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

#project-search {
    width: 100%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 14px 16px 14px 44px;
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-global);
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--transition-speed);
}

#project-search:focus {
    border-color: var(--primary);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 6px;
    font-family: var(--font-global);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

/* Directory Project Cards */
.directory-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color var(--transition-speed), transform var(--transition-speed);
}

.directory-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

.directory-card h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.directory-card p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 16px;
    flex-grow: 1;
}

.directory-card .tag-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.directory-card .tag-wrap .mini-tag {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.no-results {
    display: none;
    text-align: center;
    padding: 60px 0;
    color: var(--text-muted);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--border-color);
}

/* Contact Section */
.contact-section {
    padding: 80px 0;
    background-color: rgba(255, 255, 255, 0.01);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
}

.contact-info-panel h3, .contact-form-panel h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.contact-info-panel p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-item i {
    font-size: 1.2rem;
    color: var(--secondary);
    width: 20px;
}

.contact-item span, .contact-item a {
    color: var(--text-main);
    text-decoration: none;
}

/* Form Styles */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input, .form-group textarea {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 12px 14px;
    border-radius: 6px;
    color: var(--text-main);
    font-family: var(--font-global);
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--transition-speed);
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary);
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    background-color: #04060b;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-container p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: color var(--transition-speed);
}

.footer-links a:hover {
    color: var(--primary);
}

/* Responsive styles */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.8rem;
    }
    .about-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px 0;
    }
    .nav-menu {
        display: none;
    }
    .nav-menu.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-navbar);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border-color);
        padding: 24px;
        gap: 18px;
        align-items: center;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    }
    .nav-toggle {
        display: block;
    }
    .hero-title {
        font-size: 2.3rem;
    }
    .hero-actions {
        flex-direction: column;
    }
    .featured-grid {
        grid-template-columns: 1fr;
    }
}

/* Monospace configuration for terminal */
.mono-text {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9rem;
}

/* Terminal styled contact block */
.terminal-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #0b0f19;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.terminal-header {
    background-color: #121826;
    border-bottom: 1px solid var(--border-color);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    position: relative;
}

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

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

.term-btn.close { background-color: #ff5f56; }
.term-btn.minimize { background-color: #ffbd2e; }
.term-btn.maximize { background-color: #27c93f; }

.terminal-title {
    position: absolute;
    width: 100%;
    text-align: center;
    left: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    pointer-events: none;
}

.terminal-body {
    padding: 30px;
    text-align: left;
}

.terminal-line {
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: #ffffff;
}

.term-prompt {
    color: var(--primary); /* Light green prompt */
    margin-right: 8px;
}

.terminal-output {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 24px;
    color: #10b981; /* Emerald green output */
}

.terminal-output pre {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.88rem;
    white-space: pre-wrap;
    word-break: break-all;
}

.terminal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.terminal-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.terminal-form label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #a855f7; /* Lavender/purple */
    text-transform: lowercase;
    letter-spacing: 0.5px;
}

.terminal-form input, .terminal-form textarea {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 6px;
    color: #ffffff;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--transition-speed);
}

.terminal-form input:focus, .terminal-form textarea:focus {
    border-color: var(--primary);
}

.btn-terminal {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid rgba(16, 185, 129, 0.35);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    padding: 10px 20px;
    margin-top: 10px;
    align-self: flex-start;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-speed);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-terminal:hover {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: var(--primary);
    color: #ffffff;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Featured Project Actions & Demo Drawers */
.project-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    gap: 12px;
}

.btn-demo-toggle {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-family: var(--font-global);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-speed);
}

.btn-demo-toggle:hover, .btn-demo-toggle.active {
    border-color: var(--primary);
    color: var(--primary);
    background-color: rgba(16, 185, 129, 0.05);
}

.project-demo-drawer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), margin-top 0.4s ease;
    margin-top: 0;
}

.project-demo-drawer.active {
    max-height: 500px;
    margin-top: 20px;
}

/* Simulated Console styling */
.demo-console {
    background-color: #0b0f19;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.console-header {
    background-color: #121826;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    position: relative;
}

.console-header .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.console-header .dot.close { background-color: #ff5f56; }
.console-header .dot.minimize { background-color: #ffbd2e; }
.console-header .dot.maximize { background-color: #27c93f; }

.console-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    position: absolute;
    width: 100%;
    left: 0;
    text-align: center;
    pointer-events: none;
}

.console-body {
    padding: 16px;
    font-size: 0.8rem;
    color: #f8fafc;
    text-align: left;
}

.console-line {
    margin-bottom: 6px;
    line-height: 1.4;
}

.console-line:last-child {
    margin-bottom: 0;
}

.console-line .prompt {
    color: var(--primary);
}

/* TTS Speech Demo Tool styling */
.demo-tts-tool {
    background-color: #121826;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
}

.tts-input-row {
    display: flex;
    gap: 10px;
}

#tts-voice-text {
    flex-grow: 1;
    background-color: #0b0f19;
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 6px;
    color: #ffffff;
    font-family: var(--font-global);
    font-size: 0.88rem;
    outline: none;
    transition: border-color var(--transition-speed);
}

#tts-voice-text:focus {
    border-color: var(--primary);
}

.tts-waveform-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.tts-waveform {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 20px;
}

.tts-waveform .bar {
    width: 3px;
    height: 4px;
    background-color: var(--border-color);
    border-radius: 2px;
    transition: height 0.15s ease, background-color 0.15s ease;
}

.tts-waveform.playing .bar {
    background-color: var(--primary);
    animation: wave-animation 0.8s ease infinite alternate;
}

.tts-waveform.playing .bar:nth-child(2) { animation-delay: 0.1s; }
.tts-waveform.playing .bar:nth-child(3) { animation-delay: 0.2s; }
.tts-waveform.playing .bar:nth-child(4) { animation-delay: 0.3s; }
.tts-waveform.playing .bar:nth-child(5) { animation-delay: 0.4s; }
.tts-waveform.playing .bar:nth-child(6) { animation-delay: 0.15s; }
.tts-waveform.playing .bar:nth-child(7) { animation-delay: 0.25s; }
.tts-waveform.playing .bar:nth-child(8) { animation-delay: 0.35s; }
.tts-waveform.playing .bar:nth-child(9) { animation-delay: 0.05s; }
.tts-waveform.playing .bar:nth-child(10) { animation-delay: 0.45s; }

@keyframes wave-animation {
    0% { height: 4px; }
    100% { height: 18px; }
}

.waveform-status {
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
}

.waveform-status.playing {
    color: var(--primary);
}
