/* variables */
:root {
    --black: #171321;
    --dkblue: #00416a;
    --plum: #191970;
    --lightblue: #7575ff;
    --blue: #6666ff;
    --cyan: #00d4ff;
    --white: #f7f8fa;
    --font-size: 1.3rem;
    --mono: "Oxygen mono", monospace;
    --sans: Oxygen, sans-serif;
}


/* border box model */

html {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}


/* generic */

body {
    margin: 0;
    padding: 0;
    font-family: var(--sans);
    background-color: var(--black);
    color: var(--white);
    font-size: var(--font-size);
}

h1,
h2,
h3 {
    /* by default: margin is 1em */
    /* disable this functionality */
    margin: 0;
}

a {
    color: var(--blue);
}

a:hover {
    color: var(--lightblue);
    text-decoration: none;
}

img {
    width: 100%;
}


/* background color divs */

.section-plum {
    background-color: var(--plum);
}

.gradient {
    background: linear-gradient(90deg, #1560bd 0%, rgba(0, 212, 255, 1) 100%);
    height: 3px;
}

.section-blue {
    background-color: var(--dkblue);
}


/* intro */

.hero {
    height: calc(100vh - 3px);
    height: calc(100svh - 3px);
}

#intro {
    padding: 4rem 1rem 10rem 1rem;
    padding-bottom: 10rem;
    max-width: 1200px;
    margin: 0 auto;
}

#intro p {
    font-size: 1rem;

    /* line-height is propotion with no units */
    /* => 1.5 x font-size */
    /* avoid absolute values (with unit) */
    /* absolute value will be fixed as font-size increase (e.g zoom) */
    line-height: 1.5;
}

#intro .name {
    font-family: var(--mono);
    font-size: 1rem;
}

.name span {
    font-family: var(--sans);
    font-size: 4rem;
    color: var(--cyan);
    display: block;
    font-weight: 300;
}

#intro h2 {
    font-size: 4rem;
}


/* contact */

#contact {
    width: 400px;
    text-align: center;
    margin: 0 auto;
    padding: 4rem 0;
}

#contact p:last-child {
    margin-top: 4rem;
}


/* navigation bar */

nav {
    font-family: var(--mono);
    font-size: 80%;
    padding: 4rem 1rem;
}

nav .logo a {
    font-family: var(--sans);
}

nav ul {
    list-style-type: none;
    /*  depending on browser ul/ol has padding or margin  */
    padding: 0;
    margin: 0;
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

nav li:first-child {
    flex-basis: 100%;
    text-align: center;
}

nav [class*="fa-"] {
    font-size: 150%;
    color: var(--cyan);
}

nav .logo [class*="fa-"] {
    font-size: 100%;
    color: var(--cyan);
}

nav a {
    color: white;
    text-decoration: none;
    /* bounding box around links will be clickabale  */
    display: block;
}

nav a:hover {
    color: var(--blue);
}

nav a:hover,
nav [class*=fa-]:hover {
    color: var(--blue);
}

.button {
    background-color: var(--blue);
    color: white;
    padding: .5rem;
    border-radius: 5px;
    text-decoration: none;
    font-family: var(--mono);
}

.button:hover {
    color: white;
    background-color: var(--lightblue);
}


/* footer */

footer {
    padding: 4rem 0;
    text-align: center;
}

footer ul {
    list-style-type: none;
    padding: 0;
    margin: 2rem 0;
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    gap: 3rem;
    font-size: 3rem;
}


/* about */

#about {
    padding: 4rem 1rem;
}

#about h2 {
    font-size: 2.5rem;
    margin-bottom: calc(2.5rem * 1.5);
}

#about h4 {
    font-size: 1rem;
    font-family: var(--mono);
    margin: 0;
}

#about h3 {
    color: var(--cyan);
}

.blackbox {
    background-color: var(--black);
    padding: 1rem;
    border-radius: 10px;
    color: var(--white);
    font-size: 1.5rem;
    line-height: 1.5;
}

#about ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-start;
    gap: 1rem;
    font-size: 1rem;
}

#about img {
    margin: 2rem 0 4rem 0;
    border-left: 1px solid var(--cyan);
    border-top: 1px solid var(--cyan);
    border-radius: 25px;
    padding: 1rem;
}

/* media queries */

@media (min-width: 800px) {
    article {
        display: grid;
        grid-template-columns: repeat(10, 1fr);
    }

    #about {
        max-width: 1200px;
        margin: 0 auto;
    }

    #about img {
        grid-column: 1/6;
        grid-row: 1/2;
    }

    .text {
        grid-column: 5/11;
        grid-row: 1/2;
        order: 2;
        text-align: right;
    }

    #about ul {
        justify-content: flex-end;
    }

    #about .reverse .text {
        grid-column: 1/7;
        order: 2;
        text-align: left;
    }

    #about .reverse img {
        grid-column: 6/11;
        grid-row: 1/2;
    }

    #about .reverse ul {
        justify-content: flex-start;
    }
}

@media (min-width: 850px) {
    nav {
        /*  Limit width to this for very big screens    */
        max-width: 1200px;
        margin: 0 auto;
    }


    nav li:first-child {
        flex-basis: auto;
        text-align: left;
        margin-right: auto;
    }

}


/* Separator for projects */
.sep {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sep .line-sep {
    width: 45%;
    height: 1px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgb(255, 255, 255) 100%);
    ;
}

.sep .line-sep.reverse {
    background: linear-gradient(90deg, rgb(255, 255, 255) 0%, rgba(0, 0, 0, 0) 100%);
}

/* experience table */

#experience {
    padding: 4rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

#experience h2 {
    font-size: 2.5rem;
    margin-bottom: calc(2.5rem * 1.5);
    text-align: center;
}

.table-container {
    overflow-x: auto;
}

.timeline-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 1rem;
    text-align: left;
    background-color: var(--black);
    border-radius: 10px;
    overflow: hidden;
}

.timeline-table th,
.timeline-table td {
    padding: 1.5rem;
    border-bottom: 1px solid var(--dkblue);
}

.timeline-table th {
    background-color: var(--dkblue);
    color: var(--cyan);
    font-family: var(--mono);
    text-transform: uppercase;
}

.timeline-table tr:hover {
    background-color: rgba(0, 65, 106, 0.4);
    transition: background-color 0.3s ease;
}

.timeline-table td:first-child {
    font-family: var(--mono);
    color: var(--lightblue);
    white-space: nowrap;
}

.timeline-table td ul {
    margin: 0;
    padding-left: 1.2rem;
}

.timeline-table td ul li {
    margin-bottom: 0.2rem;
}

/* Row-specific colors aligning with title */

.text-education {
    color: var(--cyan);
}

.text-experience {
    color: var(--lightblue);
}

.row-education {
    background-color: rgba(0, 212, 255, 0.15);
    /* more visible cyan */
}

.row-experience {
    background-color: rgba(102, 102, 255, 0.15);
    /* more visible lightblue */
}

/* Adjust text color logic slightly */
.row-education td:first-child {
    color: var(--cyan) !important;
}

.row-experience td:first-child {
    color: var(--lightblue) !important;
}

.section-dark {
    color: var(--dark);
}