/* =========================================================
    CONSTANT VARIABLES
    ========================================================= */
:root { /* main theme color */
    --bg: #000;
    --text: #fff;
    --accent: #f84444;
    --accent-border: color-mix(in srgb, var(--accent) 45%, transparent);
    --selection: rgba(255, 255, 255, 0.2);
}

/* =========================================================
   GLOBAL RESET & BASE ELEMENTS
   ========================================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: Manrope, "Segoe UI", Arial, sans-serif;
    -webkit-tap-highlight-color: var(--selection);
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 35px;
    font-family: "Space Grotesk", "Arial Narrow", Arial, sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

p {
    margin: 0 0 25px;
    font-size: clamp(18px, 1.3vw, 21px);
    line-height: 1.6;
}

/* Quick link and accent text styles */
a { color: var(--accent); text-decoration: none; }
.accent { color: var(--accent); }
::selection, ::-moz-selection { text-shadow: none; background: var(--selection); }

/* =========================================================
   LAYOUT HELPERS
   ========================================================= */
.container {
    width: min(1170px, calc(100% - 40px));
    margin: 0 auto;
}

.content-section {
    padding-top: 20px; /* Standardized to 20px to prevent overriding */
}

.main-copy {
    max-width: 980px;
}

/* =========================================================
   HERO / INTRO SECTION
   ========================================================= */
.intro {
    position: relative;
    overflow: hidden;
}

/* =========================================================
   INTRO IMAGE
   ========================================================= */
.intro-layout {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(300px, 520px) minmax(180px, 1fr);
    align-items: center;
    gap: 30px;
    width: min(980px, calc(100% - 40px));
    min-height: min(32vw, 38vh, 420px);
    margin: 0 auto;
}

.intro-heading {
    margin: 0;
    font-size: clamp(24px, 2.4vw, 34px);
    transform: translateY(32px);
}

.intro-image {
    width: 100%;
    height: min(32vw, 38vh, 420px);
    object-fit: contain;
}

.latest-commit {
    display: inline-block;
    justify-self: end;
    transform: translateY(32px);
    padding: 4px 8px;
    border: 1px solid var(--accent-border);
    border-radius: 3px;
    color: var(--accent);
    font: 700 20px/1.2 "Space Mono", monospace;
    letter-spacing: 1px;
}

/* =========================================================
   BIG RED BOX
   ========================================================= */
.big-red-box {
    margin: 8px 0 38px;
    padding: 20px 22px;
    border: 3px solid var(--accent-border);
}

.big-red-box h4 {
    font-size: 22px;
    line-height: 1.2;
    margin-bottom: 18px;
}

.point-form-list li {
    margin-bottom: 10px;
    font-size: 17px;
}

.point-form-list li::marker { color: var(--accent); }

/* Tags beneath project descriptions. */
.tech-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.tech-tags span {
    padding: 3px 7px;
    border: 1px solid var(--accent-border);
    border-radius: 3px;
    color: var(--text);
    font: 700 12px/1.2 "Space Mono", monospace;
}

.banner-social-buttons {
    /* Clickable links laid out like buttons. */
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.banner-social-buttons a {
    /* Link style */
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 170px;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid var(--accent);
    color: var(--accent);
    font: 500 18px/1.4 "Space Grotesk", "Arial Narrow", Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
    padding: 50px 0;
}

.footer-row {
    display: flex;
    justify-content: space-between; /* text to left, buttons to right */
    align-items: center;
    max-width: 980px;
    /* alignment - refer to main-copy element */
}

.footer-row p {
    margin: 0;
}

.footer-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* =========================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================= */
@media (max-width: 767px) {
    /* Mobile outlay - tighter spacing. */
    .container {
        width: calc(100% - 30px);
    }
    .intro-layout {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 24px 0;
        text-align: center;
    }
    .intro-image {
        height: 45vw;
    }
    .latest-commit {
        justify-self: center;
    }

    .banner-social-buttons li {
        display: inline-flex;
        margin-bottom: 12px;
    }
    .banner-social-buttons a {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 576px) {
    /* Mobile outlay */
    .container {
        width: calc(100% - 24px);
    }
    .intro-image {
        height: 55vw;
    }
    
    .banner-social-buttons {
        gap: 10px;
    }
    .banner-social-buttons a {
        padding-left: 14px;
        padding-right: 14px;
    }
}