@import url("https://fonts.googleapis.com/css?family=Inter");

:root {
    --bg-dark: #121212;
    --bg-card: #1e1e1e;
    --text-main: #e0e0e0;
    --text-muted: #888888;
    --border: #333333;
    --accent: #ffffff;
    --font-inter: 'Inter', sans-serif;
    --font-mono: 'Courier New', Courier, monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-inter);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
    border-bottom: 1px solid var(--border);
}

/* --- HEADER --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background-color: var(--bg-dark);
    z-index: 100;
}

.logo {
    font-weight: bold;
    font-size: 1.2rem;
    letter-spacing: -1px;
    padding: 5px 10px;
}

.logo:hover,
nav a:hover {
    color: var(--text-muted);
    text-decoration: underline;
}

nav ul {
    display: flex;
    gap: 30px;
}

/* --- HERO SECTION --- */
.hero {
    height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;


}

/* The Background Image Area */
.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;


    filter: grayscale(100%);
    transition: filter 0.5s ease-in-out;
    z-index: 1;
}


.hero:has(.btn:hover)::before {
    filter: grayscale(0%);
}


.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero h1 {
    font-size: 2rem;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);

}

.hero p {
    font-size: 1.2rem;
    color: var(--text-main);

    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 40px auto;
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 15px 30px;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s;
    border: 1px solid transparent;
}

/* Primary Button Style  */
.btn-primary,
.btn:not(.btn-outline):not(.dropdown .btn) {
    background: var(--text-main);
    color: var(--bg-dark);
    border-color: var(--text-main);
}

.btn-primary:hover,
.btn:not(.btn-outline):not(.dropdown .btn):hover {
    background: transparent;
    color: var(--text-main);
}

/* Outline Button Style */
.btn-outline {
    background: transparent;
    color: var(--text-main);
    border-color: var(--border);
}

.btn-outline:hover {
    border-color: var(--text-main);
    background: rgba(224, 224, 224, 0.05);
}

/* --- SKILLS SECTION --- */
.section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    text-transform: uppercase;
    display: inline-block;
    border-bottom: 2px solid var(--text-muted);
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.skill-tag {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* --- PROJECTS GRID --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: transform 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.card-image {
    width: 100%;
    height: 300px;
    background-color: #333;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) saturate(0);
    transition: filter 0.4s ease;
}

.project-card:hover .card-image img {
    filter: grayscale(0%) saturate(1.1);
}

.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-family: var(--font-mono);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.project-tag {
    font-size: 0.7rem;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}


.card-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.card-tech {
    font-size: 0.8rem;
    margin-bottom: 15px;
    display: block;
    color: var(--text-main);
    opacity: 0.7;
}

.card-links {
    margin-top: auto;
}

.card-links a {
    font-size: 0.9rem;
    margin-right: 15px;
    border-bottom: 1px solid var(--text-muted);
}

.card-links a:hover {
    border-bottom-color: var(--text-main);
}

/* --- FOOTER --- */
footer {
    padding: 50px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.social-links {
    margin-top: 20px;
}

.social-links a {
    font-size: 1.5rem;
    margin: 0 15px;
    color: var(--text-main);
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent);
}

/* --- DROPDOWN COMPONENT --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown .btn {
    background: transparent;
    color: var(--text-main);
    padding: 0;
    font-weight: normal;
    border: none;
}

.dropdown .btn:hover {
    color: var(--text-muted);
    text-decoration: underline;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    min-width: 160px;
    border: 1px solid var(--border);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s;
    pointer-events: none;
    z-index: 200;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-content a {
    color: var(--text-main);
    padding: 12px 16px;
    display: block;
}

.dropdown-content a:hover {
    color: var(--text-muted);
    text-decoration: underline;
    background: var(--bg-dark);
}

/* --- BLOG STYLES --- */
.blog-header {
    margin-bottom: 60px;
}

.blog-header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.blog-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.blog-posts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.blog-post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 30px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.blog-post-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.blog-post-meta {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.blog-post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-post-card h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.blog-post-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.8;
}

.blog-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.blog-tag {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    padding: 5px 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.blog-read-more {
    color: var(--text-main);
    font-weight: bold;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.blog-read-more:hover {
    color: var(--text-muted);
    text-decoration: line-through;
}

/* --- PROJECT DETAIL PAGE STYLES --- */
.project-hero-section {
    position: relative;
    padding: 120px 0;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 500px;
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    margin-bottom: 80px;
}

.project-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1;
}

.project-hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    margin: 0 auto;
}

.project-hero-section::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 140px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, var(--bg-dark) 100%);
    z-index: 2;
    pointer-events: none;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.back-link:hover {
    color: var(--text-main);
}

.project-hero-content h1 {
    font-size: 3.5rem;
    font-family: var(--font-mono);
    margin-bottom: 10px;
    color: var(--text-main);
}

.project-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.project-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 40px;
}

.section-divider {
    height: 1px;
    background: var(--border);
    opacity: 0.7;
    margin: 0 0 50px 0;
}

.project-banner {
    width: 100%;
    height: 400px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 30px;
    border-radius: 4px;
}

.project-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-details-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    padding-top: 0;
    align-items: start;
}

.project-main-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-main);
}

.project-main-content h3 {
    font-size: 1.5rem;
    margin: 30px 0 15px 0;
    color: var(--text-main);
    font-family: var(--font-mono);
}

.project-main-content p {
    margin-bottom: 15px;
    color: var(--text-muted);
    line-height: 1.8;
}

.feature-list li {
    margin-bottom: 10px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-list li i {
    color: var(--text-main);
    font-size: 0.8rem;
}

.project-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 30px;
    position: sticky;
    top: 100px;
}

.meta-box {
    margin-bottom: 30px;
}

.meta-box:last-child {
    margin-bottom: 0;
}

.meta-box h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-main);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 1px;
}

.meta-box p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.meta-sub {
    font-size: 0.8rem !important;
    opacity: 0.7;
    margin-top: 5px;
}

.gallery-section {
    padding-top: 40px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    height: 400px;
    background: #000;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: 0.3s;
}

.gallery-item:hover {
    border-color: var(--accent);
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.8;
    transition: 0.3s;
}

.gallery-item:hover img {
    opacity: 1;
}

/* --- MEDIA QUERIES --- */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    nav ul {
        gap: 15px;
        font-size: 0.9rem;
    }

    .project-details-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .project-sidebar {
        position: static;
    }

    .project-banner {
        height: 250px;
    }

    .project-header h1 {
        font-size: 2rem;
    }
}

/* Projects page hero background */
.hero-projects::before {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('/images/hero-project.jpg');
    background-size: cover;
    background-position: center;
}

.hero-projects {
    height: 40vh;
    margin-bottom: 60px;

}

/* Horizontal Study Cards */
.study-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.study-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: transform 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    height: 220px;
}

.study-card:hover {
    transform: translateX(5px);
    border-color: var(--accent);
}

.study-card .card-image {
    width: 400px;
    height: 100%;
    flex-shrink: 0;
}

.study-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) saturate(0);
    transition: filter 0.4s ease;
}

.study-card:hover .card-image img {
    filter: grayscale(0%) saturate(1.1);
}

.study-card .card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.study-card .card-content h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    line-height: 1.3;
}