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

html, body {
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f0e0c9;
    margin: 0;
    padding: 0;
    height: 100%;
    position: relative;
    text-align: center;
}

/* Prevent all scrollbars */
*::-webkit-scrollbar {
    display: none;
}

* {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.page-container {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
    margin: 0;
    padding: 0;
    left: 0;
    right: 0;
    box-sizing: border-box;
}

.page-section {
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    transition: transform 0.8s ease;
    overflow: hidden;
    box-sizing: border-box;
}

.first-section {
    z-index: 2;
    align-items: center;
    justify-content: center;
}

.second-section {
    z-index: 1;
    transform: translateY(100%);
    padding: 1em;
}

/* Ensure content doesn't overflow */
.content-area {
    width: 100%;
    max-width: 800px;
    padding: 0 1em;
    box-sizing: border-box;
    margin: 0 auto;
}

.first-section {
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
}

.second-section {
    padding-bottom: 1em;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow-y: auto;
    padding-top: 3em;
    text-align: center;
    width: 100%;
}

.content-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1em;
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    box-sizing: border-box;
}

.profile-pic-container {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 1.5em;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    background-color: #e0e0e0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.scroll-indicator {
    position: absolute;
    bottom: 2em;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    animation: float 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

.scroll-indicator:hover {
    animation-play-state: paused;
    transform: translateX(-50%) scale(1.1);
}

.scroll-wheel {
    width: 30px;
    height: 45px;
}

.mouse-outline {
    stroke: #212529;
}

.mouse-wheel {
    fill: #212529;
}

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

h1 {
    color: #212529;
    font-size: 2.2em;
    margin: 0.2em 0 0.1em 0;
}
.subtitle {
    color: #212529;
    font-size: 1.1em;
    margin-bottom: 1em;
}

.handwritten {
    font-family: 'Caveat', cursive;
    color: #ec0707;
    font-size: 1.2em;
    position: relative;
    top: 1px;
}
.about {
    color: #212529;
    max-width: 400px;
    margin-bottom: 2em;
}
.btn {
    display: inline-block;
    padding: 0.7em 1.5em;
    background: #2E7D32;
    color: #fff;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
    box-shadow: 0 2px 8px rgba(46,125,50,0.08);
}
.btn:hover {
    background: #1B5E20;
}

footer {
    text-align: center;
    color: #212529;
    font-size: 0.95em;
    padding: 1em 0 0.5em 0;
}

.timeline-container {
    width: 100%;
    padding: 2em 0;
    margin-top: 2em;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.timeline {
    position: relative;
    height: 60px;
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #212529;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 2.5s cubic-bezier(0.22, 0.61, 0.36, 1);
    z-index: 1;
}

.timeline.animate .timeline-line {
    transform: scaleX(1);
}

.timeline-point {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    z-index: 2;
    width: 50px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.timeline-point::before {
    content: attr(data-year);
    position: absolute;
    top: -25px;
    font-size: 0.8em;
    font-weight: 500;
    color: #212529;
    width: 100px;
    text-align: center;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #212529;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s ease;
    transform: scale(0);
}

.timeline-dot.animate {
    transform: scale(1);
}

.timeline-point:hover .timeline-dot {
    transform: scale(1.5);
    background: #212529;
}

.timeline-label {
    position: absolute;
    top: 20px;
    font-size: 0.75em;
    color: #212529;
    text-align: center;
    width: 100px;
    left: 50%;
    transform: translateX(-50%);
}

.tech-stack-container {
    width: 100%;
    max-width: 700px;
    padding: 2em 0;
    margin: 2em auto 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.tech-stack-container.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Terminal animations */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

/* Terminal styling for tech stack */
.terminal-window {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    background-color: #1e1e1e;
    color: #f0f0f0;
    border: 1px solid #3a3a3a;
}

.terminal-body {
    padding: 12px 16px;
    background-color: rgba(30, 30, 30, 0.98);
    line-height: 1.6;
    font-size: 0.9em;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 20px;
}

.command-line {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.prompt {
    color: #27c93f;
    margin-right: 8px;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(39, 201, 63, 0.4);
}

.command {
    color: #f0f0f0;
}

.blink {
    animation: blink-animation 1s steps(5, start) infinite;
}

@keyframes blink-animation {
    to {
        visibility: hidden;
    }
}

.command-output {
    padding: 10px 0 10px 20px;
    color: #f0f0f0;
    margin-bottom: 12px;
    border-left: 1px dotted rgba(39, 201, 63, 0.15);
}

.output-line {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.dir-name {
    color: #42a5f5;
    font-weight: bold;
    width: 100px;
    display: inline-block;
}

.details {
    color: #cccccc;
}

/* Connection animation styles */
.connection-sequence {
    opacity: 0;
    transition: opacity 1s ease;
}

.connection-sequence.visible {
    opacity: 1;
}

.connecting-line {
    color: #cccccc;
    margin-left: 20px;
    position: relative;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.3s ease;
    padding-left: 10px;
    border-left: 2px solid rgba(39, 201, 63, 0.5);
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
}

.connecting-line.visible {
    opacity: 1;
    transform: translateY(0);
}

.tech-content {
    opacity: 0;
    transition: opacity 1s ease, transform 0.5s ease;
    transform: translateY(10px);
}

.tech-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.hidden {
    display: none;
}

.visible.hidden {
    display: block;
}

.terminal-header {
    background: linear-gradient(to bottom, #3a3a3a, #2d2d2d);
    padding: 8px 12px;
    border-bottom: 1px solid #444;
    display: flex;
    align-items: center;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.terminal-title {
    font-size: 0.9em;
    font-weight: 400;
    color: #cccccc;
    text-align: center;
    width: 100%;
}

.terminal-controls {
    display: flex;
    gap: 6px;
    position: absolute;
    left: 12px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close {
    background-color: #ff5f56;
    border: 1px solid #e0443e;
}

.minimize {
    background-color: #ffbd2e;
    border: 1px solid #dea123;
}

.maximize {
    background-color: #27c93f;
    border: 1px solid #1aab29;
}

.control:hover {
    filter: brightness(1.1);
}

/* Tech stack container */

.function-brace {
    position: absolute;
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
    transform: translateY(20px);
    z-index: 1;
}

/* Tech stack styling */

/* Tech items styled as command output */

.social-container {
    width: 100%;
    padding: 3em 0;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 3em;
    align-items: center;
}

/* Responsive styles for mobile devices */
@media (max-width: 767px) {
    body, html {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        margin: 0;
        padding: 0;
    }

    .page-container {
        width: 100%;
        max-width: 100vw;
        padding: 0;
        margin: 0;
        left: 0;
        right: 0;
    }

    .page-section {
        width: 100%;
        max-width: 100%;
        align-items: center;
        justify-content: center;
        left: 0;
        right: 0;
        margin: 0;
        padding: 0;
    }
    
    .content-area {
        padding: 1em;
        width: 90%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 0 auto;
        text-align: center;
    }
    
    .profile-pic-container {
        width: 80px;
        height: 80px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .about {
        font-size: 0.95em;
        padding: 0;
        width: 100%;
        max-width: 350px;
        text-align: center;
        margin: 0 auto 2em auto;
    }
    
    .timeline {
        width: 90%;
        max-width: 350px;
    }
    
    .tech-category {
        font-size: 0.8em;
        padding: 0 10px;
        line-height: 1.6;
        margin: 1em auto;
        width: 100%;
        box-sizing: border-box;
    }
    
    .social-container {
        gap: 2em;
        width: 100%;
    }
    
    .tech-stack-container {
        padding: 2em 0;
        margin-top: 3em;
        width: 90%;
    }
    
    .tech-stack {
        width: 100%;
        margin: 0 auto;
        position: relative;
    }
    
    /* Terminal mobile styles - FIXED */
    .terminal-window {
        max-width: 95%;
        font-size: 0.85em;
    }
    
    .terminal-header {
        padding: 8px 12px; /* Increased padding */
        position: relative;
        min-height: 28px; /* Ensure minimum height for controls */
    }
    
    .terminal-controls {
        left: 12px; /* Moved slightly right to prevent cutoff */
        top: 50%;
        transform: translateY(-50%); /* Center vertically */
        display: flex;
        gap: 4px; /* Reduced gap for mobile */
    }
    
    .control {
        width: 10px;
        height: 10px;
        flex-shrink: 0; /* Prevent shrinking */
        border-radius: 50%;
    }
    
    .terminal-title {
        font-size: 0.8em;
        padding-left: 60px; /* Add left padding to avoid overlap with controls */
        text-align: center;
    }
    
    .terminal-body {
        padding: 10px 12px; /* Increased horizontal padding */
        font-size: 0.8em;
        background-size: 100% 18px;
    }
    
    .command-output {
        padding: 5px 0 5px 10px;
    }
    
    .dir-name {
        width: 80px;
    }
    
    .connecting-line {
        margin-left: 10px;
        padding-left: 8px;
    }
}

.social-link {
    display: inline-flex;
    align-items: center;
    transition: transform 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    transform: scale(1.1);
}

.social-logo {
    color: #212529;
    transition: color 0.3s ease;
}

.social-link:hover .social-logo {
    color: #000000;
}

.email-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
}

.email-tooltip {
    position: absolute;
    color: #212529;
    font-size: 1em;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.3em 0.7em;
    border-radius: 4px;
    top: -30px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.email-tooltip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.9) transparent transparent transparent;
}

.email-link {
    position: relative;
}

.email-link:hover .email-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}