:root {
     --text-color: black;
     --link-color: #4a76ee;
     --background-color: #eeeff1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins' , sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

/* DARK MODE */
body.dark-mode {
  --text-color: #ffffff;
  --link-color: #8aa4ff;
  --background-color: #121212;

  background-color: var(--background-color);
  color: var(--text-color);
}

/* Navbar Dark */
body.dark-mode nav {
    background-color: #1e1e1e;
}

/* Links */
body.dark-mode a {
    color: #f1f1f1;
}

/* Sections */
body.dark-mode section {
    background-color: #181818;
}

/* Cards / skill cells */
body.dark-mode .cell,
body.dark-mode .group,
body.dark-mode form {
    background-color: #222;
    color: #f1f1f1;
}

.dark-toggle {
    margin-left: 15px;
    padding: 6px 10px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 50%;
    border: none;
    background: #333;
    color: #fff;
}

body.dark-mode .dark-toggle {
    background: #f1f1f1;
    color: #000;
}


a {
    color: var(--link-color);
    text-decoration: none;
}

/* Nav bar */

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    height: 80px;
    background-color: var(--background-color);
    transition: background-color 0.3s;
}

nav .left a {
    color: var(--text-color);
    font-size: 22px;
    font-weight: 600;

}

nav .right a {
    color: var(--text-color);
    margin: 0 10px;
    transition: color 0.3s;
}

nav .right a:last-child {
    color: var(--background-color);
    background-color: var(--text-color);
    padding: 5px 15px;
    border-radius: 5px;
}

/* Navbar links hover */
nav .right a:hover i,
nav .right a:hover span {
    color: #7a7a7a; /* change to link color on hover */
    transition: color 0.3s;
}


/* Section 1: hero */
.hero-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    margin: 50px 0;
    margin-bottom: 100px;
    gap: 40px;
}

.hero-section .text {
    flex: 5;
}

/* Animate the h2 */
.hero-section .text h2 {
    font-size: 45px;
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInUp 1s ease forwards;
}

/* Keyframes for heading animation */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-section .text p {
    margin-top: 15px;
    line-height: 1.6;
    font-size: 16px;
}

.hero-section .text .links {
    margin-top: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-section .text .links a {
    display: inline-block;
    padding: 5px 10px;
    border: 2px solid black;
    border-radius: 5px;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: transform 0.2s, background-color 0.2s;
    color: var(--text-color);
}

.hero-section .text .links a:hover {
    transform: translateY(-3px);
    background-color: #2c2c2c;
    color: #fff;
}

.hero-section .headshot {
    flex: 2;
    display: flex;
    justify-content: flex-end;
}

.hero-section .headshot img {
    width: 350px;
    border-radius: 50%;
    transition: transform 0.3s;
}

.hero-section .headshot img:hover {
    transform: scale(1.05);
}

/* ===============================
   RESPONSIVE DESIGN
   =============================== */

/* ---------- Tablets (≤ 992px) ---------- */
@media (max-width: 992px) {

  nav {
    padding: 12px 20px;
  }

  nav .right a span {
    display: none; /* hide text, keep icons */
  }

  .hero-section {
    padding: 40px 20px;
    gap: 30px;
  }

  .hero-section .text h2 {
    font-size: 1.8rem;
  }

  .hero-section .text p {
    font-size: 0.95rem;
  }

  .hero-section .headshot img {
    width: 240px;
    height: auto;
  }
}

/* ---------- Mobile (≤ 600px) ---------- */
@media (max-width: 600px) {

  /* Navbar */
  nav {
    
    align-items: center;
    gap: 10px;
  }

  nav .left a {
    font-size: 1.2rem;
  }

  nav .right {
    display: flex;
    gap: 12px;
  }

  nav .right a {
    font-size: 1.1rem;
  }

  /* Hero section */
  .hero-section {
    flex-direction: column-reverse;
    text-align: center;
    padding: 30px 15px;
  }

  .hero-section .text {
    max-width: 100%;
  }

  .hero-section .text h2 {
    font-size: 1.6rem;
  }

  .hero-section .text p {
    font-size: 0.9rem;
  }

  .hero-section .links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
  }

  .hero-section .links a span {
    display: none; /* icons only */
  }

  .hero-section .headshot img {
    width: 200px;
    margin-bottom: 20px;
  }
}


/* Skills Section */
.skills-section {
    padding: 60px 50px;
    margin-bottom: 100px;
    background-color: #f0f4ff; /* light section background */
    border-radius: 12px;
    transition: background-color 0.3s;
}

body.dark-mode .skills-section {
    background-color: #1a1a2e; /* dark mode section background */
}

.skills-section h2 {
    text-align: center;
    font-size: 35px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.skills-section .text {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
}

.skills-section .cells {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns per row */
    gap: 20px;
    justify-items: center;
    align-items: center;
}

.skills-section .cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 160px;
    padding: 20px;
    border-radius: 12px;
    background-color: #ffffff; /* card background */
    color: var(--text-color);
    text-align: center;
    font-weight: 500;
    transition: transform 0.2s, background-color 0.3s;
}

body.dark-mode .skills-section .cell {
    background-color: #222; /* dark mode card */
}

.skills-section .cell i {
    font-size: 30px;
    color: inherit;
}

.skills-section .cell span {
    font-size: 16px;
    font-weight: 600;
}

.skills-section .cell:hover {
    transform: translateY(-5px);
    background-color: #e0e8ff; /* hover for light mode */
}

body.dark-mode .skills-section .cell:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* RESPONSIVE */
@media (max-width: 950px) {
    .skills-section .cells {
        grid-template-columns: repeat(3, 1fr); /* 2 columns on tablet */
    }
}

@media (max-width: 600px) {
    .skills-section .cells {
        grid-template-columns: repeat(2, 1fr); /* 1 column on mobile */
    }
}

.experience-section h2 {
    text-align: center;
    font-size: 35px;
    margin-bottom: 25px;
}

.experience-row {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
  justify-content: center;
}

/* Card container */
.card {
  width: 280px;
  height: 220px;
  perspective: 500px;
}

/* Inner content */
.content {
  position: relative;
  width: 100%;
  height: 100%;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

/* Flip on hover (EXACT like your example) */
.card:hover .content {
  transform: rotateY(180deg);
}

/* Front & back */
.front,
.back {
  position: absolute;
  width: 100%;
  height: 100%;
  background: white;
  color: #010507;
  border-radius: 8px;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

/* Front */
.front {
  font-size: 1.6rem;
  font-weight: bold;
}

/* Back */
.back {
  background: #e2e6fb;
  color: #000;
  transform: rotateY(180deg);
}

.back ul {
  list-style: disc inside;
  font-size: 0.9rem;
  text-align: left;
}

/* ===============================
   RESPONSIVE DESIGN
   =============================== */

/* Tablets */
@media (max-width: 992px) {
  .experience-row {
    gap: 20px;
  }

  .card {
    width: 240px;
    height: 200px;
  }

  .front {
    font-size: 1.3rem;
  }

  .back ul {
    font-size: 0.85rem;
  }
}

/* Mobile devices */
@media (max-width: 600px) {
  .experience-row {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .card {
    width: 90%;       /* full width but with margin */
    max-width: 320px; /* prevents too large cards */
    height: 200px;
  }

  .front {
    font-size: 1.4rem;
  }

  .back ul {
    font-size: 0.85rem;
  }
}



/* CV DOWNLOAD SECTION */
.cv-section {
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 100px;
}

.cv-section h2 {
    font-size: 35px;
    margin-bottom: 15px;
}

.cv-section p {
    margin-bottom: 25px;
    font-size: 16px;
}

.cv-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 600;
    background-color: var(--link-color);
    color: #fff;
    border-radius: 6px;
    transition: transform 0.2s, filter 0.2s;
}

.cv-btn:hover {
    transform: translateY(-3px);
    filter: brightness(0.9);
}

/* SECTION 4: Contact */
.contact-section {
    padding: 60px 50px;
    background-color: #f4f4f4; /* light background */
    color: var(--text-color);
}

body.dark-mode .contact-section {
    background-color: #181818;
}

.contact-section h2 {
    font-size: 35px;
    text-align: center;
    margin-bottom: 40px;
}

/* Contact group: text + social links + form */
.contact-section .group {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 50px;
    flex-wrap: wrap;
}

/* LEFT SIDE: text + social links + CV button */
.contact-section .group .left-side {
    flex: 1;
    min-width: 300px;
}

/* Text inside left side */
.contact-section .left-side .text {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Social links */
.contact-section .social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-section .social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    border: 2px solid var(--text-color);
    border-radius: 50%;
    color: var(--text-color);
    font-size: 18px;
    transition: all 0.3s ease;
}

.contact-section .social-links a:hover {
    background-color: #97b6ff; /* subtle grey hover */
    color: #fff;
    border-color: #acc2f2;
    transform: translateY(-3px);
}

/* CV BOX */
.contact-section .cv-box {
    
    background-color: #e2e6fb; /* light grey box */
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-top: 60px;
    margin-bottom: 60px;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: none; /* optional border for contrast */
    transition: background-color 0.3s, transform 0.2s;
}

.contact-section .cv-box p {
    margin-bottom: 15px;
    font-size: 22px;
    color: var(--text-color);
}

/* Download CV Button inside box */
.contact-section .cv-box .download-cv {
    display: inline-block;
    padding: 10px 22px;
    font-size: 20px;
    font-weight: 500;
    color: #000000;
    background-color: #80bcde; /* green button */
    border-radius: 10px;
    text-decoration: none;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.contact-section .cv-box .download-cv:hover {
    background-color: #4098cb; /* darker green hover */
    transform: translateY(-3px);
}

/* Dark Mode for CV Box */
body.dark-mode .contact-section .cv-box {
    background-color: #8fc5e9;
    border-color: #f1f1f1;
}

body.dark-mode .contact-section .cv-box p {
    color: #f1f1f1;
}


/* RIGHT SIDE: Form */
.contact-section .group .right-side {
    flex: 1;
    min-width: 300px;
}

.contact-section form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-section form label {
    font-weight: 500;
}

/* Inputs & Textarea */
.contact-section form input,
.contact-section form textarea {
    font-family: 'Poppins', sans-serif;
    border: 2px solid var(--text-color);
    border-radius: 10px;
    padding: 12px;
    outline: none;
    background-color: transparent;
    transition: border-color 0.3s ease;
}

.contact-section form input:focus,
.contact-section form textarea:focus {
    border-color: var(--link-color);
}

/* Submit button */
.contact-section form button {
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    color: #fff;
    background-color: #80bcde;
    border: none;
    height: 50px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.contact-section form button:hover {
    background-color: #80bcde; 
    transform: translateY(-3px);
}

/* Dark Mode adjustments */
body.dark-mode .contact-section form input,
body.dark-mode .contact-section form textarea {
    border-color: #f1f1f1;
    color: #f1f1f1;
}

body.dark-mode .contact-section form button {
    background-color: #000000;
}

body.dark-mode .contact-section .social-links a {
    border-color: #f1f1f1;
    color: #f1f1f1;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .contact-section .group {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .contact-section {
        padding: 40px 20px;
    }

    .contact-section .social-links {
        justify-content: flex-start;
    }
}
