/* style.css */

/* --- CSS Variables for Easy Customization --- */
:root {
    --bg-color: #121212;
    --primary-text-color: #e0e0e0;
    --secondary-text-color: #a0a0a0;
    --accent-color: #007bff;
    --accent-color-hover: #0056b3;
    --card-bg-color: #1e1e1e;
    --border-color: #333;
    --font-family: 'Inter', sans-serif;
}

/* --- General Styles & Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offset for fixed header */
}

body {
    background-color: var(--bg-color);
    color: var(--primary-text-color);
    font-family: var(--font-family);
    line-height: 1.6;
    cursor: none;
}

h1, h2, h3 {
    line-height: 1.2;
    color: white;
}

h1 { font-size: 3rem; margin-bottom: 1rem; }
h2 { font-size: 2.5rem; text-align: center; margin-bottom: 3rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }

p {
    color: var(--secondary-text-color);
    margin-bottom: 1rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

/* Enforce custom cursor on all interactive elements */
a, .btn {
    cursor: none;
}

section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Header & Navigation --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.nav-logo {
    display: flex; /* Ensures the image is aligned properly */
    align-items: left;
}

.nav-logo svg {
    height: 40px; /* Adjust this value to resize your logo */
    width: auto;  /* Maintains the aspect ratio */
    fill: var(--accent-color); /* Set the default color */
    transition: fill 0.3s ease;
}

.nav-logo:hover svg {
    fill: var(--accent-color); /* Set the hover color */
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--primary-text-color);
    font-weight: 500;
    position: relative;
    text-decoration: none;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent-color);
}

/* Animated wavy underline for nav links */
@keyframes move-wave {
    from { background-position-x: 0; }
    to { background-position-x: -20px; } /* Must be the same as background-size */
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px; /* Position the underline */
    width: 0%;
    height: 4px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 4'%3e%3cpath d='M0 2 Q 5 0, 10 2 T 20 2' stroke='%23ffffffff' fill='none' stroke-width='1.5'/%3e%3c/svg%3e");
    background-repeat: repeat-x;
    background-size: 20px; /* This is the width of one wave segment */
    transition: width 0.3s ease-out;
    color: #007bff;
}

.nav-links a:hover::after {
    width: 100%;
    animation: none; /* Prevent animation conflict when hovering over the active link */
}

.nav-links a.active::after {
    width: 100%;
    animation: move-wave 1s linear infinite;
}


/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-content .subtitle { font-size: 1.5rem; color: var(--primary-text-color); font-weight: 500; }
.hero-content .description { max-width: 600px; margin: 1rem auto 2rem; }

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}
.btn-primary:hover {
    background-color: var(--accent-color-hover);
    color: white;
    transform: translateY(-3px);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--primary-text-color);
}
.btn-secondary:hover {
    background-color: var(--border-color);
    transform: translateY(-3px);
}

.hero-buttons { display: flex; gap: 1rem; justify-content: center; margin-bottom: 2rem; }
.social-links { display: flex; gap: 1.5rem; justify-content: center; font-size: 1.75rem; }

/* --- About Section --- */
.about-container {
    display: flex;
    align-items: center;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.about-text {
    flex: 1; /* Allows the text block to take up remaining space */
}

.about-images {
    flex: 0 0 40%; /* Sets the image container to be about 40% of the width */
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.about-images img {
    width: 100%;
    border-radius: 8px;
}

.lightbox {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.8);
            justify-content: center;
            align-items: center;
        }
        .lightbox-content {
            max-width: 90%;
            max-height: 80%;
        }
.about-images img.lightbox-trigger {
    cursor: none;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.about-images img.lightbox-trigger:hover { transform: scale(1.03); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
        
/* --- Projects Section --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.project-card img {
    width: 100%;
    height: 200px; /* Set a fixed height for all project images */
    object-fit: cover; /* This will crop the image to fit without distorting it */
    object-position: top;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

/* Wrapper for images that need a zoom/scale effect. The wrapper
   defines the clipping box (overflow:hidden) and preserves border-radius. */
.img-zoom-wrapper {
    width: 100%;
    height: 200px; /* match project-card img height */
    overflow: hidden; /* clip the scaled image inside this box */
    border-radius: 8px; /* ensure same rounding as images */
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

/* Apply these styles to both images and videos inside the wrapper */
.img-zoom-wrapper img, .img-zoom-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* keep the image cover behavior */
    object-position: top; /* Aligns the image content to the top of the container, preventing vertical shift */
    transform: scale(var(--initial-scale, 1.4)); /* scale the image */
    transform-origin: center center;
    transition: transform 0.4s ease;
}

.img-zoom-wrapper:hover img, .img-zoom-wrapper:hover video {
    /* slightly reduce scale on hover to create a subtle effect */
    transform: scale(var(--hover-scale, 1.25));
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.project-tags span {
    background-color: rgba(0, 123, 255, 0.1);
    color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-icon {
    font-size: 1.5rem;
}

/* --- Contact Section --- */
.contact {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}
.contact p {
    margin-bottom: 2rem;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--secondary-text-color);
}

/* --- Custom Cursor Styles --- */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background-color: var(--primary-text-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.cursor-circle {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-text-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.3s ease-out, width 0.3s ease-out, height 0.3s ease-out, border-width 0.3s ease-out;
}

/* --- Custom Cursor Hover Effects --- */
body.link-hovered .cursor-dot {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
}

body.link-hovered .cursor-circle {
    transform: translate(-50%, -50%) scale(1.5);
    border-width: 1px;
}