/* Universal Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}

/* Set font size for html */
html {
    font-size: 62.5%; /* 1rem = 10px */
    overflow-x: hidden;
}

/* Body styling */
body {
    width: 100%;
    min-height: 100vh;
    background-color: #000;
    color: #fff;
    line-height: 1.6;
}

/* Header styling */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(10px);
}

/* Menu Toggle Button - Hidden by default */
.menu-toggle {
    display: none;
    background: transparent;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 101;
    position: absolute;
    right: 2rem;
}

/* Navigation links styling */
nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
}

nav a {
    font-size: 1.8rem;
    color: white;
    margin-left: 4rem;
    font-weight: 500;
    transition: 0.3s ease;
    border-bottom: 3px solid transparent;
    padding: 0.5rem 0;
}

/* Hover effect and active state */
nav a:hover,
nav a.active {
    color: #b74b4b;
    border-bottom: 3px solid #b74b4b;
}

/* Section Styling */
.content-section {
    min-height: 100vh;
    padding: 10rem 9% 5rem;
    display: none;
    align-items: center;
}

.content-section.active {
    display: flex;
    flex-direction: column;
}

/* Section Title Styling */
.section-title {
    font-size: 5rem;
    margin-bottom: 3rem;
    text-align: center;
}

.section-title span {
    color: #b74b4b;
}

/* Home Section Styling */
.home {
    justify-content: center;
    gap: 8rem;
    background-color: #000;
}

.home-content {
    max-width: 60rem;
}

.home .home-content h1 {
    font-size: 6rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

span {
    color: #b74b4b;
}

.home-content h3 {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.home-content p {
    font-size: 1.8rem;
    margin-bottom: 3rem;
    color: #ddd;
}

/* Profile Image Styling */
.home-img {
    width: 35vw;
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-img img {
    width: 100%;
    max-width: 400px;
    border-radius: 50%;
    border: 0.5rem solid #b74b4b;
    box-shadow: 0 0 3rem #b74b4b;
    cursor: pointer;
    transition: 0.4s ease;
}

.home-img img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 5rem #b74b4b;
}

/* Social Icon Styling */
.social-icons {
    margin: 2.5rem 0;
    display: flex;
}

.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4.5rem;
    height: 4.5rem;
    background-color: transparent;
    border: 0.2rem solid #b74b4b;
    font-size: 2.5rem;
    border-radius: 50%;
    margin-right: 1.5rem;
    transition: 0.3s ease;
    color: #b74b4b;
}

.social-icons a:hover {
    color: #000;
    transform: scale(1.1) translateY(-5px);
    background-color: #b74b4b;
    box-shadow: 0 0 2rem #b74b4b;
}

/* Button Styling */
.btn {
    display: inline-block;
    padding: 1.5rem 3.2rem;
    background-color: #000;
    border-radius: 4rem;
    font-size: 1.8rem;
    color: #b74b4b;
    letter-spacing: 0.1rem;
    font-weight: 600;
    border: 0.2rem solid #b74b4b;
    transition: 0.3s ease;
    cursor: pointer;
    margin-top: 1rem;
}

.btn:hover {
    transform: scale(1.03);
    background-color: #b74b4b;
    color: #000;
    box-shadow: 0 0 2rem #b74b4b;
}

.btn-small {
    padding: 1rem 2rem;
    font-size: 1.6rem;
}

/* Typing Text Animation */
.typing-text {
    font-size: 3.4rem;
    font-weight: 600;
    margin-bottom: 2rem;
    min-height: 6rem;
}

.typing-text span {
    position: relative;
}

.typing-text span::before {
    content: "Software Developer";
    color: #b74b4b;
    animation: words 20s infinite;
}

.typing-text span::after {
    content: "";
    background-color: #000;
    position: absolute;
    width: calc(100% + 8px);
    height: 100%;
    border-left: 3px solid #b74b4b;
    right: -8px;
    animation: cursor 0.8s infinite, typing 20s steps(15) infinite;
}

/* Cursor Animation */
@keyframes cursor {
    to {
        border-left: 3px solid transparent;
    }
}

/* Words Animation */
@keyframes words {
    0%, 20% {
        content: "Web Developer";
    }
    21%, 40% {
        content: "Full-stack Engineer";
    }
    41%, 60% {
        content: "UI/UX Designer";
    }
    61%, 80% {
        content: "Problem Solver";
    }
    81%, 100% {
        content: "Software Developer";
    }
}

@keyframes typing {
    10%, 15%, 30%, 35%, 50%, 55%, 70%, 75%, 90%, 95% {
        width: 0;
    }
    5%, 20%, 25%, 40%, 45%, 60%, 65%, 80%, 85% {
        width: calc(100% + 8px);
    }
}

/* About Page Styles */
.about-content {
    display: flex;
    justify-content: space-between;
    gap: 5rem;
    width: 100%;
}

.about-text {
    flex: 1;
    max-width: 60rem;
}

.about-section {
    margin-bottom: 4rem;
}

.about-section h3 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #b74b4b;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.about-section h3 i {
    font-size: 2rem;
}

.highlight-box {
    background-color: rgba(183, 75, 75, 0.1);
    border-left: 3px solid #b74b4b;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
}

.highlight-box ul {
    margin: 1rem 0 1.5rem 2rem;
}

.highlight-box li {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 2rem;
}

.highlight-box li::before {
    content: "";
    position: absolute;
    left: 0;
    color: #b74b4b;
    font-size: 2rem;
}

.education-item {
    margin-bottom: 2.5rem;
}

.education-item h4 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.date {
    font-size: 1.6rem;
    color: #ddd;
}

.philosophy {
    font-style: italic;
    font-size: 1.8rem;
    line-height: 1.7;
    padding: 1.5rem;
    background-color: rgba(183, 75, 75, 0.1);
    border-radius: 0.5rem;
}

.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.interest-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: rgba(30, 30, 30, 0.8);
    border-radius: 0.5rem;
    transition: transform 0.3s ease;
}

.interest-item:hover {
    transform: translateY(-5px);
    background-color: rgba(183, 75, 75, 0.2);
}

.interest-item i {
    font-size: 2.5rem;
    color: #b74b4b;
}

.interest-item span {
    font-size: 1.4rem;
    text-align: center;
}

.fishing-note {
    font-size: 1.4rem;
    font-style: italic;
    text-align: center;
    color: #b74b4b;
    margin-top: 1rem;
}

/* Gallery Styles */
.about-gallery {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    max-width: 400px;
}

.gallery-item {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 0 1.5rem rgba(183, 75, 75, 0.3);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1rem;
    font-size: 1.4rem;
    text-align: center;
}

/* Skills Page Styles */
.skills-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
    font-size: 1.8rem;
    color: #ddd;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    width: 100%;
}

.skill-category {
    background-color: rgba(30, 30, 30, 0.8);
    padding: 3rem;
    border-radius: 1rem;
    border-left: 0.5rem solid #b74b4b;
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(183, 75, 75, 0.1);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(183, 75, 75, 0.3);
}

.category-header i {
    font-size: 2.5rem;
    color: #b74b4b;
}

.category-header h3 {
    font-size: 2.5rem;
    margin: 0;
    color: #b74b4b;
}

.skills-grid {
    display: grid;
    gap: 1.5rem;
}

.skill-item {
    background-color: rgba(40, 40, 40, 0.8);
    padding: 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(183, 75, 75, 0.2);
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.skill-name {
    font-size: 1.6rem;
    font-weight: 500;
}

.skill-percent {
    font-size: 1.4rem;
    color: #b74b4b;
    font-weight: 600;
}

.skill-bar {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background-color: #b74b4b;
    border-radius: 4px;
    width: 0;
    transition: width 1.5s ease-in-out;
}

.skills-footer {
    text-align: center;
    margin-top: 4rem;
    font-size: 1.8rem;
    padding: 2rem;
    background-color: rgba(183, 75, 75, 0.1);
    border-radius: 0.5rem;
}

.skills-footer span {
    color: #b74b4b;
    font-weight: 600;
}

/* Projects Page Styles */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    width: 100%;
}

.project-card {
    background-color: rgba(30, 30, 30, 0.8);
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 1px solid rgba(183, 75, 75, 0.2);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(183, 75, 75, 0.2);
    border-color: rgba(183, 75, 75, 0.5);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-card h3 {
    font-size: 2.2rem;
    margin: 2rem 2rem 1rem;
    color: #b74b4b;
}

.project-card p {
    font-size: 1.6rem;
    margin: 0 2rem 2rem;
    color: #ddd;
}

.project-card .btn {
    display: block;
    margin: 0 2rem 2rem;
    text-align: center;
}

/* Contact Page Styles */
.contact-subtitle {
    text-align: center;
    font-size: 1.8rem;
    color: #ddd;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.contact-container {
    display: flex;
    justify-content: space-between;
    gap: 5rem;
    width: 100%;
}

.contact-info {
    flex: 1;
    background-color: rgba(30, 30, 30, 0.8);
    padding: 3rem;
    border-radius: 1rem;
    border-left: 0.5rem solid #b74b4b;
}

.contact-info h3 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: #b74b4b;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-method {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: center;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(183, 75, 75, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #b74b4b;
}

.contact-details h4 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.contact-details a,
.contact-details p {
    font-size: 1.5rem;
    color: #ddd;
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: #b74b4b;
}

.social-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icons {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.social-icon {
    width: 45px;
    height: 45px;
    background-color: rgba(183, 75, 75, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #b74b4b;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: #b74b4b;
    color: #000;
    transform: translateY(-5px);
}

.contact-form {
    flex: 1;
    background-color: rgba(30, 30, 30, 0.8);
    padding: 3rem;
    border-radius: 1rem;
    border-left: 0.5rem solid #b74b4b;
}

.contact-form h3 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: #b74b4b;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.8rem;
}

.form-group label {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: #ddd;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    background-color: rgba(20, 20, 20, 0.8);
    color: white;
    border-radius: 0.5rem;
    border: 1px solid #444;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #b74b4b;
    box-shadow: 0 0 0 2px rgba(183, 75, 75, 0.3);
    outline: none;
}

.contact-form textarea {
    height: 15rem;
    resize: vertical;
    min-height: 10rem;
}

.btn-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    margin-top: 1rem;
}

.btn-submit i {
    font-size: 1.6rem;
}

/* Responsive Design */
@media(max-width: 1200px) {
    html {
        font-size: 55%;
    }

    .home {
        gap: 5rem;
    }
}

@media(max-width: 995px) {
    .menu-toggle {
        display: block;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 40%;
        height: 100vh;
        padding: 10rem 3rem;
        background-color: rgba(22, 22, 22, 0.9);
        backdrop-filter: blur(10px);
        border-left: 0.3rem solid #b74b4b;
        flex-direction: column;
        transition: 0.5s ease;
    }

    nav.active {
        right: 0;
    }

    nav a {
        display: block;
        font-size: 2.2rem;
        margin: 2rem 0;
        text-align: center;
    }

    .home {
        flex-direction: column-reverse;
        text-align: center;
        gap: 3rem;
    }

    .home-img {
        width: 70vw;
        margin-top: 4rem;
    }

    .home-content h1 {
        font-size: 5rem;
    }

    .home-content h3 {
        font-size: 3rem;
    }

    .social-icons {
        justify-content: center;
    }

    .about-content {
        flex-direction: column;
    }

    .about-gallery {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        max-width: 100%;
        margin-top: 3rem;
    }

    .gallery-item {
        width: calc(50% - 1rem);
    }

    .contact-container {
        flex-direction: column;
    }

    .contact-info .social-icons {
        justify-content: center;
    }

    .contact-form button {
        align-self: center;
    }

    .skills-container {
        grid-template-columns: 1fr;
    }
}

@media(max-width: 768px) {
    nav {
        width: 60%;
    }

    .home-img {
        width: 80vw;
    }

    .section-title {
        font-size: 4rem;
    }

    .gallery-item {
        width: 100%;
    }

    .interests-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }
}

@media(max-width: 480px) {
    html {
        font-size: 50%;
    }

    nav {
        width: 80%;
    }

    .home-content h1 {
        font-size: 4.5rem;
    }

    .typing-text {
        font-size: 2.8rem;
    }

    .category-header h3 {
        font-size: 2.2rem;
    }

    .skill-name {
        font-size: 1.5rem;
    }

    .skill-percent {
        font-size: 1.3rem;
    }

    .contact-method {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .contact-form h3,
    .contact-info h3 {
        font-size: 2rem;
    }

    .contact-subtitle {
        font-size: 1.6rem;
    }
}

/* Animation for skill bars when they come into view */
@keyframes fillBar {
    from { width: 0; }
    to { width: var(--skill-level); }
}

/* Loading spinner animation */
.fa-spinner {
    animation: spin 1s linear infinite;
    color: #b74b4b;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Button Loading State */
button[type="submit"] {
    position: relative;
    transition: all 0.3s ease;
}

.loading-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

button[type="submit"].loading .btn-text {
    visibility: hidden;
}

button[type="submit"].loading .loading-icon {
    display: block;
}

/* Form Status Messages */
.form-status {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 0.5rem;
    font-size: 1.6rem;
    text-align: center;
    transition: all 0.3s ease;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

.form-status.show {
    opacity: 1;
    height: auto;
    padding: 1rem;
    margin-top: 1.5rem;
}

.form-status.success {
    background-color: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4CAF50;
}

.form-status.error {
    background-color: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #F44336;
}

/* Enhanced Form Inputs */
.contact-form input,
.contact-form textarea {
    transition: all 0.3s ease;
    background-color: rgba(20, 20, 20, 0.8);
    border: 1px solid #444;
    color: #fff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    font-size: 1.6rem;
    width: 100%;
    margin-bottom: 1.5rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #b74b4b;
    box-shadow: 0 0 0 2px rgba(183, 75, 75, 0.3);
    outline: none;
}

.contact-form textarea {
    min-height: 15rem;
    resize: vertical;
}

/* Submit Button Styles */
.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem 3rem;
    background-color: #000;
    color: #b74b4b;
    border: 2px solid #b74b4b;
    border-radius: 4rem;
    font-size: 1.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.btn-submit:hover {
    background-color: #b74b4b;
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(183, 75, 75, 0.4);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .contact-form input,
    .contact-form textarea {
        padding: 1.2rem;
    }

    .btn-submit {
        padding: 1.2rem 2rem;
        font-size: 1.6rem;
    }

    .form-status {
        font-size: 1.4rem;
    }
}