:root {
    --primary-color: #112055;
    --primary-lighter-color: #f0f3f8;
    --primary-darker-color: #0c1d41;
    --secondary-color: #4f9d92;
    --font-color-primary: #fff;
    --font-color-secondary: #000;
    --link-color: #034944;
    --visited-link-color: #05676e;
    --active-link-color: #889c48;
    --button-background-color: #357b70;
    --button-hover-border-color: white;
    --button-active-background-color: whitesmoke;
    --button__secondary-background-color: #e0b354;
    --button__secondary-color: #2b2b2b;
    --background-color: #cfcece;
    --h1-color: blue;
    --font-weight-normal: 400;
    --font-weight-bold: 700;
    --font-size-body: 16px;
    --line-height-body: 1.6;
    --padding-body: 5px;
    --border-radius: 40px;
    --padding-button: 10px;
    --border-width-button: 2px;
    --border-width-grid-item: 5px;
    --padding-grid-item: 25px 35px;
    --border-width-contact-form: 5px;
    --border-radius-contact-form: 40px;
    --padding-contact-form: 25px 35px;
    --box-shadow-contact-form: rgba(133, 189, 215, 0.8784313725) 0px 30px 30px -20px;
    --font-size-heading1: 30px;
    --font-size-heading2: 24px;
    --padding-input: 10px;
    --hover-timing: 0.3s;
}

/* Basic Reset and Body Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: "Roboto", sans-serif;
    font-weight: var(--font-weight-normal);
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
    background-color: var(--background-color);
    margin: 20px 0; /* Adjusted margins */
}

h1 {
    font-size: var(--font-size-heading1);
    font-weight: var(--font-weight-bold);
    color: var(--h1-color);
    margin-top: 20px; /* Add margin to top */
}

h2 {
    font-size: var(--font-size-heading2);
    font-weight: var(--font-weight-bold);
    text-align: center; /* Centered h2s */
}

a {
    color: var(--link-color);
    transition: transform var(--hover-timing);
}

a:hover,
a:focus {
    text-decoration: none;
    transform: scale(1.2);
}

a:visited {
    color: var(--visited-link-color);
}

a:active {
    color: var(--active-link-color);
}

/* Button Styles */
button,
.butn,
.butn2 {
    border: none;
    font-family: inherit;
    background-color: var(--button-background-color);
    color: var(--font-color-primary);
    padding: var(--padding-button);
    border-radius: var(--border-radius);
    border-bottom: var(--border-width-button) solid rgba(0, 0, 0, 0.3);
    width: 150px;
    height: 40px;
    transition: all 0.3s ease;
}

button:hover,
button:focus,
.butn:hover,
.butn:focus,
.butn2:hover,
.butn2:focus {
    text-decoration: none;
    border: var(--border-width-button) solid var(--button-hover-border-color);
}

button:active,
.butn:active,
.butn2:active {
    background-color: var(--button-active-background-color);
}

/* Secondary button styles */
.button__secondary,
.butn__new {
    background-color: var(--button__secondary-background-color);
    color: var(--button__secondary-color);
    padding: 10px 20px;
    text-transform: uppercase;
}

.button__secondary:hover,
.butn__new:hover {
    background-color: var(--button-hover-border-color);
}

/* Navigation Styles */
.navigation_item {
    font-family: 'Magra', sans-serif;
    padding: 8px;
}

.navigation-list__item--active {
    background-color: whitesmoke;
    border-radius: var(--border-radius);
    padding: 8px 12px;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px, rgba(0, 73, 144, 0.5) 5px 10px 15px;
}

/* Profile Section */
.profile {
    max-width: 1500px;
    margin: 0 auto;
    padding: 20px;
}

.profile .hero-image {
    border-radius: 50%;
    width: 180px;
    height: auto;
    margin-right: 40px;
    float: right;
}

.page-main {
    margin: 30px 0 40px;
}

.page-footer {
    clear: both;
    text-align: left;
}

/* Social Icons */
.my-tech-stack {
    list-style-type: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.my-tech-stack li {
    margin: 10px;
}

.social-icons ul {
    display: flex;
    justify-content: center;
}

.social-icons li {
    font-size: 30px;
}

/* Responsive Image */
.project-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 20px;
    animation: slideIn 0.5s ease forwards;
}

.grid__item {
    background: var(--primary-lighter-color);
    border-radius: var(--border-radius);
    padding: var(--padding-grid-item);
    border: var(--border-width-grid-item) solid var(--font-color-primary);
    box-shadow: var(--box-shadow-contact-form);
    transition: transform var(--hover-timing);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}

.grid__item:hover {
    transform: scale(1.02);
}

.grid__text {
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    transform: translateY(20px);
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: var(--font-color-primary);
    padding: 10px;
    box-sizing: border-box;
}

.grid__item:hover .grid__text {
    opacity: 1;
    transform: translateY(0);
}

.grid__item a {
    color: var(--font-color-primary);
    text-align: right;
    text-decoration: underline;
    margin-top: auto;
}

@media all and (max-width: 500px) {
    .grid {
        grid-template-columns: 1fr;
    }
    h1 {
        font-size: 22px;
    }
}

@media all and (min-width: 501px) and (max-width: 750px) {
    .grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Skills Section Styling */
.skills-section {
    margin: 50px 0;
}

.skills-section h2 {
    text-align: center;
    margin-bottom: 20px;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 28px;
    color: #333;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    margin: 0 auto;
    max-width: 1200px;
}

.skill {
    flex: 1 1 100px; /* Adjust skill item size */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-family: 'Roboto', sans-serif;
}

.skill img {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
    transition: transform 0.2s ease;
}

.skill img:hover {
    transform: scale(1.1);
}

.skill p {
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

/* Layout for rows of specific skill categories */
.frontend-skills,
.backend-skills,
.cloud-hosting-skills,
.additional-skills {
    display: flex;
    justify-content: space-evenly;
    margin-bottom: 30px;
}

/* Responsive behavior */
@media (max-width: 768px) {
    .frontend-skills,
    .backend-skills,
    .cloud-hosting-skills,
    .additional-skills {
        flex-wrap: wrap;
        justify-content: center;
    }

    .skill {
        flex: 1 1 45%; /* Adjust size for smaller screens */
    }
}

@media (max-width: 480px) {
    .skill {
        flex: 1 1 100%; /* Stack skills on mobile */
    }

    .skill img {
        width: 40px;
        height: 40px;
    }
}

/* Paragraphs Container */
.paragraph-section {
    margin: 50px auto;
    max-width: 1200px;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

/* First paragraph - Full width */
.paragraph-section p:first-of-type {
    display: block;
    width: 100%;
    margin-bottom: 20px;
    text-align: justify; /* Optional, for more alignment balance */
}

/* Container for all paragraphs */
.paragraph-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Create responsive columns */
    gap: 20px; /* Space between each column */
    margin: 20px 0;
}

/* Paragraph style within the grid */
.paragraph-group p {
    background-color: #f8f8f8; /* Light background for visual separation */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 16px;
    line-height: 1.5;
    text-align: justify;
}

/* Styling for links within paragraphs */
.paragraph-group a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.paragraph-group a:hover {
    text-decoration: underline;
    color: #0056b3;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .paragraph-group {
        grid-template-columns: 1fr; /* Stack in one column for small screens */
    }
}
