/* Base Styling & Scroll Behavior */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #e2e8f0;
    background: linear-gradient(180deg, #b0c4de 0%, #4a6fa5 30%, #1e293b 65%, #080d1a 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    transition: background 0.8s ease;
}

/* Midnight Theme Modifier Class */
body.midnight-mode {
    background: linear-gradient(180deg, #0f172a 0%, #090d16 50%, #030712 100%);
}

/* Vercel Mouse Light Effect */
#interactive-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    transition: background 0.1s ease-out;
}

/* Control Buttons (Top-Right Theme Toggle & Floating Terminal) */
.control-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10;
    background: rgba(15, 23, 42, 0.7);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.control-btn:hover {
    background: #ffffff;
    color: #0f172a;
    transform: translateY(-2px);
}

.terminal-btn {
    top: auto;
    bottom: 24px;
    font-family: 'Fira Code', monospace;
    font-size: 1.1rem;
    padding: 10px 16px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/* Status Pill */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
}

/* Fullscreen Hero Intro Screen */
.hero-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 6.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: #f1f5f9;
    margin-top: 16px;
    font-weight: 600;
    opacity: 0.9;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ffffff;
    opacity: 0.8;
}

.scroll-arrow {
    animation: bounce 2s infinite;
    font-size: 1.2rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

/* Animated Birds */
.bird {
    position: absolute;
    color: #ffffff;
    font-size: 1.8rem;
    z-index: 2;
    opacity: 0.75;
    pointer-events: none;
    animation: flyAcross 18s linear infinite;
}

.bird span {
    display: inline-block;
    animation: flap 0.8s ease-in-out infinite alternate;
}

.bird-1 { top: 8%; left: -10%; animation-delay: 0s; }
.bird-2 { top: 14%; left: -10%; animation-delay: 6s; }
.bird-3 { top: 20%; left: -10%; animation-delay: 12s; }

@keyframes flyAcross {
    0% { transform: translateX(-10vw) translateY(0); }
    50% { transform: translateX(50vw) translateY(-20px); }
    100% { transform: translateX(110vw) translateY(10px); }
}

@keyframes flap {
    0% { transform: scaleY(1) scaleX(1); }
    100% { transform: scaleY(0.4) scaleX(1.3); }
}

/* Floating Clouds */
.cloud {
    position: absolute;
    font-size: 4rem;
    opacity: 0.35;
    pointer-events: none;
    user-select: none;
    filter: blur(1px);
    z-index: 1;
}

.cloud-1 { top: 18%; left: 5%; font-size: 5rem; }
.cloud-2 { top: 32%; right: 8%; font-size: 3.5rem; }
.cloud-3 { top: 58%; left: 10%; font-size: 4.5rem; opacity: 0.25; }
.cloud-4 { top: 78%; right: 12%; font-size: 6rem; opacity: 0.15; }

/* Shooting Stars */
.shooting-star {
    position: absolute;
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, #ffffff, transparent);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    transform: rotate(-35deg);
}

.star-1 { top: 65%; right: 15%; animation: shoot 5s infinite 1s; }
.star-2 { top: 80%; right: 35%; animation: shoot 7s infinite 3s; }
.star-3 { top: 90%; right: 10%; animation: shoot 6s infinite 5s; }

@keyframes shoot {
    0% { transform: translateX(0) translateY(0) rotate(-35deg); opacity: 1; width: 120px; }
    20% { transform: translateX(-300px) translateY(200px) rotate(-35deg); opacity: 0; width: 0px; }
    100% { opacity: 0; }
}

/* Main Content Wrapper */
.page-wrapper {
    position: relative;
    z-index: 2;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 20px 60px 20px;
}

/* Smooth Reveal Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Glassmorphism Cards */
.glass-card {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 28px;
    margin-bottom: 28px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

/* Header & Avatar */
header {
    text-align: center;
    margin-bottom: 36px;
}

.profile-frame {
    display: inline-block;
    margin-bottom: 16px;
}

.tilted-img {
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.avatar-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    transform: rotate(-5deg);
}

.sky-img {
    width: 100%;
    height: auto;
    max-height: 240px;
    object-fit: cover;
    transform: rotate(2deg);
}

.tilted-img:hover {
    transform: rotate(0deg) scale(1.04);
    box-shadow: 0 20px 36px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.5);
}

h1 {
    font-size: 2.1rem;
    font-weight: 800;
    margin: 8px 0;
    color: #ffffff;
}

.tagline {
    color: #cbd5e1;
    font-size: 0.98rem;
    line-height: 1.5;
    margin-top: 0;
}

/* Navigation Chips */
.nav-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.nav-chip {
    text-decoration: none;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 18px;
    border-radius: 99px;
    font-size: 0.88rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.25s ease;
}

.nav-chip:hover {
    background: #ffffff;
    color: #0f172a;
    transform: translateY(-2px);
}

/* Typography Inside Cards */
h2 {
    font-size: 1.2rem;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

p {
    line-height: 1.6;
    color: #94a3b8;
    font-size: 0.95rem;
    margin: 0;
}

/* Vertical Timeline */
.timeline {
    position: relative;
    padding-left: 20px;
    border-left: 2px solid rgba(255, 255, 255, 0.15);
    margin-top: 10px;
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -27px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #60a5fa;
    box-shadow: 0 0 10px #60a5fa;
}

.timeline-date {
    font-size: 0.78rem;
    font-weight: 700;
    color: #60a5fa;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline-content h3 {
    margin: 4px 0 10px 0;
    font-size: 1rem;
    color: #f1f5f9;
}

/* Interactive Hardware Spec Tabs */
.spec-viewer {
    margin-top: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 14px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.spec-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.spec-tab {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.spec-tab.active, .spec-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.spec-content {
    display: none;
    font-size: 0.88rem;
}

.spec-content.active {
    display: block;
}

.spec-content ul {
    margin: 0;
    padding-left: 18px;
    color: #cbd5e1;
}

.spec-content li {
    margin-bottom: 4px;
}

/* Social Buttons */
.social-grid {
    display: flex;
    gap: 12px;
}

.social-btn {
    flex: 1;
    text-align: center;
    text-decoration: none;
    color: #ffffff;
    background: rgba(96, 165, 250, 0.2);
    border: 1px solid rgba(96, 165, 250, 0.4);
    padding: 12px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.25s ease;
}

.social-btn:hover {
    background: #60a5fa;
    color: #0f172a;
    transform: translateY(-2px);
}

/* Interactive Terminal Overlay Modal */
.terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.terminal-overlay.hidden {
    display: none;
}

.terminal-box {
    width: 100%;
    max-width: 520px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    font-family: 'Fira Code', monospace;
}

.terminal-header {
    background: #1e293b;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #94a3b8;
}

.terminal-header button {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
}

.terminal-body {
    padding: 16px;
    height: 220px;
    overflow-y: auto;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #cbd5e1;
}

.terminal-body p {
    font-family: 'Fira Code', monospace;
    margin-bottom: 8px;
    color: #e2e8f0;
}

.highlight {
    color: #60a5fa;
    font-weight: bold;
}

.prompt {
    color: #10b981;
    font-weight: bold;
    margin-right: 8px;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: #090d16;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-input-line input {
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    width: 100%;
    outline: none;
}

/* Footer */
footer {
    text-align: center;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 36px;
}