:root {
    --bg-main: #f4f4f2;
    --bg-alt: #ececec;
    --bg-card: #ffffff;
    --primary: #0f172a;
    --accent: #334155;
    --text-muted: #64748b;
    --border: rgba(0, 0, 0, 0.06);
    --transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    background-image: radial-gradient(#d1d1d1 0.5px, transparent 0.5px);
    background-size: 40px 40px; 
    color: var(--primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 40px; }

/* Navigation */
nav {
    position: fixed; width: 100%; top: 0; z-index: 1000;
    background: rgba(244, 244, 242, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--border);
    padding: 5px 0;
}

nav .container { display: flex; justify-content: space-between; align-items: center; }

.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo {
    height: 100px; /* Adjust this height to match your logo's proportions */
    width: auto;  /* Keeps the aspect ratio perfect */
    display: block;
    transition: var(--transition);
}

.nav-logo:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

/* Ensure the logo doesn't get too big on mobile */
@media (max-width: 480px) {
    .nav-logo {
        height: 28px;
    }
}

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--text-muted); font-size: 0.85rem; transition: 0.3s; }
.nav-links a:hover { color: var(--primary); }
.cta-nav { border: 1px solid var(--primary); padding: 8px 18px; border-radius: 4px; color: var(--primary) !important; font-weight: 600 !important; }

/* Hero */
.hero { height: 100vh; display: flex; align-items: center; position: relative; background: radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.04), transparent); }
.hero span { text-transform: uppercase; letter-spacing: 3px; font-size: 0.75rem; color: var(--accent); font-weight: 600; }
.hero h1 { font-size: clamp(3rem, 10vw, 5.5rem); line-height: 1; margin: 20px 0; letter-spacing: -3px; }
.subtitle { max-width: 650px; font-size: 1.3rem; color: var(--text-muted); font-weight: 300; }
.hero-scroll { position: absolute; bottom: 50px; }
.scroll-link { text-decoration: none; color: var(--primary); font-size: 0.9rem; font-weight: 600; }
.scroll-link i { margin-left: 10px; animation: bounce 2s infinite; }

/* Sections */
.section { padding: 140px 0; }
.alt-bg { background-color: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 2px; color: var(--text-muted); margin-bottom: 60px; }

/* Projects */
.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.project-card { background: var(--bg-card); border-radius: 6px; overflow: hidden; transition: var(--transition); }
.project-card:hover { transform: translateY(-12px); box-shadow: 0 30px 60px -12px rgba(0,0,0,0.1); }
.project-img-wrapper { height: 280px; overflow: hidden; background: #e2e8f0; }
.project-img-wrapper img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%); transition: 0.7s; }
.project-card:hover img { filter: grayscale(0%); transform: scale(1.05); }
.project-info { padding: 35px; }
.category { font-size: 0.7rem; color: var(--accent); font-weight: 600; text-transform: uppercase; display: block; margin-bottom: 10px; }
.project-info h3 { font-size: 1.6rem; margin-bottom: 15px; }
.project-info p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 25px; }
.project-link { text-decoration: none; color: var(--primary); font-weight: 600; font-size: 0.9rem; }

/* Carousel styles */
.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    aspect-ratio: 16/9;
    background: #f5f5f5; /* placeholder background */
}

.carousel-track {
    display: flex;
    transition: transform 0.3s ease;
    height: 100%;
}

.carousel-slide {
    flex: 0 0 100%;
    height: 100%;
    object-fit: cover;
    background: #f5f5f5;
}

/* Loading placeholder */
.carousel-slide[src=""] {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s;
    font-size: 1.2rem;
    opacity: 0;
    pointer-events: none;
}

.carousel-container:hover .carousel-btn {
    opacity: 1;
    pointer-events: auto;
}

.carousel-btn:hover {
    background: rgba(0,0,0,0.8);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

.carousel-btn.hidden {
    display: none;
}

.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    background: rgba(0,0,0,0.3);
    padding: 6px 12px;
    border-radius: 20px;
    backdrop-filter: blur(2px);
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.2s;
}

.carousel-dot:hover {
    background: rgba(255,255,255,0.8);
    transform: scale(1.2);
}

.carousel-dot.active {
    background: white;
    transform: scale(1.2);
}

/* Image counter */
.carousel-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    z-index: 10;
    backdrop-filter: blur(2px);
}

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.service-item { padding: 45px; background: var(--bg-card); border-radius: 6px; }
.service-item i { font-size: 2rem; color: var(--accent); margin-bottom: 25px; }
.service-item h3 { font-size: 1.25rem; margin-bottom: 15px; }
.service-item p { font-size: 0.9rem; color: var(--text-muted); }

/* About */
.about-flex { display: flex; gap: 100px; align-items: center; }
.profile-img { width: 100%; border-radius: 6px; filter: grayscale(100%); transition: 0.8s; }
.profile-img:hover { filter: grayscale(0); }
.about-text .para { font-size: 1.1rem; color: var(--primary); font-weight: 300; margin-bottom: 30px; }
.resume-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 40px; }
.edu-item h4 { font-size: 1rem; margin-bottom: 5px; }
.edu-item p { font-size: 0.85rem; color: var(--text-muted); }
.btn-minimal { text-decoration: none; color: var(--primary); font-weight: 600; border-bottom: 2px solid var(--primary); padding-bottom: 5px; transition: 0.3s; }
.btn-minimal:hover { color: var(--accent); border-color: var(--accent); }

/* Footer */
footer { padding: 100px 0 50px; text-align: center; }
.social-links { margin-bottom: 30px; }
.social-links a { color: var(--primary); font-size: 1.3rem; margin: 0 18px; transition: 0.3s; }
.social-links a:hover { color: var(--accent); }
.copyright { font-size: 0.75rem; color: var(--text-muted); letter-spacing: 1px; }

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

/* Responsive Navigation Fix */
@media (max-width: 900px) {
    .nav-links { gap: 15px; }
    .project-grid, .services-grid, .about-flex, .resume-mini-grid { grid-template-columns: 1fr; }
    .about-flex { flex-direction: column; gap: 50px; }
    .hero h1 { font-size: 3.5rem; }
}

@media (max-width: 480px) {
    .nav-links { gap: 10px; }
    .nav-links a { font-size: 0.75rem; }
    .cta-nav { padding: 5px 12px; }
    .hero h1 { font-size: 2.8rem; }
    .container { padding: 0 20px; }
}

