/* Navigation */

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font: 18px/1.5 "JetBrains Mono", monospace, sans-serif;
    margin-bottom: 0.5em;
}

nav ul li {
    list-style-type: none;
    display: inline-block;
    padding: 0.01em;
}

nav ul {
    padding-left: 0.25em;
    margin-top: 0;
    margin-bottom: 0;
}

nav a:hover {
    text-decoration: underline;
    text-decoration-thickness: 0.25em;
}

nav ul li a.stuff {
    color: var(--text-primary);
}

nav ul li a.blog {
    color: var(--blue);
}

nav ul li a.about {
    color: var(--green);
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    text-decoration-thickness: 0.25em;
    text-decoration-color: var(--blue);
}

/* LOGO */
.logo {
    font: bold 2em -apple-system, "JetBrains Mono", monospace, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    margin-top: 0%;
    margin-bottom: 0.25em;
    line-height: .75em;
}

a.logo:visited {
    color: var(--logo-color);
}

a.logo:link {
    color: var(--logo-color);
}

header {
    background: var(--bg-primary);
    padding-top: 2rem;
    padding-left: 4rem;
    padding-right: 4rem;
    /* padding-bottom: 2rem; */
}

@media all and (max-width: 777px) {
    header {
        padding: 1rem;
    }
}

.barb {
    height: 0.250rem;
    background-image:
        repeating-linear-gradient(45deg,
            #3590F3,
            #33FF69 25%,
            #3590F3 25%,
            #33FF69 25%);
    background-size: 200% 200%;
    animation: barberpole 5s linear infinite;
}

@keyframes barberpole {
    100% {
        background-position: -100% 100%;
    }
}

/* Intro Section */
.intro-wrapper {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 130px);
    /* 100vh minus approx header height */
}

.intro-wrapper .hero {
    margin: auto 0;
    padding-top: 2em;
    padding-bottom: 2em;
}

/* Hero Section */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3em;
}

.hero-text h1 {
    font-size: 2.5rem;
    margin: 0;
    margin-bottom: 0.5em;
    line-height: 1.1;
}

.hero-text p {
    margin: 0 0 0.25rem 0;
    font-size: 1.2rem;
}

.hero-image {
    width: 175px;
    height: 175px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Project Section */
.project-showcase {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 2px;
    /* For momentum-based scrolling on iOS */
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar for IE, Edge and Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
    cursor: grab;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.project-showcase::-webkit-scrollbar {
    display: none;
}

.project-showcase:active {
    cursor: grabbing;
}

.project-card {
    /* 3 cards visible: (100% - 2 * gap) / 3 */
    flex: 0 0 calc((100% - 3rem) / 3);
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.project-card h3 {
    margin: 0.75rem 1rem 0.5rem;
    font-size: 1.1rem;
}

.project-card p {
    margin: 0 1rem 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Blog Posts Section */
.blog-posts {
    margin-top: 3rem;
}

.post-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0 0;
}

.post-list li {
    display: flex;
    align-items: baseline;
    margin-bottom: 0.75rem;
}

.post-date {
    color: var(--text-tertiary);
    flex-shrink: 0;
    margin-right: 1.5rem;
    font-family: "JetBrains Mono", monospace;
}

@property --gradient-dot-color {
    syntax: '<color>';
    inherits: true;
    initial-value: #5a5a5a;
}

:root {
    --blue: #3590F3;
    --green: #33FF69;

    /* Dark Theme (Default) */
    --bg-primary: black;
    --bg-secondary: #141414;
    --bg-tertiary: #222;
    --text-primary: #FFFAFF;
    --text-secondary: #ccc;
    --text-tertiary: #888;
    --logo-color: white;
    --gradient-dot-color: #5a5a5a;
}

body:before,
body:after {
    content: "";
    position: fixed;
    background: #000;
    left: 0;
    right: 0;
    height: 2px;
}

body:before {
    top: 0;
}

body:after {
    bottom: 0;
}

@keyframes bg-load {
    from {
        background-position: -450px -200px;
        background-size: 60px 60px;
        --gradient-dot-color: #ffffff;  
    }

    to {
        background-position: -19px -19px;
        background-size: 40px 40px;
        --gradient-dot-color: #5a5a5a;
    
    }
}

body {
    color: var(--text-primary);

    background: var(--bg-secondary);
    background-image: radial-gradient(var(--gradient-dot-color) 1px, transparent 0);
    background-size: 40px 40px;
    background-position: -19px -19px;
    background-attachment: fixed;
    animation: bg-load 2.5s cubic-bezier(0.25, 1, 0.5, 1);


    max-width: 45em;
    margin-right: auto;
    margin-left: auto;

    /* padding: 0 10px; */
    font: 18px/1.5 -apple-system, "JetBrains Mono", monospace, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";

}

p {
    margin-bottom: 0rem;
    margin-top: 0rem;
}

article {
    background: var(--bg-primary);
    padding-left: 4rem;
    padding-right: 4rem;
    padding-bottom: 2rem;
}

@media all and (max-width: 777px) {
    article {
        padding: 1rem;
    }

    .hero {
        flex-direction: column-reverse;
        text-align: center;
    }

    .project-card {
        flex: 0 0 calc((100% - 1.5rem) / 2);
    }
}

h2,
h3 {
    line-height: 1.2
}

a:link {
    color: var(--green);
}

a:visited {
    color: var(--green);
    /* color: var(--blue); */
}

@media (prefers-color-scheme: light) {
    :root {
        /* Light Theme */
        --blue: #0053A0;
        --green: #00B831;

        --bg-primary: #FFFBFE;
        --bg-secondary: #f0f0f0;
        --bg-tertiary: #e9e9e9;
        --text-primary: #0C090D;
        --text-secondary: #444;
        --text-tertiary: #666;
        --logo-color: #0C090D;
        --gradient-dot-color: #676767;
    }

    article {
        position: relative;
        /* Needed for z-index to work */
        z-index: 1;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    header {
        position: relative;
        /* Needed for z-index to work */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        z-index: 2;
    }

    .project-card:hover {
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    }
}

footer {
    font-size: small;
}