/* ------------Global Theme--------------- */
body {
    font-family: "Playfair Display", serif;
    background-color: #eaf4fb;
    color: #1f2933;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

html,
body {
    height: 100%;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ---------------Home page--------------- */
/* ---Nav bar--- */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #dbe7f1;
}

.navbar {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 0;
}

.nav-list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}

.nav-list a {
    font-size: 1.2rem;
    font-weight: 600;
    color: #3b78a1;
}

.nav-list a:hover {
    text-decoration: underline;
}

.theme-toggle {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
}

/* ----hero content--- */
.hero {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    min-height: 70vh;
}

.hero-content {
    max-width: 520px;
}

.main-content {
    display: block;
}

.home .main-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-title {
    font-size: 3.5rem;
    color: #3b78a1;
}

.hero-subtitle {
    font-size: 1.6rem;
    font-weight: 500;
    color: #3b78a1;
    margin-bottom: 1rem;
}

.hero-introduction {
    font-size: 1.3rem;
    max-width: 520px;
    line-height: 1.8;
}

.hero-buttons {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.9rem 2.2rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 1.1rem;
}

.btn-primary {
    border: 1px solid #6faed9;
}

.btn-primary:hover {
    background-color: #6faed9;
    color: #ffffff;
}

.btn-secondary {
    border: 1px solid #6faed9;
}

.btn-secondary:hover {
    background-color: #6faed9;
    color: #ffffff;
}

.hero-image {
    flex-shrink: 0;
}

.profile-img {
    width: 280px;
    height: auto;
    object-fit: cover;

    border-radius: 20px;
    background-color: #ffffff;

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

/* ---Contact section--- */
.contact-section {
    margin-top: 4rem;
    padding: 2.5rem 1rem 3rem;

    text-align: center;
    background-color: rgba(255, 255, 255, 0.35);
    border-top: 1px solid #dbe7f1;
}

.contact-list {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-item {
    font-size: 1rem;
    color: #3b78a1;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.contact-item:hover {
    text-decoration: underline;
}

/* ---footer--- */
.footer {
    margin-top: 4rem;
    padding: 0.5rem;
    width: 100%;
    text-align: center;
    background-color: #ffffff;
    border-top: 1px solid #dbe7f1;
}

.footer p {
    margin: 0 auto;
}

/* --------------------About page------------------- */
.about-page {
    max-width: 900px;
    margin: 3rem auto 2.5rem;
}

.about-page h1 {
    font-size: 2.6rem;
    color: #3b78a1;
    margin-bottom: 1rem;
}

.about-page p {
    font-size: 1.1rem;
    color: #5f748a;
    line-height: 1.8;
    max-width:  700px;
}

.about-cards {
  max-width: 1100px;
  margin: 0 auto 4rem;

  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
}

.card {
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(111, 174, 217, 0.4);
    background-color: rgba(255, 255, 255, 0.4);
}

.about-title {
    font-size: 2.6rem;
    color: #3b78a1;
    margin-bottom: 3rem;
    text-align: center;
}

.education-list {
    list-style: none;
    margin-top: 1.5rem;
    padding-left: 1.8rem;
    border-left: 2px solid #6faed9;
}

.education-list li {
    position: relative;
    margin-bottom: 2rem;
}

.education-list li::before {
    content: "";
    position: absolute;
    left: -2.15rem;
    top: 0.4rem;
    width: 10px;
    height: 10px;
    background-color: #6faed9;
    border-radius: 50%;
}

.edu-time {
    font-size: 0.85rem;
    font-weight: 600;
    color: #3b78a1;
    display: block;
    margin-bottom: 0.3rem;
}

.education-list p{
    margin: 0;
    font-size: 1rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.skills-list li {
    padding: 0.5rem 1.2rem;
    border-radius: 999px;
    border: 1px solid #6faed9;
    font-size: 0.95rem;
    background-color: rgba(255, 255, 255, 0.4);
}

/* -----------------Projects page-------------------- */
.project-page {
    max-width: 1100px;
    margin: 3rem auto 4rem;
    padding: 0 1rem;
}

.page-title {
    font-size: 2.6rem;
    color: #3b78a1;
    margin-bottom: 3rem;
    text-align: center;
}

.projects-grid {
    max-width: 1100px;
    margin: 0 auto 4rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.project-card {
    background-color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(111, 174, 217, 0.4);
    padding: 2.5rem;
    border-radius: 20px;
}

.project-card h2 {
    font-size: 1.8rem;
    color: #3b78a1;
    margin-bottom: 1.5rem;
}

.project-description {
    font-size: 1.1rem;
    color: #5f748a;
    line-height: 1.7;
    max-width: 100%;
    margin-bottom: 1.2rem;
}

.project-image {
  margin-bottom: 1.5rem;
}

.project-image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid rgba(111, 174, 217, 0.4);
  background-color: #ffffff;
  margin-bottom: 1.2rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tag {
    font-size: 0.8rem;
    padding: 0.45rem 1.2rem;
    border: 1px solid #6faed9;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 999px;
}

.project-card:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
}

/* ------------------Theme Toggle---------------- */
body.dark-theme {
    background-color: #141b27;
    color: #c6cbce;
}

body.dark-theme .site-header,
body.dark-theme .footer {
    background-color: #0a1120;
    border-color: #2c3441;
}

body.dark-theme .nav-list a {
    color: #dfe4e8;
}

/* --- Make sure the text readable after switching to dark mode --- */
/* ---Headings--- */
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme p,
body.dark-theme li {
    color: #c6cbce;
}

/* ---Pages--- */
body.dark-theme .card,
body.dark-theme .project-card,
body.dark-theme .ai-response {
    background-color: rgba(15, 29, 44, 0.85);
    border-color: #45718f;
}

body.dark-theme .about-page p {
    color: #c6cbce;
}

body.dark-theme .edu-time {
    color: #9ec3dd;
}

body.dark-theme .education-list {
    border-left-color: #45718f;
}

body.dark-theme .education-list li::before {
    background-color: #45718f;
}

body.dark-theme .tag,
body.dark-theme .skills-list li,
body.dark-theme .project-tags .tag {
  background-color: rgba(34, 50, 66, 0.85);
  color: #c6cbce;
  border-color: #45718f;
}

body.dark-theme .hero-title,
body.dark-theme .hero-subtitle {
  color: #c6cbce;
}

body.dark-theme .hero-introduction {
  color: #c6cbce;
}

/* ---Buttons---*/

body.dark-theme .btn,
body.dark-theme .ai-btn {
  color: #dfe4e8;
  border-color: #45718f;
  background-color: rgba(34, 50, 66, 0.7);
}

body.dark-theme .btn:hover,
body.dark-theme .ai-btn:hover {
  background-color: #45718f;
  color: #ffffff;
}

body.dark-theme .contact-section {
  background-color: rgba(15, 29, 44, 0.85);
  border-top-color: #2c3441;
}

body.dark-theme .contact-title,
body.dark-theme .contact-item {
  color: #dfe4e8;
}


/* -------- AI Page -------- */

body.dark-theme .ai-intro {
  color: #b8c5d3;
}

body.dark-theme .ai-response p {
  color: #e6edf3;
}

body.dark-theme .placeholder {
  color: #9aa7b6;
}

/* -------- Typing cursor -------- */

body.dark-theme .typing-cursor::after {
  color: #e6edf3;
}

/* ---------------- AI Page ---------------- */

.ai-page {
    max-width: 900px;
    margin: 3rem auto 4rem;
    padding: 0 1rem;
}

.ai-page h1 {
    font-size: 2.6rem;
    color: #3b78a1;
    margin-bottom: 1rem;
    text-align: center;
}

.ai-intro {
    text-align: center;
    font-size: 1.1rem;
    color: #5f748a;
    margin-bottom: 2.5rem;
}

.ai-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
}

.ai-questions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-btn {
    padding: 0.9rem 1.2rem;
    border-radius: 12px;
    border: 1px solid #6faed9;
    background-color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    cursor: pointer;
    text-align: left;
}

.ai-btn:hover {
    background-color: #6faed9;
    color: #ffffff;
}

.ai-response {
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(111, 174, 217, 0.4);
    background-color: rgba(255, 255, 255, 0.45);
    min-height: 180px;
}

.ai-response p {
    font-size: 1.05rem;
    color: #1f2933;
    line-height: 1.7;
}

.placeholder {
    color: #7a8fa6;
    font-style: italic;
}

/* ----Typing cursor animation */
.typing-cursor::after {
    content: "|";
    margin-left: 4px;
    animation: blink 1s infinite;
}
