/* ============================================
   CSS RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #1c2128;
    --bg-card: #21262d;
    --bg-hover: #30363d;

    /* Text Colors */
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;

    /* Accent Colors */
    --accent-primary: #58a6ff;
    --accent-secondary: #1f6feb;
    --accent-success: #3fb950;
    --accent-warning: #d29922;
    --accent-danger: #f85149;
    --accent-purple: #bc8cff;
    --accent-pink: #ff7b72;

    /* Highlight Colors */
    --highlight-orange: #ff9f66;
    --highlight-cyan: #79c0ff;
    --highlight-green: #56d364;
    --highlight-yellow: #f1e05a;

    /* Borders */
    --border-color: #30363d;
    --border-muted: #21262d;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(88, 166, 255, 0.3);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 1rem;
    --spacing-2xl: 1.5rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: #79c0ff;
    /* Brighter blue for hover */
}

button {
    font-family: inherit;
    color: var(--accent-primary);
    background: transparent;
    border: 1px solid var(--accent-primary);
    cursor: pointer;
    transition: all var(--transition-base);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: var(--spacing-sm) 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.logo-bracket {
    color: var(--accent-primary);
}

.logo-text {
    color: var(--text-primary);
    margin: 0 0.25rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.nav-menu.active {
    display: flex;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    z-index: 1001;
}

.hamburger {
    display: block;
    position: relative;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: background 0.2s ease-out;
}

.hamburger::before,
.hamburger::after {
    content: '';
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--text-primary);
    transition: all 0.2s ease-out;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

.nav-toggle.active .hamburger {
    background: transparent;
}

.nav-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.nav-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

.nav-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color var(--transition-base);
    position: relative;
}

.nav-link:hover {
    color: #79c0ff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width var(--transition-base);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    padding: 7rem 0 0.5rem;
    min-height: auto;
    background: var(--bg-primary);
    position: relative;
}

/* Hero before gradient removed */
.hero::before {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
}

.hero-profile-pic {
    flex-shrink: 0;
}

.profile-pic-placeholder {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-pic-placeholder svg {
    width: 100px;
    height: 100px;
    color: var(--text-muted);
}

.hero-text {
    flex: 1;
    display: grid;
    grid-template-areas:
        "title stats"
        "location location"
        "desc desc";
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: var(--spacing-md);
}

.hero-location {
    grid-area: location;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.location-icon {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
}

.hero-title {
    grid-area: title;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-xs);
    /* Remove flex since stats are overlapping in grid now */
    display: block;
}

.highlight-name {
    color: var(--highlight-orange);
    position: relative;
    display: inline-block;
}

.highlight-name::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-primary);
}

@keyframes shimmer {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.hero-description {
    grid-area: desc;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 800px;
    margin-bottom: var(--spacing-md);
}

.highlight {
    color: var(--highlight-cyan);
    font-weight: 500;
}

.hero-stats {
    grid-area: stats;
    justify-self: end;
    /* Align to the right on desktop, matching original design */
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: 0;
    margin-top: 10px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: all var(--transition-base);
    cursor: pointer;
}

.stat-item:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 18px;
    height: 18px;
    color: var(--accent-primary);
}

/* Animations removed as per user request */

/* ============================================
   WORK EXPERIENCE SECTION
   ============================================ */
.work-experience {
    padding: var(--spacing-xl) 0;
    background: var(--bg-primary);
}

.experience-item.hidden {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
}

.experience-item.show {
    max-height: 500px;
    opacity: 1;
    margin-bottom: var(--spacing-md);
}

.see-more-btn {
    align-self: flex-start;
    margin-top: 0.5rem;
    margin-left: 28px;
    /* Align with text content */
    padding: 0.5rem 1.25rem;
    background: transparent;
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-sm);
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.see-more-btn:hover {
    background: rgba(88, 166, 255, 0.1);
    color: #79c0ff;
    border-color: #79c0ff;
    transform: translateY(-1px);
}

.experience-timeline {
    display: flex;
    flex-direction: column;
}

.experience-item {
    display: flex;
    gap: var(--spacing-sm);
    align-items: flex-start;
    margin-bottom: var(--spacing-sm);
}

.experience-dot {
    width: 12px;
    height: 12px;
    background: var(--accent-primary);
    border-radius: 50%;
    margin-top: 4px;
    flex-shrink: 0;
    box-shadow: 0 0 0 4px rgba(88, 166, 255, 0.2);
}

.experience-content {
    flex: 1;
}

.experience-role {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.experience-company {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.experience-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   PROJECTS SECTION
   ============================================ */
.projects {
    padding: var(--spacing-xl) 0;
    background: var(--bg-primary);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.view-all {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-base);
}

.view-all:hover {
    color: var(--highlight-cyan);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Project Images Grid */
.project-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--bg-tertiary);
}

.project-image {
    aspect-ratio: 16 / 10;
    background: var(--bg-tertiary);
    display: block;
    width: 100%;
    object-fit: cover;
    border-right: 1px solid var(--border-muted);
}

.satellite-card-layout {
    display: grid;
    /* Two equal columns */
    grid-template-columns: 1fr 1fr;
    /* Two rows: first for images, second for vertical image + content */
    grid-template-rows: auto auto;
    gap: 0;
}

.sat-img-container {
    border-bottom: 1px solid var(--border-muted);
}

.sat-img-1 {
    border-right: 1px solid var(--border-muted);
}

/* Vertical image logic: below img 1 */
.sat-vert-wrapper {
    position: relative;
    border-right: 1px solid var(--border-muted);
    /* Ensure it fills the height of the adjacent content if content is taller, 
       or content fills height if image is taller. Grid handles this by default. */
    min-height: 300px;
}

.vertical-full-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Mobile responsive for satellite card */
@media (max-width: 768px) {
    .satellite-card-layout {
        /* Keep 2 columns for top images */
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        grid-template-rows: auto auto auto !important;
    }

    /* Top images stay side by side */
    .sat-img-1 {
        grid-column: 1 / 2 !important;
        border-right: 1px solid var(--border-muted);
    }

    .sat-img-2 {
        grid-column: 2 / 3 !important;
    }

    /* Vertical image spans full width below */
    .sat-vert-wrapper {
        grid-column: 1 / -1 !important;
        border-right: none;
        border-bottom: 1px solid var(--border-muted);
        /* Ensure it has a reasonable height on mobile */
        height: 400px;
    }

    /* Content spans full width at bottom */
    .satellite-content {
        grid-column: 1 / -1 !important;
    }
}

.project-image.letterbox {
    object-fit: contain;
    background: #000;
    border-right: none;
}

.project-image:last-child {
    border-right: none;
}

.project-image::before {
    display: none;
}

.placeholder-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 1;
}

/* Placeholder color variations removed */

.project-body {
    padding: var(--spacing-md);
}

.project-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xs);
}

.project-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--text-primary);
}

.project-github-icon-link {
    color: var(--accent-primary);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-github-icon-link:hover {
    color: var(--accent-primary);
    transform: translateY(-1px);
}

.project-github-icon-link svg {
    width: 18px;
    height: 18px;
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.5;
    font-size: 0.9rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--accent-primary);
    font-weight: 500;
}

.tech-icon {
    width: 24px;
    height: 24px;
}

.websockets-icon {
    filter: invert(1) brightness(2);
}

.project-github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: var(--spacing-sm);
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color var(--transition-base);
}

.project-github-link:hover {
    color: var(--accent-primary);
}

.project-github-link svg {
    width: 16px;
    height: 16px;
}

/* Flight Tracker Live Stats Section */
.live-stats-section {
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-color);
}

.live-stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xs);
}

.live-stats-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
}

.live-indicator {
    width: 8px;
    height: 8px;
    background: #238636;
    /* Darker green */
    border-radius: 50%;
    animation: live-pulse-color 2s infinite ease-in-out;
    position: relative;
}

@keyframes live-pulse-color {

    0%,
    100% {
        background-color: #238636;
        box-shadow: 0 0 0 0 rgba(35, 134, 54, 0);
    }

    50% {
        background-color: #3fb950;
        /* Brighter green */
        box-shadow: 0 0 8px rgba(63, 185, 80, 0.4);
    }
}

.live-indicator::after {
    display: none;
}

.last-updated {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 600;
    font-style: italic;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.stat-item-box {
    background: var(--bg-tertiary);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.stat-item-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0.15rem;
}

.stat-item-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-primary);
    font-family: var(--font-mono);
    line-height: 1.1;
}

.stat-item-sublabel {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
    font-weight: 500;
}

.project-icon {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
    margin-right: 0.5rem;
    vertical-align: middle;
}



/* Mini Projects Grid */
.mini-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-md);
}

.mini-project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
}

.mini-project-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.mini-icon {
    width: 24px;
    height: 24px;
    color: var(--accent-primary);
}

.mini-project-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mini-project-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.5;
}

.mini-project-footer {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.mini-tag {
    padding: 0.25rem 0.6rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* ============================================
   TECHNICAL HOBBIES SECTION
   ============================================ */
.technical-hobbies {
    padding: var(--spacing-xl) 0;
    background: var(--bg-primary);
}

.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr));
    gap: var(--spacing-lg);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: var(--spacing-sm) 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.footer-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-base);
}

.footer-link:hover {
    color: var(--accent-primary);
}

.footer-separator {
    color: var(--text-muted);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 968px) {
    .github-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .mini-projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--spacing-xl);
        transition: right 0.3s ease-in-out;
        border-left: 1px solid var(--border-color);
        margin: 0;
        padding: var(--spacing-xl);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-logo {
        font-size: 1.1rem;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-lg);
    }

    .hero-profile-pic {
        order: -1;
    }

    .profile-pic-placeholder {
        width: 160px;
        height: 160px;
    }

    .hero-text {
        grid-template-areas:
            "title"
            "location"
            "desc"
            "stats";
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .hero-description {
        margin-bottom: 0.5rem;
        /* Reduce gap below description */
    }

    .hero-stats {
        justify-self: center;
        margin-top: 0;
        /* Remove top margin for tighter spacing */
    }

    .hero-location {
        justify-content: center;
    }

    .footer-content {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
}

@media (max-width: 480px) {
    .nav-logo {
        font-size: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }
}

/* Animations removed as per user request */
.fade-in {
    opacity: 1;
    transform: none;
}

.fade-in.visible {
    opacity: 1;
    transform: none;
}