html, body {
    height: 100%;
    margin: 0;
}


body {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    background: #0f172a;
    color: #fff;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

.container {
    width: 90%;
    margin: auto;
}

/* HEADER BASE */
#header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(2,6,23,0.9);
    backdrop-filter: blur(10px);
    transition: 0.3s;
}

/* SHADOW ON SCROLL */
#header.scrolled {
    box-shadow: 0 5px 20px rgba(0,0,0,0.6);
}

/* NAV */


nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav a {
    color: #fff;
    margin: 0 10px;
    text-decoration: none;
}

.hero {
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 40px;
}

.btn {
    background: #22c55e;
    padding: 10px 20px;
    color: #000;
    text-decoration: none;
    border-radius: 5px;
}

.section {
    padding: 60px 0;
}

.form-container {
    max-width: 500px;
    margin: auto;
    text-align: center;
}

input, textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
}

.section h2 {
    text-align: center;
    margin-bottom: 40px;
}

/* GRID */
.grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
}

/* CARD (FINAL CLEAN VERSION) */
.card {
    background: #1e293b;
    padding: 25px;
    border-radius: 12px;
    width: 300px;
    text-align: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;

    /* PREMIUM EFFECT */
    transition: all 0.35s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* HOVER ANIMATION */
.card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}

/* GLOW BORDER EFFECT */
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(45deg, #22c55e, transparent, #22c55e);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    opacity: 0;
    transition: 0.3s;
}

.card:hover::before {
    opacity: 1;
}

/* OVERLAY (SMOOTH PREMIUM) */
.card .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    
    background: rgba(2,6,23,0.95);
    color: #fff;
    padding: 20px;

    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.card:hover .overlay {
    transform: translateY(0);
}

/* TEXT STYLING */
.card h3 {
    margin-bottom: 10px;
}

.card p {
    opacity: 0.85;
}

.card a {
    position: relative;
    z-index: 2;
}

.project-detail {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    align-items: stretch; /* 🔥 IMPORTANT CHANGE */
}

/* LEFT IMAGE COLUMN */
.project-image {
    flex: 0 0 45%;
    max-width: 45%;
    height: 350px;              /* FIXED BOX HEIGHT */
    
    display: flex;
    align-items: center;
    justify-content: center;

    background: #020617;
    border-radius: 10px;
    overflow: hidden;           /* IMPORTANT */
}

/* IMAGE PERFECT FIT */
.project-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;        /* FULL IMAGE VISIBLE */
    display: block;
}

/* RIGHT CONTENT */
.project-content {
    flex: 0 0 55%;
    max-width: 55%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* 🔥 FORCE TOP ALIGN */
}

/* REMOVE ANY DEFAULT TOP SPACE */
.project-content h2:first-child {
    margin-top: 0;
}

.project-content p {
    line-height: 1.6;
    margin-bottom: 15px;
    opacity: 0.9;
}

/* NAV LINKS */
.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    position: relative;
}

/* HOVER UNDERLINE EFFECT */
.nav-links a::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    background: #22c55e;
    left: 0;
    bottom: -5px;
    transition: 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* MOBILE MENU */
.menu-toggle {
    display: none;
    font-size: 26px;
    cursor: pointer;
}

/* RESPONSIVE */
@media (max-width: 768px) {

    .menu-toggle {
        display: block;
        color: #fff;
    }

    .nav-links {
        position: absolute;
        top: 70px;
        right: 0;
        background: #020617;
        flex-direction: column;
        width: 220px;
        padding: 20px;
        display: none;
    }

    .nav-links.active {
        display: flex;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: bold;
}

.logo img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.logo img {
    transition: 0.3s;
}

.logo:hover img {
    transform: rotate(10deg) scale(1.1);
}
