/*
 * 1. DESIGN TOKENS
 */
:root {
    /* Colors */
    --green: #58cc02;
    --green-bright: #78d933;
    --black: #202124;
    --gray-light: #f8f9fa;
    --gray-text: #5f6368;
    --border-color: #e5e5e5;

    /* Typography */
    --font-main: "Figtree", sans-serif;

    /* Font Sizes */
    --fs-h1: 2.5rem;
    --fs-h2: 1.75rem;
    --fs-body: 1rem;
    --fs-ui: 0.875rem;
    --fs-sm: 0.75rem;

    /* Font Weights */
    --fw-extra-bold: 800;
    --fw-bold: 700;
    --fw-semibold: 600;
    --fw-medium: 500;
    --fw-regular: 400;

    /* Line Heights */
    --lh-tight: 1.2;
    --lh-loose: 1.6;

    /* Spacing */
    --section-spacing: 80px;
}

/*
 * 2. BASE STYLES
 */
html {
    /* Interaction */
    scroll-behavior: smooth;
}

*,
*::before,
*::after {
    /* Box Model */
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    /* Typography */
    font-family: var(--font-main);
    font-size: var(--fs-body);
    font-weight: var(--fw-regular);
    line-height: var(--lh-loose);
    color: var(--black);

    /* Misc */
    -webkit-font-smoothing: antialiased;
}

a {
    /* Typography */
    color: inherit;
    text-decoration: none;
}

/*
 * 3. TYPOGRAPHY
 */
h1 {
    /* Box Model */
    margin-bottom: 16px;

    /* Typography */
    font-size: var(--fs-h1);
    font-weight: var(--fw-extra-bold);
    line-height: var(--lh-tight);
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

h2 {
    /* Typography */
    font-size: var(--fs-h2);
    font-weight: var(--fw-extra-bold);
    line-height: var(--lh-tight);
    margin-bottom: 16px;
}

h3 {
    /* Typography */
    font-weight: var(--fw-extra-bold);
    line-height: var(--lh-tight);
    margin-bottom: 16px;
}

.ui-label {
    /* Typography */
    font-size: var(--fs-ui);
    font-weight: var(--fw-semibold);
}

.caption {
    /* Typography */
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--gray-text);
}

.subtext {
    /* Box Model */
    max-width: 600px;

    /* Typography */
    font-size: var(--fs-body);
    font-weight: var(--fw-medium);
    color: var(--gray-text);
}

/*
 * 4. LAYOUT & UTILITIES
 */
.container {
    /* Box Model */
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
}

.grid {
    /* Layout */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;

    /* Box Model */
    margin-top: 40px;
}

/*
 * 5. COMPONENTS
 */
/* Navigation */
nav {
    /* Positioning */
    position: sticky;
    top: 0;

    /* Layout */
    display: flex;
    align-items: center;
    justify-content: space-between;

    /* Box Model */
    padding: 20px 5%;
    border-bottom: 2px solid var(--border-color);

    /* Visual */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
}

.nav-logo {
    /* Typography */
    font-size: var(--fs-body);
    font-weight: var(--fw-extra-bold);
}

.nav-links a {
    /* Typography */
    margin-left: 24px;
    font-size: var(--fs-ui);
    font-weight: var(--fw-bold);
    color: var(--gray-text);
    text-decoration: none;
}

.nav-links a:hover:not(.contact-link) {
    /* Visual */
    color: var(--green-bright);
}

.nav-links a.contact-link {
    /* Visual */
    color: var(--green);
}

.nav-links a.contact-link:hover {
    /* Visual */
    color: var(--green-bright);
}

/* Buttons */
.btn {
    /* Layout */
    display: inline-block;

    /* Box Model */
    padding: 12px 24px;
    border-radius: 12px;

    /* Typography */
    font-weight: 700;
    font-size: var(--fs-ui);
    text-decoration: none;
    color: white;

    /* Visual */
    background-color: var(--green);
    box-shadow: 0 4px 0 #46a302;

    /* Misc */
    transition: all 0.1s ease;
}

.btn:hover {
    /* Visual */
    background-color: var(--green-bright);
}

.btn:active {
    /* Visual */
    box-shadow: none;

    /* Misc */
    transform: translateY(4px);
}

/* Cards */
.card {
    /* Box Model */
    padding: 32px;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-footer {
    /* Box Model */
    display: flex;
    gap: 6px 6px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 24px
}

/* Specific Project Link Components */
.project-link {
    /* Typography */
    font-size: var(--fs-sm);
    font-weight: 600;
    color: white;

    /* Box Model */
    padding: 6px 12px;

    /* Visual */
    background: var(--green);
    border-radius: 20px;

    /* Animation */
    transition: background-color 0.2s ease;
}

.project-link:hover {
    /* Visual */
    background-color: var(--green-bright);
}

/* Tags */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 6px;
    margin-top: 6px;
}

.tag {
    /* Typography */
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--gray-text);

    /* Box Model */
    display: inline-flex;
    padding: 6px 12px;

    /* Visual */
    background: var(--gray-light);
    border-radius: 20px;
}

.social-link {
    /* Layout */
    display: inline-flex;
    align-items: center;
    justify-content: center;

    /* Typography */
    font-size: var(--fs-sm);
    font-weight: 600;
    color: white;

    /* Box Model */
    padding: 8px 16px;
    min-width: 40px;

    /* Visual */
    background: var(--green);
    border-radius: 20px;

    /* Misc */
    transition: all 0.2s ease;
}

.social-link:hover {
    /* Visual */
    background-color: var(--green-bright);
}

/*
 * 6. SECTIONS
 */
#hero {
    /* Layout */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    /* Box Model */
    border-bottom: 2px solid var(--border-color);

    /* Typography */
    text-align: center;

    /* Visual */
    background-color: var(--gray-light);

    /* Misc */
    min-height: calc(100vh - 135.2px);
}

#about {
    /* Box Model */
    padding: var(--section-spacing) 0;

    /* Visual */
    border-bottom: 2px solid var(--border-color);
}

.about-grid {
    /* Layout */
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;

    /* Box Model */
    margin-top: 40px;
}

#projects {
    /* Box Model */
    padding: var(--section-spacing) 0;

    /* Visual */
    border-bottom: 2px solid var(--border-color);
}

#contact {
    /* Box Model */
    padding: var(--section-spacing) 0;

    /* Typography */
    text-align: center;

    /* Visual */
    border-bottom: 2px solid var(--border-color);
    background-color: var(--gray-light);
}

.contact-footer {
    /* Layout */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    padding-top: 0;
}

.global-footer {
    /* Layout */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    /* Box Model */
    height: 67.6px;

    /* Typography */
    text-align: center;
    font-size: var(--fs-sm);
    color: var(--gray-text);

    /* Visual */
    background-color: white;
}

/*
 * 7. ANIMATIONS
 */
.typewriter {
    /* Layout */
    display: inline-block;

    /* Box Model */
    overflow: hidden;
    margin: 0 auto 16px auto;
    max-width: fit-content;
    white-space: nowrap;

    /* Visual */
    border-right: .1em solid var(--black);

    /* Typography */
    letter-spacing: normal;

    /* Animation */
    animation:
        typing 3.5s steps(31, end),
        blink-caret .75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0
    }

    to {
        width: 33ch;
    }
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: var(--black);
    }
}

/*
 * 8. MEDIA QUERIES
 */
@media (max-width: 768px) {
    .typewriter {
        white-space: normal;
        border-right: none;
        animation: none;
        max-width: 100%;
        overflow: visible;
        margin-bottom: 24px;
    }
}