:root {
    --bg-main: #0B0E14;
    --bg-alt: #151A23;
    --bg-card: #1A202C;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --border: rgba(255, 255, 255, 0.08);
    --glow: rgba(59, 130, 246, 0.3);
    --ff-main: 'Inter', sans-serif;
    --ff-head: 'Rajdhani', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--ff-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.logo {
    font-family: var(--ff-head);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

.section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-title .line {
    flex-grow: 1;
    height: 1px;
    background: var(--border);
    position: relative;
}

.section-title .line::before {
    content: '';
    position: absolute;
    left: 0;
    top: -1px;
    width: 50px;
    height: 3px;
    background: var(--accent);
}

.bg-alt {
    background-color: var(--bg-alt);
}

.accent {
    color: var(--accent);
}

/* Utilities */
.box-glow {
    background: linear-gradient(145deg, var(--bg-card), var(--bg-alt));
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.box-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.1), transparent 50%);
    pointer-events: none;
}

.box-glow:hover {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 20px var(--glow);
    transform: translateY(-5px);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 4px;
    font-weight: 600;
    font-family: var(--ff-head);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--text-main);
    transform: translateY(-2px);
}

/* Gravix Motion for Buttons */
@keyframes gravixLevitate {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-5px) scale(1.02);
    }
}

.gravix-btn {
    animation: gravixLevitate 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gravix-btn:nth-child(2) {
    animation-delay: -2s;
    /* Creates an alternating magnetic float between buttons */
}

/* Enhancing existing button hover specifically for Gravix mode */
.btn-primary.gravix-btn:hover,
.btn-secondary.gravix-btn:hover {
    animation-play-state: paused;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.5);
    border-color: var(--accent);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 4px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-main);
    border: 1px solid var(--border);
    cursor: pointer;
}

.btn-small:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-block {
    display: block;
    width: 100%;
}

/* AeroMotion UI Effect */
.btn-aero {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    font-family: var(--ff-head);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    z-index: 3;
    margin-top: 1rem;
    width: fit-content;
}

.btn-aero i {
    transition: transform 0.3s ease;
}

.btn-aero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
    transition: left 0.6s ease;
}

.btn-aero:hover {
    transform: translateY(-4px);
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3), 0 0 15px var(--glow);
    color: #fff;
}

.btn-aero:hover::before {
    left: 100%;
}

.btn-aero:hover i {
    transform: translateX(4px);
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 1.5rem 0;
}

nav.scrolled {
    background: rgba(11, 14, 20, 0.85);
    backdrop-filter: blur(12px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.9rem;
    font-family: var(--ff-head);
    font-weight: 600;
    letter-spacing: 1px;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

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

.nav-links a:hover {
    color: var(--accent);
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        radial-gradient(circle at center, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    background-size: 30px 30px, 30px 30px, 100% 100%;
    pointer-events: none;
    z-index: 0;
}

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

.greeting {
    color: var(--accent);
    font-family: var(--ff-head);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.hero h2 {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
    border-left: 2px solid var(--accent);
    padding-left: 1rem;
}

.btn-group {
    display: flex;
    gap: 1rem;
}

/* Animated Robotic Arm Graphic */
.css-robot-arm {
    position: relative;
    width: 350px;
    height: 400px;
    margin: 30px auto;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.arm-base {
    width: 140px;
    height: 30px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-bottom: 4px solid var(--accent);
    border-radius: 8px 8px 0 0;
    position: relative;
    z-index: 1;
}

.joint-1 {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--bg-main);
    border: 2px solid var(--accent);
    border-radius: 50%;
    bottom: 10px;
    left: 50%;
    margin-left: -30px;
    z-index: 2;
    box-shadow: inset 0 0 10px rgba(59, 130, 246, 0.4);
    transform-origin: 50% 50%;
    animation: moveJoint1 8s ease-in-out infinite alternate;
}

.joint-1::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
}

.link-1 {
    position: absolute;
    width: 30px;
    height: 140px;
    background: linear-gradient(to right, #2a3441, #151a23);
    border: 2px solid var(--border);
    border-radius: 15px;
    bottom: 30px;
    left: 50%;
    margin-left: -15px;
    transform-origin: bottom center;
}

.joint-2 {
    position: absolute;
    width: 50px;
    height: 50px;
    background: var(--bg-main);
    border: 2px solid var(--accent);
    border-radius: 50%;
    top: -25px;
    left: 50%;
    margin-left: -25px;
    z-index: 3;
    transform-origin: 50% 50%;
    animation: moveJoint2 8s ease-in-out infinite alternate;
    box-shadow: inset 0 0 10px rgba(59, 130, 246, 0.4);
}

.joint-2::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
}

.link-2 {
    position: absolute;
    width: 22px;
    height: 110px;
    background: linear-gradient(to right, #2a3441, #151a23);
    border: 2px solid var(--border);
    border-radius: 11px;
    bottom: 25px;
    left: 50%;
    margin-left: -11px;
    transform-origin: bottom center;
}

.joint-3 {
    position: absolute;
    width: 40px;
    height: 40px;
    background: var(--bg-main);
    border: 2px solid var(--accent);
    border-radius: 50%;
    top: -20px;
    left: 50%;
    margin-left: -20px;
    z-index: 4;
    transform-origin: 50% 50%;
    animation: moveJoint3 8s ease-in-out infinite alternate;
    box-shadow: inset 0 0 10px rgba(59, 130, 246, 0.4);
}

.joint-3::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
}

.effector {
    position: absolute;
    width: 50px;
    height: 20px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    bottom: 20px;
    left: 50%;
    margin-left: -25px;
    border-radius: 4px;
    transform-origin: bottom center;
}

.claw-left,
.claw-right {
    position: absolute;
    width: 8px;
    height: 30px;
    background: var(--text-muted);
    top: -30px;
    border-radius: 4px;
}

.claw-left {
    left: 5px;
    transform-origin: bottom center;
    animation: pinchLeft 8s ease-in-out infinite alternate;
}

.claw-right {
    right: 5px;
    transform-origin: bottom center;
    animation: pinchRight 8s ease-in-out infinite alternate;
}

.spark {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    top: -15px;
    left: 50%;
    margin-left: -6px;
    box-shadow: 0 0 15px 5px rgba(59, 130, 246, 0.8);
    animation: weldSpark 8s infinite alternate;
}

@keyframes moveJoint1 {

    0%,
    15% {
        transform: rotate(-30deg);
    }

    40%,
    60% {
        transform: rotate(40deg);
    }

    85%,
    100% {
        transform: rotate(-10deg);
    }
}

@keyframes moveJoint2 {

    0%,
    15% {
        transform: rotate(50deg);
    }

    40%,
    60% {
        transform: rotate(-60deg);
    }

    85%,
    100% {
        transform: rotate(30deg);
    }
}

@keyframes moveJoint3 {

    0%,
    15% {
        transform: rotate(-20deg);
    }

    40%,
    60% {
        transform: rotate(20deg);
    }

    85%,
    100% {
        transform: rotate(-20deg);
    }
}

@keyframes pinchLeft {

    0%,
    35% {
        transform: rotate(-15deg);
    }

    45%,
    55% {
        transform: rotate(0deg);
    }

    65%,
    100% {
        transform: rotate(-15deg);
    }
}

@keyframes pinchRight {

    0%,
    35% {
        transform: rotate(15deg);
    }

    45%,
    55% {
        transform: rotate(0deg);
    }

    65%,
    100% {
        transform: rotate(15deg);
    }
}

@keyframes weldSpark {

    0%,
    45% {
        opacity: 0;
        transform: scale(0.5);
    }

    48%,
    52% {
        opacity: 1;
        transform: scale(1.5);
        box-shadow: 0 0 20px 10px rgba(59, 130, 246, 1);
    }

    55%,
    100% {
        opacity: 0;
        transform: scale(0.5);
    }
}

/* Projects Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.project-corner-img {
    position: absolute;
    top: 0;
    right: 0;
    width: 130px;
    height: 130px;
    border-radius: 0;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
    border-left: 1px solid var(--border);
    z-index: 1;
    transition: transform 0.4s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.project-card:hover .project-corner-img {
    transform: scale(1.1);
}

.project-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.project-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.project-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    flex-grow: 1;
}

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

.tech-stack span {
    font-size: 0.8rem;
    font-family: var(--ff-head);
    color: var(--accent);
    padding: 0.2rem 0.6rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 4px;
}

.project-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: linear-gradient(145deg, var(--bg-card), var(--bg-alt));
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.skill-category::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.skill-category:hover {
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.skill-category:hover::after {
    transform: scaleX(1);
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.skill-header i {
    font-size: 1.8rem;
}

.skill-header h3 {
    font-size: 1.2rem;
}

.skill-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.skill-list li::before {
    content: '▹';
    color: var(--accent);
}

/* Experience Section */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.exp-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.exp-header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    transition: var(--transition);
}

.exp-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.exp-title h3 {
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
}

.exp-role {
    color: var(--accent);
    font-size: 0.9rem;
    font-family: var(--ff-head);
    font-weight: 600;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.exp-card.active .toggle-icon {
    transform: rotate(180deg);
}

.exp-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease;
    background: var(--bg-main);
    padding: 0 2rem;
}

.exp-card.active .exp-body {
    max-height: 2500px;
    padding: 2rem;
    border-top: 1px solid var(--border);
}

.exp-summary {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.exp-subboxes {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.exp-subbox {
    position: relative;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.exp-subbox::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
    box-shadow: 0 0 15px var(--accent);
}

/* Glare effect */
.exp-subbox::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: skewX(-25deg);
    transition: all 0.6s ease;
    z-index: 1;
    pointer-events: none;
}

.exp-subbox:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(59, 130, 246, 0.4),
        0 0 20px rgba(59, 130, 246, 0.2);
    border-color: transparent;
    z-index: 10;
}

.exp-subbox:hover::before {
    transform: scaleY(1);
}

.exp-subbox:hover::after {
    left: 200%;
}

.exp-subbox-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    z-index: 2;
    font-family: var(--ff-head);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.exp-subbox:hover .exp-subbox-title {
    color: var(--accent);
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    transform: translateX(10px);
}

.exp-subbox-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.exp-subbox:hover .exp-subbox-desc {
    transform: translateX(10px);
    color: var(--text-main);
}

.hover-img {
    position: absolute;
    top: -20px;
    right: -30px;
    width: 220px;
    height: 140px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    border: 2px solid var(--accent);
    opacity: 0;
    z-index: 10;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-img::before {
    /* Removed darkening gradient so the floating image is clear */
    content: none;
}

.exp-subbox:hover .hover-img {
    opacity: 1;
}

.anim-slide .hover-img {
    transform: translateX(100%);
}

.anim-slide:hover .hover-img {
    transform: translateX(0);
}

.anim-scale .hover-img {
    transform: scale(0.8);
}

.anim-scale:hover .hover-img {
    transform: scale(1);
}

.anim-fade-up .hover-img {
    transform: translateY(20px);
}

.anim-fade-up:hover .hover-img {
    transform: translateY(0);
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    width: 2px;
    background: var(--border);
}

@keyframes floatZeroG {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 3rem;
    width: 100%;
    animation: floatZeroG 6s ease-in-out infinite;
}

.timeline-item:nth-child(even) {
    animation-delay: -3s;
}

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

.timeline-dot {
    position: absolute;
    left: 14px;
    top: 25px;
    width: 14px;
    height: 14px;
    background: var(--bg-main);
    border: 2px solid var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--glow);
    z-index: 2;
    transition: var(--transition);
}

.timeline-item:hover .timeline-dot {
    background: var(--accent);
    box-shadow: 0 0 20px var(--glow);
}

.timeline-content {
    padding: 2rem;
    position: relative;
}

.timeline-date {
    font-family: var(--ff-head);
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.timeline-content h3 {
    margin-bottom: 1rem;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Attachment button */
.timeline-attach {
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
}

.timeline-attach:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

/* AntiFlux Animation for important buttons */
@keyframes antiFluxPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.6);
        border-color: var(--accent);
    }

    50% {
        box-shadow: 0 0 15px 5px rgba(59, 130, 246, 0.2), inset 0 0 8px rgba(59, 130, 246, 0.1);
        border-color: rgba(255, 255, 255, 0.4);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
        border-color: var(--accent);
    }
}

.antiflux {
    animation: antiFluxPulse 2.5s infinite cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--accent);
    color: var(--accent);
    position: relative;
    overflow: hidden;
}

.antiflux::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: antiFluxShine 4s infinite linear;
}

@keyframes antiFluxShine {
    0% {
        left: -100%;
    }

    20% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

.antiflux:hover {
    animation: none;
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

/* Desktop alternating layout */
@media (min-width: 768px) {
    .timeline::before {
        left: 50%;
        transform: translateX(-50%);
    }

    .timeline-item {
        width: 50%;
        padding-left: 0;
        padding-right: 40px;
    }

    .timeline-item:nth-child(even) {
        margin-left: 50%;
        padding-right: 0;
        padding-left: 40px;
    }

    .timeline-dot {
        left: auto;
        right: -7px;
    }

    .timeline-item:nth-child(even) .timeline-dot {
        right: auto;
        left: -7px;
    }

    /* Connectors (optional little lines pointing to center) */
    .timeline-content::after {
        content: '';
        position: absolute;
        top: 30px;
        width: 40px;
        height: 2px;
        background: var(--border);
        z-index: -1;
    }

    .timeline-item:nth-child(odd) .timeline-content::after {
        right: -40px;
    }

    .timeline-item:nth-child(even) .timeline-content::after {
        left: -40px;
    }
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.gallery-item:hover {
    border-color: var(--accent);
    transform: scale(1.02);
}

.img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--border);
    background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255, 255, 255, 0.02) 10px, rgba(255, 255, 255, 0.02) 20px);
}

/* Contact */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

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

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-main);
    font-family: var(--ff-main);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Animated View Details Button */
.btn-details {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-family: var(--ff-head);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    z-index: 1;
}

.btn-details::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.4), var(--accent));
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: -1;
}

.btn-details:hover {
    color: #fff;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    transform: translateY(-3px);
}

.btn-details:hover::before {
    left: 0;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-main);
    border: none;
    border-radius: 0;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    transform: translateY(100vh);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: fixed;
    top: 2rem;
    right: 3rem;
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(5px);
    width: 50px;
    height: 50px;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 100;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--accent);
    color: #fff;
    transform: rotate(90deg);
}

.modal-body {
    padding: 0;
}

.full-page-modal-content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.modal-banner {
    width: 100%;
    height: 50vh;
    background: var(--bg-main);
    position: relative;
    padding: 4rem 15% 0 15%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid var(--border);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.modal-text-content {
    padding: 2rem 15% 5rem 15%;
    position: relative;
    z-index: 10;
    margin-top: 0;
}

.modal-text-content h2 {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    color: var(--text-main);
}

.modal-text-content .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 3rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    color: var(--text-main);
    font-size: 1.1rem;
}

.modal-text-content .btn-primary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.modal-section {
    margin-bottom: 2.5rem;
}

.modal-section h4 {
    font-size: 1.3rem;
    color: var(--accent);
    margin-bottom: 0.8rem;
    font-family: var(--ff-head);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-section p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .modal-banner {
        padding: 4rem 2rem 0 2rem;
        height: 40vh;
    }

    .modal-text-content {
        padding: 2rem;
        margin-top: 0;
    }

    .modal-text-content h2 {
        font-size: 2.5rem;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .tagline {
        margin: 0 auto 2.5rem auto;
        border-left: none;
        border-bottom: 2px solid var(--accent);
        padding: 0 0 1rem 0;
    }

    .btn-group {
        justify-content: center;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-card);
        flex-direction: column;
        padding: 2rem;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .tech-circle {
        width: 300px;
        height: 300px;
    }

    .inner-circle {
        width: 200px;
        height: 200px;
    }
}

/* Gallery Image Hover Animation */
.gallery-img-hover {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.gallery-img-hover:hover {
    transform: scale(1.05);
    z-index: 10;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

/* Desktop Split Modal Layout */
@media (min-width: 992px) {
    .full-page-modal-content {
        flex-direction: row;
        align-items: flex-start;
    }

    .modal-banner {
        width: 50%;
        height: 100vh;
        padding: 4rem 2rem 4rem 4rem;
        position: sticky;
        top: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .modal-banner img {
        height: calc(100vh - 8rem);
        width: 100%;
        object-fit: contain;
        background: rgba(0, 0, 0, 0.2);
    }

    .modal-text-content {
        width: 50%;
        padding: 4rem 4rem 5rem 2rem;
    }
}

/* --- UI Enhancements for Redesign --- */

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

/* Project Main Image */
.project-main-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Placeholder Image Box */
.img-placeholder-box {
    width: 100%;
    height: 100%;
    min-height: 200px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-family: var(--ff-main);
    border-radius: 8px;
    gap: 0.5rem;
}

.img-placeholder-box i {
    font-size: 1.5rem;
    color: var(--accent);
    opacity: 0.7;
}

/* Project Highlight String */
.project-highlight-line {
    font-size: 0.9rem;
    color: var(--text-main);
    font-style: italic;
    margin-bottom: 1rem;
    border-left: 2px solid var(--accent);
    padding-left: 0.8rem;
}

/* Modal 2-Column Challenge/Solution */
.cs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.cs-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.cs-box:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .cs-grid {
        grid-template-columns: 1fr;
    }
}

/* Experience Key Contributions */
.key-contributions {
    margin-top: 1rem;
    padding-left: 1.2rem;
    list-style: none;
}

.key-contributions li {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    position: relative;
    line-height: 1.5;
}

.key-contributions li::before {
    content: '▹';
    position: absolute;
    left: -1.2rem;
    color: var(--accent);
}