@font-face {
  font-family: 'Gilroy';
  src: url('fonty/Gilroy-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gilroy';
  src: url('fonty/Gilroy-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gilroy';
  src: url('fonty/Gilroy-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gilroy';
  src: url('fonty/Gilroy-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gilroy';
  src: url('fonty/Gilroy-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --primary: #4399cf;
  --primary-dark: #2d7fb8;
  --navy: #1a1a80;
  --navy-dark: #161671;
  --accent: #4399cf;
  --text-main: #111827;
  --text-muted: #6b7280;
  --border-subtle: #e5e7eb;
  --surface: #f3f4f6;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 999px;
  --shadow-soft: 0 22px 45px rgba(67, 153, 207, 0.18);
  --shadow-light: 0 12px 25px rgba(67, 153, 207, 0.10);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Gilroy", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
}

/* Layout */

.container {
  width: min(1120px, 100% - 3rem);
  margin: 0 auto;
}

.section {
  padding: 80px 0;
}

.section--alt {
  background: #f9fafb;
}

.section--alt + .section--alt {
  padding-top: 40px;
}

.section--contact {
  background: radial-gradient(circle at top left, rgba(67,153,207,0.12), transparent 55%),
              radial-gradient(circle at bottom right, rgba(22,22,113,0.12), transparent 55%);
}


.section--stats {
  background: linear-gradient(135deg, rgba(67,153,207,0.08), rgba(26,26,128,0.12));
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px;
  max-width: 900px;
  margin: 0 auto;
}

.stats__item {
  text-align: center;
}

.stats__number {
  font-size: 64px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--navy), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stats__label {
  font-size: 18px;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.4;
}

@media (max-width: 900px) {
  .stats__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .stats__number {
    font-size: 56px;
  }
}

.section__header {
  text-align: center;
  margin-bottom: 48px;
}

.section__header h2 {
  font-size: 36px;
  margin-bottom: 8px;
  color: var(--navy);
  font-weight: 700;
}

.section__header p {
  color: var(--text-muted);
}

/* Nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav__logo:hover {
  transform: scale(1.05);
}

.nav__logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-light);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.nav__logo:hover .nav__logo-mark {
  transform: scale(1.1);
  box-shadow: 0 16px 32px rgba(67, 153, 207, 0.25);
}

.nav__logo-img {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.nav__logo-img path {
  fill: var(--navy) !important;
  stroke: none;
}

.nav__logo-text {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 16px;
}

.nav__links a {
  text-decoration: none;
  color: var(--navy);
  padding: 6px 10px;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease, transform 0.2s ease;
  font-weight: 500;
  position: relative;
}

.nav__links a::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(26, 26, 128, 0.1);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nav__links a:hover {
  background: rgba(26, 26, 128, 0.1);
  color: var(--navy-dark);
  transform: translateY(-2px);
}

.nav__links a:not(.nav__cta):hover::before {
  opacity: 1;
}

.nav__cta:hover::before {
  opacity: 0 !important;
}

.nav__cta {
  background: var(--accent);
  color: #f9fafb !important;
  padding-inline: 16px !important;
}

.nav__cta:hover {
  background: var(--navy-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 26, 128, 0.3);
}

.nav__lang {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.05em;
  padding: 6px 12px !important;
  border: 1px solid rgba(26, 26, 128, 0.2);
  border-radius: 999px;
  transition: all 0.18s ease;
}

.nav__lang:hover {
  background: rgba(26, 26, 128, 0.08);
  border-color: rgba(26, 26, 128, 0.4);
  transform: translateY(-1px);
}

.nav__burger {
  display: none;
  background: none;
  border: none;
  padding: 0;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.nav__burger:hover {
  transform: scale(1.1);
}

.nav__burger span {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: #111827;
  transition: transform 0.2s ease, background 0.2s ease;
}

.nav__burger:hover span {
  background: var(--accent);
}

/* Hero */

.hero {
  position: relative;
  padding: 120px 0 80px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a80 0%, #161671 100%);
  transition: transform 0.1s ease-out;
}

.hero__gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(67, 153, 207, 0.5), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(67, 153, 207, 0.45), transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(67, 153, 207, 0.4), transparent 60%),
    radial-gradient(circle at 10% 80%, rgba(67, 153, 207, 0.48), transparent 45%),
    radial-gradient(circle at 90% 20%, rgba(67, 153, 207, 0.42), transparent 55%);
  z-index: 1;
  animation: pulseGradient 3s ease-in-out infinite;
}

.hero__logo-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.hero__logo-svg {
  width: 800px;
  height: 800px;
  opacity: 0.25;
  filter: blur(12px);
  fill: rgba(255, 255, 255, 0.4);
  animation: logoFloat 25s ease-in-out infinite;
  transform-origin: center center;
}

@keyframes logoFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    opacity: 0.25;
  }
  25% {
    transform: translate(50px, -30px) scale(1.15) rotate(8deg);
    opacity: 0.3;
  }
  50% {
    transform: translate(-40px, 50px) scale(0.9) rotate(-8deg);
    opacity: 0.28;
  }
  75% {
    transform: translate(40px, 30px) scale(1.1) rotate(5deg);
    opacity: 0.32;
  }
}

@keyframes pulseGradient {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

.hero__inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero__content {
  color: #ffffff;
}

.hero__eyebrow {
  font-size: 16px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 16px;
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(36px, 4vw, 46px);
  line-height: 1.1;
  margin: 0 0 18px;
  font-weight: 700;
}

.hero__highlight {
  background: linear-gradient(135deg, #ffffff, rgba(67, 153, 207, 0.9), #ffffff);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes cardPulse {
  0%, 100% { 
    box-shadow: 0 32px 64px rgba(67, 153, 207, 0.3), 0 16px 32px rgba(15, 23, 42, 0.2);
  }
  50% { 
    box-shadow: 0 36px 72px rgba(67, 153, 207, 0.35), 0 20px 40px rgba(15, 23, 42, 0.25);
  }
}

.hero__subtitle {
  max-width: 640px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  justify-content: center;
}

.hero__portfolio-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: 40px;
  width: 100%;
}

.hero__portfolio-link {
  position: relative;
  background: linear-gradient(135deg, rgba(67,153,207,0.15), rgba(67,153,207,0.25));
  color: #FFFFFF;
  padding: 22px 20px 24px;
  border-radius: 20px;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(67, 153, 207, 0.2);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  z-index: 1;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.hero__portfolio-link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(67,153,207,0.15), rgba(67,153,207,0.25));
  opacity: 1;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

.hero__portfolio-link::after {
  content: "";
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(0.8) translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
}

.hero__portfolio-link:hover {
  transform: translateY(-8px) scale(1.02) rotateX(2deg);
  box-shadow: 0 32px 64px rgba(67, 153, 207, 0.3), 0 16px 32px rgba(15, 23, 42, 0.2);
  border-color: rgba(67, 153, 207, 0.4);
  animation: cardPulse 2s ease-in-out infinite;
}

.hero__portfolio-link:hover::after {
  opacity: 1;
  transform: scale(1.2) translate(-50%, -50%);
}

.hero__portfolio-link h3 {
  margin: 14px 0 8px;
  font-size: 18px;
  color: #FFFFFF;
  position: relative;
  z-index: 2;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero__portfolio-link:hover h3 {
  transform: translateX(4px);
}

.hero__portfolio-link p {
  margin: 0 0 20px;
  font-size: 16px;
  color: #FFFFFF;
  position: relative;
  z-index: 2;
  opacity: 0.9;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero__portfolio-link:hover p {
  transform: translateX(4px);
}

.hero__portfolio-link .project-card__badge {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero__portfolio-link:hover .project-card__badge {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.hero__portfolio-link .project-card__link {
  position: relative;
  z-index: 2;
  color: #FFFFFF;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
}

.hero__portfolio-link:hover .project-card__link {
  gap: 12px;
  transform: translateX(4px);
}

/* About */

.section__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr);
  gap: 40px;
}


.about__highlights {
  display: grid;
  gap: 18px;
}

/* Cards */

.card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 24px 22px;
  border: 1px solid rgba(26, 26, 128, 0.2);
  box-shadow: var(--shadow-light);
}

.card--soft {
  background: #f9fafb;
  box-shadow: none;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 20px;
  color: var(--navy);
  font-weight: 600;
}

.card ul {
  padding-left: 18px;
  margin: 0;
  font-size: 16px;
}

.card ul li + li {
  margin-top: 4px;
}

/* Skills */

.skills__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

/* Timeline */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.timeline__item {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 24px;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(26, 26, 128, 0.15);
  background: #ffffff;
}

.timeline__meta {
  font-size: 16px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline__date {
  font-weight: 600;
  color: var(--navy);
}

.timeline__location {
  font-weight: 500;
}

.timeline__content h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 18px;
  color: var(--navy);
  font-weight: 600;
}

.timeline__content ul {
  margin: 0;
  padding-left: 18px;
  font-size: 16px;
}

.timeline__content li + li {
  margin-top: 4px;
}

/* Projects */

.projects__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.project-card {
  position: relative;
  background: linear-gradient(135deg, rgba(67,153,207,0.15), rgba(67,153,207,0.25));
  color: #111827;
  padding: 22px 20px 24px;
  border-radius: 20px;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(67, 153, 207, 0.2);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  perspective: 1000px;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(0.8) translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02) rotateX(2deg);
  box-shadow: 0 32px 64px rgba(67, 153, 207, 0.3), 0 16px 32px rgba(15, 23, 42, 0.2);
  border-color: rgba(67, 153, 207, 0.4);
  animation: cardPulse 2s ease-in-out infinite;
}

.project-card:hover::before {
  opacity: 1;
}

.project-card:hover::after {
  opacity: 1;
  transform: scale(1.2) translate(-50%, -50%);
}

.project-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  background: rgba(67, 153, 207, 0.2);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(67, 153, 207, 0.4);
  color: var(--accent);
  position: relative;
  z-index: 2;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-card__badge {
  background: rgba(67, 153, 207, 0.35);
  border-color: rgba(67, 153, 207, 0.6);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(67, 153, 207, 0.3);
}

.project-card h3 {
  margin: 14px 0 8px;
  font-size: 18px;
  position: relative;
  z-index: 2;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover h3 {
  transform: translateX(4px);
  color: var(--accent);
}

.project-card p {
  margin: 0 0 20px;
  font-size: 16px;
  color: var(--text-muted);
  position: relative;
  z-index: 2;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover p {
  transform: translateX(4px);
}

.project-card__link {
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  position: relative;
  z-index: 2;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
}

.project-card:hover .project-card__link {
  gap: 12px;
  transform: translateX(4px);
}

/* Contact */

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
  gap: 36px;
  align-items: start;
}

.contact__info {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  font-size: 16px;
}

.contact__info li + li {
  margin-top: 6px;
}

.contact__info a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 500;
}

.contact__info a:hover {
  text-decoration: underline;
  color: var(--navy-dark);
}

.contact__form {
  background: #ffffff;
  border-radius: 20px;
  padding: 24px 22px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: var(--shadow-light);
}

.form__row {
  margin-bottom: 16px;
}

.form__row label {
  display: block;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--navy);
}

.form__row input,
.form__row textarea {
  width: 100%;
  padding: 10px 11px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  font: inherit;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.form__row input:focus,
.form__row textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(67,153,207,0.25);
}

.form__note {
  margin-top: 10px;
  font-size: 16px;
  color: var(--text-muted);
}

.form__message {
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  font-size: 16px;
  display: none;
}

.form__message.success {
  display: block;
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.form__message.error {
  display: block;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--primary-dark));
  color: #f9fafb;
  box-shadow: 0 18px 30px rgba(67, 153, 207, 0.35);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 36px rgba(67, 153, 207, 0.5);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn--full {
  width: 100%;
}

/* Subhero for subpages */

.subhero {
  padding: 64px 0 32px;
  background: linear-gradient(135deg, rgba(67,153,207,0.12), rgba(67,153,207,0.18));
  color: #111827;
  box-shadow: 0 24px 40px rgba(67, 153, 207, 0.15);
  transition: background 0.3s ease, transform 0.1s ease-out;
}

.subhero:hover {
  background: linear-gradient(135deg, rgba(67,153,207,0.15), rgba(67,153,207,0.22));
}

.subhero__eyebrow {
  font-size: 16px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  font-weight: 600;
  transition: transform 0.3s ease, color 0.3s ease;
  display: inline-block;
}

.subhero:hover .subhero__eyebrow {
  transform: translateX(5px);
  color: var(--primary-dark);
}

/* Disable translateX animations on subpages */
body.subpage .subhero:hover .subhero__eyebrow {
  transform: none;
}

.subhero h1 {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 700;
  transition: transform 0.3s ease, color 0.3s ease;
}

.subhero:hover h1 {
  transform: translateX(5px) scale(1.02);
  color: var(--navy-dark);
}

/* Disable translateX animations on subpages */
body.subpage .subhero:hover h1 {
  transform: none;
}

.subhero__subtitle {
  max-width: 640px;
  margin: 0;
  color: var(--text-muted);
  font-size: 16px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.subhero:hover .subhero__subtitle {
  transform: translateX(5px);
  opacity: 0.9;
}

/* Disable translateX animations on subpages */
body.subpage .subhero:hover .subhero__subtitle {
  transform: none;
}

/* Gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.gallery__item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.15);
}

.gallery__thumb {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery__item:hover .gallery__thumb img {
  transform: scale(1.05);
}

.gallery__thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    135deg,
    rgba(67,153,207,0.18),
    rgba(67,153,207,0.18) 10px,
    rgba(26,26,128,0.08) 10px,
    rgba(26,26,128,0.08) 20px
  );
  color: rgba(15, 23, 42, 0.45);
  font-weight: 600;
  font-size: 18px;
}

/* Lightbox/Modal */

.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.2s ease;
}

.lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  margin: auto;
  animation: zoomIn 0.3s ease;
}

.lightbox__image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox__close {
  position: absolute;
  top: -40px;
  right: 0;
  color: #ffffff;
  font-size: 32px;
  font-weight: 300;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #ffffff;
  font-size: 24px;
  font-weight: 300;
  cursor: pointer;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease;
  user-select: none;
}

.lightbox__prev:hover,
.lightbox__next:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox__prev {
  left: -60px;
}

.lightbox__next {
  right: -60px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Footer */

.footer {
  border-top: 1px solid #e5e7eb;
  padding: 18px 0 24px;
  background: #ffffff;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.footer:hover {
  background: #f9fafb;
  border-top-color: rgba(67, 153, 207, 0.2);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 16px;
  color: #6b7280;
  transition: color 0.3s ease, transform 0.3s ease;
}

.footer:hover .footer__inner {
  color: var(--text-main);
  transform: translateX(3px);
}

/* Disable translateX animations on subpages */
body.subpage .footer:hover .footer__inner {
  transform: none;
}

.footer__meta a {
  color: var(--accent);
  text-decoration: none;
}

.footer__meta a:hover {
  text-decoration: underline;
}

.footer__description {
  margin: 0 0 8px 0;
  font-weight: 500;
  color: var(--navy);
}

.footer__subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.footer__copyright {
  text-align: right;
}

@media (max-width: 600px) {
  .footer__inner {
    flex-direction: column;
    text-align: left;
  }
  
  .footer__copyright {
    text-align: left;
    margin-top: 12px;
  }
}

/* Welcome Section */

.welcome-section {
  padding: 80px 0;
  background: #ffffff;
}

.welcome-scroll {
  overflow: hidden;
  white-space: nowrap;
  margin-bottom: 50px;
  position: relative;
  width: 100%;
}

.welcome-scroll__mask {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}

.welcome-scroll__mask--left {
  left: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

.welcome-scroll__mask--right {
  right: 0;
  background: linear-gradient(to left, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

.welcome-scroll__content {
  display: inline-flex;
  animation: scrollText 50s linear infinite;
  will-change: transform;
}

.welcome-scroll__text {
  font-size: clamp(36px, 4vw, 46px);
  font-weight: 700;
  color: var(--navy);
  padding: 0 80px;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--navy), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

@keyframes scrollText {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.works-showcase {
  position: relative;
  margin-top: 30px;
}

.works-showcase__container {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  position: relative;
  transition: min-height 0.3s ease;
}

.works-showcase__item {
  flex: 0 0 calc(33.333% - 16px);
  max-width: calc(33.333% - 16px);
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(26, 26, 128, 0.12);
  opacity: 0;
  transform: scale(0.95) translateY(10px);
  animation: fadeInWork 1.2s ease-out forwards;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s ease;
  text-decoration: none;
  display: block;
  cursor: pointer;
}

.works-showcase__item:hover {
  transform: scale(1.02) translateY(-5px);
  box-shadow: 0 12px 32px rgba(26, 26, 128, 0.18);
  z-index: 10;
}

.works-showcase__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.works-showcase__item:hover img {
  transform: scale(1.03);
}

@keyframes fadeInWork {
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes fadeOutWork {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.9) translateY(-15px);
  }
}

@media (max-width: 900px) {
  .welcome-scroll__text {
    padding: 0 60px;
  }
  
  .welcome-scroll__mask {
    width: 80px;
  }
  
  .works-showcase__container {
    gap: 16px;
  }
  
  .works-showcase__item {
    flex: 0 0 calc(33.333% - 11px);
    max-width: calc(33.333% - 11px);
  }
}

@media (max-width: 600px) {
  .hero__logo-bg {
    align-items: flex-start;
    padding-top: 80px;
  }
  
  .hero__logo-svg {
    width: 500px;
    height: 500px;
  }
  
  .welcome-section {
    padding: 60px 0;
  }
  
  .welcome-scroll__text {
    padding: 0 40px;
    font-size: clamp(28px, 6vw, 48px);
  }
  
  .welcome-scroll__mask {
    width: 60px;
  }
  
  .works-showcase__container {
    flex-direction: column;
    gap: 20px;
  }
  
  .works-showcase__item {
    flex: 0 0 100%;
    max-width: 100%;
    max-width: 300px;
  }
}

/* Responsive */

@media (max-width: 900px) {
  .hero {
    padding: 80px 0 60px;
  }

  .section__grid,
  .contact__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .skills__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .projects__grid,
  .hero__portfolio-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .projects__grid,
  .hero__portfolio-links {
    grid-template-columns: minmax(0, 1fr);
  }

  .projects__grid {
    gap: 16px;
  }


  .timeline__item {
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .lightbox__prev {
    left: 10px;
  }
  
  .lightbox__next {
    right: 10px;
  }
  
  .lightbox__close {
    top: 10px;
    right: 10px;
  }

  .nav__links {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    background: rgba(255, 255, 255, 0.98);
    padding: 20px 16px;
    border-radius: 0;
    border: none;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 4px 20px rgba(15,23,42,0.12);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    backdrop-filter: blur(20px);
    gap: 8px;
  }

  .nav__links.nav__links--open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav__links a:not(.nav__cta):not(.nav__lang) {
    width: 100%;
    padding: 6px 10px;
    border-radius: 999px;
    text-align: left;
  }

  /* Group wrapper for CTA and lang - they will be side by side */
  .nav__links-group {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
  }

  .nav__links-group .nav__cta,
  .nav__links-group .nav__lang {
    padding: 6px 10px;
    border-radius: 999px;
    text-align: left;
    width: auto;
    flex: 0 0 auto;
  }

  .nav__burger {
    display: inline-flex;
  }
}

/* Animations page */

.animations__content {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
}

.card--animations {
  text-align: center;
  max-width: 600px;
  padding: 48px 40px;
  background: linear-gradient(135deg, rgba(67,153,207,0.08), rgba(67,153,207,0.15));
  border: 1px solid rgba(67, 153, 207, 0.3);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.4s ease,
              background 0.4s ease,
              border-color 0.4s ease;
  cursor: pointer;
}

.card--animations:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 32px 64px rgba(67, 153, 207, 0.3);
  background: linear-gradient(135deg, rgba(67,153,207,0.12), rgba(67,153,207,0.2));
  border-color: rgba(67, 153, 207, 0.5);
}

.animations__icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--primary-dark));
  border-radius: 20px;
  color: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.4s ease,
              background 0.4s ease;
}

.card--animations:hover .animations__icon {
  transform: rotate(10deg) scale(1.15);
  box-shadow: 0 24px 48px rgba(67, 153, 207, 0.4);
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
}

.animations__icon svg {
  width: 40px;
  height: 40px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card--animations:hover .animations__icon svg {
  transform: scale(1.2);
}

.card--animations h2 {
  font-size: 32px;
  margin: 0 0 16px;
  color: var(--navy);
  font-weight: 700;
  transition: transform 0.3s ease, color 0.3s ease;
}

.card--animations:hover h2 {
  transform: translateY(-3px);
  color: var(--navy-dark);
}

.animations__description {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0 0 32px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.card--animations:hover .animations__description {
  transform: translateY(-2px);
  opacity: 0.95;
}

.btn--large {
  padding: 16px 32px;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.3s ease,
              background 0.3s ease;
}

.card--animations:hover .btn--large {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 28px 48px rgba(67, 153, 207, 0.5);
}

.btn--large svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn--large:hover svg {
  transform: translate(6px, -6px) rotate(5deg);
}

.card--animations:hover .btn--large svg {
  transform: translate(8px, -8px) rotate(10deg) scale(1.1);
}

.animations__note {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  font-style: italic;
}

/* Scroll reveal animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.scroll-reveal--fade {
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal--fade.revealed {
  opacity: 1;
}

.scroll-reveal--slide-up {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal--slide-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

.scroll-reveal--scale {
  opacity: 0;
  transform: scale(0.9) translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal--scale.revealed {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.scroll-reveal--slide-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal--slide-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.scroll-reveal--slide-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal--slide-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Delay classes for sequential animations */
.scroll-reveal--delay-1 {
  transition-delay: 0.1s;
}

.scroll-reveal--delay-2 {
  transition-delay: 0.2s;
}

.scroll-reveal--delay-3 {
  transition-delay: 0.3s;
}

.scroll-reveal--delay-4 {
  transition-delay: 0.4s;
}

.scroll-reveal--delay-5 {
  transition-delay: 0.5s;
}

/* Disable scroll reveal animations on subpages - make all elements visible immediately */
body.subpage .scroll-reveal,
body.subpage .scroll-reveal--fade,
body.subpage .scroll-reveal--slide-up,
body.subpage .scroll-reveal--scale,
body.subpage .scroll-reveal--slide-left,
body.subpage .scroll-reveal--slide-right {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

@media (max-width: 900px) {
  .card--animations {
    padding: 36px 24px;
  }

  .animations__icon {
    width: 64px;
    height: 64px;
  }

  .animations__icon svg {
    width: 32px;
    height: 32px;
  }

  .card--animations h2 {
    font-size: 28px;
  }

  .animations__description {
    font-size: 16px;
  }

  .btn--large {
    padding: 14px 24px;
    font-size: 16px;
  }
}
