:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #121212;
    --bg-tertiary: #1a1a1a;
    --text-primary: #f0f0f0;
    --text-secondary: #b0b0b0;
    --accent: #00b4d8;
    --accent-dark: #0077b6;
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 5px;
    --font-code: 'JetBrains Mono', monospace;
    --font-text: 'Roboto', sans-serif;
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-bold: 600;
    --base-font-size: 18px; /* Increased from default */
}

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

body {
    font-family: var(--font-code);
    font-weight: var(--font-weight-light);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: var(--base-font-size);
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-code);
    font-weight: var(--font-weight-regular);
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 2.5rem; /* Increased from 2rem */
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

p {
    font-family: var(--font-text);
    font-weight: var(--font-weight-light);
    line-height: 1.7;
    font-size: 1.1rem; /* Increased from default */
}

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

/* Header & Navigation */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

/* Add visual separator to header - similar to about section */
header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.3;
}

header.scrolled {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    padding: 1rem 5%;
}

.logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.8rem;
    font-weight: 700;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.2rem; /* Increased from 1rem */
    transition: var(--transition);
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--accent);
    transition: var(--transition);
}

nav ul li a:hover {
    color: var(--accent);
}

nav ul li a:hover::after {
    width: 100%;
}

.menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Language Toggle - Updated Color */
.language-toggle {
    position: absolute;
    top: 0;
    right: 5px;
    color: white; /* Changed from var(--text-secondary) to white for better visibility */
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.8; /* Slightly increased from 0.7 for better contrast */
    transition: var(--transition);
    font-family: var(--font-code);
    padding: 0.1rem 0.3rem;
    z-index: 5;
}

.language-toggle:hover {
    color: var(--accent);
    opacity: 1;
}

@media screen and (max-width: 768px) {
    .language-toggle {
        right: 5px;
        font-size: 0.8rem;
    }
}

@media screen and (max-width: 480px) {
    .language-toggle {
        right: 5px;
        font-size: 0.75rem;
    }
}

/* Remove old language selector styles */
.language-container {
    display: none;
}

/* Language Selector - More Subtle Design */
.language-container {
    margin-left: 1.5rem;
    position: relative;
    z-index: 101;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.language-container:hover {
    opacity: 1;
}

#language-selector {
    background-color: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 0.3rem 1.7rem 0.3rem 1.5rem;
    border-radius: var(--border-radius);
    font-family: var(--font-code);
    font-size: 0.85rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: var(--transition);
    position: relative;
    background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%),
                      linear-gradient(135deg, var(--accent) 50%, transparent 50%);
    background-position: 
        calc(100% - 8px) calc(50% + 0px),
        calc(100% - 3px) calc(50% + 0px);
    background-size: 
        4px 4px,
        4px 4px;
    background-repeat: no-repeat;
}

.language-container::before {
    content: '🌐';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    z-index: 2;
    pointer-events: none;
    opacity: 0.8;
}

#language-selector:hover, 
#language-selector:focus {
    color: var(--accent);
    outline: none;
}

#language-selector option {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 5px;
    font-size: 0.8rem;
}

/* Ensure the language container is properly positioned in error pages */
.error-page .language-container {
    margin-top: 2rem;
    margin-left: 0;
}

/* Section Heights and Transitions */
section {
    min-height: 100vh;
    transition: opacity 0.3s ease;
    opacity: 1;
    width: 100%;
    position: relative;
    padding: 6rem 0; /* Ensure consistent padding */
    scroll-margin-top: 5rem; /* Add scroll margin for better positioning */
}

main {
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

.section-fade-out {
    opacity: 0;
    pointer-events: none;
}

.section-fade-in {
    opacity: 1;
    animation: fadeIn 0.5s ease forwards;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    padding: 6rem 0 5rem;
}

.hero .container {
    width: 100%;
}

.hero-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.hero-content {
    flex: 1;
    text-align: left;
    padding-right: 2rem;
    display: flex;
    flex-direction: column;
}

.hero-terminal {
    flex: 1;
    width: 100%;
    max-width: 600px;
    margin: 1.5rem 0;
    order: 2;
}

.hero h1, .hero-subtitle {
    order: 1;
}

.hero h1 {
    font-size: 4.5rem; /* Increased from 3.5rem */
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem; /* Increased from 1.2rem */
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.typewriter {
    margin-bottom: 0;
    font-size: 1.2rem;
    font-family: var(--font-code);
    height: auto;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 100%;
    overflow: hidden;
}

.hero-content {
    margin: 0 auto;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.typewriter {
    margin-bottom: 2rem;
    font-size: 1.2rem;
    font-family: 'JetBrains Mono', monospace;
    height: auto;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    margin: 0 auto 2rem;
    overflow: hidden;
}

.terminal-header {
    background-color: #2a2a2a;
    padding: 8px 15px;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
}

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

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

.terminal-close {
    background-color: #ff5f56;
}

.terminal-minimize {
    background-color: #ffbd2e;
}

.terminal-maximize {
    background-color: #27c93f;
}

.terminal-title {
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex-grow: 1;
    text-align: center;
    position: relative; /* Add position relative */
}

.terminal-body, 
.terminal-line, 
.command,
.terminal-prompt,
.terminal-title {
    font-family: var(--font-code);
    font-weight: var(--font-weight-light);
    font-size: 0.95rem;
    line-height: 1.5;
}

.terminal-body {
    padding: 4px 20px;
    min-height: 320px;
    height: 40vh; /* Set height relative to viewport */
    max-height: 400px;
    text-align: left;
    overflow-y: auto;
}

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

.command {
    color: var(--text-primary);
}

#terminal-output {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 8px 0;
}

.terminal-line {
    color: var(--text-primary);
    margin-bottom: 2px;
}

.current-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.terminal-prompt {
    color: var(--accent);
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 18px;
    background-color: var(--accent);
    animation: terminal-blink 1s infinite;
    vertical-align: middle;
    margin-left: 4px;
}

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

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.cta-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 3rem; /* Increased top margin */
    justify-content: center;
    width: 100%;
    text-align: center;
    position: relative;
    bottom: -2rem; /* Push buttons down */
}

.btn {
    padding: 0.9rem 2.2rem; /* Slightly larger padding */
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-block;
    font-family: var(--font-code);
    font-weight: var(--font-weight-regular);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 1.1rem; /* Added explicit font size */
}

.btn.primary {
    background: var(--accent);
    color: #0a0a0a;
}

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

.btn.small {
    padding: 0.6rem 1.2rem; /* Slightly larger */
    font-size: 0.95rem; /* Increased from 0.8rem */
}

.btn.demo {
    background: linear-gradient(45deg, var(--accent), var(--accent-dark));
    color: white;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 180, 216, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn.demo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--accent-dark), var(--accent));
    transition: left 0.3s ease;
    z-index: -1;
}

.btn.demo:hover::before {
    left: 0;
}

.btn.demo:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.5);
}

.btn.demo i {
    margin-right: 0.5rem;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn.primary:hover {
    background: var(--accent-dark);
}

.btn.secondary:hover {
    background: rgba(0, 180, 216, 0.1);
}

/* About Section */
.about {
    display: flex;
    align-items: center;
    background-color: var(--bg-secondary);
    min-height: 100vh;
    padding: 8rem 0;
    position: relative; /* Add position relative for the ::after element */
}

/* Add a visual separator to about section */
.about::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.3;
}

.about-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
}

.about-text {
    max-width: 700px;
    margin: 0 auto;
}

.about-text p {
    margin-bottom: 1rem;
    font-size: 1.2rem; /* Increased from 1rem */
    line-height: 1.8;
    color: var(--text-secondary);
}

.about-text h3 {
    font-size: 2.2rem; /* Increased from 1.8rem */
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

/* Skills Section */
.skills {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 8rem 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.skill-card {
    background-color: var(--bg-tertiary);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

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

.skill-card i {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.skill-card h3 {
    margin-bottom: 0;
    font-size: 1.3rem; /* Increased from 1.1rem */
    transition: var (--transition);
}

.skill-description {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0, 180, 216, 0.9), rgba(0, 119, 182, 0.9));
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: var(--border-radius);
}

.skill-description p {
    color: white;
    font-size: 1rem; /* Increased from 0.85rem */
    line-height: 1.5;
    text-align: center;
    font-family: var(--font-text);
}

.skill-card:hover .skill-description {
    opacity: 1;
}

.skill-card:hover i,
.skill-card:hover h3 {
    transform: translateY(-40px);
    opacity: 0;
}

/* Projects Section */
.projects {
    display: flex;
    align-items: center;
    background-color: var(--bg-secondary);
    padding: 8rem 0 10rem; /* Increased bottom padding */
    margin-bottom: 0; /* Let the padding handle spacing */
    position: relative; /* Ensure proper positioning */
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background-color: var(--bg-tertiary);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

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

.project-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.project1 {
    background-image: url('https://via.placeholder.com/350x200/1a1a1a/00b4d8');
}

.project2 {
    background-image: url('https://via.placeholder.com/350x200/1a1a1a/00b4d8');
}

.project3 {
    background-image: url('https://via.placeholder.com/350x200/1a1a1a/00b4d8');
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem; /* Increased from 1.3rem */
}

.project-info p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.1rem; /* Increased from 0.9rem */
    font-family: var(--font-text);
}

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

.project-tech span {
    background: rgba(0, 180, 216, 0.1);
    color: var (--accent);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem; /* Increased from 0.75rem */
    font-family: var(--font-code);
}

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

/* Add a visual separator */
.projects::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.3;
}

/* Contact Section */
.contact {
    display: flex;
    align-items: center;
    padding: 10rem 0 8rem; /* Adjusted padding */
    margin-top: 0; /* Reset margin */
    position: relative; /* Ensure proper positioning */
    z-index: 1; /* Ensure it's above previous section */
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

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

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

.contact-item i {
    color: var(--highlight-color, var(--accent));
    width: 20px;
    text-align: center;
    margin-right: 5px;
}

.contact-item a {
    color: #e9e9e9;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
    display: inline-block;
    padding-left: 10px;
    font-size: 1.1rem; /* Added font size */
}

.contact-item a:hover {
    color: var(--highlight-color, var(--accent));
    transform: translateX(2px);
}

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

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background-color: var(--bg-tertiary); /* Fixed space after var */
    border: 1px solid #444; /* Darker border */
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-family: var(--font-code);
    font-size: 1.1rem;
    transition: var(--transition);
}

/* Optional: Add this for a darker background if needed */
.form-group input,
.form-group textarea {
    background-color: #121212; /* Darker background than --bg-tertiary */
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0, 180, 216, 0.2);
    background-color: #0f0f0f; /* Even darker when focused */
}

/* Footer */
footer {
    background-color: var(--bg-tertiary);
    padding: 2rem 0;
    margin-top: 0; /* Reset margin */
    position: relative; /* Ensure proper positioning */
    z-index: 2; /* Ensure it's above other elements */
    width: 100%;
    overflow: hidden; /* Prevent overflow issues */
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.social-links a {
    color: var(--text-secondary);
    font-size: 1.4rem; /* Increased from 1.2rem */
    transition: var(--transition);
}

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

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .terminal-body {
        min-height: 280px;
        height: 35vh;
        max-height: 350px;
    }

    .cta-buttons {
        margin-top: 3.5rem;
        bottom: -1.5rem;
    }
}

@media screen and (max-width: 992px) {
    .contact-content {
        grid-template-columns: 1fr;
    }

    .hero-split {
        flex-direction: column;
        gap: 3rem;
    }
    
    .hero-content {
        text-align: center;
        padding-right: 0;
        order: 1; /* Make content appear first */
        margin-top: 2rem; /* Ensure proper spacing from top */
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-terminal {
        order: 2; /* Make terminal appear second */
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .typewriter {
        max-height: 300px;
        overflow-y: auto; /* Add scrolling for terminal content */
    }
    
    .terminal-body {
        min-height: 250px;
        height: 30vh;
        max-height: 300px;
    }
    
    .cta-buttons {
        justify-content: center;
        margin-top: 2rem;
        margin-bottom: 1rem;
        order: 3;
        margin: 3rem auto 1rem;
        max-width: 500px;
        bottom: -1rem;
    }

    .hero h1 {
        font-size: 3.8rem; /* Adjusted from original responsive size */
    }
    
    .hero-subtitle {
        font-size: 1.3rem; /* Adjusted from original responsive size */
    }

    section {
        padding: 6rem 0; /* Consistent padding */
        min-height: auto; /* Allow sections to size to content */
    }
}

@media screen and (max-width: 768px) {
    nav ul {
        display: none;
    }
    
    .menu-btn {
        display: block;
    }
    
    .hero {
        padding-top: 6rem; /* Increase to prevent header overlap */
        padding-bottom: 4rem; /* Increased padding at bottom */
    }
    
    .hero h1 {
        font-size: 2.8rem; /* Adjusted from 2.3rem */
    }
    
    .hero-subtitle {
        font-size: 1.2rem; /* Adjusted from 1.1rem */
    }
    
    .typewriter {
        font-size: 0.9rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .logo {
        font-size: 1.4rem;
    }
    
    .slogan {
        font-size: 1rem;
    }

    .hero .container {
        min-height: 70vh;
    }

    .cta-buttons {
        bottom: 8%;
    }
    
    .hero-split {
        gap: 1.5rem; /* Reduce gap to save space */
    }
    
    .terminal-body {
        min-height: 220px;
        height: 28vh;
        max-height: 280px;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
    }
    
    .hero-content h1, 
    .hero-content .hero-subtitle {
        order: 1;
    }
    
    .hero-terminal {
        order: 2;
        margin: 1.5rem 0;
    }
    
    .cta-buttons {
        order: 3;
        margin-top: 2.5rem;
        bottom: -0.5rem;
    }

    section {
        min-height: auto;
        padding: 5rem 0;
    }

    p {
        font-size: 1.05rem; /* Ensure paragraphs stay readable on mobile */
    }

    nav ul.show {
        padding-top: 1rem;
    }
    
    .language-container {
        margin: 0;
        position: absolute;
        right: 3.2rem;
        top: 1.5rem;
    }
    
    #language-selector {
        font-size: 0.8rem;
        padding: 0.2rem 1.2rem 0.2rem 1.5rem;
        background-position: 
            calc(100% - 8px) calc(50% + 0px),
            calc(100% - 3px) calc(50% + 0px);
        background-size: 
            3px 3px,
            3px 3px;
    }
    
    .language-container::before {
        font-size: 0.7rem;
        left: 0.2rem;
    }

    /* Add more space between sections on smaller screens */
    .projects {
        margin-bottom: 4rem;
        padding-bottom: 4rem;
    }
    
    .contact {
        margin-top: 6rem;
        padding: 8rem 0 5rem; /* More padding at top */
    }

    /* Make footer more compact on mobile */
    footer {
        padding: 1.5rem 0;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-content p {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        max-width: 90%;
        margin: 0 auto 1rem;
        line-height: 1.4; /* Improve readability */
    }
}

@media screen and (max-width: 480px) {
    .hero {
        padding-top: 5rem;
        padding-bottom: 3rem;
        min-height: auto; /* Remove fixed height requirement */
    }
    
    .hero h1 {
        font-size: 2.3rem; /* Adjusted from 2rem */
        margin-top: 1rem; /* Ensure title is visible */
    }
    
    .hero-split {
        gap: 2rem;
    }
    
    .cta-buttons {
        bottom: 6%;
        flex-direction: column;
        width: 90%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero .container {
        min-height: 60vh;
    }

    .terminal-body {
        min-height: 180px;
        height: 25vh;
        max-height: 220px;
        padding: 10px 15px;
    }
    
    .terminal-header {
        padding: 6px 10px; /* Smaller header */
    }
    
    #terminal-output {
        gap: 2px; /* Reduce spacing between lines */
    }
    
    .cta-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.7rem; /* Reduce gap between buttons */
        max-width: 250px;
        margin: 2rem auto 0;
        bottom: -1rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem; /* Adjusted from 1rem */
        margin-bottom: 1.5rem;
    }
    
    .hero-split {
        gap: 1.5rem;
    }
    
    .hero-terminal {
        margin-bottom: 1.5rem;
        margin: 1.5rem 0 1rem;
    }
    
    .typewriter {
        margin-bottom: 0;
        overflow-y: auto;
        max-height: 180px;
    }
    
    .cta-buttons {
        margin-top: 0.5rem;
    }
    
    .hero h1 {
        font-size: 2.3rem; /* Adjusted from 2rem */
    }
    
    .hero-subtitle {
        font-size: 1.1rem; /* Adjusted from 1rem */
    }

    /* Even more compact footer for very small screens */
    footer {
        padding: 1rem 0;
    }
    
    .footer-content p {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    .social-links {
        gap: 1.2rem;
    }
    
    .social-links a {
        font-size: 1.2rem;
    }
    
    /* Ensure proper section spacing */
    section {
        padding: 4rem 0;
    }
    
    .projects {
        padding-bottom: 6rem;
    }
    
    .contact {
        padding-top: 6rem;
    }
    
    /* Create clear visual separation between sections */
    .projects::after {
        content: '';
        display: block;
        height: 2px;
        background: linear-gradient(90deg, transparent, var(--accent), transparent);
        width: 80%;
        margin: 3rem auto 0;
        opacity: 0.3;
    }
}
