/* GENERAL */

/* Importing Google Fonts. */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600&display=swap');


* {
    margin: 0;
    padding: 0;
}

/* Theme variables */
:root {
    --bg: #ffffff;
    --text: #111111;
    --muted-text: #555555;
    --surface: #ffffff;
    --surface-2: #fafafa;
    --border: #a3a3a3;
    --link: #000000;
    --link-hover: #6b7280;
    --link-underline: #b5b5b5;
}

body.dark {
    --bg: #0f1115;
    --text: #e6e6e6;
    --muted-text: #b0b0b0;
    --surface: #141821;
    --surface-2: #1a2030;
    --border: #2e3448;
    --link: #e6e6e6;
    --link-hover: #cfcfcf;
    --link-underline: #6b7280;
}

body {
    font-family: "Poppins", sans-serif;
    background: var(--bg);
    color: var(--text);
}

html {
    scroll-behavior: smooth;
}

p {
    color: var(--muted-text);
}

/* TRANSITION */

a, .btn {
    transition: all 300ms ease;
}

/* DESKTOP NAv */

nav, .nav-links {
    display: flex;
}

nav {
    justify-content: space-around;
    align-items: center;
    height: 17vh;
}

.nav-links {
    gap: 2rem;
    list-style: none;
    font-size: 1.5rem;
}

.nav-links li { display: flex; align-items: center; }

a {
    color: var(--link);
    text-decoration: none;
    text-decoration-color: transparent;
}

a:hover {
    color: var(--link-hover);
    text-decoration: underline;
    text-underline-offset: 1rem;
    text-decoration-color: var(--link-underline);
}

.logo {
    font-size: 2rem;
}

.logo:hover {
    cursor: default;
}

/* HAMBURGER MENU */

#hamburger-nav {
    display: none;
}

.hamburger-menu{
    position: relative;
    display: inline-block;
}

.hamburger-icon{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 24px;
    width: 30px;
    cursor: pointer;
}

.hamburger-icon span {
    width: 100%;
    height: 2px;
    background-color: var(--text);
    transition: all 0.3 ease-in-out;
}

.menu-links {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--surface);
    width: fit-content;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

.menu-links a {
    display: block;
    padding: 10px;
    text-align: center;
    font-size: 1.5rem;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}

.menu-links li {
    list-style: none;
}

.menu-links.open {
    max-height: 300px;
}

.hamburger-icon.open span:first-child {
    transform: rotate(45deg) translate(10px, 5px);
}

.hamburger-icon.open span:nth-child(2) {
    opacity: 0;
}

.hamburger-icon.open span:last-child {
    transform: rotate(-45deg) translate(10px, -5px);
} 

.hamburger-icon span:first-child {
    opacity: 1;
}

.hamburger-icon span:first-child {
    transform: none;
}

/* SECTIONS */

section {
    padding-top: 4vh;
    height: 96vh;
    margin: 0 10rem;
    box-sizing: border-box;
    min-height: fit-content;
}

.section-container {
    display: flex;
}

/* PROFILE SECTION */

#profile {
    display: flex;
    justify-content: center;
    gap: 5rem;
    height: 80vh;
}

.section__pic-container {
    display: flex;
    height:400px;
    width: 400px;
    margin: auto 0;
}

.section__text {
    align-self: center;
    text-align: center;
}

.section__text p {
    font-weight: 600;
}

.section__text__p1 {
    text-align: center;
}

.section__text__p2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    max-width: 475px;
}

.title {
    font-size: 3rem;
    text-align: center;
}

#socials-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

/* ICONS */

.icon {
    cursor: pointer;
    height: 2rem;
}

/* BUTTONS */

.btn-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn {
    font-weight: 600;
    transition: all 300ms ease;
    padding: 1rem;
    border-radius: 2rem; 
}

.btn-colour-1, .btn-colour-2 {
    border: rgb(53, 53, 53) 0.1rem solid;
}

.btn-colour-1:hover, .btn-colour-2:hover {
    cursor: pointer;
}

.btn-colour-1, .btn-colour-2:hover {
    background: rgb(53, 53, 53);
    color: white;
}

.btn-colour-1:hover {
    background: rgb(0,0,0)
}

.btn-colour-2 {
    background: none;
}

.btn-colour-2:hover {
    background: rgb(255, 255, 255) 0.1rem solid;
}

.btn-container {
    gap: 1rem;
}

/* ABOUT SECTION */

#about {
    position: relative;
}

.about-containers {
    gap: 2rem;
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.about-details-container {
    justify-content: center;
    flex-direction: column;
}

.about-containers, .about-details-container {
    display: flex;
}

.about-pic {
    border-radius: 2rem;
}

.arrow {
    position: absolute;
    right: -5rem;
    bottom: 2.5rem;
}

.details-container {
    padding: 1.5rem;
    flex: 1;
    background: var(--surface);
    border-radius: 2rem;
    border: var(--border) 0.1rem solid;
    text-align: center;
}

.section-container {
    gap: 4rem;
    height: 80%;
}

.section__pic-container {
    height: 400px;
    width: 400px;
    margin: auto 0;
}

.text-container p {
    margin-top: 2rem;
    line-height: 2rem;
}

/* EXPERIENCE SECTION */

#experience {
    position: relative;
}

.experience-sub-title {
    color: var(--muted-text);
    font-weight: 600;
    font-size: 1.75rem;
    margin-bottom: 2rem;
}

.experience-details-container {
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.article-container {
    display: flex;
    text-align: initial;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 2.5rem;
    justify-content: space-around;
}

article {
    display: flex;
    width: 10rem;
    justify-content: space-around;
    gap: 0.5rem;
}

article .icon {
    cursor: default;
}
    
/* PROJECTS SECTION */

#projects {
    position: relative;
  }
  
  .colour-container {
    border-color: var(--border);
    background: var(--surface-2);
  }
  
  .project-img {
    border-radius: 2rem;
    width: 90%;
    height: 90%;
  }
  
  .project-title {
    margin: 1rem;
    color: var(--text);
  }
  
  .project-btn {
    color: var(--text);
    border-color: var(--border);
  }

  /* CONTACT */

#contact {
    display: flex;
    justify-content: center;
    flex-direction: column;
    height: 70vh;
  }
  
  .contact-info-upper-container {
    display: flex;
    justify-content: center;
    border-radius: 2rem;
    border: var(--border) 0.1rem solid;
    background: var(--surface-2);
    margin: 2rem auto;
    padding: 0.5rem;
  }
  
  .contact-info-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem;
  }
  
  .contact-info-container p {
    font-size: larger;
  }
  
  .contact-icon {
    cursor: default;
  }
  
  .email-icon {
    height: 2.5rem;
  }
  
  /* FOOTER SECTION */
  
  footer {
    height: 26vh;
    margin: 0 1rem;
  }
  
  footer p {
    text-align: center;
  }

/* Buttons: respect theme border color */
.btn-colour-1, .btn-colour-2 {
    border: var(--border) 0.1rem solid;
}

/* Sliding theme switch */
.theme-switch {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.theme-switch-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch-track {
    position: relative;
    width: 54px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    transition: background 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.switch-thumb {
    position: absolute;
    top: 50%;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    transform: translate(0, -50%);
    transition: transform 0.25s ease;
}

/* Move thumb when dark */
body.dark .switch-thumb {
    transform: translate(26px, -50%);
}

.switch-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    fill: var(--text);
    opacity: 0.6;
}

.switch-icon.icon-sun { left: 8px; }
.switch-icon.icon-moon { right: 8px; }

/* Icon emphasis by theme */
body:not(.dark) .switch-icon.icon-sun { opacity: 1; }
body.dark .switch-icon.icon-moon { opacity: 1; }

/* Mobile menu layout for switch */
.menu-links .theme-switch { display: block; margin: 10px auto; }

/* Dark-mode helpers for existing icons */
img.icon:not(.no-invert) { transition: filter 0.2s ease; }
body.dark img.icon:not(.no-invert) { filter: invert(1) brightness(1.15); }

/* Buttons in dark mode: ensure transparent variant has white text */
body.dark .btn-colour-2 { color: #ffffff; }
