/* --- Root Variables & Global Styles (from main theme) --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display.swap');

:root {
    --bg-color: #050505;
    --surface-color: #111111;
    --border-color: rgba(255, 255, 255, 0.1);
    --primary-text: #EAEAEA;
    --secondary-text: #888888;
    --accent-color: #14B8A6; /* Main theme's Teal */
    --accent-glow: rgba(20, 184, 166, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--primary-text);
    font-family: 'Inter', sans-serif;
    cursor: none;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* --- Main Reusable Components (from main theme) --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    /* --- [FIX] Adjusted padding for consistency --- */
    padding: 0 2rem;
}

/* --- [FIX] Updated the entire header section for a thinner design and shrink effect --- */
.main-header {
    padding: 1.2rem 0; /* Thinner by default */
    position: fixed;
    width: 100%;
    z-index: 100;
    transition: padding 0.3s ease, background-color 0.3s ease, backdrop-filter 0.3s ease;
    border-bottom: 1px solid transparent; /* Prevents content jump */
}

.main-header.scrolled {
    padding: 0.6rem 0; /* Even thinner on scroll */
    background-color: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

/* --- [FIX] Changed .header-content to .container to match your HTML --- */
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--primary-text);
    transition: font-size 0.3s ease; /* Added transition for shrinking */
}

/* --- [ADD] Rule to shrink the logo on scroll --- */
.main-header.scrolled .logo {
    font-size: 1.1rem;
}

.contact-btn {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1.2rem;
    border-radius: 99px;
    text-decoration: none;
    color: var(--primary-text);
    font-weight: 500;
    /* Added padding and font-size to the transition for shrinking */
    transition: background 0.2s ease, color 0.2s ease, padding 0.3s ease, font-size 0.3s ease;
}

/* --- [ADD] Rule to shrink the button on scroll --- */
.main-header.scrolled .contact-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.contact-btn:hover {
    background: var(--accent-color);
    color: var(--bg-color);
}

/* go back link */
.final-link {
    text-align: center;
    margin-top: 4rem;
    display: flex;
    justify-content: center;
}

.final-link a {
    display: flex;
    align-items: center;
    width: max-content;
    color: var(--secondary-text);
    transition: color 0.3s ease, transform 0.3s ease;
}

.final-link a:hover {
    color: var(--primary-text);
    transform: translateX(10px); /* moves the whole link */
}


.main-footer {
    padding: 4rem 2rem 2rem 2rem; /* Adjusted padding */
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--secondary-text);
    font-weight: 500;
    transition: color 0.2s ease;
}

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

/* --- Custom Cursor (from main theme) --- */
.cursor-dot, .cursor-glow {
    position: fixed; top: 0; left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%; pointer-events: none; z-index: 9999;
    transition: transform 0.2s ease-out, opacity 0.3s ease;
}
.cursor-dot { width: 8px; height: 8px; background-color: var(--accent-color); }
.cursor-glow { width: 40px; height: 40px; background-image: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%); }
.cursor-dot.hidden, .cursor-glow.hidden { opacity: 0; }

/* --- Projects Page Specific Styles --- */
.page-hero {
    text-align: center;
    padding: 8rem 0 3rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4rem;
}

.page-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0.6));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-hero p {
    font-size: 1.25rem;
    color: var(--secondary-text);
    max-width: 600px;
    margin: 0 auto;
}

/* The .container around projects-grid needs padding */
main.container {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.project-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

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

/* --- Button Styles --- */
.card-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: auto; /* Pushes buttons to the bottom */
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    font-size: 0.9rem;
}

.btn i {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--bg-color);
    font-weight: 600;
}

.btn-primary:hover {
    background-color: #10a08f;
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background-color: var(--surface-color);
    color: var(--primary-text);
    border-color: var(--accent-color);
}

/* For disabled buttons on upcoming projects */
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}