/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background: #0d1117;
    color: #c9d1d9;
    line-height: 1.6;
}

/* Full Viewport Sections */
section {
    min-height: 100vh;
    padding: 60px 20px;
    position: relative;
}

/* Hero Section - Keep vertical centering */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Other sections - Natural flow with proper spacing */
.education-section,
.work-section,
.projects-section,
.languages-section,
.achievements-section,
.contact-section,
.contact-form-section,
.message-sent-section {
    display: block;
    padding: 80px 20px;
}

.section-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Hero Section - Centered Terminal Card */
.hero-section {
    background: #0d1117;
    background-image: 
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 20px 20px;
    min-height: 100vh;
}

.terminal-card {
    background: #0d1117;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    max-width: 600px;
    width: 100%;
    border: 1px solid #30363d;
}

.terminal-header {
    background: #21262d;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #30363d;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.btn.close {
    background: #ff5f56;
}

.btn.minimize {
    background: #ffbd2e;
}

.btn.maximize {
    background: #27ca3f;
}

.terminal-content {
    padding: 32px;
}

/* Command Line Styling */
.command-line {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 16px;
}

.prompt {
    color: #7c3aed;
    font-weight: 600;
    margin-right: 8px;
}

.command {
    color: #58a6ff;
    font-weight: 500;
}

/* Output Styling */
.output {
    margin-bottom: 32px;
    margin-left: 16px;
}

/* Hero Section Specific Styling */
.hero-section .output {
    margin-bottom: 16px;
}

.hero-section .command-line {
    margin-bottom: 4px;
}

/* Section-specific spacing adjustments */
.education-section .output,
.work-section .output,
.projects-section .output,
.languages-section .output,
.achievements-section .output,
.contact-section .output,
.contact-form-section .output {
    margin-bottom: 40px;
}

.education-section .education-item,
.work-section .work-item,
.projects-section .project,
.languages-section .language-item,
.achievements-section .achievement-category {
    margin-bottom: 40px;
}

.achievements-section .achievement-item {
    margin-bottom: 24px;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #f0f6fc;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #58a6ff, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: #8b949e;
    margin-bottom: 24px;
    text-align: center;
}

h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #f0f6fc;
    margin-bottom: 24px;
    border-bottom: 2px solid #30363d;
    padding-bottom: 8px;
}

h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #58a6ff;
    margin-bottom: 12px;
    margin-top: 24px;
}

h5 {
    font-size: 1.1rem;
    font-weight: 500;
    color: #7c3aed;
    margin-bottom: 8px;
    margin-top: 16px;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.skill {
    background: #21262d;
    color: #58a6ff;
    padding: 8px 16px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    border: 1px solid #30363d;
    transition: all 0.3s ease;
}

.skill:hover {
    background: #30363d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.2);
}

/* Hero Section Skills */
.hero-section .skills-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.hero-section .skill {
    padding: 6px 10px;
    font-size: 0.85rem;
}

/* Projects */
.project {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 32px;
    margin-bottom: 32px;
    transition: all 0.3s ease;
}

.project:hover {
    border-color: #58a6ff;
    box-shadow: 0 4px 16px rgba(88, 166, 255, 0.1);
}

.project:last-child {
    margin-bottom: 0;
}

.project p {
    color: #8b949e;
    margin-bottom: 16px;
    font-size: 1rem;
}

.project ul {
    margin-left: 20px;
    margin-bottom: 16px;
}

.project li {
    color: #c9d1d9;
    margin-bottom: 6px;
    position: relative;
}

.project li::marker {
    color: #7c3aed;
}

/* Tech Stack */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tech {
    background: #7c3aed;
    color: #f0f6fc;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Education */
.education-item {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 32px;
    margin-bottom: 32px;
    transition: all 0.3s ease;
}

.education-item:hover {
    border-color: #58a6ff;
    box-shadow: 0 4px 16px rgba(88, 166, 255, 0.1);
}

.education-details {
    margin-top: 12px;
}

.institution {
    color: #58a6ff;
    font-weight: 500;
    margin-bottom: 4px;
}

.duration {
    color: #8b949e;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.grade {
    color: #7c3aed;
    font-weight: 500;
}

/* Work Experience */
.work-item {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 32px;
    margin-bottom: 32px;
    transition: all 0.3s ease;
}

.work-item:hover {
    border-color: #7c3aed;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.1);
}

.work-duration {
    color: #8b949e;
    font-size: 0.9rem;
    margin-bottom: 20px;
    font-style: italic;
}

.role-item {
    margin-bottom: 24px;
    padding-left: 16px;
    border-left: 2px solid #30363d;
}

.role-item:last-child {
    margin-bottom: 0;
}

.role-item h5 {
    color: #58a6ff;
    margin-bottom: 8px;
}

.role-item p {
    color: #c9d1d9;
    line-height: 1.6;
}

/* Languages */
.language-item {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.language-item:hover {
    border-color: #7c3aed;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.1);
}

.language-item h4 {
    color: #58a6ff;
    margin: 0;
}

.language-item p {
    color: #8b949e;
    margin: 0;
    font-style: italic;
}

/* Profile Summary */
.profile-summary {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 32px;
    border-left: 4px solid #7c3aed;
}

.profile-summary p {
    color: #c9d1d9;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

/* Achievements */
.achievement-category {
    margin-bottom: 40px;
}

.achievement-category:last-child {
    margin-bottom: 0;
}

.achievement-item {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.achievement-item:hover {
    border-color: #7c3aed;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.1);
}

.achievement-item:last-child {
    margin-bottom: 0;
}

.achievement-item ul {
    margin-left: 20px;
}

.achievement-item li {
    color: #c9d1d9;
    margin-bottom: 4px;
}

.achievement-item li::marker {
    color: #58a6ff;
}

/* Contact Info */
.contact-info {
    margin-top: 16px;
}

.contact-item {
    margin-bottom: 16px;
}

.contact-item .command-line {
    margin-bottom: 4px;
}

.contact-item .output {
    margin-left: 0;
    margin-bottom: 16px;
}

.download-link {
    color: #58a6ff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.download-link:hover {
    color: #7c3aed;
    text-decoration: underline;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.social-link {
    color: #58a6ff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: #7c3aed;
    text-decoration: underline;
}

/* Contact Form */
.contact-form {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 32px;
    margin-top: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group .command-line {
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 4px;
    padding: 12px;
    color: #c9d1d9;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.1);
}

.submit-btn {
    background: #7c3aed;
    color: #f0f6fc;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.submit-btn:hover {
    background: #6d28d9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* Cursor Animation */
.cursor {
    display: inline-block;
    color: #58a6ff;
    font-weight: bold;
    animation: blink 1s infinite;
    margin-left: 4px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
    section {
        padding: 40px 16px;
    }
    
    .hero-section {
        padding: 20px 16px;
    }
    
    .education-section,
    .work-section,
    .projects-section,
    .languages-section,
    .achievements-section,
    .contact-section,
    .contact-form-section,
    .message-sent-section {
        padding: 60px 16px;
    }
    
    .section-container {
        padding: 0;
    }
    
    .terminal-card {
        max-width: 100%;
    }
    
    .terminal-content {
        padding: 24px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .hero-section .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .education-item,
    .work-item,
    .project,
    .language-item,
    .achievement-item,
    .contact-form {
        padding: 20px;
    }
    
    .social-links {
        flex-direction: column;
        gap: 8px;
    }
    
    .tech-stack {
        gap: 6px;
    }
    
    .tech {
        font-size: 0.8rem;
        padding: 3px 8px;
    }
    
    /* Adjust spacing for mobile */
    .projects-section .output,
    .achievements-section .output,
    .contact-section .output,
    .contact-form-section .output {
        margin-bottom: 24px;
    }
    
    .projects-section .project,
    .achievements-section .achievement-category {
        margin-bottom: 24px;
    }
}

@media (max-width: 480px) {
    section {
        padding: 30px 12px;
    }
    
    .hero-section {
        padding: 20px 12px;
    }
    
    .education-section,
    .work-section,
    .projects-section,
    .languages-section,
    .achievements-section,
    .contact-section,
    .contact-form-section,
    .message-sent-section {
        padding: 50px 12px;
    }
    
    .terminal-content {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .command-line {
        font-size: 14px;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-section .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .education-item,
    .work-item,
    .project,
    .language-item,
    .achievement-item,
    .contact-form {
        padding: 16px;
    }
    
    /* Further reduce spacing for very small screens */
    .education-section .output,
    .work-section .output,
    .projects-section .output,
    .languages-section .output,
    .achievements-section .output,
    .contact-section .output,
    .contact-form-section .output {
        margin-bottom: 20px;
    }
    
    .education-section .education-item,
    .work-section .work-item,
    .projects-section .project,
    .languages-section .language-item,
    .achievements-section .achievement-category {
        margin-bottom: 20px;
    }
    
    .achievements-section .achievement-item {
        margin-bottom: 16px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0d1117;
}

::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}

/* Selection Styling */
::selection {
    background: #7c3aed;
    color: #f0f6fc;
}

/* Focus Styling */
*:focus {
    outline: 2px solid #58a6ff;
    outline-offset: 2px;
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fadeInUp 0.6s ease-out;
}

/* Ensure proper spacing between sections */
section + section {
    margin-top: 0;
}

/* Prevent content from being cut off */
.projects-section,
.achievements-section,
.contact-section,
.contact-form-section {
    overflow: visible;
}

/* Ensure last section has proper bottom spacing */
.contact-form-section:last-child,
.message-sent-section:last-child {
    padding-bottom: 100px;
}

/* Hover Effects */
.project:hover,
.achievement-item:hover {
    transform: translateY(-2px);
}

/* Print Styles */
@media print {
    .terminal-header {
        display: none;
    }
    
    .cursor {
        display: none;
    }
    
    .terminal {
        box-shadow: none;
        border: 1px solid #30363d;
    }
}
