*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #07070d;
  --surface: #0f0f1a;
  --blue: #2563eb;
  --blue-light: #3b82f6;
  --white: #ffffff;
  --muted: #94a3b8;
  --border: rgba(255,255,255,0.07);
  --nav-h: 68px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 2rem;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3rem;
  transition: background 0.3s, backdrop-filter 0.3s, border-bottom 0.3s;
  background: #ffffff;
}

nav.scrolled {
  background: rgb(255, 255, 255);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: #0a0a0f;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 2.2rem;
  list-style: none;
}

.nav-links a {
  color: #374151;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
  padding-bottom: 2px;
}

.nav-links a:hover,
.nav-links a.active {
  color: #0a0a0f;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
}

.nav-lang {
  font-size: 0.88rem;
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #0a0a0f;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 110;
}

/* ===== HERO ===== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 45%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(7, 7, 13, 0.82) 0%,
    rgba(7, 7, 13, 0.55) 60%,
    rgba(7, 7, 13, 0.75) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 3rem;
  padding-top: var(--nav-h);
  display: flex;
  align-items: flex-end;
  gap: 3.5rem;
  width: 100%;
}

.hero-photo {
  flex-shrink: 0;
  width: 400px;
  max-width: 100%;
  align-self: flex-end;
}

.hero-photo img {
  width: 100%;
  max-width: 100%;
  display: block;
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 850px;
  min-width: 0;
}

.hero-text h1 {
  font-size: clamp(1.8rem, 4.5vw, 3.6rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.4rem;
  color: var(--white);
  word-break: break-word;
}

.accent {
  color: var(--blue-light);
}

.hero-sub {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 2rem;
  max-width: 480px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  border: 1px solid var(--white);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  border-radius: 2px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--white);
  color: var(--bg);
}

.btn-outline {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  border: 1.5px solid var(--blue);
  color: var(--blue-light);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 2px;
  transition: background 0.2s, color 0.2s;
}

.btn-outline:hover {
  background: var(--blue);
  color: var(--white);
}

.socials {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.socials a {
  color: var(--muted);
  display: flex;
  align-items: center;
  transition: color 0.2s, transform 0.2s;
}

.socials a:hover {
  color: var(--white);
  transform: translateY(-2px);
}

.socials svg {
  width: 22px;
  height: 22px;
}

/* ===== ABOUT ===== */

.about {
  padding: 7rem 0;
  background: #ffffff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about h2,
.about p,
.about .eyebrow {
  color: #0a0a0f;
}

.about .muted {
  color: #64748b;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue-light);
  margin-bottom: 0.9rem;
}

.eyebrow.center,
h2.center,
.contact-sub.center {
  text-align: center;
}

.about-left h2 {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1.2rem;
}

.about-left p {
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s, transform 0.5s;
  min-width: 0;
}

.stat.visible {
  opacity: 1;
  transform: none;
}

.stat strong {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 0.4rem;
  word-break: break-word;
}

.stat span {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

.about-left {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s, transform 0.5s;
}

.about-left.visible {
  opacity: 1;
  transform: none;
}

/* ===== PORTFOLIO ===== */

.portfolio {
  padding: 7rem 0;
}

.portfolio h2 {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 3.5rem;
  text-align: center;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s, opacity 0.5s;
  opacity: 0;
  transform: translateY(24px);
  min-width: 0;
}

.card.visible {
  opacity: 1;
  transform: none;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(37,99,235,0.4);
}

.card.featured {
  border-color: rgba(37,99,235,0.35);
}

.card-img {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.card:hover .card-img img {
  transform: scale(1.04);
}

.placeholder-img {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border-bottom: 1px solid var(--border);
}

.card-body {
  padding: 1.4rem;
}

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-light);
  background: rgba(37,99,235,0.1);
  border: 1px solid rgba(37,99,235,0.2);
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 0.8rem;
}

.card-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.35;
  min-height: 1.4em;
}

.card-body p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ===== CONTACT ===== */

.contact {
  padding: 7rem 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
}

.contact h2 {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.contact-sub {
  color: var(--muted);
  font-size: 0.97rem;
  max-width: 480px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.contact-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

footer {
  border-top: 1px solid var(--border);
  padding: 1.8rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-brand {
  font-weight: 700;
  font-size: 0.95rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-socials {
  display: flex;
  gap: 1.4rem;
}

.footer-socials a {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-socials a:hover {
  color: var(--white);
}

/* ====================================================== */
/* RESPONSIVE — TABLET & MOBILE                            */
/* ====================================================== */

@media (max-width: 900px) {
  .container {
    padding: 0 1.25rem;
  }

  nav {
    padding: 0 1.25rem;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 1.8rem;
    display: none;
    border-top: 1px solid var(--border);
    z-index: 105;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  .nav-toggle {
    display: block;
  }

  .nav-lang {
    display: none;
  }

  /* HERO: stack vertically, no forced row */
  .hero-content {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1.8rem;
    padding: calc(var(--nav-h) + 2.5rem) 1.5rem 3rem;
    min-height: 100vh;
  }

  .hero-photo {
    width: 55%;
    max-width: 220px;
    align-self: center;
  }

  .hero-text {
    align-items: center;
    max-width: 100%;
  }

  .hero-sub {
    margin: 0 auto 2rem;
  }

  .hero-actions {
    flex-direction: column;
    justify-content: center;
    gap: 1.2rem;
  }

  .about {
    padding: 4.5rem 0;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .portfolio {
    padding: 4.5rem 0;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .contact {
    padding: 4.5rem 0;
  }
}

@media (max-width: 600px) {
  .hero-text h1 {
    font-size: 1.85rem;
  }

  .hero-photo {
    width: 50%;
    max-width: 170px;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .stat {
    padding: 1.1rem;
  }

  .stat strong {
    font-size: 1.05rem;
  }

  .stat span {
    font-size: 0.78rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}