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

body {
    font-family: "Poppins", sans-serif;
}

/* Navbar Styles */
nav {
    display: flex;
    justify-content: space-around;
    box-shadow: 4px 4px 10px gray;
}

.nav-links {
    display: flex;
    font-size: 30px;
    list-style: none;
    align-items: center;
    gap: 30px;
}

.nav-links > li > a {
    text-decoration: none;
    color: black;
    padding: 20px;
    transition: background-color 0.3s ease;
}

.nav-links > li > a:hover {
    background-color: lightgray;
    border-radius: 8px;
}

.menu-toggle {
    display: none;
    font-size: 30px;
    color: #28A745;
    cursor: pointer;
}

/* Hero Section Styles */
section.hero { 
    margin: 30px 1.5em;
    height: 80vh;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.hero-info {
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hero-info > h1 {
    font-size: 60px;
}

.hero-info > p {
    font-size: large;
    line-height: 2em;
}

.hero-info > a {
    background-color: #28A745;
    text-decoration: none;
    border: 2px solid gainsboro;
    border-radius: 45px;
    color: white;
    padding: 12px;
    cursor: pointer;
    font-size: 20px;
    width: 200px;
    text-align: center;
}

.hero-img > img {
    width: 500px;
    height: 500px;
    border-radius: 50%;
    object-fit: cover;
}

/* Skills Section Styles */
.skills > h1 {
    padding: 1.5em;
    text-align: center;
    font-size: 50px;
    text-decoration: underline;
}

.skills-table-container {
    padding: 2em;
    max-width: 1200px;
    margin: 0 auto;
}

.skills-table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 2px 2px 30px rgba(0, 0, 0, 0.2);
    background-color: #fff;
}

.skills-table th,
.skills-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.skills-table th {
    background-color: #28A745;
    color: white;
    font-weight: 600;
    font-size: 18px;
}

.skills-table td {
    font-size: 16px;
    line-height: 1.5em;
}

.skills-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.skills-table tr:hover {
    background-color: #f1f1f1;
}

/* Hobbies Section Styles */
section.hobbies {
    margin: 30px 1.5em;
}

.hobbies > h1 {
    text-align: center;
    font-size: 50px;
    text-decoration: underline;
    padding: 1.5em;
}

.hobbies-holder {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 2em;
    justify-content: center;
}

.hobby-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 2em;
    box-shadow: 2px 2px 30px gray;
    width: 300px;
    text-align: center;
}

.hobby-card > img {
    width: 100px;
    align-self: center;
}

.hobby-card > p {
    font-size: large;
    line-height: 2em;
}

/* Media Section Styles */
section.media {
    margin: 30px 1.5em;
    text-align: center;
}

.media > h1 {
    font-size: 50px;
    text-decoration: underline;
    padding: 1.5em;
}

.media-holder {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2em;
    align-items: center;
}

.media-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 2em;
    box-shadow: 2px 2px 30px gray;
    width: 100%;
    max-width: 1200px;
    text-align: center;
    align-items: center;
}

.media-card > h2 {
    font-size: 24px;
}

.media-content {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    justify-content: center;
}

.media-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: calc(50% - 10px);
    min-width: 280px;
}

.media-item > audio {
    width: 100%;
}

.media-item > iframe {
    width: 100%;
    height: 315px;
    border: none;
}

.media-item > p {
    font-size: large;
    line-height: 1.8em;
    margin: 0;
}

/* Contact Section Styles */
section.contacts {
    margin: 2em 1.5em;
    text-align: center;
}

.contacts > h1 {
    font-size: 50px;
    text-decoration: underline;
    padding-top: 1.5em;
    padding-bottom: 0.5em;
}

.contacts > p {
    font-size: large;
    line-height: 2em;
    margin-bottom: 20px;
    white-space: pre-line;
}

.contact-buttons {
    margin-top: 2em;
    margin-bottom: 4em;
    display: flex;
    gap: 20px;
    justify-content: center;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 1rem;
    color: #333;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.contact-btn img {
    width: 20px;
    height: 20px;
}

.contact-btn:hover {
    background: #808080;
}

/* Footer Styles */
footer {
    text-align: center;
    padding: 1em;
    background-color: rgb(146, 127, 255);
    color: white;
    margin-top: 30px;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #28A745;
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 1000;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.scroll-to-top:hover {
    background-color: #218838;
    transform: scale(1.1);
}

/* Responsive Styles */
@media (max-width: 900px) {
    .hero-img {
        display: none;
    }

    .hero-info { 
        width: 100%;
        gap: 30px;
    }
}

@media (max-width: 800px) {
    .menu-toggle {
        display: block;
        position: absolute;
        right: 20px;
        top: 20px;
        font-size: 24px;
    }

    nav {
        flex-direction: column;
        padding: 15px;
        align-items: center;
    }

    .nav-links {
        display: none;
        width: 100%;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        padding: 20px 10px;
        font-size: 20px;
    }

    .nav-links.active > li {
        padding-top: 15px;
    }

    .nav-links > li > a {
        font-size: 18px;
        padding: 8px;
        display: block;
        text-align: center;
        border-bottom: 1px solid lightgray;
        margin: 0 10px;
    }

    section.hero {
        margin: 20px 0.5em;
        height: auto;
        flex-direction: column;
        align-items: center;
    }

    .hero-info > h1 {
        font-size: 36px;
        text-align: center;
    }

    .hero-info > p {
        font-size: 16px;
        line-height: 1.8em;
    }

    .hero-info > a {
        font-size: 16px;
        width: 150px;
        padding: 10px;
    }

    .skills > h1 {
        font-size: 36px;
        padding: 1em;
    }

    .skills-table-container {
        padding: 1em;
    }

    .skills-table th,
    .skills-table td {
        padding: 10px;
        font-size: 14px;
    }

    .hobbies > h1 {
        font-size: 36px;
        padding: 1em;
    }

    .hobby-card {
        width: 100%;
        max-width: 280px;
        padding: 1.5em;
    }

    .hobby-card > p {
        font-size: 14px;
        line-height: 1.8em;
    }

    section.media {
        margin: 20px 0.5em;
    }

    .media > h1 {
        font-size: 36px;
        padding: 1em;
    }

    .media-holder {
        padding: 1em;
    }

    .media-card {
        width: 100%;
        max-width: 95%;
        padding: 0;
    }

    .media-card > h2 {
        font-size: 20px;
        padding: 1em;
    }

    .media-content {
        flex-direction: column;
        gap: 0;
    }

    .media-item {
        width: 100%;
        min-width: 0;
        padding: 0.5em;
    }

    .media-item > audio {
        max-width: 100%;
    }

    .media-item > iframe {
        max-width: 100%;
        height: 180px;
    }

    .media-item > p {
        font-size: 14px;
        line-height: 1.6em;
    }

    .contacts > h1 {
        font-size: 36px;
        padding-top: 1em;
        padding-bottom: 0.5em;
    }

    .contacts > p {
        font-size: 14px;
        line-height: 1.8em;
        white-space: normal;
    }

    .contact-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 1.5em auto;
    }

    .contact-btn {
        font-size: 14px;
        padding: 8px 12px;
    }
}

@media (max-width: 600px) {
    .hero-info > h1 {
        font-size: 28px;
    }

    .hero-info > p {
        font-size: 14px;
    }

    .hero-info > a {
        font-size: 14px;
        width: 120px;
    }

    .skills > h1 {
        font-size: 28px;
    }

    .skills-table-container {
        padding: 0.5em;
    }

    .skills-table {
        display: block;
    }

    .skills-table thead {
        display: none;
    }

    .skills-table tr {
        display: block;
        margin-bottom: 1em;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 10px;
    }

    .skills-table td {
        display: block;
        text-align: center;
        border-bottom: none;
    }

    .skills-table td:first-child {
        font-weight: bold;
        font-size: 14px;
        color: #28A745;
        margin-bottom: 5px;
    }

    .skills-table td:last-child {
        border-bottom: none;
    }

    .hobbies > h1 {
        font-size: 28px;
    }

    .hobby-card {
        max-width: 100%;
        padding: 1em;
    }

    .hobby-card > p {
        font-size: 12px;
    }

    .media > h1 {
        font-size: 28px;
    }

    .media-card {
        max-width: 95%;
        padding: 0;
    }

    .media-card > h2 {
        font-size: 18px;
        padding: 0.75em;
    }

    .media-content {
        flex-direction: column;
        gap: 0;
    }

    .media-item {
        width: 100%;
        min-width: 0;
        padding: 0.25em;
    }

    .media-item > audio {
        max-width: 100%;
    }

    .media-item > iframe {
        max-width: 100%;
        height: calc(100% * 315 / 560);
    }

    .media-item > p {
        font-size: 12px;
        line-height: 1.4em;
    }

    .contacts > h1 {
        font-size: 28px;
    }

    .contacts > p {
        font-size: 12px;
    }

    .contact-btn {
        font-size: 12px;
        padding: 6px 10px;
    }
}