* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Fira Sans', sans-serif; 
  line-height: 1.6;
  background: #121212;
  color: #f1f1f1;
  transition: background 0.4s, color 0.4s;
}

header {
  background: #000;
  color: #fff;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.4s, color 0.4s;
}

header h1 {
  font-size: 1.6rem;
  font-weight: 600;
  cursor: pointer;
}

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

nav a {
  text-decoration: none;
  
  color: #bb86fc;
  font-weight: 400;
  transition: color 0.3s;
}

nav a:hover {
  color: #9a67d1;
}

section {
  padding: 3rem 2rem;
  max-width: 1000px;
  margin: auto;
}

section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  border-left: 5px solid #bb86fc;
  padding-left: 10px;
  color: #fff;
  transition: color 0.4s, border-color 0.4s;
}

section p {
  margin-bottom: 1rem;
  color: #bb86fc;
  transition: color 0.4s;
}

section ul {
  list-style: none;
  margin-top: 1rem;
}

section ul li {
  background: #1e1e1e;
  padding: 1rem;
  margin-bottom: 10px;
  border-radius: 8px;
  box-shadow: 0px 2px 5px rgba(255,255,255,0.1);
  transition: transform 0.3s, background 0.4s, color 0.4s;
}

section ul li:hover {
  transform: scale(1.02);
}

section:last-of-type ul li {
  display: inline-block;
  margin-right: 1rem;
}

section:last-of-type a {
  color: #bb86fc;
  font-weight: 600;
  text-decoration: none;
}

section:last-of-type a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  nav ul {
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
  }
}

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

.project-card {
  background: #1e1e1e;
  border-radius: 10px;
  box-shadow: 0px 3px 6px rgba(255,255,255,0.1);
  padding: 1rem;
  transition: transform 0.3s, background 0.4s, color 0.4s;
  text-align: center;
  color: #f1f1f1;
}

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

.project-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.project-card h3 {
  margin-bottom: 0.5rem;
}

.project-card a {
  display: inline-block;
  margin: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  background: #bb86fc;
  color: #000;
  text-decoration: none;
  transition: background 0.3s;
}

.project-card a:hover {
  background: #9a67d1;
  color: #fff;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  text-align: center;
}

.skill {
  background: #1e1e1e;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0px 3px 6px rgba(255,255,255,0.1);
  transition: transform 0.3s, box-shadow 0.3s, background 0.4s, color 0.4s;
}

.skill:hover {
  transform: translateY(-5px);
  box-shadow: 0px 5px 10px rgba(255,255,255,0.2);
}

.skill img {
  width: 60px;
  height: 60px;
  margin-bottom: 0.8rem;
}

.skill p {
  font-weight: 500;
  color: #bb86fc;
}


body.light-mode {
  background: #f9f9f9;
  color: #333;
}

body.light-mode header {
  background: #1a1a1a;
  color: #fff;
}

body.light-mode section h2 {
  color: #222;
  border-left: 5px solid #00adb5;
}

body.light-mode .project-card,
body.light-mode .skill {
  background: #fff;
  color: #333;
  box-shadow: 0px 2px 6px rgba(0,0,0,0.1);
}

body.light-mode p {
  color: #444;
}

body.light-mode nav a {
  color: #fff;
}

body.light-mode .btn-scroll {
  background: #000;
  color: #fff;
}

body.light-mode .btn-scroll:hover {
  background: #444;
  color: #fff;
}

#lain-gif {
  position: fixed;
  bottom: 20px;
  right: 40px;
  width: 300px;
  height: auto;
  display: none; 
  z-index: 9999;
  pointer-events: none;
}

footer {
  background: #000; 
  color: #fff;
  padding: 1.5rem 2rem;
  text-align: center;
  position: relative;
  cursor: pointer; 
  font-weight: 500;
  transition: background 0.3s, color 0.3s;
}

footer:hover {
  background: #111; 
  color: #00adb5;  
}

footer a {
  color: #00adb5;
  text-decoration: none;
  margin-left: 0.5rem;
}

footer a:hover {
  text-decoration: underline;
}

.intro-section {
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  background: url('img/lain.gif') no-repeat center center;
  background-size: cover;
  text-align: center;
  padding: 0 !important;
  margin: 0 !important;      
  max-width: 100% !important; 
  position: relative;
}

.intro-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.4);
  z-index: 1;
}

.intro-content {
  position: relative;
  z-index: 2;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.intro-section h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #fff;
}

.intro-section p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.btn-scroll {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  background: #fff;
  color: #000;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}

.btn-scroll:hover {
  background: #ccc;
  color: #000;
  transform: translateY(-2px);
}

.intro-content {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.intro-section.hide-gif {
  background: none !important;
}

#typing {
  font-family: 'Fira Sans';
  font-size: 36px; 
  white-space: pre;
  border-right: 2px solid black;
  padding-right: 5px;
  display: inline-block;
  animation: blink 0.7s step-end infinite;
}

@keyframes blink {
  from, to { border-color: transparent; }
  50% { border-color: black; }
}
