/* Defining Local Font Faces */
@font-face {
    font-family: "Montserrat";
    font-weight: 400;
    src: url(/fonts/Montserrat-Regular.ttf);
}

@font-face {
    font-family: "Montserrat";
    font-weight: 500;
    src: url(/fonts/Montserrat-Medium.ttf);
}

@font-face {
    font-family: "Montserrat";
    font-weight: 700;
    src: url(/fonts/Montserrat-Bold.ttf);
}

@font-face {
    font-family: "Audiowide";
    font-weight: 400;
    src: url(/fonts/Audiowide-Regular.ttf);
}

/* Preventing Horizontal Scrolling */
html,
body {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    overflow-x: hidden;
    user-select: none;
}

/* Body */
body {
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
    background-color: #fafafa;
    margin: 0;
    padding: 0;
    color: #333;
    font-size: 19px;
    line-height: 1.6;
    transition: background-color 0.5s ease;
}

/* Navigation Bar */
.navigationBar {
    font-weight: 700;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(250, 250, 250, 0.95);
    backdrop-filter: blur(10px);
    padding: 8px 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    border-bottom: 1px solid rgba(224, 224, 224, 0.5);
    height: 40px;
    transition: background-color 0.5s ease, border-bottom 0.5s ease;
}

/* Navigation layout - split into left and right */
.left-nav,
.right-nav {
    display: flex;
    align-items: center;
}

.left-nav {
    flex: 1;
    justify-content: flex-start;
}

.right-nav {
    flex: 1;
    justify-content: flex-end;
    margin: 110px;
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
}

nav ul li {
    margin: 0 30px;
}

nav .left-nav ul li:first-child {
    margin-left: 0;
}

nav .left-nav ul li:last-child {
    margin-right: 30px;
}

nav .right-nav ul li:first-child {
    margin-left: 30px;
}

nav .right-nav ul li:last-child {
    margin-right: 0;
}

nav ul li a {
    display: inline-flex;
    color: #000000;
    text-decoration: none;
    font-size: 18px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease;
    position: relative;
}

nav ul li a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: linear-gradient(to right, #6e5cf5, #b1a8f5);
    transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

nav ul li a:hover {
    color: #6e5cf5;
    transform: translateY(-2px);
}

body.dark-mode nav ul li a:hover {
    color: #b1a8f5;
}

#barHeading {
    font-family: "Audiowide", sans-serif;
    font-size: 25px;
    color: #000000;
    margin: 0;
    font-weight: bold;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: color 0.5s ease;
}

/* Decorations */
.decorations {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.stripe {
    position: absolute;
    width: 50px;
    height: 300%;
    background: linear-gradient(to bottom, #8ff9d0, #6abed3, #6dc1ed, #b1a8f5, #6e5cf5);
    left: 10%;
    top: -100%;
    transform: rotate(5deg) translateY(-30%) translateX(-50%) skew(-5deg);
    animation: stripeFloat 15s ease-in-out infinite alternate;
}

@keyframes stripeFloat {
    0% {
        transform: rotate(5deg) translateY(-30%) translateX(-50%) skew(-5deg);
    }
    100% {
        transform: rotate(5deg) translateY(-25%) translateX(-48%) skew(-4deg);
    }
}

.circle {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(to bottom right, #8ff9d0, #6abed3);
    animation: circleFloat 10s ease-in-out infinite alternate;
}

@keyframes circleFloat {
    0% {
        transform: translateY(0) scale(1);
    }
    100% {
        transform: translateY(-15px) scale(1.05);
    }
}

/* Introduction Section */
.introduction {
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
    background-color: transparent;
    box-shadow: none;
    color: #000000;
    margin-top: 150px;
    margin-left: max(5%, 220px);
    margin-right: max(5%, 220px);
    padding: 30px;
    border-radius: 20px;
    transition: color 0.5s ease;
}

.introduction p {
    font-size: clamp(16px, 1.2vw, 20px);
    margin-top: 20px;
    transition: color 0.5s ease;
    max-width: 1200px;
}

.resumeButton {
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    font-size: clamp(16px, 1vw, 18px);
    font-weight: 600;
    color: white;
    background: linear-gradient(to right, #6e5cf5, #b1a8f5);
    border: none;
    border-radius: 25px;
    text-decoration: none;
    box-shadow: 4px 6px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.resumeButton img {
    width: 22px;
    height: 22px;
    filter: invert(1);
    transition: transform 0.3s ease;
}

.resumeButton:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.resumeButton:hover img {
    transform: translateX(3px);
}

.resumeButton::before {
    content: none;
}

#introHeading,
#introName {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: clamp(40px, 4vw, 74px);
    margin-bottom: 0;
    margin-top: 0;
    transition: color 0.5s ease;
}

#introHeading {
    background: linear-gradient(to bottom, #8ff9d0, #6abed3, #b1a8f5, #6e5cf5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#introName {
    color: #000000;
}

/* Skills Section */
.skills {
    padding: 35px;
    border-radius: 35px;
    background-color: transparent;
    color: #000000;
    box-shadow: none;
    margin: 250px max(5%, 220px) 80px;
    transition: color 0.5s ease;
}

.skills h2 {
    margin-top: 5px;
    margin-bottom: 15px;
}

.skill-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin: clamp(10px, 1.5vw, 20px);
    width: clamp(80px, 6vw, 100px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.skill-item:hover {
    transform: translateY(-10px);
}

.skills img {
    width: clamp(50px, 4vw, 70px);
    height: clamp(50px, 4vw, 70px);
    margin: clamp(15px, 1.5vw, 25px);
    vertical-align: middle;
    user-select: none;
    -webkit-user-drag: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.skill-name {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: clamp(12px, 0.9vw, 15px);
    margin-top: 10px;
    text-align: center;
    transition: color 0.5s ease;
}

#macIcon {
    width: clamp(55px, 4.5vw, 77px);
    height: clamp(55px, 4.5vw, 77px);
}

.skills h3 {
    margin-top: 30px;
    font-size: clamp(18px, 1.3vw, 24px);
}

/* Experience Section */
.experience {
    margin: 50px max(5%, 220px) 80px;
    padding: 35px;
    border-radius: 35px;
    background-color: transparent;
    color: #000000;
    box-shadow: none;
    transition: color 0.5s ease;
}

.experience h2 {
    margin-top: 5px;
    margin-bottom: 15px;
}

.experience h3 {
    font-size: clamp(18px, 1.3vw, 24px);
}

.experience h4 {
    font-size: clamp(16px, 1.1vw, 20px);
}

.experience p {
    font-size: clamp(16px, 1.1vw, 19px);
    max-width: 1200px;
}

/* Project Section */
.projects {
    margin: 50px max(5%, 220px) 80px;
    padding: 35px;
    border-radius: 35px;
    background-color: transparent;
    color: #000000;
    box-shadow: none;
    transition: color 0.5s ease;
}

.projects h2 {
    margin-top: 5px;
    margin-bottom: 15px;
}

.projects h3 {
    font-size: clamp(18px, 1.3vw, 24px);
}

.projects ul {
    padding-left: clamp(20px, 2vw, 40px);
}

.projects ul li {
    margin-bottom: 12px;
    font-size: clamp(16px, 1.1vw, 19px);
}

/* Project and Education Cards Styles */
.projects-grid,
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 30px;
    margin-top: 30px;
    grid-auto-flow: row;
    align-items: start;
}

.project-card,
.education-card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.project-card:hover,
.education-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.project-header,
.education-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.project-header h3,
.education-header h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
}

.project-meta,
.education-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-tag,
.education-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 14px;
    border: 1px solid #8884ff;
    color: #8884ff;
}

.project-tag img {
    width: 16px;
    height: 16px;
    margin-left: 5px;
}

.project-content,
.education-content {
    padding: 20px;
}

/* Project Card Styles */
.project-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: left;
}

.project-description {
    margin: 0;
    padding-left: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: auto;
    transition: all 0.3s ease;
}

.project-description.expanded {
    -webkit-line-clamp: unset;
    display: block;
}

.read-more {
    display: inline-block;
    color: #6e5cf5;
    margin-top: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.3s ease;
    font-weight: 500;
}

.read-more:hover {
    color: #8884ff;
    text-decoration: underline;
}

.read-less {
    display: none;
    color: #6e5cf5;
    margin-top: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.3s ease;
    font-weight: 500;
}

.read-less:hover {
    color: #8884ff;
    text-decoration: underline;
}

/* Education Section */
.education {
    margin: 50px max(5%, 220px) 80px;
    padding: 35px;
    border-radius: 35px;
    background-color: transparent;
    color: #000000;
    box-shadow: none;
    transition: color 0.5s ease;
}

.education h2 {
    margin-top: 5px;
    margin-bottom: 15px;
}

.education h3 {
    font-size: clamp(18px, 1.3vw, 24px);
}

.education ul {
    padding-left: clamp(20px, 2vw, 40px);
    margin-top: 10px;
}

.education ul li {
    margin-bottom: 12px;
    font-size: clamp(16px, 1.1vw, 19px);
}

/* Contact Section */
.contact {
    margin: 50px max(5%, 220px) 170px;
    padding: 35px;
    border-radius: 35px;
    background-color: transparent;
    color: #000000;
    box-shadow: none;
    transition: color 0.5s ease;
}

.contact h2 {
    margin-top: 5px;
    margin-bottom: 15px;
}

.contact p {
    font-size: clamp(16px, 1.1vw, 19px);
}

.contact-form {
    margin-top: 30px;
    max-width: 800px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: clamp(14px, 1vw, 16px);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: "Montserrat", sans-serif;
    font-size: clamp(14px, 1vw, 16px);
    background-color: transparent;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6e5cf5;
    box-shadow: 0 0 0 3px rgba(110, 92, 245, 0.2);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    padding: 12px 30px;
    background: linear-gradient(to right, #6e5cf5, #b1a8f5);
    color: white;
    border: none;
    border-radius: 25px;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    font-size: clamp(16px, 1vw, 18px);
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    box-shadow: 4px 6px 12px rgba(0, 0, 0, 0.2);
}

.submit-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(110, 92, 245, 0.4);
}

.submit-btn::before {
    content: none;
}

/* Headings and Text */
h1,
h3,
h4,
p,
ul {
    margin-bottom: 15px;
    transition: color 0.5s ease;
}

h2 {
    font-size: clamp(28px, 2vw, 35px);
    scroll-margin-top: 100px;
    transition: color 0.5s ease;
}

/* Type Writer Effect Elements */
#introName .txt {
    border-right: 0.5rem solid;
    animation: blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {
    from,
    to {
        border-color: currentColor;
    }
    50% {
        border-color: transparent;
    }
}

/* Ensure the introName text color changes in dark mode */
body.dark-mode #introName,
body.dark-mode #introName .txt {
    color: #ffffff;
}

/* Dock */
#dock {
    position: fixed;
    bottom: 58px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 4px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 2000;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.5s ease;
}

#dock:hover {
    transform: translateX(-50%) translateY(-5px);
}

.dock-item {
    width: 45px;
    height: 45px;
    padding: 6px;
    border-radius: 50%;
    cursor: pointer;
    background: transparent;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center center;
    will-change: transform;
}

.dock-item img {
    width: 30px;
    height: 30px;
}

#githubDock img {
    width: clamp(35px, 2.5vw, 45px);
    height: clamp(35px, 2.5vw, 45px);
}

#emailDock img {
    width: clamp(30px, 2.2vw, 38px);
    height: clamp(30px, 2.2vw, 38px);
}

#phoneDock img {
    width: clamp(33px, 2.4vw, 43px);
    height: clamp(33px, 2.4vw, 43px);
}

#discordDock img {
    width: clamp(30px, 2.2vw, 39px);
    height: clamp(30px, 2.2vw, 39px);
}

.theme-icon-container {
    position: relative;
    width: 32px;
    height: 32px;
}

.dock-separator {
    width: 1px;
    height: 24px;
    background-color: #ccc;
    margin: 0 4px;
    transition: background-color 0.5s ease;
}

/* Success Message */
.success-message {
    display: none;
    background-color: rgba(110, 92, 245, 0.1);
    border-left: 4px solid #6e5cf5;
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Theme toggle styles */
.theme-icon-container {
    position: relative;
    width: 32px;
    height: 32px;
}

.theme-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body:not(.dark-mode) .sun-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

body:not(.dark-mode) .moon-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

body.dark-mode .sun-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

body.dark-mode .moon-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* Dark Mode */
body.dark-mode {
    background-color: #1a1a1a;
    color: #ffffff;
}

body.dark-mode #dock {
    background-color: rgba(30, 30, 30, 0.3);
}

body.dark-mode .navigationBar {
    background-color: rgba(26, 26, 26, 0.95);
    border-bottom: 1px solid rgba(51, 51, 51, 0.5);
}

body.dark-mode .dock-separator {
    background-color: #444;
}

body.dark-mode .form-group input,
body.dark-mode .form-group textarea {
    border-color: #444;
    color: #ffffff;
}

/* Dark mode styles for project and education cards */
body.dark-mode .project-card,
body.dark-mode .education-card {
    background-color: #2a2a2a;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .project-card-front {
    background-color: #2a2a2a;
}

body.dark-mode .project-card-back {
    background-color: #2a2a2a;
}

body.dark-mode .project-header,
body.dark-mode .education-header {
    border-bottom: 1px solid #3a3a3a;
}

body.dark-mode .project-tag,
body.dark-mode .education-tag {
    border: 1px solid #b1a8f5;
    color: #b1a8f5;
}

body.dark-mode .read-more,
body.dark-mode .read-less {
    color: #b1a8f5;
}

body.dark-mode .read-more:hover,
body.dark-mode .read-less:hover {
    color: #c4bdf7;
}

/* Override black text in dark mode */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode p,
body.dark-mode li,
body.dark-mode .navigationBar a,
body.dark-mode #barHeading,
body.dark-mode #introName,
body.dark-mode #introName .txt,
body.dark-mode .skill-name,
body.dark-mode label {
    color: #ffffff !important;
}

body.dark-mode .navigationBar a:hover {
    color: #b1a8f5 !important;
}

/* Invert icons for dark mode */
body.dark-mode #themeIcon,
body.dark-mode #dock .dock-item img {
    filter: invert(1);
}

@media screen and (min-width: 2000px) and (max-width: 2560px) {
    .introduction,
    .skills,
    .experience,
    .projects,
    .education,
    .contact {
        margin-left: auto;
        margin-right: auto;
        max-width: 1800px;
        padding-left: 60px;
        padding-right: 60px;
    }

    .introduction {
        margin-top: 120px;
    }

    .navigationBar {
        padding-left: 60px;
        padding-right: 60px;
    }

    body {
        font-size: 20px;
    }

    .skill-item {
        margin: 25px;
    }
}

/* Responsive Design */
@media (max-width: 1600px) {
    .introduction,
    .skills,
    .experience,
    .projects,
    .education,
    .contact {
        margin-left: 180px;
        margin-right: 180px;
    }

    .introduction {
        margin-top: 115px;
    }

    .contact {
        margin-bottom: 80px;
    }
}

@media (max-width: 1400px) {
    .introduction,
    .skills,
    .experience,
    .projects,
    .education,
    .contact {
        margin-left: 150px;
        margin-right: 150px;
    }
}

@media (max-width: 1200px) {
    .introduction,
    .skills,
    .experience,
    .projects,
    .education,
    .contact {
        margin-left: 120px;
        margin-right: 120px;
    }
}

@media (max-width: 992px) {
    .introduction,
    .skills,
    .experience,
    .projects,
    .education,
    .contact {
        margin-left: 80px;
        margin-right: 80px;
    }

    #introHeading,
    #introName {
        font-size: 60px;
    }

    .projects-grid,
    .education-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navigationBar {
        padding: 10px 20px;
        height: auto;
        flex-wrap: wrap;
    }

    .left-nav,
    .right-nav {
        width: 100%;
        justify-content: center;
        margin: 5px 0;
    }

    #barHeading {
        position: relative;
        left: 0;
        transform: none;
        width: 100%;
        text-align: center;
        margin: 10px 0;
        order: -1;
    }

    nav ul {
        justify-content: center;
    }

    nav ul li {
        margin-right: 20px;
        margin-left: 20px;
    }

    .introduction {
        margin-top: 200px;
    }

    #introHeading,
    #introName {
        font-size: 50px;
    }

    .introduction,
    .skills,
    .experience,
    .projects,
    .education,
    .contact {
        margin-left: 50px;
        margin-right: 50px;
        padding: 20px;
    }

    .dock-item {
        margin: 0 5px;
    }

    .skill-item {
        margin: 15px;
    }
}

@media (max-width: 576px) {
    .navigationBar {
        padding: 10px;
    }

    nav ul li {
        margin-right: 10px;
        margin-left: 10px;
    }

    nav ul li a {
        font-size: 16px;
    }

    #introHeading,
    #introName {
        font-size: 40px;
    }

    .introduction,
    .skills,
    .experience,
    .projects,
    .education,
    .contact {
        margin-left: 20px;
        margin-right: 20px;
        padding: 15px;
    }

    .introduction p {
        font-size: 16px;
    }

    .dock-item {
        width: 40px;
        height: 40px;
        margin: 0 3px;
    }

    .dock-item img {
        width: 30px;
        height: 30px;
    }

    .dock-separator {
        margin: 0 5px;
    }

    .skill-item {
        margin: 10px;
        width: 80px;
    }

    .skills img {
        width: 50px;
        height: 50px;
        margin: 15px;
    }
}

@media (max-width: 480px) {
    nav ul li {
        margin-right: 8px;
        margin-left: 8px;
    }

    nav ul li a {
        font-size: 14px;
    }

    #barHeading {
        font-size: 20px;
    }

    #introHeading,
    #introName {
        font-size: 32px;
    }

    h2 {
        font-size: 28px;
    }

    h3 {
        font-size: 20px;
    }

    .skill-item {
        width: 70px;
    }
}