/*General*/
/* 4 upload from google font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

/* 5 choose marge w kol */
*{ 
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body { /* 6 */
    font-family: 'Poppins', sans-serif;
}

/* ===== DARK THEME SYSTEM ===== */
:root {
  --bg-main: #09090b;
  --bg-section: #0f0f12;
  --bg-card: #18181b;
  --border-color: #27272a;
  --accent: #06b6d4;
  --accent-purple: #a855f7;
  --text-main: #f4f4f5;
  --text-muted: #a1a1aa;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
}

p {
  color: var(--text-muted);
}
/* 7 when we add our links the scroll is smooth and doesn t go instantly to the chosen section  */

html{ 
    scroll-behavior: smooth;
}


/* 9 Transition*/
/* for all the links "a", and a new class "btn" */
a, .btn{
    transition: all 300ms ease;
}

/* 10 DEKTOP NAV*/
nav, .nav-links{
    display: flex; /* block yabdew ta7t b3adhhom kima par defaut, w flex yabdew ba7dhi b3adhhom  */
}

/* 11 partie el fou9ania, how things are arranged*/
nav{ 
    justify-content: space-around ; /* 12 space between the logo and the links */
    align-items: center;
    height: 17vh; /* 9adeh teb3ed mel fou9 */
}

.nav-links{
    list-style: none; /* 13 n7iyou les points */
    gap: 2rem; /* 14 espace entre les liens */
    font-size: 1.5rem; /* 15 taille des liens */
}

/* 16 style the link element */
a {
    text-decoration: none;
    color: var(--text-main);
}

a:hover{ /* 17 when we hover the links */
    color: var(--accent);
    text-decoration-color: var(--accent);
    text-underline-offset: 0.5rem;
}

/* 18 na3mlou logo */
.logo {
    font-size: 2rem;
}

/* 19 man7ebouch el curseur yetbadal ki n3adiweh 3al logo */

.logo:hover{
    cursor: default;

}

/* HAMBURGER MENU */
/* default hidden on desktop */
#hamburger-nav { 
    display: none; 
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--bg-section); /* dark background */
    position: relative;
    z-index: 100;
}

.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(--accent); /* cyan accent for visibility */
    transition: all 0.3s ease-in-out;
}

/* menu links hidden by default */
.menu-links {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--bg-section);
    width: 200px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    border-radius: 0.5rem;
}

/* links style */
.menu-links a {
    display: block;
    padding: 10px 15px;
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-main);
    text-decoration: none;
}

.menu-links a:hover {
    color: var(--accent);
}

/* open menu state */
.menu-links.open {
    max-height: 500px; /* enough for all links */
}

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

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

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


/* Section*/ 
section {
    padding-top: 4vh; /* 24 espace entre les sections */
    height: 96vh; /* 25 9adeh teb3ed mel ta7t */
    margin:  0 10rem; /* 26 espace entre les sections w les bords */    
    box-sizing:  border-box;
    min-height: fit-content; /* 27 9adeh yebda kbir el section ken mawjoud fih contenu kbir */
    background-color: var(--bg-section);
    border-radius: 1.5rem;
}

.section-container{
    display: flex;
    gap: 4rem; /* 40 espace entre les deux parties de la section */
    height: 80%; /* 41 9adeh teb3ed mel ta7t */
}

/* Profile SECTION */
#profile {
    display: flex;
    justify-content: center;
    gap: 5rem; /* 28 espace entre les deux parties de la section profile */
    height: 80vh;
    position: relative;
    overflow: hidden;
}

#profile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(6, 182, 212, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.section__pic-container{
    display: flex;
    height: 400px;
    width: 400px; 
    margin: auto 0; /* 42 espace entre le haut et le bas de la section */  
}

.section__text{
    align-self: center; /* 30 espace entre le haut et le bas de la section */
    text-align: center;
}

.section__text__p1{
    text-align: center;
}

.section__text__p2{
    font-size: 1.75rem;
    margin-bottom: 1rem;    
}

.title{
    font-size: 3rem;
    text-align: center;
    background: linear-gradient(90deg, var(--accent), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: white;
}

#socials-container{
    display: flex;
    justify-content: center;
    margin-top: 1rem; /* 32 espace entre les icones et le texte */
    gap: 1rem; /* 31 espace entre les icones */
}

/* ICONS */
.icon{
    cursor: pointer;
    height: 3rem;
}

/*BUTTONS*/
.btn-container{
    display: flex;
    justify-content: center;
    gap: 1rem; /* 34 espace entre les boutons */
}

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

/* Buttons Dark Theme */
.btn-color-1 {
  background: var(--accent);
  color: black;
  border: none;
}

.btn-color-1:hover {
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
  transform: translateY(-2px);
}

.btn-color-2 {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-color-2:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ABOUT SECTION */
#about{
    position: relative;
}

.about-container{
    gap: 2rem; /* 35 espace entre les deux parties de la section about */
    margin: 2rem 0; /* 36+37 espace top/bottom */
}

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

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

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

.arrow {
    position: absolute;
    right: -5rem; /* 38 espace entre la section about w la fleche */
    bottom: 2.5rem; /* 39 espace entre la section about w la fleche */
}


/* Make <a> behave exactly like your button */
a.btn {
    display: inline-flex;           /* Like button */
    align-items: center;            /* Vertical centering */
    justify-content: center;        /* Horizontal centering */
    font-family: 'Poppins', sans-serif; /* Use same font as your body/buttons */
    font-weight: 600;               /* Match button font weight */
    font-size: 1rem;                /* Match button font size */
    line-height: 1;                 /* Prevent extra spacing */
    text-decoration: none;          /* Remove underline */
    padding: 1rem;                  /* Same padding as buttons */
    width: 8rem;                    /* Same width */
    border-radius: 2rem;            /* Same rounded corners */
    cursor: pointer;                /* Pointer like a button */
    border: 1px solid var(--border-color); /* Match btn-color-2 */
    color: var(--text-main);        /* Text color */
    background: transparent;        /* Match btn-color-2 */
    transition: all 300ms ease;     /* Hover smoothness */
    box-sizing: border-box;         /* Ensure padding fits width */
}



/* Hover effect exactly like your button */
a.btn.btn-color-2:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.25);
}


/* DETAILS CONTAINERS (CARDS) */
.details-container{
    padding: 1.5rem;
    flex: 1;
    background: var(--bg-card);
    border-radius: 2rem;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}

.details-container:hover {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.25);
  transform: translateY(-5px);
}

/* ========================= */
/* EDUCATION SECTION STYLES  */
/* ========================= */

/* container for left and right columns */
.edu-container {
  display: flex; /* row layout */
  gap: 2rem;
}

/* Left column: Bachelor (takes more space) */
.edu-left {
  flex: 2; /* bigger */
}

/* Right column: stacked vertically */
.edu-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Details container style (cards) */
#education .details-container {
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: 2rem;
  border: 1px solid var(--border-color);
  text-align: center;
  transition: all 0.3s ease;
}
#education {
  position: relative;
  padding-bottom: 6rem; /* IMPORTANT: gives space for arrow */
}
#education .details-container:hover {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.25);
  transform: translateY(-5px);
}

#education .skills-sub-title {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

/* Year for each education entry */
#education .edu-year {
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* Arrow icon at bottom */
#education .arrow {
  position: absolute;
  right: -5rem;
  bottom: 2.5rem;
}

#education .degree,
#education .thesis {
  margin-bottom: 1rem;
}

#education .thesis-details {
  text-align: left;
  padding-left: 1.2rem;
}







/* SKILLS SECTION */
#skills {
  position: relative;
}

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

.skills-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;
}

/* EXPERIENCE SECTION */
#experience {
  position: relative;
}

.experience-details-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem; /* spacing between cards */
  margin-top: 2rem;
}

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

#experience h3 {
  color: var(--accent);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

#experience p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

#experience ul {
  list-style: disc inside;
  text-align: left;
  color: var(--text-main);
  margin: 0.5rem 0;
  padding-left: 1rem;
}

#experience ul li {
  margin-bottom: 0.5rem;
}

/* Arrow icon at bottom */
#experience .arrow {
  position: absolute;
  right: -5rem;
  bottom: 2.5rem;
}


/* modif */

/* PROJECTS SECTION */
#projects {
  position: relative;
}

#projects .about-containers {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap; 
}

/* This is the key change for the 2 by 2 layout */
#projects .about-containers .details-container {
  flex: 1 1 45%; /* Takes up roughly half the width */
  min-width: 350px; /* Prevents cards from getting too skinny */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.color-container {
  border-color: var(--border-color);
  background: var(--bg-card);
  padding: 1.5rem; /* Adds nice spacing inside the cards */
  border-radius: 2rem;
  border: 1px solid var(--border-color);
}

.project-img {
  border-radius: 2rem;
  width: 100%; /* Changed to 100% to fill the container better */
  height: auto;
}

.project-title {
    margin-bottom: 0.5rem; /* reduce space below h2 */
  color: var(--text-main);
}
.project-date-inline {
  display: block;          /* forces it to new line */
  font-size: 1rem;
  font-weight: normal;
  color: var(--text-secondary);
  margin-top: 0.2rem;       /* small gap from title */
}


.project-btn {
  color: var(--text-main);
  border-color: var(--border-color);
}


/* 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: 1px solid var(--border-color);
  background: var(--bg-card);
  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;
}


.hidden {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s ease;
}

.show {
  opacity: 1;
  transform: translateY(0);
}
