html {
    overflow-x: hidden;
    width: 100%;
}

* {
    box-sizing: border-box;
}

body {
    background-color: white;
    color: black;
    padding: 0px;
    margin: 0px;
    overflow-x: hidden;
    width: 100%;

}

.home {
    height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 0vh;
    padding-left: clamp(16px, 6vw, 48px);
    padding-right: clamp(16px, 6vw, 48px);
}

#fluid-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

#home #intro {
    position: relative;
    z-index: 1;
    text-align: center;
}


#home #intro h1 {
    text-align: center;
    font-size: 8vw;
    margin-top: 250px;
    margin-bottom: 10px;
    padding: 0px;
}

.typing-container {
    text-align: center;
    position: relative;
    display: block;
    font-size: 2vw;
    font-weight: bold;
    width: 70vw;
    margin: 0 auto;
    margin-bottom: 20px;
    min-height: 2.8vw;
}

.typing-wrapper {
    display: inline-block;
    min-width: 30ch;
    text-align: center;
}

.cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background-color: rgb(88, 141, 141);
    margin-left: 4px;
    vertical-align: text-bottom;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}


#home #intro p {
    text-align: center;
    position: relative;
    display: block;
    font-size: 2vw;
    width: 70vw;
    margin: 0 auto;
    margin-bottom: 20px;
}


.buttons {
    font-size: 1vw;
    display: block;
    width: fit-content;
    color: black;
    background-color: white;
    padding: 10px;
    margin: 0 auto;
    border: 2px solid rgb(88, 141, 141);
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
}

.buttons:hover {
    box-shadow: 0px 0px 8px 0.2px rgb(88, 141, 141);
}

.social-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(12px, 3vw, 24px);
    margin-top: 30px;
    flex-wrap: wrap;
    padding: 0 clamp(8px, 4vw, 24px);
}

.social-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: clamp(120px, 32vw, 160px);
    height: clamp(120px, 34vw, 170px);
    padding: clamp(14px, 4vw, 22px);
    border: 2px solid rgb(88, 141, 141);
    border-radius: 10px;
    background-color: white;
    text-decoration: none;
    color: black;
    transition: all 0.3s ease;
    cursor: pointer;
}

.social-button:hover {
    background-color: rgb(88, 141, 141);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(88, 141, 141, 0.2);
}

.social-icon {
    width: clamp(32px, 8vw, 40px);
    height: clamp(32px, 8vw, 40px);
    margin-bottom: 10px;
    color: rgb(88, 141, 141);
}

.social-button:hover .social-icon {
    color: white;
}

.social-label {
    font-size: clamp(13px, 3.2vw, 16px);
    font-weight: 600;
    text-align: center;
}

.scroll-down {
    font-size: 1.5vw;
    position: absolute;
    padding: 0;
    margin: 0;
    left: 50%;
    transform: translateX(-50%);
    bottom: 6%;
    opacity: 0.7;
    animation: bounce 1.5s infinite;
}

#arrow-down {
    color: rgb(88, 141, 141);
    bottom: 3%;
    z-index: 2;
}

@keyframes bounce {
    0% {
        transform: translateX(-50%) translateY(-20px);
        animation-timing-function: ease-in;
    }

    50% {
        transform: translateX(-50%) translateY(0);
        animation-timing-function: ease-out;
    }

    100% {
        transform: translateX(-50%) translateY(-20px)
    }
}

.highlight {
    color: rgb(88, 141, 141);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    order: 1;
}

#nav-name {
    font-size: clamp(18px, 2vw, 22px);
    margin: 8px 4px;
    white-space: nowrap;
}

.cursor-toggle {
    display: inline-block;
    position: relative;
    width: 40px;
    height: 20px;
    margin-left: 10px;
    vertical-align: middle;
}

.cursor-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: rgb(88, 141, 141);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

body.dark-mode .slider {
    background-color: #555;
}

body.dark-mode input:checked + .slider {
    background-color: rgb(88, 141, 141);
}


.navbar {
    background: transparent;
    backdrop-filter: blur(18px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 2px solid rgba(88, 141, 141, 0.3);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px clamp(16px, 5vw, 32px);
}

#shortcuts {
    flex: 1 1 auto;
    margin-left: auto;
    order: 2;
}

.navbar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(10px, 2vw, 18px);
    flex-wrap: wrap;
}

.navbar li {
    margin: 0;
}

.navbar a {
    color: black;
    text-decoration: none;
    font-size: clamp(14px, 3.5vw, 16px);
}

.navbar #shortcuts a:hover {
    color: rgb(88, 141, 141);
}

.moon-button {
    position: static;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    z-index: 1001;
    padding: 6px;
    transition: transform 0.3s ease;
    color: rgb(88, 141, 141);
    flex: 0 0 auto;
    margin-left: 0;
    order: 3;
}

.moon-button .theme-icon {
    width: 28px;
    height: 28px;
    display: block;
}

body.dark-mode .moon-button {
    color: rgb(255, 214, 102);
}

.moon-button:hover {
    transform: scale(1.2);
}

@media (max-width: 900px) {
    .navbar {
        justify-content: center;
    }
    .nav-left {
        order: 1;
    }
    .moon-button {
        order: 2;
        margin-left: 0;
    }
    #shortcuts {
        order: 3;
        flex: 1 1 100%;
        margin-left: 0;
    }
    .navbar ul {
        justify-content: center;
    }
}

body.dark-mode {
    background-color: black;
    color: white;
}

body.dark-mode .typing-container {
    color: rgb(88, 141, 141);
}

body.dark-mode .social-button {
    background-color: rgb(88, 141, 141);
    border-color: rgb(88, 141, 141);
    color: white;
}

body.dark-mode .social-button:hover {
    background-color: white;
    border-color: white;
    color: black;
}

body.dark-mode .social-icon {
    color: white;
}

body.dark-mode .social-button:hover .social-icon {
    color: black;
}

body.dark-mode .buttons {
    color: white;
    background-color: black;
    border-color: rgb(88, 141, 141);
}

body.dark-mode .navbar a {
    color: white;
}


/* page 2 */

.about-me {
    width: 100%;
    min-height: 70vh;
    padding: clamp(40px, 8vw, 80px) clamp(16px, 6vw, 80px);
    font-size: clamp(16px, 1.4vw, 19px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(24px, 6vw, 48px);
    flex-wrap: wrap;
}

.about-me h1 {
    text-align: left;
    font-size: clamp(32px, 6vw, 52px);
    margin: 0 0 clamp(12px, 3vw, 24px) 0;
    position: static;
}

.about-me h3 {
    font-size: clamp(18px, 3vw, 24px);
    text-align: left;
}

.about-content {
    flex: 1 1 320px;
    max-width: 640px;
    min-width: 280px;
}

.about-me .about-me-text-box {
    position: static;
    padding: 5px 0;
    width: 100%;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.7;
    margin: 0 0 clamp(12px, 3vw, 18px) 0;
}

.about-me .buttons {
    display: inline-block;
    position: static;
    margin-right: 12px;
    font-size: clamp(14px, 1.4vw, 16px);
}

.about-me .about-me-picture {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-me .about-me-picture img {
    width: clamp(180px, 34vw, 320px);
    height: auto;
    position: static;
    border: 3px solid rgb(88, 141, 141);
    border-radius: 8px;
    transform-origin: center center;
    transition: transform 0.3s ease;
}

.about-me .about-me-picture img:hover {
    transform: scale(1.025);
}

@media (max-width: 640px) {
    .about-me {
        text-align: center;
    }
    .about-content {
        text-align: center;
    }
    .about-me h1,
    .about-me h3 {
        text-align: center;
    }
}


/* page 3 */


.skills {
    height: clamp(70vh, 80vh, 120vh);
    width: 100vw;
    padding-top: 60px;
    padding-left: clamp(16px, 6vw, 48px);
    padding-right: clamp(16px, 6vw, 48px);
}

.skills h2 {
    text-align: center;
    font-size: 4vw;
}

/* Skills section filters */
.skill-filters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 20px auto 24px;
    padding: 0 2vw;
    flex-wrap: wrap;
}

.filter-btn {
    appearance: none;
    border: 2px solid rgb(88, 141, 141);
    background: white;
    color: black;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: rgba(88, 141, 141, 0.1);
}

.filter-btn.active {
    background: rgb(88, 141, 141);
    color: white;
}

/* Skills grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, max-content));
    gap: 24px; /* spacing between smaller skill blocks */
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2vw;
    justify-content: center;
    justify-items: center;
}

.skill-card {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px solid rgb(88, 141, 141);
    border-radius: 12px;
    padding: 12px 10px;
    min-height: 60px;
    width: 120px;
    /* Fallback font-size scales with viewport */
    font-size: clamp(12px, 1.6vw, 18px);
    background: white;
    color: black;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

/* Prefer scaling text to the card width using container query units, with support detection */
@supports (font-size: 10cqi) {
    .skill-card {
        /* Scale font-size with card's inline size, clamped for readability */
        font-size: clamp(12px, 8cqi, 18px);
        /* Enable container queries on cards */
        container-type: inline-size;
    }
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(88, 141, 141, 0.18);
    background: rgb(88, 141, 141);
    color: white;
}

/* Dark mode adjustments */
body.dark-mode .filter-btn {
    background: black;
    color: white;
    border-color: rgb(88, 141, 141);
}

body.dark-mode .filter-btn:hover {
    background: rgba(88, 141, 141, 0.25);
}

body.dark-mode .filter-btn.active {
    background: rgb(88, 141, 141);
    color: white;
}

body.dark-mode .skills-grid .skill-card {
    background: black;
    color: white;
}

body.dark-mode .skills-grid .skill-card:hover {
    background: rgb(88, 141, 141);
    color: white;
}

/* Responsive tweaks */
@media (max-width: 1024px) {
    .skills {
        height: clamp(75vh, 90vh, 130vh);
    }
}

@media (max-width: 768px) {
    .skills {
        height: clamp(80vh, 110vh, 150vh);
    }
    .skills h2 {
        font-size: 6vw;
    }
    .skill-card {
        min-height: 54px;
        padding: 10px 8px;
        width: 100px;
    }
}

@media (max-width: 480px) {
    .skills {
        height: clamp(90vh, 130vh, 180vh);
    }
}








/* ========== PROJECTS SECTION ========== */
.projects {
    min-height: 60vh;
    width: 100vw;
    padding: 80px clamp(16px, 6vw, 48px) 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.projects h2 {
    font-size: 3rem;
    margin-bottom: 3rem;
    text-align: center;
}

/* Projects grid container */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* Individual project card */
.project-card {
    background: rgba(240, 240, 240, 0.8);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    min-height: 340px;
}

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

/* Dark mode styles for project cards */
body.dark-mode .project-card {
    background: rgba(30, 30, 30, 0.8);
    border-color: rgb(88, 141, 141);
}

body.dark-mode .project-card:hover {
    border-color: rgb(88, 141, 141);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.1);
}

/* Project title */
.project-title {
    font-size: 1.8rem;
    margin: 0;
    color: #333;
    font-weight: 600;
}

body.dark-mode .project-title {
    color: #fff;
}

/* Project description */
.project-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    margin: 0;
    flex-grow: 1;
}

body.dark-mode .project-description {
    color: #ccc;
}

/* Technology tags container */
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

/* Individual technology tag */
.tech-tag {
    background: rgba(0, 0, 0, 0.08);
    color: #333;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.dark-mode .tech-tag {
    background: rgba(255, 255, 255, 0.1);
    color: #ddd;
    border-color: rgb(88, 141, 141);
}

/* Project button (Code link) */
.project-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #333;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    align-self: flex-start;
}

.project-button:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .project-button {
    background: rgb(88, 141, 141);
    border: 2px solid rgb(88, 141, 141);
}

body.dark-mode .project-button:hover {
    background: rgb(100, 160, 160);
    border-color: rgb(100, 160, 160);
    box-shadow: 0 4px 12px rgba(88, 141, 141, 0.4);
}

/* GitHub icon inside button */
.button-icon {
    width: 20px;
    height: 20px;
}

/* ========== RESPONSIVE DESIGN ========== */
/* Tablet view: 2 columns */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .projects h2 {
        font-size: 2.5rem;
    }
}

/* Mobile view: 1 column (stacked vertically) */
@media (max-width: 768px) {
    .projects {
        padding: 60px clamp(16px, 6vw, 28px) 40px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .projects h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .project-card {
        padding: 1.5rem;
        min-height: auto;
    }
    
    .project-title {
        font-size: 1.5rem;
    }
    
    .project-description {
        font-size: 0.95rem;
    }
}

/* ========== CONTACT SECTION ========== */
.contact {
    min-height: 80vh;
    width: 100vw;
    padding: 80px clamp(16px, 6vw, 48px) 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact h2 {
    font-size: 3rem;
    margin-bottom: 3rem;
    text-align: center;
}

/* Contact container: form on left, info on right */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* Contact Form Styling */
.contact-form {
    border: 2px solid rgb(88, 141, 141);
    border-radius: 12px;
    padding: 2rem;
    background: rgba(240, 240, 240, 0.5);
}

body.dark-mode .contact-form {
    background: rgba(30, 30, 30, 0.5);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    color: #333;
}

body.dark-mode .form-group label {
    color: #ddd;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: white;
    color: #333;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

body.dark-mode .form-group input,
body.dark-mode .form-group textarea {
    background: rgba(50, 50, 50, 0.8);
    color: #ddd;
    border-color: rgba(255, 255, 255, 0.2);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgb(88, 141, 141);
}

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

/* Submit Button */
.submit-button {
    background: rgb(88, 141, 141);
    color: white;
    border: none;
    padding: 0.9rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    width: 100%;
}

.submit-button:hover {
    background: rgb(100, 160, 160);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 141, 141, 0.4);
}

/* Contact Info Styling */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.contact-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.info-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.contact-icon {
    width: 28px;
    height: 28px;
    color: rgb(88, 141, 141);
}

.info-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

body.dark-mode .info-header h3 {
    color: #fff;
}

.info-text {
    margin: 0;
    font-size: 1.1rem;
    color: #555;
    padding-left: 36px;
}

body.dark-mode .info-text {
    color: #ccc;
}

/* ========== FOOTER ========== */
.footer {
    width: 100vw;
    background: rgba(240, 240, 240, 0.8);
    border-top: 2px solid rgba(0, 0, 0, 0.1);
    padding: 1.2rem 40px;
}

body.dark-mode .footer {
    background: rgba(30, 30, 30, 0.8);
    border-top-color: rgb(88, 141, 141);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Footer Top Row: Name on left, Icons on right */
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.6rem;
}

/* Footer Left */
.footer-left {
    text-align: left;
}

.footer-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

body.dark-mode .footer-name {
    color: #fff;
}

.footer-name:hover {
    color: rgb(88, 141, 141);
}

/* Footer Right */
.footer-right {
    display: flex;
    gap: 1.5rem;
}

.footer-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.footer-icon-link:hover {
    transform: translateY(-3px);
}

.footer-icon {
    width: 24px;
    height: 24px;
    color: #333;
    transition: color 0.3s ease;
}

body.dark-mode .footer-icon {
    color: #fff;
}

.footer-icon-link:hover .footer-icon {
    color: rgb(88, 141, 141);
}

/* Footer Bottom Row: Centered text */
.footer-bottom {
    text-align: center;
    position: relative;
    padding-top: 1.5rem;
}

.footer-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 1px;
    background: rgba(88, 141, 141, 0.3);
}

.footer-bottom p {
    margin: 0;
    font-size: 1rem;
    color: #555;
}

body.dark-mode .footer-bottom p {
    color: #ccc;
}

.heart {
    display: inline-block;
    color: rgb(88, 141, 141);
    font-size: 1.2rem;
    transition: transform 0.2s ease;
    user-select: none;
    width: 1.2em;
    height: 1.2em;
    line-height: 1;
    text-align: center;
    vertical-align: middle;
}

.heart:hover {
    transform: scale(1.2);
}

/* ========== RESPONSIVE DESIGN FOR CONTACT & FOOTER ========== */
/* Tablet view */
@media (max-width: 1024px) {
    .contact-container {
        gap: 2rem;
    }
    
    .contact h2 {
        font-size: 2.5rem;
    }
}

/* Mobile view: stack vertically */
@media (max-width: 768px) {
    .contact {
        padding: 60px 20px 40px 20px;
    }
    
    .contact h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer {
        padding: 1.5rem 20px;
    }
    
    .footer-top {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-left {
        text-align: center;
    }
    
    .footer-right {
        justify-content: center;
    }
}
