/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #2563eb;
    --primary-blue-dark: #1d4ed8;
    --secondary-blue: #3b82f6;
    --light-blue: #dbeafe;
    --dark-blue: #1e3a8a;
    --accent-blue: #60a5fa;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Mobile-first improvements */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--white);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Add gradient background to main content area */
.main-content {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--light-blue) 100%);
    min-height: calc(100vh - 70px);
}

/* Improve touch targets on mobile */
button, 
.btn, 
.nav-link, 
.contact-link {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Prevent text selection on interactive elements */
.btn, 
.nav-link {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

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

.nav-logo img {
    width: 32px;
    height: 32px;
}

.nav-logo i {
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: width 0.3s ease;
}

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

/* Mobile navigation */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.3s ease;
}

.hamburger:hover {
    background-color: var(--gray-100);
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Hamburger animation */
.hamburger.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Main content */
.main-content {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--light-blue) 100%);
    background-attachment: fixed;
    background-size: cover;
}

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

/* Hero section */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80vh;
    padding: 4rem 0;
}

.hero-section .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    padding: 1rem 0;
}

.hero-title div {
    display: block;
    margin-bottom: 0.5rem;
}

.hero-title div:last-child {
    margin-bottom: 0;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Typing animation styles */
.typing-text {
    display: inline-block;
    color: transparent;
    -webkit-text-fill-color: transparent;
    position: relative;
    --sweep-progress: 0;
    min-width: 1px; /* Ensure element takes up space even when empty */
}

.typing-text.completed {
    background: linear-gradient(135deg, 
        var(--primary-blue) 0%, 
        var(--accent-blue) 25%, 
        var(--secondary-blue) 50%, 
        var(--accent-blue) 75%, 
        var(--primary-blue) 100%
    );
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientMove 4s ease-in-out 3s infinite;
}

.typing-text.completed::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: var(--text-dark);
    -webkit-text-fill-color: var(--text-dark);
    background: var(--text-dark);
    -webkit-background-clip: text;
    background-clip: text;
    animation: sweepReveal 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    pointer-events: none;
}

@keyframes sweepReveal {
    0% {
        clip-path: inset(0 0% 0 0);
    }
    100% {
        clip-path: inset(0 100% 0 0);
    }
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.typing-cursor {
    color: var(--primary-blue);
    font-weight: 700;
    animation: blink 1s infinite;
    margin-left: 2px;
    transition: all 0.3s ease;
}

.typing-cursor.completed {
    animation: gradientShift 2s ease-in-out infinite;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue), var(--secondary-blue), var(--primary-blue));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.typing-cursor.hidden {
    opacity: 0;
    visibility: hidden;
}

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

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: all 0.3s ease;
}

/* Code Editor Styles */
.code-editor {
    background: var(--text-dark);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 500px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    animation: slideInUp 0.8s ease-out;
    transition: all 0.3s ease;
}

.editor-header {
    background: var(--gray-300);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--gray-400);
}

.editor-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-red, .btn-yellow, .btn-green {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.btn-red { background: #ef4444; }
.btn-yellow { background: #f59e0b; }
.btn-green { background: #10b981; }

.editor-title {
    margin-left: 1rem;
    font-size: 0.875rem;
    color: var(--text-dark);
    font-weight: 500;
}

.editor-content {
    padding: 1.5rem;
    background: var(--text-dark);
    min-height: 240px; /* Reduced but still accommodates all lines */
}

.code-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem; /* Reduced spacing between lines */
    opacity: 0;
    animation: fadeInLine 0.5s ease-out forwards;
    position: relative;
}

.code-line:nth-child(1) { animation-delay: 0.5s; }
.code-line:nth-child(2) { animation-delay: 1s; }
.code-line:nth-child(3) { animation-delay: 1.5s; }
.code-line:nth-child(4) { animation-delay: 2s; }
.code-line:nth-child(5) { animation-delay: 2.5s; }
.code-line:nth-child(6) { animation-delay: 3s; }

.prompt {
    color: #10b981;
    font-weight: bold;
    font-size: 0.9rem;
}

.command {
    color: var(--white);
    font-size: 0.9rem;
}

.typing-command {
    overflow: hidden;
    border-right: 2px solid var(--white);
    white-space: nowrap;
    animation: blink-caret 0.75s step-end infinite;
}

.output {
    color: #60a5fa;
    font-size: 0.9rem;
    margin-left: 1rem;
    opacity: 0; /* Hide initially */
}

.cursor {
    color: var(--white);
    font-weight: bold;
    animation: blink 1.2s infinite;
    margin-left: 2px;
    display: none; /* Hide initially */
}

/* Final cursor in the last line */
.code-line:last-child .cursor {
    display: none; /* Hidden until all messages are shown */
    position: relative;
}

/* Hide the final prompt initially */
.code-line:last-child .prompt {
    visibility: hidden; /* Hidden but takes up space */
}

/* Ensure the last line is visible but content is hidden */
.code-line:last-child {
    min-height: 1.5rem; /* Ensure consistent line height */
}

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

@keyframes fadeInLine {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--white); }
}

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

/* Projects page styles */
.projects-hero {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.projects-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.projects-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* Coming Soon section */
.coming-soon-section {
    padding: 6rem 0;
    text-align: center;
}

.coming-soon-content {
    max-width: 600px;
    margin: 0 auto;
}

.coming-soon-icon {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 3rem;
    color: var(--white);
    animation: pulse 2s ease-in-out infinite;
}

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

.coming-soon-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.coming-soon-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.coming-soon-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-item i {
    font-size: 2rem;
    color: var(--primary-blue);
}

.feature-item span {
    font-weight: 500;
    color: var(--text-dark);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-blue));
    border-radius: 4px;
    width: 0%; /* Start at 0% width */
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.progress-text {
    color: var(--text-light);
    font-size: 0.9rem;
    animation: fadeInOut 2s ease-in-out infinite;
}

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

.projects-section {
    padding: 4rem 0;
}

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

.project-card {
    background: var(--white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--light-blue), var(--accent-blue));
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-icon {
    font-size: 4rem;
    color: var(--white);
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.project-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

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

.tech-tag {
    background: var(--gray-100);
    color: var(--text-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

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

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Contact page styles */
.contact-hero {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.contact-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
}

.contact-section {
    padding: 4rem 0;
}

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

.contact-form-container {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
}

.contact-form-container h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid var(--gray-200);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

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

.contact-info-container h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
}

.contact-info-container > p {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.6;
}

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

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.contact-method:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.contact-details h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.contact-details p {
    font-size: 1rem;
    color: var(--primary-blue);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.contact-note {
    font-size: 0.875rem;
    color: var(--text-light);
}

.contact-availability {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--gray-200);
}

.contact-availability h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.availability-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.availability-item i {
    color: var(--primary-blue);
    width: 16px;
}

/* About section */
.about-section {
    padding: 4rem 0;
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.contact-info {
    margin-bottom: 2rem;
}

.contact-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

.contact-item i {
    color: var(--primary-blue);
    font-size: 1.1rem;
    width: 20px;
}

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

.code-window {
    background: var(--text-dark);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transition: all 0.3s ease;
}

.window-header {
    background: var(--gray-300);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.window-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-red, .btn-yellow, .btn-green {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.btn-red { background: #ef4444; }
.btn-yellow { background: #f59e0b; }
.btn-green { background: #10b981; }

.window-title {
    margin-left: 1rem;
    font-size: 0.875rem;
    color: var(--text-dark);
}

.code-content {
    padding: 1.5rem;
}

.code-content pre {
    color: var(--white);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    overflow-x: auto;
}

/* CTA section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Code showcase section */
.code-showcase-section {
    padding: 4rem 0;
    background: var(--gray-50);
    text-align: center;
}

.code-showcase-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.code-showcase-section > p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.code-showcase-section .code-window {
    max-width: 500px;
    margin: 0 auto;
    box-shadow: var(--shadow-xl);
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
}

.footer-content p {
    opacity: 0.8;
}

/* Error page styles */
.error-container {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.error-content {
    max-width: 600px;
    margin-bottom: 2rem;
}

.error-visual {
    margin-bottom: 2rem;
}

.error-number {
    font-size: 8rem;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1;
    margin-bottom: 1rem;
}

.error-illustration {
    position: relative;
    height: 100px;
}

.floating-elements {
    position: relative;
    height: 100%;
}

.element {
    position: absolute;
    width: 40px;
    height: 40px;
    background: var(--light-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    animation: float 3s ease-in-out infinite;
}

.element-1 {
    top: 0;
    left: 20%;
    animation-delay: 0s;
}

.element-2 {
    top: 30%;
    right: 20%;
    animation-delay: 1s;
}

.element-3 {
    bottom: 0;
    left: 50%;
    animation-delay: 2s;
}

.error-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.error-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.error-help h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.help-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.help-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-light);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.help-option:hover {
    background-color: var(--gray-100);
    color: var(--primary-blue);
    transform: translateX(5px);
}

.help-option i {
    color: var(--primary-blue);
    width: 20px;
}

.error-footer {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
}

.link:hover {
    text-decoration: underline;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    /* Ensure proper viewport handling */
    html {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }

    /* Prevent horizontal scrolling */
    body {
        overflow-x: hidden;
        width: 100%;
    }
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s ease;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
        height: calc(100vh - 70px);
        overflow-y: auto;
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu .nav-item {
        margin: 0;
        padding: 0;
    }

    .nav-menu .nav-link {
        display: block;
        padding: 1rem 2rem;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--gray-100);
        transition: all 0.3s ease;
    }

    .nav-menu .nav-link:hover {
        background-color: var(--gray-50);
        color: var(--primary-blue);
    }

    .nav-menu .nav-link::after {
        display: none;
    }

    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 2rem 0;
        min-height: 70vh;
        gap: 2rem;
    }

    .hero-section .container {
        flex-direction: column;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
        margin-bottom: 1rem;
    }
    
    .hero-title div {
        margin-bottom: 0.25rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .hero-buttons {
        justify-content: center;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .hero-buttons .btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        min-width: 140px;
    }

    /* Hide code editor on mobile */
    .hero-visual {
        display: none; /* Hide terminal completely on mobile */
    }

    .hero-content {
        order: 1; /* Content takes full width on mobile */
        max-width: 100%;
        text-align: center;
    }

    /* Code elements are hidden on mobile, so no specific styling needed */

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-text {
        order: 1; /* Text content first on mobile */
    }

    .about-text h2 {
        font-size: 2rem;
    }

    .about-text p {
        font-size: 1rem;
    }

    .about-visual {
        order: 2; /* Visual content second on mobile */
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }

    .code-window {
        margin-top: 1rem;
        width: 100%;
        max-width: 100%;
    }

    .code-content pre {
        font-size: 0.75rem;
        padding: 1rem;
    }

    .error-content {
        flex-direction: column;
    }

    .error-number {
        font-size: 6rem;
    }

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

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-method {
        flex-direction: column;
        text-align: center;
    }

    .contact-icon {
        align-self: center;
    }

    .coming-soon-features {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .coming-soon-icon {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }

    .coming-soon-title {
        font-size: 2rem;
    }

    .container {
        padding: 0 1.5rem;
    }

    .nav-container {
        padding: 0 1.5rem;
    }

    /* Disable hover effects on mobile */
    .feature-card, .btn, .floating-card, .element {
        transform: none !important;
    }

    .feature-card:hover, .btn:hover {
        transform: none !important;
    }

    /* Optimize mobile performance */
    .code-editor,
    .project-card,
    .contact-method {
        will-change: auto;
        transform: translateZ(0);
    }

    /* Better mobile text rendering */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .contact-title {
        font-size: 2.5rem;
    }

    .contact-form-container {
        padding: 1.5rem;
    }

    /* About page mobile styles */
    .about-hero-title {
        font-size: 2.5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-text h2 {
        font-size: 2rem;
    }

    .about-text h3 {
        font-size: 1.25rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .skill-category {
        padding: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .experience-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .experience-item {
        padding: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .contact-methods {
        flex-direction: column;
        align-items: center;
    }

    .contact-method {
        width: 100%;
        max-width: 400px;
    }

    .about-visual {
        display: none; /* Hide code windows on mobile */
    }

    .about-text {
        order: 1; /* Text content takes full width on mobile */
        text-align: center;
    }

    /* Improve touch targets */
    .btn {
        min-height: 48px;
        touch-action: manipulation;
        border-radius: 0.75rem;
        font-weight: 600;
    }

    .nav-link {
        padding: 1rem 0;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Better mobile button spacing */
    .hero-buttons {
        gap: 1rem;
    }

    .hero-buttons .btn {
        flex: 1;
        max-width: 200px;
        justify-content: center;
    }

    /* Better form inputs on mobile */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 1rem;
        border-radius: 0.75rem;
        border-width: 2px;
    }

    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        border-color: var(--primary-blue);
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    }

    /* Improve tech stack display */
    .tech-stack {
        gap: 0.75rem;
    }

    .tech-tag {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-title div {
        margin-bottom: 0.2rem;
    }

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

    /* Code elements are hidden on mobile, so no specific styling needed */

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        padding: 1rem 1.5rem;
    }

    .container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .about-text h2 {
        font-size: 1.75rem;
    }

    .about-hero-title {
        font-size: 2rem;
    }

    .about-text h3 {
        font-size: 1.1rem;
    }

    /* Better mobile spacing */
    .hero-section {
        padding: 3rem 0;
    }

    .projects-hero,
    .contact-hero,
    .about-hero {
        padding: 3rem 0;
    }

    .projects-section,
    .contact-section,
    .about-section {
        padding: 3rem 0;
    }

    /* Improve mobile card layouts */
    .project-card,
    .contact-method,
    .feature-item {
        margin-bottom: 1rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .skill-category {
        padding: 1rem;
        margin-bottom: 0.25rem;
    }

    .skill-category h4 {
        font-size: 1rem;
    }

    .skill-category p {
        font-size: 0.875rem;
    }

    .tech-stack {
        gap: 0.5rem;
    }

    .tech-tag {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }

    .coming-soon-features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .contact-methods {
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }

    .contact-method {
        padding: 1rem;
        width: 100%;
        max-width: 350px;
        flex-direction: column;
        text-align: center;
    }

    .contact-icon {
        align-self: center;
        margin-bottom: 0.5rem;
    }

    .error-number {
        font-size: 5rem;
    }

    .projects-title,
    .contact-title {
        font-size: 2rem;
    }

    .experience-item {
        padding: 1.5rem;
    }

    .experience-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* Medium tablets */
@media (min-width: 481px) and (max-width: 768px) {
    .about-content {
        gap: 2.5rem;
    }

    .about-visual .code-window,
    .requirements-window {
        max-width: 450px;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .experience-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Large tablets and small desktops */
@media (min-width: 769px) and (max-width: 1024px) {
    .about-content {
        gap: 3rem;
    }

    .about-visual .code-window,
    .requirements-window {
        max-width: 400px;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Show code elements only on larger screens */
@media (min-width: 769px) {
    .hero-visual {
        display: flex !important; /* Show terminal on larger screens */
    }

    .about-visual {
        display: flex !important; /* Show code windows on larger screens */
    }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: 60vh;
        padding: 1.5rem 0;
    }

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

    .hero-visual {
        display: none; /* Hide terminal in landscape mode too */
    }

    .floating-card {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        pointer-events: none;
    }
}

/* Animation classes */
.feature-card, .btn, .floating-card, .element {
    transition: all 0.3s ease;
}

.feature-card:hover, .btn:hover {
    transform: translateY(-2px);
}

/* Loading animation */
html {
    scroll-behavior: smooth;
} 

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .code-editor {
        animation: none;
    }
    
    .code-line {
        animation: none;
        opacity: 1;
    }
    
    .typing-command {
        animation: none;
        border-right: none;
    }
    
    .typing-cursor {
        animation: none;
    }
    
    .coming-soon-icon {
        animation: none;
    }
    
    .progress-fill {
        animation: none;
    }
} 

/* About page styles */
.about-hero {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.about-hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

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

.about-section {
    padding: 4rem 0;
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.about-text h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: var(--text-dark);
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

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

.skill-category {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.skill-category h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-category h4 i {
    color: var(--primary-blue);
}

.skill-category p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.tech-tag {
    background: var(--gray-100);
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-1px);
}

.experience-section {
    padding: 4rem 0;
    background: var(--gray-50);
}

.experience-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

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

.experience-item {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
}

.experience-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.experience-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--white);
    font-size: 2rem;
}

.experience-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.experience-item p {
    color: var(--text-light);
    line-height: 1.6;
}

.contact-section {
    padding: 4rem 0;
    background: var(--white);
    text-align: center;
}

.contact-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.contact-section > p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
}

.contact-method:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.contact-details h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.contact-details p {
    font-size: 1rem;
    color: var(--primary-blue);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.contact-note {
    font-size: 0.875rem;
    color: var(--text-light);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
} 

.about-visual {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-end;
    justify-content: flex-start;
    height: 100%;
}

.about-visual .code-window {
    width: 100%;
    max-width: 500px;
}

.requirements-window {
    align-self: flex-end;
    margin-top: auto;
    width: 100%;
}