/* REMINDER: Organize alphabetically */
/* TODO: convert all px to rem for responsive styling*/

/*!* Box model: Margin | Border | Padding | Content *!*/

/* Mobile devices */
@media only screen and (max-width: 768px) {
    .header {grid-area: 1 / span 6;}
    .main-panel {grid-area: 3 / span 6;}
    .footer {grid-area: 5 / span 6;}
}

/*Small tablets / larger phones / computers*/
@media only screen and (min-width: 768px) {
    .header {grid-area: 1 / span 6;}
    .main-panel {grid-area: 2 / span 6;}
    .footer {grid-area: 4 / span 6;}
}

/* ------------------------------------- */
/* ------------------------------------- */
/* ------------------------------------- */
/* Uniform styling */
:root {
    /* 8px grid system — the fix */
    --space-1: 0.5rem;   /* 8px / 16 */
    --space-2: 1rem;     /* 16px / 16 */
    --space-3: 1.5rem;   /* 24px / 16 */
    --space-4: 2rem;     /* 32px / 16 */
    --space-6: 3rem;     /* 48px / 16 */
    --space-8: 4rem;     /* 64px / 16 */
    --space-48: 24rem;   /* 384px / 16 */
    --space-80: 40rem;   /* 640px / 16 */

      /* 60% — dominant background */
    --color-bg: #181818;
    /* 30% — surfaces, cards, sidebars */
    --color-surface: #1F1F1F;
    --color-border: #e2e8f0;
    /* 10% — accent, used sparingly */
    --color-accent: #FF5722;
    --color-accent-hover: #3b82f6;
    --color-secondary: #673AB7;
    --color-secondary-hover: #A05D44;
    /* Text */
    --color-text-primary: #F7F7F7;
    --color-text-highlight: #FFEB3B;
    --color-text-muted:  #9a9a9a;

    font-family: 'Trebuchet MS', sans-serif;

    --mobile_width:768px;
}

* {
    margin: 0;
    box-sizing: border-box;
}

.grid-container {
    display: grid;
    min-height: 100vh;;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
    'header header header header header header'
    'main main main main main main'
    'footer footer footer footer footer footer';
    gap: var(--space-1);
}
/* Header and Nav */
header {
    grid-area: header;
}

/* Nav Bar */
nav {
    background-color: var(--color-surface);
    font-size: var(--space-3);
    padding: var(--space-2) var(--space-4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    /*width: 100%;*/
}

nav > .logo {
    /* for the logo */
    color: var(--color-text-primary);
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
}

/* Nav items container */
nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

/* Nav links */
nav ul li a {
    text-decoration: none;
    color: var(--color-text-primary);
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--color-text-highlight); /* change color on hover */
}

/*Hamburger menu*/
.hamburger {
    display: none;
    cursor: pointer;
    width: 34px;
}

.hamburger .bar{
    flex-basis: 100%;
    height: 4px;
    background-color: var(--color-text-primary);
    margin: 3px;
}

@media (max-width: 768px){
    nav {
        flex-wrap:wrap;
    }

    .hamburger {
        display: flex;
        flex-wrap: wrap;
    }

    .logo {
        height: 80px;
    }

    .nav-links {
        display:none;
        flex-basis: 100%;
        flex-wrap: wrap;
    }

    .nav-links li {
        flex-basis: 100%;
    }

    .nav-links a {
        text-align: center;
        font-size: 28px;
    }

    .nav-links a:hover {
       color: var(--color-text-highlight);
    }

    .nav-links .nav-cta-button {
        padding: 30px 16px;
        margin-left: 0;
        border: none;
        border-radius: 0;
        margin-bottom: 20px;
    }

    .nav-links .nav-cta-button:hover{
        background-color: var(--color-text-highlight);
    }
}

/* End nav bar */
/* End Header and Nav */

/* Footer */
footer {
    grid-area: footer;
    background-color: var(--color-surface);
    display: flex;
    font-size: 1rem;
    padding: 1rem 2rem;
    justify-content: center;
    align-items: center;
}

footer > div:first-child {
    color: var(--color-accent);
    font-size: 1rem;
}

footer ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

footer ul li a {
    text-decoration: none;
    color: var(--color-text-primary);
    font-weight: 500;
    transition: color 0.3s;
}

footer ul li a:hover {
    color: var(--color-text-highlight); /* change color on hover */
}

/* End Footer */


body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text-primary)
}

main {
    grid-area: main;
    /*padding-top:1rem;*/
    margin-top:1rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
    padding-left: 2rem;
    padding-right: 2rem;
}

section {
    border: 0.5px solid var(--color-border);
    border-radius: 5px;
    margin: var(--space-2);
    padding-left: var(--space-1);
    padding-right: var(--space-1);
}

.row-div {
    display: flex;
    gap: var(--space-1);
    padding: var(--space-1);
}

/* Text styles */
a:link, a:visited{
    color: var(--color-text-primary)
}

/*p {*/
/*    margin-left:20px;*/
/*    margin-right:20px;*/
/*}*/

/* End ext Styles */


/* Button Styles */
button {
    cursor: pointer;
    align-self: center;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease;
}
.btn-small {
    /*font-size: var(--space-1);*/
}
.btn-medium {
    font-size: var(--space-2);
}
.btn-large {
    font-size: var(--space-3);
}
/* Primary — one per page, unmissable */
.btn-primary {
    background: var(--color-accent);
    color: var(--color-surface);
}
.btn-primary:hover{
    background-color: var(--color-accent-hover);
}
/* Secondary — present but steps back */
.btn-secondary {
  background: var(--color-secondary);
  color: var(--color-surface);
}
.btn-secondary:hover{
    background: var(--color-secondary-hover);
}
/* Ghost — lowest priority, almost invisible */
.btn-ghost {
    background: transparent;
    color: var(--color-text-muted);
}
.btn-ghost:hover {
    background: var(--color-border);
    flex: 0 0 auto;
}
/* End button styles */


/*!* Tiles *!*/
/*.project-image {*/
/*    width: 100%;*/
/*    height: auto;*/
/*    border-radius: 10px;*/
/*    margin-bottom: 1rem;*/
/*}*/

.tile-icon {
    width: var(--space-4);
    height: var(--space-4);
    vertical-align: middle;
    background: var(--color-text-primary)
}

.pill-container {
    display: flex;
    flex-wrap: wrap;
}

.pill{
    background-color:var(--color-secondary);
    color:var(--color-text-primary);
    border-radius: var(--space-3);
    padding: var(--space-1);
    margin: var(--space-1);
    width: fit-content;
}

.tiles-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top:.5rem;
    margin-bottom: .5rem;
}

.tile {
    flex: 1 0 300px;
    background-color: var(--color-surface);
    color: var(--color-text-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: var(--space-2);
    margin: var(--space-1);
    border-radius: var(--space-1);
    max-width: var(--space-48);
    transition: transform 0.3s ease-in-out;
}

.tile:hover {
    transform: scale(1.05);
    background-color:var(--color-accent)
}

/* END TILES */

/*!* Form *!*/

form {
    max-width: var(--space-80);   /* Make the form wider */
    width: 100%;        /* Responsive width */
    margin: auto;       /* Center it */
}

.form-row {
    display: flex;
    gap: var(--space-1);
    margin-bottom: var(--space-1);
}

.form-row > div {
    flex: 1; /* Each child takes equal width */
}

input[type=text], select, textarea{
    padding: var(--space-1);
    margin: var(--space-1) 0;
    border: 2px solid var(--color-border);
    border-radius: var(--space-2);
    font-size: 1.1rem;
    width:100%; /* Fill available space */
    box-sizing: border-box;
}

label {
    display:block;
    margin-bottom: var(--space-1);
}

/*!* End Form *!*/

.large-image {
    max-width: 100%; /* Ensures the image never exceeds the width of its container */
    height: auto;    /* Automatically adjusts the height to maintain the aspect ratio */
    display: block;
}

/* Color splashes for UI/UX Design page */
.show-color {
    height:50px;
    width: 100px;
    border-radius: 5px;
}

.bg {
    background: var(--color-bg);
}
.surface {
    background: var(--color-surface);
}
.border {
    background: var(--color-border);
    color: var(--color-bg)
}

.text-primary {
    background: var(--color-text-primary);
    color: var(--color-surface)
}
.text-muted {
    background: var(--color-text-muted);
    color: var(--color-surface)
}
.accent {
    background: var(--color-accent);

}
.accent-hover {
    background: var(--color-accent-hover);
}
.accent:hover {
    background: var(--color-accent-hover);
}
.secondary {
    background: var(--color-secondary);
}
.secondary:hover {
    background: var(--color-secondary-hover);
}
/* end color splashes */


/* Parking lot */
/*     !* 60% — dominant background *!*/
/*    --color-bar-bg:#244357;*/
/*    --color-bg: #233036;*/
/*    !* 30% — surfaces, cards, sidebars *!*/
/*    --color-surface: #89a9ba;*/
/*    --color-border: #e2e8f0;*/
/*    !* 10% — accent, used sparingly *!*/
/*    --color-accent: #2563eb;*/
/*    --color-accent-hover: #3b82f6;*/
/*    --color-secondary: #D15D14;*/
/*    --color-secondary-hover: #A05D44;*/
/*    !* Text *!*/
/*    --color-text-primary: #dbdcdc;*/
/*    --color-text-muted: #89a9ba;*/
