/* ============================================
   CSS Variables
   ============================================ */
:root {
  --mouse-x: 50%;
  --mouse-y: 50%;
  --font-primary: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono: 'Roboto Mono', monospace;
  --color-black: #000000;
  --color-white: #ffffff;
  --color-zinc-400: #a1a1aa;
  --color-zinc-500: #71717a;
  --color-zinc-600: #52525b;
  --color-zinc-700: #3f3f46;
  --color-zinc-800: #27272a;
  --color-zinc-900: #18181b;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-black);
  color: var(--color-white);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* ============================================
   Canvas Background
   ============================================ */
.fixed-canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

/* ============================================
   Header
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: all 0.3s ease;
  background-color: transparent;
}

.header.scrolled {
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo .logo-link {
  font-weight: 700;
  font-size: 1.25rem;
  transition: opacity 0.3s ease;
}

.header-logo .logo-link:hover {
  opacity: 0.8;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-link {
  color: var(--color-zinc-400);
  transition: color 0.3s ease;
  font-size: 1rem;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-white);
}

.language-switcher {
  display: flex;
  gap: 0.5rem;
  padding: 0.25rem;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
}

.lang-btn {
  padding: 0.5rem 1rem;
  color: var(--color-zinc-400);
  transition: all 0.3s ease;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.lang-btn:hover {
  color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.05);
}

.lang-btn.active {
  color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu-btn {
  display: block;
  color: var(--color-white);
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: background-color 0.3s ease;
}

.mobile-menu-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu-btn:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

.menu-icon,
.close-icon {
  display: block;
}

.hidden {
  display: none !important;
}

.nav-mobile {
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-link-mobile {
  color: var(--color-white);
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  transition: background-color 0.3s ease;
}

.nav-link-mobile:hover {
  background-color: var(--color-zinc-800);
}

.language-switcher-mobile {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
}

.lang-btn-mobile {
  padding: 0.5rem 1rem;
  color: var(--color-zinc-400);
  transition: all 0.3s ease;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: rgba(255, 255, 255, 0.05);
}

.lang-btn-mobile:hover {
  color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.1);
}

.lang-btn-mobile.active {
  color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.15);
}

/* ============================================
   Main Content
   ============================================ */
.main {
  position: relative;
  z-index: 10;
  padding-top: 4rem;
}

@media (max-width: 480px) {
  .main {
    padding-top: 3.5rem;
  }
}

/* ============================================
   Home Section
   ============================================ */
.home-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 0 1rem;
  text-align: center;
}

.home-content {
  animation: fadeInScale 0.75s ease-out;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.title {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  margin-bottom: 1.5rem;
  color: var(--color-white);
  cursor: pointer;
  display: inline-block;
  transition: transform 0.3s ease;
  padding: 0.5rem 1rem;
  text-shadow: 0px 2px 5px rgba(0, 0, 0, 0.4);
  line-height: 1.1;
}

.title:hover {
  transform: scale(1.04);
}

@media (min-width: 480px) {
  .title {
    font-size: 4.5rem;
    margin-bottom: 2rem;
  }
}

@media (min-width: 768px) {
  .title {
    font-size: 7rem;
  }
}

.description {
  color: var(--color-white);
  font-size: 1rem;
  max-width: 100%;
  width: 90%;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  margin-top: 0.5rem;
  animation: fadeInUp 0.5s ease-out 0.8s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 640px) {
  .description {
    font-size: 1.125rem;
    max-width: 42rem;
    width: auto;
  }
}

.description-text {
  display: block;
}

/* ============================================
   Sections
   ============================================ */
.section {
  min-height: 100vh;
  padding: 2rem 0;
}

@media (min-width: 768px) {
  .section {
    padding: 4rem 0;
  }
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 6rem 1.5rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 3rem;
  }
}

.section-subtitle {
  color: var(--color-zinc-400);
  margin-bottom: 4rem;
}

/* ============================================
   Projects Section
   ============================================ */
.projects-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

.project-card {
  position: relative;
  padding: 1.5rem;
  border-radius: 0.5rem;
  background-color: rgba(24, 24, 27, 0.5);
  border: 1px solid var(--color-zinc-800);
  overflow: hidden;
  transition: all 0.3s ease;
  width: 100%;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUpProject 0.6s ease-out forwards;
}

@keyframes fadeInUpProject {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.project-card:nth-child(1) {
  animation-delay: 0s;
}

.project-card:nth-child(2) {
  animation-delay: 0.1s;
}

.project-card:nth-child(3) {
  animation-delay: 0.2s;
}

@media (min-width: 768px) {
  .project-card {
    width: calc(50% - 1rem);
  }
}

.project-card-link {
  cursor: pointer;
}

.project-card:hover {
  transform: scale(1.03);
  background-color: rgba(39, 39, 42, 0.5);
}

.project-hover-effect {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.06), transparent 40%);
  pointer-events: none;
}

.project-card:hover .project-hover-effect {
  opacity: 1;
}

.project-content {
  flex: 1;
  position: relative;
  z-index: 10;
}

.project-date {
  font-size: 0.875rem;
  color: var(--color-zinc-500);
  margin-bottom: 0.5rem;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  background: linear-gradient(to right, var(--color-white), var(--color-zinc-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.3s ease;
}

.project-card:hover .project-title {
  background: linear-gradient(to right, var(--color-white), var(--color-zinc-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.external-link {
  opacity: 0;
  transition: opacity 0.3s ease;
  display: inline-block;
  margin-left: 0.25rem;
}

.project-card:hover .external-link {
  opacity: 1;
}

.project-description {
  color: var(--color-zinc-400);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ============================================
   Contact Section
   ============================================ */
.contact-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-card {
  position: relative;
  display: block;
  padding: 3rem;
  border-radius: 0.5rem;
  background-color: rgba(24, 24, 27, 0.5);
  border: 1px solid var(--color-zinc-800);
  overflow: hidden;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 28rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUpContact 0.6s ease-out forwards;
}

@keyframes fadeInUpContact {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  .contact-card {
    padding: 3rem;
  }
}

.contact-card:hover {
  background-color: rgba(39, 39, 42, 0.5);
}

.contact-hover-effect {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.06), transparent 40%);
  pointer-events: none;
}

.contact-card:hover .contact-hover-effect {
  opacity: 1;
}

.contact-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contact-icon {
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 9999px;
  background-color: rgba(39, 39, 42, 0.5);
  border: 1px solid var(--color-zinc-700);
  transition: all 0.3s ease;
}

.contact-card:hover .contact-icon {
  transform: scale(1.1);
  background-color: rgba(63, 63, 70, 0.5);
  border-color: var(--color-zinc-700);
}

.contact-icon svg {
  display: block;
  color: var(--color-white);
}

.contact-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(to right, var(--color-white), var(--color-zinc-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.company-name {
  margin-top: 3rem;
  color: var(--color-zinc-500);
  font-size: 1rem;
  font-weight: 500;
  opacity: 0;
  animation: fadeIn 0.6s ease-out 0.2s forwards;
}

.company-details {
  margin-top: 1rem;
  color: var(--color-zinc-500);
  font-size: 0.75rem;
  text-align: center;
  max-width: 600px;
  opacity: 0;
  animation: fadeIn 0.6s ease-out 0.3s forwards;
}

.company-address {
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.company-ids {
  font-size: 0.7rem;
  color: var(--color-zinc-600);
  letter-spacing: 0.02em;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@media (min-width: 768px) {
  .company-name {
    margin-top: 6rem;
    font-size: 1.125rem;
  }
  
  .company-details {
    font-size: 0.875rem;
  }
  
  .company-address {
    margin-bottom: 0.75rem;
  }
  
  .company-ids {
    font-size: 0.8rem;
  }
}

/* ============================================
   Accessibility
   ============================================ */
.skip-to-content {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 1rem;
  background-color: var(--color-black);
  color: var(--color-white);
  text-decoration: none;
}

.skip-to-content:focus {
  left: 0;
  top: 0;
}

/* ============================================
   Touch Device Optimizations
   ============================================ */
@media (hover: none) {
  .title:hover {
    transform: none;
  }
  
  .project-card:hover {
    transform: none;
  }
}

/* ============================================
   Smooth Scrolling Enhancement
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

