/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Manrope:wght@400;700&display=swap');

/* Global Variables & Reset */
:root {
    --bg-color: #0c0c0c;
    --text-color: #e8e8e8;
    /* Accent color is a coral/red tone */
    --accent-color: #eb473c; 
    --header-bg: #1a1a1a;
    --card-bg: #000000;
    --padding-base: 20px;
}
* {
    box-sizing: border-box;
}
html {
    /* when button moves you to new section */
    scroll-behavior: smooth;
}

/* General Body & Typography */
body {
    font-family: 'Manrope', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}
h1, h2, h3 {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-color);
}

/* Utility & Layout */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--padding-base);
}

/* --- Header & Navigation --- */
header {
    background-color: var(--header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    border-top: 2px solid var(--accent-color);
}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--padding-base);
}
.logo a {
    display: block;
}
.logo img {
    padding-top: 5px;
    height: 40px;
    width: auto;
}
.nav-links-container {
    display: flex;
    align-items: center;
    gap: 20px;
}
.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}
.nav-menu li {
    display: inline-block;
}
nav a {
    color: var(--text-color);
    text-decoration: none;
    padding: 10px 20px;
    display: block;
    transition: color 0.3s, background-color 0.3s, border-bottom 0.3s;
    position: relative;
}
nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease-in-out;
}
nav a:hover {
    color: var(--text-color);
    background-color: #eb483c10
}

/* Hamburger Icon Styling */
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.8em;
    cursor: pointer;
    color: var(--text-color);
    padding: 5px;
}

/* --- Hero Section --- */
#hero {
    text-align: center;
    padding: 60px 20px;
    margin-top: 50px;
    margin-bottom: 50px;
    box-shadow: inset 0 15px 40px rgba(0, 0, 0, 0.7), inset 0 0 55px rgba(235, 72, 60, 0.951);
    background-color: #000000;
    border-radius: 40px;
    opacity: 0;
    animation: fadeIn 1.3s ease-out forwards;
    animation-delay: 0s;
}
#hero h1 {
    font-size: 3em;
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
}
#hero .hero-subtitle {
    display: inline-block;
    width: fit-content;
    font-size: 1.5em;
    margin-bottom: 30px;
    border-right: 2px solid var(--accent-color);
    animation: blink-caret 1.1s step-start infinite;
}

/* --- Link Tree Section Styling --- */
#link-tree {
    padding: 30px 0;
    margin-bottom: 50px;
    border-radius: 40px;
    background-color: #161616;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-top: 1px solid #3d3d3d;
    border-bottom: 1px solid #3d3d3d;
    scroll-margin-top: 120px;
}
.link-tree-title {
    font-size: 2.2em;
    margin-top: 0;
    margin-bottom: 10px;
    text-align: center;
}
.link-tree-subtitle {
    font-size: 1.2em;
    color: #aaa;
    margin-bottom: 25px;
}
#link-tree h3 {
    text-align: center;
}
#link-tree p {
    font-size: 1.15em;
    color: #aaa;
    text-align: center;
    margin-top: 0;
}
.link-grid {
    width: 520px;
    display: block;
    flex-wrap: wrap;
    gap: 20px;
    margin: 0 auto;
    justify-content: center;
    align-content: center;
    text-align: center;
}
.link-bar {
    flex: 1 1 250px;
    background-color: #111111;
    border: 1px solid var(--accent-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    border-radius: 30px;
    padding: 15px;
    margin-bottom: 20px;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px; /* Added gap for better spacing */
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    cursor: pointer;
}

.link-bar:hover {
    transform: translateY(-2px);
    box-shadow: 0 0px 20px rgba(235, 72, 60, 0.3);
    border-color: var(--accent-color);
}

/* Text Content Styling within link-bar */
.link-text-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.link-logo-wrapper {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.link-bar h3 {
    text-transform: uppercase;
    margin: 0;
    font-size: 1.4em;
    color: var(--text-color);
    margin-bottom: 5px;
}
.link-bar p {
    text-transform: uppercase;
    font-size: 1em;
    color: #aaa;
    margin: 0;
}

/* Social Links Styling */
.social-links {
    margin-top: 40px;
    margin-bottom: 20px;
    max-width: 520px;
    display: flex;
    justify-content: space-evenly;
}
.social-logo {
    width: 55px;
    height: 55px;
    object-fit: contain;
}
.divider {
  border-top: 1px solid var(--accent-color);
  margin-top: 50px;
}

/* --- Intro Section Specific Styling --- */
#intro {
    margin-bottom: 50px;
    background-color: #161616;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    padding: 40px 40px;
    border-top: 1px solid #3d3d3d;
    border-bottom: 1px solid #3d3d3d;
    border-radius: 40px;
    scroll-margin-top: 120px;
}
.intro-title {
    font-size: 2.2em;
    margin-top: 0;
    margin-bottom: 10px;
    text-align: center;
}
.section-heading {
    font-size: 1.8em;
    margin-top: 30px;
    margin-bottom: 10px;
}
.intro-content p {
    margin-bottom: 15px;
}
.cta {
    margin-top: 40px;
}
.cta h3 {
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 10px;
}
.cta-list {
    list-style: none;
    padding: 0;
    margin-bottom: 0;
}
.cta-list li {
    margin-bottom: 10px;
}

/* --- General CTA Button Styles --- */
.cta-button {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s, border-color 0.3s;
    border: 1px solid var(--accent-color);
    background-color: transparent;
    color: var(--accent-color);
    cursor: pointer;
    margin: 10px;
    text-align: center;
}
.cta-button:hover {
    color: var(--text-color);
    transform: translateY(-3px);
}

/* --- Project Gallery Styling --- */
#project-gallery {
    padding: 30px 0;
    margin-bottom: 50px;
    background-color: #161616;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    padding: 40px 40px;
    border-top: 1px solid #3d3d3d;
    border-bottom: 1px solid #3d3d3d;
    border-radius: 40px;
    scroll-margin-top: 120px;
}
.project-gallery-title {
    font-size: 2.2em;
    margin-top: 0;
    margin-bottom: 10px;
    text-align: center;
}
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.project-card {
    width: 100%;
    display: block;
    background-color: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid #222;
}
.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(235, 72, 60, 0.3);
}
.project-image-container {
    width: 100%;
    height: 250px;
    overflow: hidden;
}
.project-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s;
}
.project-card:hover .project-image-container img {
    transform: scale(1.05);
}
.project-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}
.project-title {
    font-size: 1.6em;
    margin-top: 0;
    margin-bottom: 10px;
}
.project-subtitle {
    color: #aaa;
    margin-bottom: 15px;
    flex-grow: 1;
}

/* Footer */
.site-footer {
    background-color: #111111;
    color: var(--text-color);
    text-align: center;
    padding: 20px 0;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    flex-wrap: wrap;
    gap: 10px;
}
.github-link {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 20px;
}

/* Keyframe Animation */
@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--accent-color); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ======================================
   RESPONSIVENESS (Media Queries)
======================================= */

/* Tablet View (Max 992px) */
@media (max-width: 992px) {
    /* Navigation */
    .navbar {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .nav-links-container {
        gap: 15px;
    }

    .nav-menu {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
    }

    .hamburger {
        display: none;
    }

    nav a {
        padding: 10px 15px;
    }

    /* Hero Section */
    #hero h1 {
        font-size: 1.6em;
        padding: 20px;
    }

    #hero .hero-subtitle {
        font-size: 1.15em;
    }

    #intro {
        padding: 25px 5px;
    }

    /* Project Gallery */
    #project-gallery {
        padding: 20px 20px;
    }

    .link-grid {
        max-width: 100%;
    }
    .link-bar h3 {
        font-size: 1.1em;
    }
    #link-tree p {
        font-size: 0.9em;
    }
    .link-tree-title {
        font-size: 1.6em;
    }
    .link-tree-subtitle {
        font-size: 0.6em;
    }  
    .section-heading {
        font-size: 1.4em;
    }
    .intro-title {
        font-size: 1.6em;
    }
    .project-gallery-title {
        font-size: 1.6em;
    }
}

/* Mobile View (Max 650px) */
@media (max-width: 650px) {
    /* General Padding */
    .container {
        width: 95%;
    }
    
    /* Adjusting navbar layout for smaller screens */
    .navbar {
        flex-direction: row;
        justify-content: space-between;
        padding: 10px 20px;
        align-items: center;
    }
    
    /* Show hamburger and hide menu by default */
    .hamburger {
        display: block;
    }

    .logo img {
        /* Keeping the content: url for compatibility, though it's not ideal */
        content: url("images/small_logo.png");
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: var(--header-bg);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
        padding: 10px 0;
        transition: all 0.3s ease-in-out;
    }

    /* When active, show the menu */
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #222;
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        padding: 15px 20px;
        width: 100%;
        display: block;
        text-align: center;
    }
}
