html {
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Open Sans', sans-serif;
}

body {
  background: #111;
  color: #eee;
  line-height: 1.6;
}

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  background: #111;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity 0.5s ease;
}

.loading-text {
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dots::after {
  content: '';
  animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

/* Navbar */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  background: #111;
  padding: 1rem 1rem 0.8rem 2rem;
  border-bottom: 1px solid #222;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.3s ease;
  z-index: 1000;
}

.navbar.hide {
  transform: translateY(-100%);
}

.nav-left {
  display: flex;
}

.nav-left img {
  height: 32px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

@keyframes spin {
  50% { transform: rotate(-45deg); }
}

.logo-rotate {
  animation: spin 0.4s ease-in-out;
}

.navbar ul {
  list-style: none;
  display: flex;
  align-items: center;
}

.navbar a,
.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  color: #ccc;
  background: none;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease;
}

.navbar a:hover,
.dropdown-toggle:hover {
  background: #111;
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  display: flex;
  flex-direction: column;
  top: 120%;
  left: 0;
  background: #111;
  border: 1px solid #222;
  border-radius: 0.5rem;
  min-width: 120px;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: 0.25s ease;
  list-style: none;
}

.dropdown-menu li {
  display: block;      
  width: 100%;         
}

.dropdown.show .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  margin: 0 0.5rem;
  padding: 0.75rem 1rem;
  color: #ccc;
}

.dropdown-menu a:hover {
  background: #222;
}

.arrow {
  transition: transform 0.25s ease;
}

.dropdown.show .arrow {
  transform: rotate(180deg);
}

/* Headline */
.me {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 1rem 2rem;
}

.me h1 {
  max-width: 800px;
  padding: 4rem 0 1rem 0;
  font: 600 40px/1 'Fira Code', monospace;
  color: #FFBF00;
}

.cta-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 1rem;
}

.cta-button {
  display: inline-block;
  padding: 0.5rem 2rem;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #6C63FF, #4A47E0);
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 0.1rem 0.5rem rgba(108, 99, 255, 0.3);
}

.cta-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0.2rem 1rem rgba(108, 99, 255, 0.45);
}

.cta-button:active {
  transform: scale(0.97);
}

.title {
  max-width: 1200px;
  margin: 1rem auto;
  padding: 0 2rem;
  font-size: 1.2rem;
}

.subtitle {
  max-width: 1200px;
  margin: auto;
  padding: 0 2rem;
  font-size: 0.8rem;
  color: #aaa;
}

.section-line {
  height: 2px;
  background: #222;
}

.hero {
  max-width: 1200px;
  margin: 0 auto 4rem;
  padding: 1rem 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}

.hero-main {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card {
  border-radius: 1rem;
  border: 1px solid #222;
  overflow: hidden;
}

.card img {
  width: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.card:hover img {
  transform: scale(1.02);
}

.card-content h3 {
  font-weight: 600;
  font-size: 1rem;
}

.card-content p {
  font-size: 1rem;
  color: #aaa;
  line-height: 1.4;
}

/* Gallery */
.content {
  max-width: 1200px;
  margin: 0 auto 4rem;
  padding: 1rem 2rem;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.content.active {
  opacity: 1;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.gallery-item {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 0.8rem;
  border: 1px solid #222;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.2s ease;
}

/* Footer */
.footer-dark {
  border-top: 1px solid #222;
  padding: 4rem 2rem;
}

.footer-links {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.left {
  display: flex;
  gap: 4rem;
}

.link-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.link {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  min-width: 80px;
}

.link-group span {
  font-size: 0.8rem;
  color: #666;
}

.link-group a {
  font-size: 0.8rem;
  color: #ccc;
  text-decoration: none;
}

.link-group a:hover {
  color: #eee;
  text-decoration: underline;
}

.right {
  margin-top: auto;
  font-size: 0.75rem;
  color: #aaa;
}

.right span {
  color: #666;
}

/* Responsive */
@media (max-width: 1024px) {
  html { font-size: 12px; }
  .nav-left img { height: 24px; }
  .hero { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
}