/* RESET */
/* GLOBAL RESET AND OVERFLOW PREVENTION */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body {
  font-family: 'Red Hat Text', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0b0e14;
  color: #eaeaf0;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

/* NAVIGATION */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.nav-brand {
  display: flex;
  align-items: center;
  transition: all 0.4s ease;
}

.nav-logo {
  height: 120px;
  width: auto;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 32px;
  align-items: center;
}

.nav-item {
  margin: 0;
  position: relative;
}

.nav-link {
  color: #b8bddb;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
  padding: 8px 16px;
  border-radius: 8px;
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(139, 14, 26, 0.1);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, #8b0e1a, #a31e2a);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 60%;
}
.lang-btn {
  background: none;
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Red Hat Display', sans-serif;
}

.lang-btn:hover {
  border-color: #8b0e1a;
  background: rgba(139, 14, 26, 0.1);
  color: #8b0e1a;
}
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
  padding: 8px;
  border-radius: 6px;
  transition: background 0.3s ease;
}

.hamburger:hover {
  background: rgba(255, 255, 255, 0.1);
}

.bar {
  width: 25px;
  height: 3px;
  background: #b8bddb;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
  background: #8b0e1a;
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
  background: #8b0e1a;
}

/* HERO */
.hero {
  position: relative;
  top: 80px;
  height: 100vh;
  background: #0b0e14;
  overflow: hidden;
  width: 100%;
  max-width: 100vw;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to top, rgba(11, 14, 20, 1) 0%, rgba(11, 14, 20, 0.7) 50%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  mask-image: 
    linear-gradient(90deg, transparent 0%, black 10%, black 90%, transparent 100%),
    linear-gradient(to top, transparent 0%, black 60%);
  mask-composite: intersect;
  -webkit-mask-image: 
    linear-gradient(90deg, transparent 0%, black 10%, black 90%, transparent 100%),
    linear-gradient(to top, transparent 0%, black 60%);
  -webkit-mask-composite: source-in;
  z-index: 0;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 280px 4vw 0 6vw;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.hero-backdrop {
  max-width: 800px;
  width: 100%;
}

.hero-text {
  position: relative;
  width: 100%;
}

/* HEADLINE */
.hero-text h1 {
  font-size: clamp(1.6rem, 4vw, 3rem);
  line-height: 1.15;
  margin-bottom: 32px;

  background: linear-gradient(180deg, #ffffff, #cfd3ff);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  opacity: 0;
  filter: blur(6px);
  transform: translateY(28px);
  animation:
    reveal 1s ease forwards .15s,
    glow-pulse 6s ease-in-out infinite 2s;
}

/* PARAGRAPH */
.hero-text p {
  color: #b8bddb;
  max-width: 600px;

  opacity: 0;
  filter: blur(6px);
  transform: translateY(28px);
  animation: reveal 1s ease forwards .35s;
}

/* ANIMATIONS */
@keyframes reveal {
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes glow-pulse {
  50% {
    text-shadow: 0 0 24px rgba(139, 14, 26, 0.25);
  }
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transform: none !important;
    filter: none !important;
  }
}

/* GLOBAL CONTAINER */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
  box-sizing: border-box;
}

/* SECTION HEADERS */
.section-header {
  text-align: center;
  margin-bottom: 30px;
}

.section-header h2 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  margin-bottom: 16px;
  background: linear-gradient(180deg, #ffffff, #cfd3ff);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-header p {
  color: #b8bddb;
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* TECH STACK SECTION */
.tech-stack {
  padding: 120px 0;
  background: #0b0e14;
  position: relative;
  z-index: 10;
  overflow: hidden;
}

.tech-stack::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, #0b0e14 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

.tech-stack::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent 0%, #161b22 100%);
  z-index: 1;
  pointer-events: none;
}

.tech-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  opacity: 0.3;
  z-index: 0;
}

.tech-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.tech-text {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 48px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.tech-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #b8bddb;
  margin-bottom: 24px;
}

.tech-text p:last-child {
  margin-bottom: 0;
}

.tech-text strong {
  color: #ffffff;
  font-weight: 600;
}

/* ABOUT SECTION */
.about {
  padding: 120px 0;
  background: #0b0e14;
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 24px;
  color: #eaeaf0;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #b8bddb;
  margin-bottom: 48px;
}

.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
}

.skill-item {
  padding: 24px;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
}

.skill-item h4 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: #ffffff;
}

.skill-item p {
  color: #b8bddb;
  margin: 0;
  font-size: 0.95rem;
}

/* PROJECTS SECTION */
.projects {
  padding: 120px 0;
  background: #161b22;
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px;
}

.project-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 14, 26, 0.3);
}

.project-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-content p {
  text-align: start;
  line-height: 1.6;
  color: #b8bddb;
  margin-bottom: 24px;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 16px;
}

.project-header h3 {
  font-size: 1.4rem;
  color: #ffffff;
  margin: 0;
}

.project-location {
  font-size: 0.85rem;
  color: #a8a8b8;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  white-space: nowrap;
}

.project-button {
  margin-top: auto;
  padding-top: 20px;
  text-align: center;
}

.btn-contact-style {
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Red Hat Display', sans-serif;
  color: #ffffff;
  text-decoration: none;
  border: none;
  cursor: pointer;
  display: inline-block;
  padding: 12px 24px;
  border-radius: 6px;
  background: #8b0e1a;
  border: 1px solid #a31e2a;
  transition: all 0.2s ease;
  min-width: 100px;
}

.btn-contact-style::before {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.btn-contact-style:hover {
  background: #a31e2a;
  border-color: #bb2e3a;
}

.btn-contact-style:hover::before {
  transform: translateX(100%);
}

.btn-contact-style:active {
  background: #7a0c17;
}

/* MODAL STYLES */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.modal {
  background: rgba(11, 14, 20, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  max-width: 600px;
  width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modalSlideIn 0.3s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
  font-size: 1.5rem;
  color: #eaeaf0;
  margin: 0;
  font-family: 'Red Hat Display', sans-serif;
}

.modal-close {
  background: none;
  border: none;
  color: #b8bddb;
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #ffffff;
}

.modal-content {
  padding: 24px 32px 32px;
}

.modal-content p {
  color: #b8bddb;
  line-height: 1.6;
  margin-bottom: 16px;
  text-align: justify;
}

.modal-content ul {
  color: #b8bddb;
  padding-left: 20px;
  text-align: justify;
}

.modal-content li {
  margin-bottom: 8px;
  text-align: justify;
}

.modal-content strong {
  color: #eaeaf0;
}

.modal-actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* CONTACT SECTION */
.contact {
  padding: 120px 0;
  background: #0b0e14;
  position: relative;
  z-index: 10;
}

.contact-simple {
  text-align: center;
  position: relative;
  z-index: 1;
}

.contact-simple a {
  font-size: 1.4rem;
  font-weight: 600;
  font-family: 'Red Hat Display', sans-serif;
  color: #ffffff;
  text-decoration: none;
  display: inline-block;
  padding: 18px 36px;
  border-radius: 8px;
  background: #8b0e1a;
  border: 1px solid #a31e2a;
  transition: all 0.2s ease;
}

.contact-simple a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.contact-simple a:hover {
  background: #a31e2a;
  border-color: #bb2e3a;
}

.contact-simple a:hover::before {
  transform: translateX(100%);
}

.contact-simple a:active {
  background: #7a0c17;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .nav-container {
    padding: 0 24px;
  }

  .nav-logo {
    height: 80px;
    padding: 6px 10px;
  }

  .navbar.scrolled .nav-logo {
    height: 70px;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 80px;
    flex-direction: column;
    background: rgba(11, 14, 20, 0.98);
    backdrop-filter: blur(20px);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 32px 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-item {
    margin: 16px 0;
  }

  .nav-link {
    font-size: 1.1rem;
  }

  .lang-btn {
    font-size: 1rem;
    padding: 12px 20px;
  }

  .hamburger {
    display: flex;
  }

  .hero-inner {
    padding: 200px 32px 0 24px;
  }

  .container {
    padding: 0 24px;
  }
  
  .about,
  .projects,
  .contact {
    padding: 80px 0;
  }
  
  .contact-content {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .skills {
    grid-template-columns: 1fr;
  }
}