/* ==============================
   1. Global & Base Styles (Mobile-First)
   ============================== */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Kanit', Cambria;
  }
  a {
    text-decoration: none;
    color: inherit;
  }
  ul {
    list-style: none;
  }
  
  /* Root Variables (Dark Mode by default) */
  :root {
    --main-color: purple;
    --secondary-color: red;
    --text-color: white;
    --border-color: #303030;
    --gradient-start: #4d4d4d;
    --gradient-end: #2b2b2b;
    --bg-gradient-start: #2c2c2c;
    --bg-gradient-end: #424242;
    --bg-color: rgb(137, 35, 107);
  }
  
  /* Light Theme Overrides */
  :root.light-theme {
    --main-color: #9432ad;
    --text-color: #1f1f1f;
    --bg-color: #f2f2f2;
    --gradient-start: #dcdcdc;
    --gradient-end: #bbbbbb;
    --bg-gradient-start: #e8e8e8;
    --bg-gradient-end: #fafafa;
  }
  
  /* Body & Background */
  body {
    color: var(--text-color);
    background-image: linear-gradient(120deg, black, var(--bg-gradient-end)) !important;
    background-attachment: fixed;
  }
  .bg-gradient {
    background-image: linear-gradient(120deg, var(--gradient-start), var(--gradient-end)) !important;
    background-attachment: fixed;
  }
  
  /* ------------------------------
     Mobile-First Layout
     ------------------------------ */
  
  /* Main Container: single column */
  .main-container {
    max-width: 1320px;
    width: 90%;
    margin: 20px auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: flex-start;
  }
  
  /* Menu-Profile: stack vertically */
  .menu-profile {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 20px;
  }
  
  /* Header & Nav */
  header {
    position: relative;
    z-index: 2;
  }
  nav {
    position: relative;
  }
  
  /* Dark-Light Button (unchanged) */
  .dark-light-btn {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    background-color: rgb(28, 28, 28);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  /* Hamburger Button: visible on mobile */
  .hamburger-btn {
    display: block;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.6rem;
    cursor: pointer;
    margin: 0 0 10px 20px;
    position: relative;
    z-index: 9999;
  }
  
  /* Nav Links (Mobile): hidden by default; dropdown below header */
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;  /* positioned below header buttons */
    left: 0;
    right: 0;
    z-index: 999;
    background: linear-gradient(120deg, var(--gradient-start), var(--gradient-end));
    padding: 10px;
    flex-direction: column;
    gap: 10px;
    /* Optional: a subtle shadow */
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  }
  .nav-links.open {
    display: flex;
  }
  
  /* (If desired, you could let the hamburger remain visible; here we choose to keep it.)
     Instead, you might want to reposition it so it isn’t overlapped by .nav-links. */
  
  
  /* Header Navigation List & Items */
  header ul {
    /* Mobile: we use the dropdown inside .nav-links, so these styles only apply when visible */
    background: linear-gradient(120deg, var(--gradient-start), var(--gradient-end));
    padding: 10px 5px;
    border-radius: 30px;
    gap: 10px;
    justify-content: center;
    display: flex;
    flex-direction: column;
  }
  header ul li a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    background-color: var(--bg-color);
    position: relative;
    transition: all 0.2s ease;
  }
  /* Tooltip styles for nav links remain unchanged */
  header ul li a::after {
    content: attr(data-label);
    position: absolute;
    top: 50%;
    left: 120%;
    transform: translateY(-50%);
    white-space: nowrap;
    background-color: var(--main-color);
    color: var(--text-color);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  header ul li a::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 110%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 5px 5px 0;
    border-color: transparent var(--main-color) transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  header nav ul li a:hover::after,
  header nav ul li a:hover::before {
    opacity: 1;
    visibility: visible;
  }
  
  /* Profile Section */
  .profile-container {
    height: auto;
    position: relative;
  }
  .user-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 30px 0 30px 30px;
    overflow: hidden;
  }
  .user-profile-container {
    padding: 40px;
    width: 100%;
  }
  .user-profile-img {
    width: 100%;
    height: 280px;
    background-color: red;
    overflow: hidden;
    border-radius: 30px 0 30px 30px;
  }
  .user-profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  .user-profile-text {
    margin-top: 40px;
    text-align: center;
  }
  .user-profile-text span {
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 0.9rem;
  }
  .user-profile-text h1 {
    color: var(--text-color);
    font-size: 2rem;
    font-weight: 600;
    margin: 5px 0;
  }
  .profile-social-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
  }
  .profile-social-container a {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    transition: all 0.3s ease;
  }
  .profile-social-container a:hover,
  .user-profile-btns a:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
  }
  .user-profile-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 70px;
    border-top: 1px solid var(--text-color);
    width: 100%;
  }
  .user-profile-btns a {
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    font-weight: 500;
    transition: all 0.3s ease;
  }
  .user-profile-btns a:first-child {
    border-right: 1px solid black;
  }
  
  /* Section Containers */
  .section-container {
    background: linear-gradient(90deg, rgb(65,65,65), rgb(122,122,122)) !important;
    padding: 45px 20px;
    display: flex;
    flex-direction: column;
  }
  .all-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    overflow: hidden;
  }
  
  /* About Section */
  #about-us {
    border-radius: 0 30px 0 0;
    padding: 85px 20px;
  }
  #about-us h3 {
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
  }
  #about-us h3 span {
    color: plum;
  }
  #about-us #role {
    opacity: 1;
    white-space: nowrap;
    transition: opacity 0.5s ease-out;
    border-right: 2px solid magenta;
    display: inline-block;
    padding-right: 5px;
  }
  #about-us h1 {
    color: gold;
    font-size: 1.85rem;
    margin: 10px 0;
    font-weight: 600;
    max-width: 700px;
  }
  #about-us h1 span {
    background-color: var(--bg-color);
    color: white;
    padding: 0 15px;
    border-radius: 30px;
  }
  #about-us p {
    color: var(--text-color);
    font-size: 0.9rem;
    margin-top: 20px;
    max-width: 750px;
  }
  
  /* Projects Section */
  .project-container-about {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 30px;
  }
  .project-container-box {
    display: flex;
    align-items: center;
    gap: 20px;
  }
  .project-container-box span {
    color: var(--text-color);
    font-size: 3.4rem;
    font-weight: 400;
  }
  .project-container-box strong {
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 400;
    max-width: 10px;
  }
  .section-heading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  .section-heading span {
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 5px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  .section-heading h3 {
    color: var(--text-color);
    font-size: 2rem;
    font-weight: 500;
    margin: 6px;
  }
  
  /* Skill Boxes */
  .skill-box-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 40px;
    width: 100%;
  }
  .skill-box {
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 10px;
  }
  .skill-box content {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 10px;
    align-items: center;
  }
  .skill-box-content i {
    color: gold;
    font-size: 2rem;
  }
  .skill-box-content span {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 500;
    margin-left: 10px;
  }
  
  /* Project List */
  .project-list {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 50px 0 0 0;
  }
  .project-list li {
    color: var(--text-color);
    background-color: gray;
    border: 1px solid var(--border-color);
    padding: 5px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    user-select: none;
  }
  .project-list li.active {
    background-color: purple;
    color: var(--text-color);
  }
  
  /* Project Container & Boxes */
  .project-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 40px;
  }
  .project-box {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    border: 2px solid purple;
  }
  .project-box-img {
    width: 100%;
    height: 400px;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
  }
  .project-box-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
  }
  .project-box:hover .project-box-img img {
    transform: scale(1.05);
  }
  .project-box-text-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    background-color: var(--bg-color);
    color: gold;
    font-size: 1.5rem;
    text-align: center;
  }
  
  /* Education & Work Sections (Mobile: stacked) */
  .edu-work-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 50px;
  }
  .edu-container,
  .work-container {
    display: flex;
    flex-direction: column;
  }
  .edu-work-label {
    color: var(--text-color);
    background-color: var(--bg-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    margin-bottom: 15px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }
  .edu-work-box-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 10px;
  }
  .edu-work-box {
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
    background-color: rgba(128, 128, 128, 0.2);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  .edu-work-year {
    font-size: 0.9rem;
    color: gold;
    font-weight: 500;
  }
  .edu-work-location {
    font-size: 0.85rem;
    font-style: italic;
    color: #eee;
  }

  /* nav.menu-open .hamburger-btn {
    display: none;
  } */
  
  /* ==============================
     2. Media Query: Tablet & Desktop
     ============================== */
  @media (min-width: 769px) {
    /* Main container becomes two columns */
    .main-container {
      grid-template-columns: 425px 1fr;
      margin: 50px auto;
    }
    
    /* Menu-profile: two columns */
    .menu-profile {
      grid-template-columns: 65px 1fr;
      margin-bottom: 0;
    }
    
    /* Nav: Hide hamburger; show nav-links inline */
    .hamburger-btn {
      display: none;
    }
    .nav-links {
      display: grid;
      position: static;
      background: none;
      padding: 0;
      gap: 10px;
      flex-direction: row;
      align-items: center;
    }
    
    /* Education & Work Sections: two columns side-by-side */
    .edu-work-container {
      grid-template-columns: 1fr 1fr;
    }
  }


  
  