* {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
  }

body {
    background: var(--main-color);
    color: var(--text-color);
    transition: 0.5s ease-in-out;
}

/* Light/Dark mode color palettes */

:root {
    --main-color: #F5EDED;
    --secondary-color: #E2DAD6;
    --accent-color: #fd8700;
    --secondary-accent: #008cff;
    --text-color: black;
    --secondary-text: rgb(90, 90, 90);
    --mode-img-size: 5vh;
}

.darkmode {
    --main-color: #222831;
    --secondary-color: #31363F;
    --accent-color: #7ecfd3;
    --secondary-accent: #fc5b5b;
    --text-color: white;
    --secondary-text: rgb(196, 196, 196);
    --mode-img-size: 5vh;
}

/* LIGHT/DARK MODE BUTTON */

#mode-switch {
    cursor: pointer;
    height: 3%;
    width: 3%;
    padding: 0;
    border-radius: 50%;
    background-color: var(--secondary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    top: 20px;
    right: 20px;
    margin-top: 20px;
    margin-right: 20px;
    transition: background-color 0.5s ease-in-out;
    border: none;
}

#mode-switch:hover {
    opacity: 80%;
    box-shadow: -3px 5px 5px #222831;
    transition: opacity 0.3s ease-in-out,
                box-shadow 0.3s ease-in-out;
}

#mode-switch img {
    height: var(--mode-img-size);
}

#mode-switch img:last-child {
    display: none;
}

.darkmode #mode-switch img:first-child {
    display: none;
}

.darkmode #mode-switch img:last-child {
    display: block;
}

#navbar {
    position: sticky;
    top: 0;
    z-index: 1; /* appears above everything else as you scroll */
    background-color: var(--secondary-color);
    display: flex;
    justify-content: space-between;
    width: 100%;
    transition: 0.5s ease-in-out;
}

#header {
    width: 100%;
    height: 100vh;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.container {
    padding: 2% 10%;
}

#logo {
    width: 15vh;
}

nav ul li {
    display: inline-block;
    list-style: none;
    margin: 2vh
}

nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 2vh;
    font-weight: 600;
    position: relative;
}

nav ul li a::after {
    content: '';
    width: 0;
    height: 3px;
    background: var(--accent-color);
    position: absolute;
    left: 0;
    bottom: -6px;
    transition: 0.5s;
}

nav ul li a:hover::after {
    width: 100%;
}

.header-text {
    margin-top: 15%;
    font-size: 3vh;
}

.header-text h1 {
    font-size: 7vh;
    margin-top: 3vh;
}

.header-text h1 span {
    color: var(--accent-color);
}

.home-btns {
    margin-top: 15px;
    gap: 15px;
    display: flex;
}

.resume-file {
    display: inline-block;
    text-decoration: none;
}

.resume-btn {
    display: flex;
    margin-top: 4px;
    margin-right: 5px;
    border-radius: 50px;
    font-size: 18px;
    cursor: pointer;
    text-align: center;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: var(--text-color);
    font-weight: 600;
    border: none;
    align-items: center;
    transition: all 0.3s ease-in-out;
}

.resume-btn:hover {
    transform: scale(1.05);
    opacity: 80%;
    transition: all 0.3s ease-in-out;
}

.resume-btn svg {
    fill: var(--text-color);
    margin-right: 3px;
    margin-left: -6px;
}

.home-links {
    border-radius: 50px;
}

.home-links {
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}

.home-links img {
    display: block;
    height: 6vh;
}

.home-links:hover {
    transform: scale(1.1);
    opacity: 80%;
    transition: all 0.3s ease-in-out;
}

/* About Section */

#about {
    padding: 80px 0;
    scroll-margin-top: 100px;
}

.row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.about-col-1 {
    flex-basis: 35%;
}

.about-col-1 img {
    width: 100%;
    border-radius: 15px;
}

.about-col-2 {
    flex-basis: 60%;
}

.about-col-2 p {
    font-size: 18px;
}

.subtitle {
    font-size: 60px;
    font-weight: 600;
    color: var(--text-color);
}

.tab-titles {
    display: flex;
    margin: 20px 0 40px;
}

.tab-links {
    margin-right: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
}

.tab-links:hover {
    color: var(--secondary-text);
    transition: 0.2s ease-in-out;
}

.tab-links::after {
    content: '';
    width: 0;
    height: 3px;
    background: var(--secondary-accent);
    position: absolute;
    left: 0;
    bottom: -8px;
    transition: 0.5s;
}

.tab-links.active-link::after {
    width: 50%;
}

.tab-contents ul li {
    list-style: none;
    margin: 10px 0;
    font-size: 18px;
}

.tab-contents ul li span {
    color: var(--secondary-accent);
    font-size: 20px;
    font-weight: 600;
}

/* make tab contents invisble by default */
.tab-contents {
    display: none;
}

.tab-contents.active-tab {
    display: block; /* make Skills tab visible */
}

/* Projects Section */
#projects {
    padding: 50px 0;
    scroll-margin-top: 120px;
}

.projects-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    grid-gap: 40px;
}

.project {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
}

.project img {
    width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 30px;
    display: block;
    margin: auto;
}

.wrapper {
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.project-img {
    position: relative;
}

.project-desc {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: 0.5s;
    border-radius: 30px;
    padding: 20px;
}

.project-desc h1 {
    margin-bottom: 10px;
}

.project-desc:hover {
    opacity: 1;
}

.project-btns {
    margin-top: 15px;
    gap: 20px;
    display: flex;
    justify-content: center;
}

.project-btns button {
    padding: 1em;
    height: 5vh;
    width: 10vh;
    border-radius: 50px;
    border: none;
    background-color: var(--secondary-color);
    color: var(--text-color);
    font-size: 15px;
    font-weight: 600;
    transition: 0.3s ease-in-out;
    position: relative;
}

/* use the @property rule to create a custom angle property */
@property --angle {
    syntax: "<angle>";

    /* default value */
    initial-value: 0deg;

    /* default setting for custom property */
    inherits: false;
}

.project .project-btns button::after,  .project .project-btns button::before{

    /* create a pseudo-button behind each button */
    content: '';
    position: absolute;
    height: 100%;
    width: 100%;
    background-image: conic-gradient(from var(--angle), var(--accent-color), var(--secondary-accent), var(--accent-color));
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    z-index: -1;
    animation: 3s spin linear infinite;

    /* copy over the buttons css styling */
    padding: 3px;
    border-radius: 50px;
}

/* spinning animation to perform a full rotation */
@keyframes spin {
    from {
        --angle: 0deg;
    }

    to {
        --angle: 360deg;
    }
}

.project .project-btns button::before {
    filter: blur(1.5rem);
    opacity: 0.3;
}

.project .project-btns button:hover {
    transform: scale(1.1);
}

/* Skills Section */
#skills {
    padding: 30px 0;
    scroll-margin-top: 120px;
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    grid-gap: 40px;
    margin-top: 50px;
}

.skills-list .skill-boxes {
    background: var(--secondary-color);
    padding: 37px;
    font-size: 13px;
    font-weight: 300;
    border-radius: 10px;
    transition: background 0.5s, transform 0.5s;
    border: 1px solid black;
}

#box-icon {
    font-size: 50px;
    margin-bottom: 30px;
}

.skills-list .skill-boxes h2 {
    font-size: 30px;
    font-weight: 500;
    margin-bottom: 15px;
    margin-top: 15px;
}

.skills-list .skill-boxes:hover {
    background: rgba(0, 0, 0, 0.15);
    transform: translateY(-10px);
}

.grid-list {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    list-style-type: none;
}

.grid-list .grid-item {
    display: flex;
}

.grid-list .grid-item svg {
    height: 40px;
    width: 40px;
    margin-right: 20px;
    margin-bottom: 25px;
}

.grid-list .grid-item span {
    font-size: 20px;
    line-height: 50px;
    font-weight: 600;
}


/* Contact Section */
#contact {
    margin-top: 50px;
}

.contact-left {
    flex-basis: 35%;
}

.contact-right {
    flex-basis: 60%;
}

/* Contact Icons */

.contact-icons {
    margin-top: 30px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 20px;
}

.contact-icons div {
    background-color: white;
    padding: 1em;
    border-radius: 50%;
    box-sizing: border-box;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
}

.contact-icons svg {
    height: 32px;
}

/* Email button */

/* The icon labels that will pop up */
.contact-icons .mail::before {
    content: attr(data-icons);
    position: absolute;
    color: white;
    background-color: var(--accent-color);
    padding: 0.5em 1em;
    border-radius: 100px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
    transform: translateX(170px);
    opacity: 1; /* make invisible */
    transition: transform 200ms ease-in-out;
}

.contact-icons .mail:hover::before {
    transform: translateX(200px) scale(1.2);
}

.contact-icons .mail:hover {
    background-color: var(--accent-color);
    fill: white;
} 

/* Triangle under the icon labels */
.contact-icons .mail::after {
    content: '';
    position: absolute;
    height: 0;
    width: 0;

    /* We don't include border-top because a triangle is just a square missing an edge */
    border-right: 10px solid var(--accent-color);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    transform: translateX(45px);
    opacity: 1;
    transition: transform 200ms ease-in-out;
}

.contact-icons .mail:hover::after {
    transform: translateX(50px) scale(1.2);
}

/* Phone button */

/* The icon labels that will pop up */
.contact-icons .phone::before {
    content: attr(data-icons);
    position: absolute;
    color: white;
    background-color: var(--accent-color);
    padding: 0.5em 1em;
    border-radius: 100px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
    transform: translateX(118px);
    opacity: 1; /* make invisible */
    transition: transform 200ms ease-in-out;
}

.contact-icons .phone:hover::before {
    transform: translateX(138px) scale(1.2);
}

.contact-icons .phone:hover {
    background-color: var(--accent-color);
    fill: white;
} 

/* Triangle under the icon labels */
.contact-icons .phone::after {
    content: '';
    position: absolute;
    height: 0;
    width: 0;

    /* We don't include border-top because a triangle is just a square missing an edge */
    border-right: 10px solid var(--accent-color);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    transform: translateX(45px);
    opacity: 1;
    transition: transform 200ms ease-in-out;
}

.contact-icons .phone:hover::after {
    transform: translateX(50px) scale(1.2);
}

/* Social Icons */

.social-icons {
    margin-top: 30px;
    margin-bottom: 10px;
    display: flex;
    gap: 20px;
}

.social-icons a {
    text-decoration: none;
    background-color: white;
    padding: 1em;
    border-radius: 50%;
    box-sizing: border-box;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
}

.social-icons a svg {
    height: 32px;
}

/* The icon labels that will pop up */
.social-icons a::before {
    content: attr(data-icons);
    position: absolute;
    color: white;
    background-color: var(--accent-color);
    padding: 0.5em 1em;
    border-radius: 100px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
    transform: translateY(30px) rotate(-25deg);
    opacity: 0; /* make invisible */
    transition: 300ms cubic-bezier(0.26,-0.48, 0.27, 1.92);
}

.social-icons a:hover::before {
    transform: translateY(65px) rotate(0);
    opacity: 1;
}

.social-icons a:hover {
    background-color: var(--accent-color);
    fill: white;
} 

/* Triangle under the icon labels */
.social-icons a::after {
    content: '';
    position: absolute;
    height: 0;
    width: 0;

    /* We don't include border-top because a triangle is just a square missing an edge */
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 10px solid var(--accent-color);
    transform: translateY(0) rotate(-25deg);
    opacity: 0;
    transition: 300ms cubic-bezier(0.26,-0.48, 0.27, 1.92);
}

.social-icons a:hover::after {
    transform: translateY(45px) rotate(0);
    opacity: 1;
}

/* Footer Section */
#footer {
    padding-top: 50px;
}

#footer p {
    text-align: center;
    color: #ababab;
    font-weight: 100;
}

hr {
    margin-top: 50px;
    margin-bottom: 50px;
}
