/* ======= GLOBAL RESET ======= */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* ======= VARIABLES ======= */
:root {
  --bg: #0f0f1a;
  --surface: #3fa9f5;
  --primary: #3fa9f5;
  --text: #e0e0e0;
  --muted: #999;
  --radius: 12px;
  --shadow: 0 15px 30px rgba(63, 169, 245, .12);
  --max-width: 1200px;
}

/* ======= BASE ======= */
body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

#real-body {
  position: relative;
  z-index: 1;
}

#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  background-image: url("");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 50% 50%;
  z-index: 0;
}

.count-particles {
  background: #000022;
  position: fixed;
  top: 48px;
  left: 0;
  width: 80px;
  color: #13E8E9;
  font-size: .8em;
  text-align: left;
  text-indent: 4px;
  line-height: 14px;
  padding-bottom: 2px;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: bold;
}

.js-count-particles {
  font-size: 1.1em;
}

#stats,
.count-particles {
  -webkit-user-select: none;
  margin-top: 5px;
  margin-left: 5px;
}

#stats {
  border-radius: 3px 3px 0 0;
  overflow: hidden;
}

.count-particles {
  border-radius: 0 0 3px 3px;
}

.container {
  width: min(90%, var(--max-width));
  margin-inline: auto;
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--primary);
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

/*======== HEADER ======= */


header .container {
  width: 100%;
  max-width: none;
  /* disable the 1200 px cap */
  margin-inline: 0;
  /* cancel the automatic centring */
  padding: 1rem 5rem;
}

/* ======= NAVIGATION ======= */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(15, 15, 26, .8);
  backdrop-filter: blur(10px);
  z-index: 100;
}

.logo a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.logo span {
  color: #fff;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform .3s;
  transform-origin: right;
}

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ======= HERO ======= */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  text-align: center;
  /*background: radial-gradient(circle at top left, #1e1e2f 0%, var(--bg) 80%);*/
  padding-top: 80px;
}

.hero-content h2 {
  font-size: clamp(2rem, 6vw, 4rem);
  margin-bottom: 0.5rem;
}

.hero-content h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
  height: 2rem;
}

.btn {
  display: inline-block;
  padding: .75rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid var(--primary);
  font-weight: 600;
  transition: all .3s;
  cursor: pointer;
  text-decoration: none;
}

.btn.primary {
  color: var(--bg);
  background: var(--primary);
}

.btn.primary:hover {
  box-shadow: 0 0 12px var(--primary);
}

.btn.secondary {
  color: var(--primary);
  border-color: var(--primary);
}

.btn.secondary:hover {
  background: var(--primary);
  color: var(--bg);
}

/* ======= ABOUT ======= */
.about p {
  margin-top: 1rem;
  max-width: 700px;
}

/* ======= PROJECTS ======= */
.projects {
  margin-top: 4rem;
}

.projects-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 2rem;
}

.project-card {
  padding: 2rem;
  background: rgba(26, 26, 46, .6);
  border: 1px solid rgba(0, 255, 247, .2);
  border-radius: var(--radius);
  backdrop-filter: blur(4px);
  transition: transform .3s, box-shadow .3s;
}

.project-card:hover {
  transform: translateY(-6px);
}

.project-card h3 {
  margin-bottom: .5rem;
  color: var(--primary);
}

.project-meta {
  display: flex;
  gap: 1rem;
  font-size: .875rem;
  margin-top: 1rem;
}

.project-meta span {
  display: flex;
  align-items: center;
  gap: .25rem;
}

/* ======= CONTACT ======= */
.contact {
  margin-top: 4rem;
  text-align: center;
}

.contact .btn {
  margin: .5rem;
}

/* ======= FOOTER ======= */
footer {
  text-align: center;
  padding: 2rem 0;
  margin-top: 4rem;
  color: var(--muted);
  font-size: .875rem;
}

/* ======= RESPONSIVE ======= */
@media(max-width:768px) {
  .nav-links {
    gap: 1rem;
  }
}

/* --- phones ( ≤ 768px ) --- */
@media(max-width:768px){
  /* Make header container full‑width & remove excessive side‑padding */
  nav{flex-wrap:wrap;padding:.75rem 1rem;}
  .logo{flex:1 1 100%;text-align:left;margin-bottom:.5rem;}

  /* Collapse nav links into two‑column grid */
  .nav-links{flex:1 1 100%;justify-content:flex-start;gap:.75rem;flex-wrap:wrap;}
  .nav-links a{font-size:.9rem;padding:.25rem .4rem;}

  /* Hero text */
  .hero{padding-top:72px;}
  .hero-content h2{font-size:clamp(1.75rem,7.5vw,2.5rem);} 
  .hero-content h3{font-size:1.1rem;}
  .btn{padding:.6rem 1.2rem;}
}

/* --- small phones ( ≤ 480px ) --- */
@media(max-width:480px){
  .container{width:94%;}

  /* Nav links stack vertically */
  .nav-links{flex-direction:column;align-items:flex-start;gap:.4rem;}
  .nav-links a{font-size:.8rem;}

  /* Projects grid single column */
  .projects-grid{grid-template-columns:1fr;}
  .project-card{padding:1.5rem;}

  /* Contact buttons full‑width */
  .contact .btn{display:block;width:100%;margin:.5rem auto;}
}


/* --- phones ( ≤ 768px ) --- */
@media(max-width:768px){
  /* Navigation */
  nav{padding:.75rem 1rem;}
  .nav-links a{font-size:.9rem;}
  .logo a{font-size:1.25rem;}

  /* Hero */
  .hero{padding-top:64px;}
  .hero-content h2{font-size:clamp(1.75rem,8vw,3rem);} 
  .hero-content h3{font-size:1.2rem;}
  .btn{padding:.6rem 1.2rem;}
}

/* --- small phones ( ≤ 480px ) --- */
@media(max-width:480px){
  .container{width:90%;}

  /* Nav links stack for very small screens */
  .nav-links{gap:.5rem;flex-wrap:wrap;justify-content:flex-end;}
  .nav-links a{font-size:.8rem;}

  /* Projects grid becomes single column */
  .projects-grid{grid-template-columns:1fr;}

  .project-card{padding:1.5rem;}

  /* Contact buttons stack */
  .contact .btn{display:block;width:100%;margin:.5rem auto;}
}
