/* Reset and Base Styles */                                          
:root {
    --color-bg: #0a0a0a;
    --color-text: #00ff00;
    --color-text-dim: #00cc00;
    --color-terminal: #000000;
    --color-terminal-header: #2d2d2d;
    --glow: 0 0 10px rgba(0, 255, 0, 0.5);
}

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

body {
    font-family: 'Courier New', monospace;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

html {
    overflow-x: hidden;
    max-width: 100vw;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    overflow-x: hidden;
}

/* Terminal Header */
.terminal-header {
    background: var(--color-terminal-header);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.terminal-controls {
    display: flex;
    gap: 0.5rem;
    margin-right: 1rem;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.close { background: #ff5f56; }
.minimize { background: #ffbd2e; }
.maximize { background: #27c93f; }

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

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 2rem;
}

.matrix-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.matrix-bg canvas {
    opacity: 0.1;
}

.terminal-window {
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid var(--color-text);
    border-radius: 8px;
    padding: 2rem;
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    box-shadow: 0 5px 25px rgba(0, 255, 0, 0.3);
    backdrop-filter: blur(5px);
    animation: slideIn 0.8s ease-out;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.terminal-output {
    font-size: 1.2rem;
    line-height: 2;
}

.prompt {
    color: var(--color-text);
    margin-right: 0.5rem;
}

/* Add enhanced styling for responses */
.response {
    display: inline-block;
    overflow: hidden;
    white-space: normal;
    word-wrap: break-word;
    background-color: rgba(0, 255, 0, 0.15);
    padding: 5px 10px;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
    font-weight: bold;
    color: #00ff00;
    letter-spacing: 0.5px;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
    border: 1px solid rgba(0, 255, 0, 0.3);
    margin: 5px 0;
    width: 100%;
    max-width: 100%;
    animation: none;
}

.response span {
    display: inline-block;
    animation: revealText 1.5s steps(40, end) forwards;
}

.response::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, 
        rgba(0, 255, 0, 0) 0%, 
        rgba(0, 255, 0, 0.1) 50%, 
        rgba(0, 255, 0, 0) 100%);
    z-index: 1;
    animation: shimmer 2s infinite;
}

.cursor {
    animation: blink 1s step-end infinite;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 25px;
    margin: 20px 0;
    justify-content: center;
}

.social-link {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 50%;
    background: rgba(0, 255, 0, 0.1);
    position: relative;
}

.social-link:hover {
    transform: translateY(-5px);
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

.social-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #00ff00;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.social-link:hover::after {
    transform: scaleX(1);
}

.social-icon {
    width: 32px;
    height: 32px;
}

/* Section Headers */
.section-header {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-text);
    position: relative;
    animation: float 6s ease-in-out infinite;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: #00ff00;
    transition: width 0.3s ease;
}

.section-header:hover::after {
    width: 80px;
}

/* Featured Section */
.featured {
    padding: 4rem 0;
}

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

.terminal-card {
    background: var(--color-terminal);
    border: 1px solid var(--color-text);
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.terminal-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 255, 0, 0.2);
}

.terminal-card::before {
    pointer-events: none;
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(0, 255, 0, 0.1),
        transparent
    );
    transform: rotate(45deg);
    transition: all 0.5s;
    opacity: 0;
}

.terminal-card:hover::before {
    animation: shine 1.5s;
}

.card-header {
    background: var(--color-text);
    color: var(--color-terminal);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-content {
    padding: 1.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-stack span {
    display: inline-block;
    padding: 3px 8px;
    margin: 2px;
    border: 1px solid #00ff00;
    border-radius: 12px;
    font-size: 0.8em;
    transition: all 0.3s ease;
    background: rgba(0, 255, 0, 0.1);
}

.tech-stack span:hover {
    background-color: rgba(0, 255, 0, 0.1);
    transform: translateY(-2px);
}

/* Blog Section */
.blog {
    padding: 4rem 0;
    background: rgba(0, 255, 0, 0.02);
}

.blog-grid {
    display: grid;
    gap: 2rem;
    max-width: 100%;
    overflow: hidden;
}

.blog-card {
    background: var(--color-terminal);
    border: 1px solid var(--color-text);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.blog-card:hover {
    transform: scale(1.03);
    box-shadow: 0 5px 15px rgba(0, 255, 0, 0.3);
    border: 2px solid var(--color-text);
}

.blog-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(0, 255, 0, 0.1),
        transparent
    );
    transform: rotate(45deg);
    transition: all 0.5s;
    opacity: 0;
}

.blog-card:hover::before {
    animation: shine 1.5s;
}

.blog-card .card-header {
    background: transparent;
    color: var(--color-text);
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--color-text);
}

.file-type {
    color: var(--color-text-dim);
}

.blog-card .card-content {
    padding: 1.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.blog-card h3 {
    margin-bottom: 1rem;
    color: var(--color-text);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tags span {
    transition: all 0.3s ease;
    background: rgba(0, 255, 0, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.9rem;
    border: 1px solid var(--color-text);
}

.tags span:hover {
    background-color: rgba(0, 255, 0, 0.2);
    transform: translateY(-2px);
    border: 1px solid var(--color-text);
    box-shadow: 0 2px 4px rgba(0, 255, 0, 0.3);
}

/* Add this new effect for blog cards */
.blog-grid a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.blog-grid a:hover .blog-card {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 255, 0, 0.4);
    border: 2px solid var(--color-text);
}

.blog-grid a:hover .blog-card .card-header {
    border-bottom: 2px solid var(--color-text);
}

.blog-grid a:hover .blog-card h3 {
    color: #ffffff;
    text-shadow: 0 0 8px var(--color-text);
}

/* Particles */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
}

/* Image Carousel Styles */
.carousel-section {
    padding: 4rem 0;
    background: rgba(0, 255, 0, 0.02);
}

.carousel {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

.carousel-container {
    overflow: hidden;
    width: 100%;
    display: flex;
    justify-content: center;
    max-width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    width: 100%;
}

.carousel-slide {
    flex: 0 0 100%;
    padding: 0 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.carousel-slide img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid var(--color-text);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
    transition: all 0.5s ease;
    display: block;
    margin: 0 auto;
}

.carousel-slide:hover img {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.4);
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: #00ff00;
    border: 1px solid #00ff00;
    padding: 15px;
    cursor: pointer;
    font-size: 20px;
    border-radius: 50%;
    z-index: 10;
    transition: all 0.3s ease;
}

.carousel-button:hover {
    background: rgba(0, 255, 0, 0.1);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

.carousel-button.prev {
    left: 10px;
}

.carousel-button.next {
    right: 10px;
}

/* Footer */
footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--color-text);
    width: 100%;
    overflow: hidden;
}

/* Website Link */
.website-link {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    box-sizing: border-box;
    background-color: #00ff00;
    color: #000;
    padding: 12px 0;
    border-radius: 24px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
    transition: background 0.2s;
    border: 1px solid #00ff00;
    text-align: center;
}

.website-link:hover {
    background-color: #000;
    color: #00ff00;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 255, 0, 0.4);
}

/* Project Links */
.project-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: #00ff00;
    text-decoration: underline;
}

/* BLOG 1 clicking/redirection */
.blog1-link {
    text-decoration: none;
    color: inherit;
}
  
.blog-link:hover {
    cursor: pointer;
}

/* HIGHLIGHTING */
.highlight_glow {
    color: #00ff00;
    text-shadow: 0 0 8px #00ff00;
    font-weight: bold;
}
.highlight_underline {
    border-bottom: 2px solid #00ff00;
    font-weight: bold;
}
.highlight_allout {
    background-color: #00ff00;
    color: #000;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-weight: bold;
}
.subheading {
    font-size: large;
}

/* Make all images responsive */
img {
    max-width: 100%;
    height: auto;
}

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

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

@keyframes revealText {
    from { 
        clip-path: inset(0 100% 0 0);
    }
    to { 
        clip-path: inset(0 0 0 0);
    }
}

@keyframes shine {
    0% {
        left: -100%;
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-dim);
}

/* Responsive design for different screen sizes */
@media (max-width: 1200px) {
    .terminal-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .terminal-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .terminal-window {
        width: 95%;
        margin: 0 auto;
        padding: 2rem;
    }
    
    .terminal-output {
        font-size: 1rem;
        line-height: 2.4;
    }
    
    .carousel-container {
        max-width: 90%;
        margin: 2rem auto;
    }
    
    .social-links {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 25px;
        margin: 30px 0;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        width: 95%;
        margin: 0 auto;
        gap: 3rem;
    }
    
    .section-header {
        font-size: 1.1rem;
        margin-bottom: 3rem;
    }
    
    .carousel-button {
        padding: 10px 15px;
        font-size: 16px;
    }
    
    .container {
        width: 92%;
        padding: 1.5rem;
    }
    
    .hero {
        padding: 40px 0;
        height: auto;
        min-height: 100vh;
    }
    
    .featured, .blog, .carousel-section {
        padding: 60px 0;
        margin-bottom: 30px;
    }
    
    .card-content {
        padding: 2rem;
    }
    
    .terminal-card, .blog-card {
        margin-bottom: 2rem;
    }
    
    /* Add space between responses and commands */
    .response {
        margin: 15px 0;
        padding: 8px 14px;
    }
    
    /* Add more space after terminal commands */
    .prompt {
        margin-top: 20px;
        display: inline-block;
    }
    
    p {
        margin-bottom: 1.2rem;
        line-height: 1.8;
    }
    
    .tech-stack {
        margin-top: 1.5rem;
        gap: 0.8rem;
    }
    
    /* Ensure all elements stay within viewport on mobile */
    .container, 
    .terminal-window, 
    .carousel-container,
    .terminal-card,
    .blog-card,
    .blog-grid {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .website-link {
        display: block;
        width: 100%;
        font-size: 1.1rem;
        padding: 14px 0;
        margin: 1.5rem 0 1rem 0;
        border-radius: 22px;
    }
}

@media (max-width: 480px) {
    .terminal-title {
        font-size: 0.8rem;
    }
    
    .response {
        font-size: 0.9rem;
        padding: 8px 14px;
        margin: 18px 0;
    }
    
    .terminal-window {
        padding: 1.8rem;
        margin-top: 30px;
    }
    
    .terminal-card {
        padding: 0;
        margin-bottom: 2.5rem;
    }
    
    .blog-card {
        padding: 0;
        margin-bottom: 2.5rem;
    }
    
    .card-header {
        padding: 1.2rem;
    }
    
    .blog-card .card-content, .terminal-card .card-content {
        padding: 1.8rem;
    }
    
    .website-link {
        display: block;
        width: 100%;
        font-size: 1.1rem;
        padding: 16px 0;
        margin: 1.5rem 0 1rem 0;
        border-radius: 20px;
    }
    
    .carousel-button {
        padding: 8px 14px;
        font-size: 16px;
    }
    
    .terminal-controls {
        padding: 8px;
    }
    
    .control {
        width: 10px;
        height: 10px;
        margin-right: 8px;
    }
    
    .tech-stack span, .tags span {
        font-size: 0.8em;
        padding: 6px 12px;
        margin: 4px;
    }
    
    .container {
        width: 92%;
        padding: 1.2rem;
    }
    
    .carousel-section {
        padding: 40px 0;
    }
    
    .blog, .featured {
        padding: 50px 0;
    }
    
    .blog-grid {
        gap: 3rem;
    }
    
    footer {
        padding: 30px 0;
        font-size: 0.85rem;
        margin-top: 30px;
    }
    
    .carousel-slide img {
        max-height: 40vh;
        margin: 20px auto;
    }
    
    .carousel-slide {
        padding: 0 20px;
    }
    
    .terminal-header {
        padding: 0.8rem;
    }
    
    /* Add space between social links in footer */
    .social-links {
        gap: 30px;
        margin: 35px 0;
    }
    
    p {
        margin-bottom: 1.5rem;
        line-height: 1.8;
    }
    
    .section-header {
        margin-bottom: 3rem;
    }
    
    .tech-stack {
        margin-top: 1.8rem;
        gap: 1rem;
    }
}

/* Additional responsive styles for very small screens */
@media (max-width: 360px) {
    .social-icon {
        width: 22px;
        height: 22px;
    }
    
    .terminal-window {
        width: 100%;
        padding: 1.5rem;
        margin-top: 30px;
    }
    
    .terminal-title {
        font-size: 0.75rem;
    }
    
    .section-header {
        font-size: 1rem;
        margin-bottom: 2.5rem;
    }
    
    .blog-card h3, .terminal-card .card-header span {
        font-size: 1rem;
        margin-bottom: 1.2rem;
    }
    
    .blog-card p, .terminal-card p {
        font-size: 0.85rem;
        margin-bottom: 1.2rem;
        line-height: 1.9;
    }
    
    .card-header {
        padding: 1.4rem;
    }
    
    .website-link {
        display: block;
        width: 100%;
        font-size: 1rem;
        padding: 14px 0;
        margin: 1.8rem 0 1rem 0;
        border-radius: 18px;
    }
    
    /* Increase space between blog items */
    .blog-grid {
        gap: 3.5rem;
    }
    
    /* Add space between tech stack items */
    .tech-stack {
        gap: 10px;
        margin-top: 1.8rem;
    }
    
    .social-links {
        gap: 25px;
        flex-wrap: wrap;
        justify-content: center;
        margin: 35px 0;
    }
    
    .terminal-output {
        line-height: 2.4;
    }
    
    p {
        margin-bottom: 1.5rem;
        line-height: 1.9;
    }
    
    .container {
        padding: 1.5rem;
    }
    
    .terminal-card, .blog-card {
        margin-bottom: 3rem;
    }
    
    .response {
        margin: 20px 0;
        padding: 10px 16px;
    }
    
    .prompt {
        margin-top: 25px;
    }
    
    .blog-card .card-content, .terminal-card .card-content {
        padding: 2rem;
    }
    
    .carousel-slide {
        padding: 0 25px;
    }
    
    footer {
        padding: 35px 0;
        margin-top: 40px;
    }
}
