:root {
    --primary-bg: #0a0a14;
    --secondary-bg: #12121d;
    --text-color: #ffffff;
    --accent-color: #ff7700;
    --accent-hover: #ff9900;
    --border-color: #2a2a3b;
    --card-bg: #1a1a2a;
    --terminal-bg: #0d0d1a;
    --terminal-text: #00ff9d;
    --success-color: #00ff9d;
    --warning-color: #ffcc00;
    --error-color: #ff3860;
    --spotify-green: #1DB954;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', monospace;
}

body {
    background: var(--primary-bg);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(255, 119, 0, 0.1) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 255, 157, 0.1) 0%, transparent 25%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header & Navigation */
header {
    background: rgba(18, 18, 29, 0.95);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--accent-color);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-color), var(--success-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.nav-links a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.nav-links a:hover:after {
    width: 100%;
}

.mode-toggle {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mode-toggle:hover {
    background: rgba(255, 119, 0, 0.1);
}

/* Hero Section */
.hero {
    padding: 8rem 0 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    text-align: left;
}

.hero-text {
    flex: 1;
}

.hero-image {
    flex: 1;
    text-align: center;
    position: relative;
}

.profile-shape {
    width: 380px;
    height: 380px;
    margin: 0 auto;
    position: relative;
    animation: pulse 4s infinite ease-in-out;
    filter: drop-shadow(0 0 20px rgba(255, 119, 0, 0.5));
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: linear-gradient(135deg, var(--accent-color), var(--success-color));
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-photo {
    width: 95%;
    height: 95%;
    object-fit: cover;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-color), var(--success-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #ccc;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #999;
}

.highlight {
    color: var(--accent-color);
}

.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-color), var(--success-color));
    color: #000;
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 119, 0, 0.3);
    margin-right: 1rem;
    margin-bottom: 1rem;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 119, 0, 0.4);
}

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

.btn.secondary:hover {
    background: rgba(255, 119, 0, 0.1);
}

/* Sections */
section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.section-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--accent-color), var(--success-color));
    margin: 0.5rem auto;
    border-radius: 2px;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.tech-stack {
    margin-top: 2rem;
}

.tech-stack h3 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.tech-icons {
    display: flex;
    gap: 1.5rem;
    font-size: 2.5rem;
}

.tech-icons i {
    transition: all 0.3s;
}

.tech-icons i:hover {
    color: var(--accent-color);
    transform: translateY(-5px);
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #ccc;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    text-align: center;
}

.skill-item {
    margin-bottom: 1.5rem;
}

.skill-name {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.skill-bar {
    height: 10px;
    background: var(--secondary-bg);
    border-radius: 5px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(to right, var(--accent-color), var(--success-color));
    border-radius: 5px;
    width: 0;
    transition: width 1s ease-in-out;
}

/* Portfolio Tabs */
.portfolio-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-button {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-button:hover, .tab-button.active {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    position: relative;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.project-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: var(--accent-color);
}

.project-content p {
    color: #ccc;
    margin-bottom: 1.5rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tag {
    background: rgba(255, 119, 0, 0.1);
    color: var(--accent-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
}

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

/* Object Detection Specific Styles */
.ai-controls {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid var(--accent-color);
    border-radius: 8px;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1rem;
    cursor: pointer;
}

.confidence-control {
    margin-top: 1rem;
}

.confidence-control input[type="range"] {
    width: 200px;
    margin: 0 1rem;
}

.demo-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 1rem auto;
    border: 2px solid var(--accent-color);
    border-radius: 10px;
    overflow: hidden;
}

#webcam, #output {
    width: 100%;
    height: auto;
}

#webcam {
    transform: scaleX(-1);
}

.fps-display {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(26, 26, 26, 0.8);
    color: var(--accent-color);
    padding: 5px 10px;
    border-radius: 5px;
    font-family: monospace;
    z-index: 2;
}

/* Certifications Section */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    justify-items: center;
}

.certification-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Enhanced AI Assistant Section */
.ai-assistant {
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    margin: 3rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.ai-assistant::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--accent-color), var(--success-color));
}

.chat-container {
    height: 400px;
    overflow-y: auto;
    background: var(--terminal-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) var(--secondary-bg);
}

.chat-container::-webkit-scrollbar {
    width: 6px;
}

.chat-container::-webkit-scrollbar-track {
    background: var(--secondary-bg);
    border-radius: 3px;
}

.chat-container::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 3px;
}

.chat-message {
    margin: 1rem 0;
    padding: 1.2rem;
    border-radius: 12px;
    max-width: 85%;
    line-height: 1.5;
    animation: messageSlideIn 0.3s ease-out;
    position: relative;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    background: linear-gradient(135deg, rgba(255, 119, 0, 0.15), rgba(255, 119, 0, 0.05));
    border: 1px solid rgba(255, 119, 0, 0.3);
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.bot-message {
    background: linear-gradient(135deg, rgba(0, 255, 157, 0.1), rgba(0, 255, 157, 0.05));
    border: 1px solid rgba(0, 255, 157, 0.2);
    border-bottom-left-radius: 4px;
}

.streaming-message {
    background: linear-gradient(135deg, rgba(0, 255, 157, 0.08), rgba(0, 255, 157, 0.03));
    border: 1px dashed rgba(0, 255, 157, 0.3);
}

/* Typing Indicator */
.typing-indicator {
    background: rgba(0, 255, 157, 0.05) !important;
    border: 1px dashed rgba(0, 255, 157, 0.2) !important;
    max-width: 80px;
}

.typing-dots {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success-color);
    animation: typingBounce 1.4s ease-in-out infinite both;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }
.typing-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Chat Input Improvements */
.chat-input-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

#chatInput {
    flex: 1;
    background: var(--terminal-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    padding: 1rem 1.5rem;
    outline: none;
    font-size: 1rem;
    transition: all 0.3s;
}

#chatInput:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(255, 119, 0, 0.1);
}

#chatInput:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#sendButton {
    border-radius: 25px;
    padding: 1rem 2rem;
    min-width: 100px;
    transition: all 0.3s;
}

#sendButton:disabled {
    background: var(--border-color);
    cursor: not-allowed;
}

/* Modal */
/* Improved Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 2% auto;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    width: 90%;
    max-width: 900px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: modalFadeIn 0.4s ease;
}

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

.close {
    color: #aaa;
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
}

.close:hover {
    color: var(--accent-color);
}

.modal-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--accent-color);
    font-size: 2.2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.modal-title:after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, var(--accent-color), var(--success-color));
    margin: 0.5rem auto;
    border-radius: 2px;
}

.game-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.game-option {
    background: var(--secondary-bg);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.game-option:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 25px rgba(255, 119, 0, 0.2);
}

.game-option i {
    font-size: 3.5rem;
    margin-bottom: 1.2rem;
    color: var(--accent-color);
    transition: transform 0.3s, color 0.3s;
}

.game-option:hover i {
    transform: scale(1.2);
    color: var(--success-color);
}

.game-option h3 {
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
}

.game-option p {
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Spotify Section */
.spotify-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.spotify-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.spotify-header i {
    color: var(--spotify-green);
    font-size: 2.5rem;
}

.spotify-header h2 {
    color: var(--spotify-green);
    font-size: 1.8rem;
}

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

.playlist-item {
    background: #191414;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s;
    border: 1px solid #282828;
}

.playlist-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(29, 185, 84, 0.2);
}

.playlist-iframe {
    width: 100%;
    height: 352px;
    border: none;
}

/* Music Visualizer */
.visualizer-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
    margin: 1.5rem 0;
    background: rgba(25, 20, 20, 0.7);
    border-radius: 10px;
    overflow: hidden;
}

.visualizer-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 50px;
    gap: 3px;
}

.bar {
    width: 4px;
    background: var(--spotify-green);
    border-radius: 2px;
    height: 10px;
    animation: visualizer 1.5s infinite ease-in-out;
}

.bar:nth-child(1) { animation-delay: 0s; }
.bar:nth-child(2) { animation-delay: 0.1s; }
.bar:nth-child(3) { animation-delay: 0.2s; }
.bar:nth-child(4) { animation-delay: 0.3s; }
.bar:nth-child(5) { animation-delay: 0.4s; }
.bar:nth-child(6) { animation-delay: 0.5s; }
.bar:nth-child(7) { animation-delay: 0.6s; }
.bar:nth-child(8) { animation-delay: 0.7s; }
.bar:nth-child(9) { animation-delay: 0.8s; }
.bar:nth-child(10) { animation-delay: 0.9s; }

@keyframes visualizer {
    0%, 100% { height: 10px; }
    50% { height: 40px; }
}

/* Game Section */
.game-section {
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    padding: 2rem;
    margin: 3rem 0;
}

.game-section.hidden {
    display: none;
}

.game-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    background: var(--terminal-bg);
    padding: 10px;
    border-radius: 8px;
}

.game-cell {
    background: var(--secondary-bg);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.game-cell:hover {
    background: rgba(255, 119, 0, 0.1);
}

.game-cell.empty {
    background: transparent;
}

.game-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.game-info {
    margin-bottom: 1rem;
}

/* Queens Game */
.queens-game-board {
    display: grid;
    gap: 2px;
    background: var(--terminal-bg);
    padding: 10px;
    border-radius: 8px;
    max-width: 500px;
}

.queens-cell {
    background: var(--secondary-bg);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.queens-cell:hover {
    background: rgba(255, 119, 0, 0.1);
}

.queens-cell.has-queen::after {
    content: '♛';
    font-size: 1.5rem;
    color: var(--accent-color);
}

.queens-cell.threatened {
    background: rgba(255, 0, 0, 0.2);
}

.queens-size-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.queens-size-selector select {
    background: var(--terminal-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: 4px;
}

/* Tic Tac Toe Game */
.tic-tac-toe-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    background: var(--terminal-bg);
    padding: 10px;
    border-radius: 8px;
    max-width: 400px;
}

.ttt-cell {
    background: var(--secondary-bg);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.ttt-cell:hover {
    background: rgba(255, 119, 0, 0.1);
}

.ttt-cell.x {
    color: var(--accent-color);
}

.ttt-cell.o {
    color: var(--success-color);
}

/* Memory Game */
.memory-game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    background: var(--terminal-bg);
    padding: 10px;
    border-radius: 8px;
    max-width: 500px;
}

.memory-card {
    aspect-ratio: 1;
    perspective: 1000px;
    cursor: pointer;
}

.memory-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.memory-card.flipped .memory-card-inner {
    transform: rotateY(180deg);
}

.memory-card-front, .memory-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.memory-card-front {
    background: var(--secondary-bg);
}

.memory-card-back {
    background: var(--accent-color);
    color: #000;
    transform: rotateY(180deg);
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--accent-color);
    width: 30px;
}

.contact-form {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background: var(--terminal-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    outline: none;
}

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

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

/* Footer */
footer {
    background: var(--secondary-bg);
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.social-links a {
    color: var(--text-color);
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--accent-color);
}

.copyright {
    color: #666;
}

/* CLI Mode */
.cli-mode {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--terminal-bg);
    color: var(--terminal-text);
    z-index: 1000;
    padding: 2rem;
    font-family: 'Courier New', monospace;
    overflow: auto;
}

.cli-header {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.cli-content {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.cli-input {
    background: transparent;
    border: none;
    color: var(--terminal-text);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    width: 100%;
    outline: none;
    caret-color: var(--accent-color);
}

.cli-command {
    color: var(--accent-color);
}

.cli-output {
    margin-bottom: 1rem;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 2rem;
    background: var(--card-bg);
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 968px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .contact-grid,
    .game-container {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.2rem;
    }
    
    .profile-shape {
        width: 280px;
        height: 280px;
    }

    #navLinks {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    #navLinks {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--secondary-bg);
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        border-top: 1px solid var(--border-color);
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        z-index: 99;
    }

    #navLinks.active {
        transform: translateY(0);
        display: flex; /* <--- make sure it shows */
    }

    #navLinks a {
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
        text-align: center;
    }

    #navLinks a:last-child {
        border-bottom: none;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero {
        padding: 6rem 0 4rem;
    }

    section {
        padding: 4rem 0;
    }

    .tech-icons {
        font-size: 2rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .portfolio-tabs {
        flex-direction: column;
        align-items: center;
    }

    .tab-button {
        width: 100%;
        text-align: center;
    }

    .game-options {
        grid-template-columns: 1fr;
    }

    .mobile-menu-btn {
        display: block;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .profile-shape {
        width: 220px;
        height: 220px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .tech-icons {
        font-size: 1.5rem;
    }

    .project-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .chat-input-group {
        flex-direction: column;
    }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

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

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

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

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    #navLinks {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--secondary-bg);
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        border-top: 1px solid var(--border-color);
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        z-index: 99;
    }

    #navLinks.active {
        transform: translateY(0);
        display: flex; /* <--- make sure it shows */
    }

    #navLinks a {
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    #navLinks a:last-child {
        border-bottom: none;
    }
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 1.5rem;
        margin: 5% auto;
    }
    
    .game-options {
        grid-template-columns: 1fr;
    }
    
    .playlists-grid {
        grid-template-columns: 1fr;
    }
    
    .playlist-iframe {
        height: 300px;
    }
    
    .modal-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 1rem;
    }
    
    .game-option {
        padding: 1.5rem;
        min-height: 180px;
    }
    
    .game-option i {
        font-size: 2.8rem;
    }
    
    .playlist-iframe {
        height: 250px;
    }
}

/* Button styling */
.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-color), var(--success-color));
    color: #000;
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 119, 0, 0.3);
    margin-right: 1rem;
    margin-bottom: 1rem;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 119, 0, 0.4);
}

.btn.spotify {
    background: var(--spotify-green);
    color: white;
    box-shadow: 0 5px 15px rgba(29, 185, 84, 0.3);
}

.btn.spotify:hover {
    box-shadow: 0 8px 20px rgba(29, 185, 84, 0.4);
}

/* PWA App-like styles */
@media all and (display-mode: standalone) {
    header {
        padding-top: env(safe-area-inset-top);
    }
}

/* Improved Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 1rem 2rem;
    background: var(--card-bg);
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: all 0.3s ease-out;
    z-index: 10000;
    max-width: 80%;
    text-align: center;
    color: var(--text-color);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    border-color: var(--success-color);
    background: rgba(0, 255, 157, 0.1);
}

.toast.error {
    border-color: var(--error-color);
    background: rgba(255, 56, 96, 0.1);
}

.toast.warning {
    border-color: var(--warning-color);
    background: rgba(255, 204, 0, 0.1);
}

/* App Install Prompt */
.install-prompt {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 1px solid var(--accent-color);
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-width: 300px;
    display: none;
}

.install-prompt.show {
    display: block;
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.install-prompt-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2rem;
}

/* Enhanced AI Assistant Icon */
.ai-assistant-icon {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, var(--accent-color), var(--success-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
    animation: pulse 2s infinite;
}

.ai-assistant-icon:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.ai-assistant-icon i {
    font-size: 26px;
    color: #000;
}

.ai-assistant-icon::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--success-color));
    z-index: -1;
    animation: pulseRing 2s infinite;
}

@keyframes pulseRing {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@media (max-width: 768px) {
    .ai-assistant-icon {
        bottom: 20px;
        left: 20px;
        width: 55px;
        height: 55px;
    }
    
    .ai-assistant-icon i {
        font-size: 22px;
    }
}

/* markdown stuff */

/* Markdown Styling for Chat Messages */
.chat-message h1,
.chat-message h2,
.chat-message h3,
.chat-message h4,
.chat-message h5,
.chat-message h6 {
    margin: 1rem 0 0.5rem 0;
    color: var(--accent-color);
    line-height: 1.2;
}

.chat-message h1 {
    font-size: 1.8rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.3rem;
}

.chat-message h2 {
    font-size: 1.5rem;
}

.chat-message h3 {
    font-size: 1.3rem;
}

.chat-message p {
    margin: 0.8rem 0;
    line-height: 1.6;
}

.chat-message ul,
.chat-message ol {
    margin: 0.8rem 0;
    padding-left: 2rem;
}

.chat-message li {
    margin: 0.4rem 0;
}

.chat-message blockquote {
    border-left: 4px solid var(--accent-color);
    margin: 1rem 0;
    padding-left: 1rem;
    color: #ccc;
    font-style: italic;
}

.chat-message code {
    background: var(--terminal-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.chat-message pre {
    background: var(--terminal-bg);
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1rem 0;
}

.chat-message pre code {
    background: none;
    padding: 0;
}

.chat-message a {
    color: var(--accent-color);
    text-decoration: underline;
}

.chat-message a:hover {
    color: var(--accent-hover);
}

.chat-message table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.chat-message th,
.chat-message td {
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    text-align: left;
}

.chat-message th {
    background: rgba(255, 119, 0, 0.1);
}

.chat-message img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 0.5rem 0;
}

/* Responsive improvements for AI Assistant */
@media (max-width: 768px) {
    .ai-assistant {
        padding: 1.5rem;
        margin: 2rem 0;
    }
    
    .chat-container {
        height: 300px;
        padding: 1rem;
    }
    
    .chat-message {
        max-width: 90%;
        padding: 1rem;
    }
    
    .chat-input-group {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    #sendButton {
        width: 100%;
    }
    
    .ai-assistant-icon {
        bottom: 20px;
        left: 20px;
        width: 55px;
        height: 55px;
    }
    
    .ai-assistant-icon i {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .ai-assistant {
        padding: 1rem;
    }
    
    .chat-container {
        height: 250px;
    }
    
    .chat-message {
        max-width: 95%;
        padding: 0.8rem;
        font-size: 0.9rem;
    }
}