/* Base Styles (Mobile First) */
:root {
    --primary-color: hsl(305, 93%, 22%);
    --secondary-color: rgb(254, 181, 113);
    --text-color: #6a0461;
    --light-color: #fff;
    --dark-color: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
}

.container {
    position: relative;
    min-height: 90vh;
    background-color: var(--primary-color);
    overflow: hidden;
}

.container:before, 
.container:after {
    content: "";
    position: absolute;
    left: 50%;
    min-width: 400vw;
    min-height: 400vw;
    background-color: var(--light-color);
    animation-name: rotate;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    z-index: 1;
}

.container:before {
    bottom: 15vh;
    border-radius: 45%;
    animation-duration: 10s;
}

.container:after {
    bottom: 12vh;
    opacity: .5;
    border-radius: 47%;
    animation-duration: 10s;
}

@keyframes rotate {
    0% {
        transform: translate(-50%, 0) rotateZ(0deg);
    }
    50% {
        transform: translate(-50%, -2%) rotateZ(180deg);
    }
    100% {
        transform: translate(-50%, 0%) rotateZ(360deg);
    }
}


/* Header Elements */
.mainImage {
    position: absolute;
    top: 4%;
    right: 5%;    
    width: 15vh;
    border-radius: 55%;
    border: 3px solid var(--secondary-color);
    z-index: 10;
    object-fit: cover;
}

.mainImage2 {
    position: absolute;
    top: 2%;
    width: 40vh;
    max-width: 450px;
    z-index: 10;
    filter: 
    drop-shadow(-1px -1px 0 #feb571)
    drop-shadow(1px -1px 0 #feb571)
    drop-shadow(-1px 1px 0 #feb571)
    drop-shadow(1px 1px 0 #feb571);
}

/* Navigation */
.main-nav {
    position: absolute;
    top: 10vh;
    z-index: 20;
    width: 60%;
}

.menu-toggle {
    display: block;
    background: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    padding: 10px 15px;
    font-size: 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    z-index: 30;
    margin-left: 20px;
}

.nav-list {    
    display: none;
    list-style: none;
    padding: 15px;    
    margin-top: 0.5rem;
    background: rgba(255, 255, 255, 0.8);
    max-width: 300px;
}



.nav-list.active {
    display: block;
}

.nav-list li {
    margin: 0.5rem 0;
}

.nav-list a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.3rem;
    display: block;
    padding: 0.5rem;
}

.nav-list a:hover {
    color: var(--secondary-color);
}

.fixed-height {
	display:block;
min-height:92%;
}
/* Content Container */
.content-container {
    position: absolute;
    top: 13%;
    left: 5%;
    right: 5%;
    background-color: var(--light-color);
    border-radius: 20px;
    padding: 2rem;
    z-index: 5;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    max-height: 92%;
    overflow-y: auto;
}

/* Main Content */
.content-section {
    margin-bottom: 0.9rem;
    padding: 0rem 0;
}

h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

h3,.subtitle {
    font-size: 1.3rem;
    color: var(--text-color);
    margin: 1rem 0;
}
h4{
    text-align: center;
}

.subtitle{
    font-weight: bold;
    text-align: center;
}

/* About Section */
.about-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-half {
    background: rgba(254, 181, 113, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--secondary-color);
}

/* Skills Section */
.skills-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.skill-section {
    background: rgba(106, 4, 97, 0.05);
    padding: 1.5rem;
    border-radius: 10px;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.skill-category {
    background: rgba(255, 255, 255, 0.7);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.skill-category h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.skill-category ul {
    list-style-position: inside;
}

.skill-category li {
    margin-bottom: 0.3rem;
}

.skill-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
}

.skill-list li i {
  font-size: 1.4rem;
  color:var(--text-color); 
}

/* =======WeChat======= */

/* wechat */
.wechat-contact {
  position: relative;
  display: inline-block;
}

/* QR code pop up style */
.wechat-qr-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

/* QR code container */
.qr-container {
  background: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  position: relative;
  max-width: 300px;
}

/* QR code style */
.qr-code {
  width: 200px;
  height: 200px;
  margin: 10px 0;
  border: 1px solid #ddd;
}

/* close button */
.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

/* wechat text */
.qr-container p {
  margin: 5px 0;
  color: #333;
}
/* =====END OF WECHAT======= */

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
    gap: 0.6rem;
    margin-bottom: -30px;
}

.project-card {
    text-decoration: none;
    color: var(--dark-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card img, .projects-grid img {
    width: 250px;
    height: 250px;
    border-radius: 20px;
    object-fit: cover;
    border: solid var(--secondary-color);
    border-width: 1px 5px 5px 1px;
}

.project-card h3 {
    margin-top: 0.2rem;
    font-size: 1.3rem;
    text-align: center;
    color: var(--primary-color);
}

/* Contact Section */

.contact-form {
    background: rgba(106, 4, 97, 0.05);
    padding: 1.5rem;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

.submit-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.submit-btn:hover {
    background: var(--text-color);
}

/* Footer */
footer {
    background: var(--primary-color);
    color: white;
    margin-bottom: 0.5rem;
    padding: 1rem;
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    gap:20px;

}

.social-links a {
    color: white;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--secondary-color);
}

/* Tablet Styles */
@media (min-width: 800px) {
    h2 {
    font-size: 2rem;
}
h3,.subtitle,.project-card h3 {
    font-size: 1.6rem;}

    .content-container {
        max-width: 1400px;
        margin: auto;
    }

    .mainImage {
    position: absolute;
    top: 3%;
    right: 5%;    
    width: 20vh;
    height: 20vh;
    border-radius: 55%;
    border: 8px solid var(--secondary-color);
    z-index: 10;
    object-fit: cover;
}

.mainImage2 {    
    right: 30%;
}

    .main-nav {
        top: 3vh;
        left:10%;        
    }
    
    .nav-list {
        display: flex;
        flex-direction: row;
        max-width: unset;        
        background-color: unset;
    }
    
    .nav-list li {
        margin: 0;
    }
    
    .nav-list a {
        border-radius: 5px;
        padding: 0.5rem 1rem;
    }
    
    .menu-toggle {
        display: none;
    }
    
    .about-content {
        flex-direction: row;
    }
    
    .about-half {
        flex: 1;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .contact-content {
        flex-direction: row;
    }
    
    .contact-info,
    .contact-form {
        flex: 1;
    }
}
/* Desktop Styles */
@media (min-width: 1200px) {       
    .mainImage2 {
        right: 25%;
        min-width: 500px;
    }
    
    .main-nav {
        position: relative;
        top: 4vh;
    }
}

/* Desktop Styles */
@media (min-width: 2000px) {
    .mainImage {
        width: 25vh;
        height: 25vh;
    }
    
    .mainImage2 {
        right: 25%;
        min-width: 800px;
    }
    
    .main-nav {
        position: relative;
        top: 4vh;
        max-width: unset;
    }

    .nav-list {
        display: flex;
        flex-direction: row;
    }
    .container {
    min-height: 94vh; }
    
    .projects-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .content-section {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
}