/* 
  Global Styles & Variables 
  Theme: Reference Dark (Deep Navy/Black)
*/
:root {
    --bg-body: #050505;
    --bg-card: #0d1117;
    --bg-card-hover: #161b22;
    --text-main: #ffffff;
    --text-muted: #8b949e;
    --accent-color: #58a6ff;
    --tag-bg: rgba(255, 255, 255, 0.08);
    --tag-text: #c9d1d9;
    --border-color: #30363d;
    --font-main: 'Inter', sans-serif;
    --transition-speed: 0.2s;
    --accent-green: #2ea043;
    /* GitHub Green for Education */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: transparent;
    /* transparent to show fixed canvas */
    color: var(--text-muted);
    line-height: 1.6;
    /* Important for background effects */
    position: relative;
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

/* Fixed Starry Background */
#starry-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
    /* Behind everything */
    background-color: #000000;
    /* Pure Black Base */
    pointer-events: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-speed);
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

h1,
h2,
h3,
h4 {
    color: var(--text-main);
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-center {
    text-align: center;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.pt-4 {
    padding-top: 1.5rem;
}

.pb-4 {
    padding-bottom: 1.5rem;
}

.text-accent {
    color: var(--accent-color);
}

/* Full Height Sections */
.full-height {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 0;
    padding-bottom: 10px;
    /* Reduced to minimum */
}

.section-heading {
    font-size: 2rem;
    margin-bottom: 20px;
    /* Reduced from 30px */
    font-weight: 600;
    text-align: center;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-nav ul {
    display: flex;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
    /* Ensure no bullets */
}

.main-nav a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    /* For underline positioning */
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text-main);
}

/* Underline Animation */
.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease-in-out;
    opacity: 0.8;
    /* Slight transparency for elegance */
}

/* Active State - Always Solid */
.main-nav a.active::after {
    width: 100%;
    opacity: 1;
}

/* Hover State (for non-active items) */
.main-nav a:not(.active):hover {
    color: var(--accent-color);
    /* Highlight text color */
}

.main-nav a:not(.active):hover::after {
    width: 0;
    /* No underline */
}

.header-socials {
    display: flex;
    gap: 15px;
    align-items: center;
    padding-left: 30px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.header-socials a {
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.header-socials a:hover {
    color: var(--accent-color);
}

@media (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        gap: 20px;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 15px;
    }

    .header-socials {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 20px;
        width: 100%;
        justify-content: center;
    }
}

.mobile-menu-toggle {
    display: none;
    color: var(--text-main);
    font-size: 1.4rem;
    cursor: pointer;
}

/* -------------------------------------
   Hero Animations & Keyframes
------------------------------------- */

/* 1. Fade In & Slide from Left (Avatar) */
@keyframes fadeInSlideRight {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 2. Fade In & Slide Up (Text) */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 3. Gentle Float (Avatar Idle) */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* 4. Pulse Glow (Avatar Background) */
@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 25px rgba(88, 166, 255, 0.2);
    }

    50% {
        box-shadow: 0 0 45px rgba(88, 166, 255, 0.45);
    }

    100% {
        box-shadow: 0 0 25px rgba(88, 166, 255, 0.2);
    }
}

/* 5. Light Sweep (Buttons) */
@keyframes sweep {
    0% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

/* Hero Section */
.hero-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    perspective: 1000px;
    /* Enable 3D space for tilt */
}

/* Hero Avatar Wrapper */
.hero-avatar {
    position: relative;
    /* Initial Entry Animation */
    animation: fadeInSlideRight 1s ease-out forwards;
    /* Optimize */
    will-change: transform, opacity;
}

.hero-avatar img {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);

    /* Idle Animations */
    animation:
        pulseGlow 4s infinite ease-in-out,
        float 6s infinite ease-in-out;

    transition: transform 0.1s ease-out;
    /* Smooth tilt movement */
    z-index: 2;
    position: relative;
}

/* Glow Circle Behind Avatar (Optional Extra Depth) */
.hero-avatar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(88, 166, 255, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: 1;
    animation: pulseGlow 4s infinite ease-in-out;
}

.hero-content {
    max-width: 600px;
}

/* Staggered Text Animations */
.hero-name,
.hero-title,
.hero-tagline,
.hero-skills-snapshot,
.hero-buttons {
    opacity: 0;
    /* Hidden initially */
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-name {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, #a5b4fc);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation-delay: 0.2s;
    /* 1st */
}

.hero-title {
    font-size: 1.4rem;
    color: var(--accent-color);
    margin-bottom: 15px;
    font-weight: 500;
    animation-delay: 0.4s;
    /* 2nd */
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 25px;
    animation-delay: 0.6s;
    /* 3rd */
}

.hero-skills-snapshot {
    font-size: 0.95rem;
    color: var(--accent-color);
    font-family: 'Outfit', sans-serif;
    margin-bottom: 25px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: inline-block;
    animation-delay: 0.8s;
    /* 4th */
    transition: transform 0.3s, background 0.3s;
}

.hero-skills-snapshot:hover {
    transform: translateY(-2px);
    background: rgba(88, 166, 255, 0.08);
    /* Subtle highlight */
}

.hero-buttons {
    display: flex;
    gap: 12px;
    animation-delay: 1s;
    /* 5th */
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
    align-items: center;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* Smooth bouncy ease */
    position: relative;
    overflow: hidden;
    /* For sweep effect */
    z-index: 1;
}

/* Button Hover Effects (Lift + Shadow) */
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Light Sweep Effect on Hover */
.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    z-index: -1;
    transition: none;
}

.btn:hover::after {
    animation: sweep 0.65s ease-in-out;
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {

    .hero-avatar,
    .hero-avatar img,
    .hero-name,
    .hero-title,
    .hero-tagline,
    .hero-skills-snapshot,
    .hero-buttons,
    .btn:hover,
    .skill-card:hover,
    .project-card:hover {
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
        transition: none !important;
    }
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.btn-primary {
    background: var(--text-main);
    color: var(--bg-body);
    border-color: var(--text-main);
}

.btn-primary:hover {
    background: transparent;
    color: var(--text-main);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-main);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent-color);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 0.8rem;
    border-radius: 4px;
}

/* About */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
}

.about-content p {
    margin-bottom: 20px;
    opacity: 0;
}

/* Acitve State for About Text */
section#about.active .about-content p {
    animation: fadeInUp 0.8s ease-out forwards;
}

section#about.active .about-content p:nth-child(1) {
    animation-delay: 0.2s;
}

section#about.active .about-content p:nth-child(2) {
    animation-delay: 0.4s;
}

/* About Heading Animation */
@keyframes fadeInUpScale {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

section#about.active .section-heading {
    animation: fadeInUpScale 0.8s ease-out forwards;
}

/* Keyword Highlight Sweep */
.highlight-text {
    position: relative;
    display: inline-block;
    color: var(--text-main);
    /* Ensure contrast */
    font-weight: 500;
}

.highlight-text::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 2px;
    /* Adjust vertical position */
    width: 100%;
    height: 30%;
    /* Partial emphasize */
    background: linear-gradient(90deg, transparent, rgba(88, 166, 255, 0.4), transparent);
    background-size: 200% 100%;
    background-position: -100% 0;
    z-index: -1;
    opacity: 0;
    border-radius: 4px;
}

@keyframes highlightSweep {
    0% {
        background-position: 200% 0;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        background-position: -200% 0;
        opacity: 0;
    }
}

section#about.active .highlight-text::after {
    animation: highlightSweep 2s ease-in-out 0.6s forwards;
    /* Delay to sync with text fade */
}


/* -------------------------------------
   General Scroll Animations
------------------------------------- */

/* Initial hidden state for elements we want to animate */
.section-heading,
.skill-card,
.project-card,
.timeline-item,
.contact-form {
    opacity: 0;
    /* Hidden initially */
}

/* Animations Triggered by .active class on parent section */
section.active .section-heading {
    animation: fadeInUpScale 0.8s ease-out forwards;
}

section.active .contact-form {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* -------------------------------------
   Skills Premium Animations (Grouped)
------------------------------------- */

/* Keyframe for Card Entry (Fade + Slide Right + Scale) */
@keyframes fadeInSlideRightScale {
    0% {
        opacity: 0;
        transform: translateX(-30px) scale(0.98);
    }

    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Staggered Animations for Skills Cards */
section.active .skill-card {
    animation: fadeInSlideRightScale 0.8s ease-out forwards;
}

section.active .skill-card:nth-child(1) {
    animation-delay: 0.1s;
}

section.active .skill-card:nth-child(2) {
    animation-delay: 0.3s;
}

section.active .skill-card:nth-child(3) {
    animation-delay: 0.5s;
}

section.active .skill-card:nth-child(4) {
    animation-delay: 0.7s;
}

/* Skill Chip - No Stagger (Appear with Card) */
.skill-tags span {
    opacity: 1;
    /* Visible by default (inside parent) */
    transform: none;
    animation: none;
}

/* Premium Hover Interactions */
.skill-card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.skill-card:hover {
    transform: translateY(-5px);
    /* Lift */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    /* Soft shadow */
    border-color: var(--accent-color);
}

.skill-tags span {
    transition: transform 0.2s, background 0.2s;
}

.skill-tags span:hover {
    transform: none;
    /* No scaling on hover */
    background: rgba(88, 166, 255, 0.15);
    /* Gentle highlight */
    cursor: default;
}


/* Staggered Animations for Projects */
section.active .project-card {
    animation: fadeInUp 0.8s ease-out forwards;
}

section.active .project-card:nth-child(1) {
    animation-delay: 0.2s;
}

section.active .project-card:nth-child(2) {
    animation-delay: 0.3s;
}

section.active .project-card:nth-child(3) {
    animation-delay: 0.4s;
}

section.active .project-card:nth-child(4) {
    animation-delay: 0.5s;
}

/* Staggered Animations for Timeline */
section.active .timeline-item {
    animation: fadeInUp 0.8s ease-out forwards;
}

section.active .timeline-item:nth-child(1) {
    animation-delay: 0.2s;
}

section.active .timeline-item:nth-child(2) {
    animation-delay: 0.4s;
}

section.active .timeline-item:nth-child(3) {
    animation-delay: 0.6s;
}

/* Reduced Motion for All Scroll Animations */
@media (prefers-reduced-motion: reduce) {

    .section-heading,
    .skill-card,
    .project-card,
    .timeline-item,
    .contact-form,
    .skill-tags span,
    section#about.active .section-heading,
    section#about.active .about-content p,
    section#about.active .highlight-text::after,
    section.active .section-heading,
    section.active .skill-card,
    section.active .project-card,
    section.active .timeline-item,
    section.active .contact-form,
    section.active .skill-card .skill-tags span {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .highlight-text::after {
        display: none;
    }
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Force 4 columns side-by-side */
    gap: 16px;
}

@media (max-width: 992px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    /* Reduced from 24px */
    transition: transform 0.2s;
}

.skill-card:hover {
    transform: translateY(-4px);
    border-color: var(--text-muted);
}

.skill-card h3 {
    font-size: 1rem;
    /* Slightly smaller font */
    margin-bottom: 8px;
    /* Reduced from 16px/12px */
    display: flex;
    align-items: center;
    gap: 8px;
    /* Reduced gap */
    color: var(--text-main);
}

.skill-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    /* Reduced from 20px */
    line-height: 1.4;
    font-style: italic;
    border-left: 2px solid var(--accent-color);
    padding-left: 10px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tags span {
    background: var(--tag-bg);
    color: var(--tag-text);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Projects Grid */
/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Force 4 columns as requested */
    gap: 15px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}

.project-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    border-color: var(--accent-color);
}

.project-image {
    height: 180px;
    /* Reduced from 250px */
    background: var(--bg-card);
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--bg-card);
    object-position: center;
    /* Center the image to show the middle content */
    transition: transform 0.3s;
}

/* Explicit Fix for WoofFlow and similar images */
.project-img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    /* Focus on top elements (robot/email) */
}

.project-card:hover .project-image img {
    transform: scale(1.05);
    /* Subtle zoom on hover */
}

.date-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    padding: 4px 10px;
    border-radius: 20px;
    color: #fff;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-content {
    padding: 15px;
    /* Compact padding for small cards */
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.project-outcome {
    font-size: 0.85rem;
    margin-bottom: 15px;
    flex: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.project-tags span {
    background: var(--tag-bg);
    color: var(--tag-text);
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-links {
    display: flex;
    gap: 15px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.btn-link {
    font-size: 0.85rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.8;
}

.btn-link:hover {
    opacity: 1;
    color: var(--accent-color);
}

/* Carousel buttons removed */

.view-all-link {
    color: var(--accent-color);
    font-weight: 600;
}

/* Timeline */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-left: 10px;
    /* Space for the line */
}

/* Vertical Line */
.timeline::before {
    content: '';
    position: absolute;
    left: 19px;
    /* Align with markers */
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 35px;
    margin-bottom: 10px;
    /* Reduced from 20px */
}

/* Markers */
.timeline-marker {
    position: absolute;
    left: 12px;
    top: 2px;
    /* Adjusted alignment */
    width: 16px;
    height: 16px;
    background: var(--bg-body);
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    z-index: 1;
}

.marker-blue {
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(88, 166, 255, 0.3);
}

.marker-green {
    border-color: var(--accent-green);
    box-shadow: 0 0 10px rgba(46, 160, 67, 0.3);
}

/* Header with Date and Tag */
.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 8px;
}

.timeline-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.timeline-tag {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag-blue {
    background: rgba(88, 166, 255, 0.15);
    color: var(--accent-color);
    border: 1px solid rgba(88, 166, 255, 0.2);
}

.tag-green {
    background: rgba(46, 160, 67, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(46, 160, 67, 0.2);
}

/* Content Card */
.timeline-content {
    background: var(--bg-card);
    padding: 12px 16px;
    /* Reduced from 14px 18px */
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
}

/* Visual Prominence for Experience */
.experience-item .timeline-content {
    border-left: 4px solid var(--accent-color);
    background: linear-gradient(145deg, var(--bg-card), #11161d);
}

.education-item .timeline-content {
    border-left: 4px solid var(--accent-green);
    opacity: 0.95;
    /* Slightly less prominent */
}

.timeline-content h3 {
    font-size: 1.1rem;
    /* Slightly smaller heading */
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-content h3 .icon {
    font-size: 1.4rem;
}

.role-location {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.timeline-content ul {
    padding-left: 18px;
}

.timeline-content li {
    list-style: disc;
    font-size: 0.9rem;
    margin-bottom: 3px;
    color: var(--text-muted);
    line-height: 1.35;
}

/* Resume */
.resume-preview-container {
    max-width: 500px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

/* Contact (Compact) */
.compact-form {
    max-width: 500px;
    margin: 0 auto;
}

.contact-form {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 4px;
    color: var(--text-main);
    font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent-color);
    outline: none;
}

/* Footer */
footer {
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    background: var(--bg-card);
}

/* Responsive */
@media (max-width: 900px) {
    .carousel-slide {
        min-width: 50%;
    }
}

@media (max-width: 768px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        padding-top: 80px;
        /* Ensure content clears fixed header */
    }

    .hero-avatar {
        height: auto;
        overflow: visible;
        margin-top: 20px;
    }


    .projects-grid {
        grid-template-columns: 1fr;
        /* 1 column on mobile */
    }

    /* Skills Grid Mobile Fix */
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .hero-avatar img {
        width: 160px;
        height: 160px;
        margin: 0 auto;
        /* Center image */
        display: block;
        object-fit: cover;
        object-position: center;
        max-width: 100%;
    }

    /* Wrap buttons on mobile */
    .hero-buttons {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    /* Ensure full width buttons don't overflow */
    .hero-buttons .btn {
        margin-bottom: 10px;
    }

    .main-nav {
        display: none;
    }

    .main-nav.active {
        display: flex;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px;
        left: 0;
        background: rgba(5, 5, 5, 0.95);
        padding: 20px;
        border-bottom: 1px solid var(--border-color);
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Mobile toggle logic exists in JS */
    .mobile-menu-toggle {
        display: block;
        order: -1;
        /* Move to left */
    }

    .logo {
        order: 1;
        /* Move to right (after toggle) */
    }

    .carousel-slide {
        min-width: 100%;
    }
}

/* -------------------------------------
   Modern & Lively Refinements
------------------------------------- */

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Scroll Reveal Class */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Staggered Load */
.hero-avatar,
.hero-name,
.hero-title,
.hero-tagline,
.hero-skills-snapshot,
.hero-buttons {
    opacity: 0;
    /* Hidden initially */
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-avatar {
    animation-delay: 0.1s;
}

.hero-name {
    animation-delay: 0.3s;
}

.hero-title {
    animation-delay: 0.4s;
}

.hero-tagline {
    animation-delay: 0.5s;
}

.hero-skills-snapshot {
    animation-delay: 0.6s;
}

.hero-buttons {
    animation-delay: 0.7s;
}

/* Enhanced Button Effects */
.btn {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: scale(1.05);
    /* Slight scale up */
    box-shadow: 0 0 15px var(--accent-color);
    /* Glow */
}

.btn-secondary:hover {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

/* Enhanced Card Effects */
.project-card,
.skill-card,
.timeline-content {
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.project-card:hover,
.skill-card:hover,
.timeline-content:hover {
    transform: translateY(-8px);
    /* Higher lift */
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    /* Deeper shadow */
    border-color: var(--accent-color);
}

/* Project Image Zoom */
.project-image img {
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}


/* -------------------------------------
   Global Fixed Navigation
------------------------------------- */
#global-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    padding: 10px 20px;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 999;
    align-items: center;
    transition: opacity 0.3s, transform 0.3s;
}

#global-nav .nav-btn {
    min-width: 120px;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Success Message */
#contact-success {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--accent-green);
    animation: fadeIn 0.5s ease;
}

.success-icon {
    font-size: 3rem;
    color: var(--accent-green);
    margin-bottom: 15px;
}

#contact-success h3 {
    color: var(--text-main);
    margin-bottom: 10px;
}

/* -------------------------------------
   Project Detail Pages
------------------------------------- */

.project-detail-section {
    padding-top: 120px;
    /* Account for fixed header */
    padding-bottom: 60px;
    max-width: 800px;
    /* Optimize for reading */
    margin: 0 auto;
}

.project-header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 30px;
}

.project-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, #a5b4fc);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-tagline {
    font-size: 1.2rem;
    color: var(--accent-color);
}

.detail-block {
    margin-bottom: 40px;
}

.detail-block h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-main);
    border-left: 4px solid var(--accent-color);
    padding-left: 15px;
}

.detail-block p {
    margin-bottom: 15px;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.detail-block ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.detail-block li {
    margin-bottom: 8px;
}

/* Badges for Tools & Tech */
.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-badge {
    background: rgba(88, 166, 255, 0.1);
    color: var(--accent-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(88, 166, 255, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.tech-badge:hover {
    background: rgba(88, 166, 255, 0.2);
    transform: translateY(-2px);
}

.tech-badge i {
    font-size: 1rem;
}

/* Step-by-step Approach */
.approach-step {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.approach-step h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.approach-step h3::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-color);
}

.approach-step p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Navigation Buttons specific to project pages */
.project-nav-buttons {
    display: flex;
    justify-content: space-between;
    /* Spread them out */
    gap: 15px;
    margin-top: 50px;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
}

.project-nav-buttons .btn {
    min-width: 140px;
    justify-content: center;
}