@import url('https://fonts.googleapis.com/css2?family=Brygada+1918:ital,wght@0,400..700;1,400..700&display=swap');

:root {
  --bg-color: #ffffff;
  --text-color: #333333;
  --accent-color: #4a90e2;
  --secondary-color: #f5f5f5;
  --header-bg: rgba(255, 255, 255, 0.95);
  --transition-speed: 0.3s;
}

.dark-theme {
  --bg-color: #1a1a1a;
  --text-color: #ffffff;
  --accent-color: #64b5f6;
  --secondary-color: #2d2d2d;
  --header-bg: rgba(26, 26, 26, 0.95);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Brygada 1918", serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* Header Styles */
header {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  background-color: var(--header-bg);
  backdrop-filter: blur(10px);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent-color);
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  margin-left: 2rem;
  transition: color var(--transition-speed);
}

.nav-links a:hover {
  color: var(--accent-color);
}

#theme-toggle {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  margin-left: 2rem;
  font-size: 1.2rem;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--text-color);
  margin: 2px 0;
  transition: var(--transition-speed);
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 1rem;
  position: relative;
  overflow: hidden;
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
}

.hero p {
  font-size: 1.5rem;
  opacity: 0.8;
  position: relative;
  z-index: 2;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 2rem;
}

.download-button {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2rem;
  border-radius: 50px;
  background: var(--accent-color);
  color: white !important;
  text-decoration: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
  border: 2px solid rgba(255,255,255,0.1);
}

.download-button:hover {
  transform: translateY(-3px);
  opacity: 0.9;
}

.download-button i {
  font-size: 1.2em;
}

/* ÐÐ´Ð°Ð¿Ñ‚Ð¸Ð²Ð½Ð¾ÑÑ‚ÑŒ Ð´Ð»Ñ Ð¼Ð¾Ð±Ð¸Ð»ÑŒÐ½Ñ‹Ñ… */
@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  
  .download-button {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
}

.hero-avatar {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  margin-bottom: 2rem;
  position: relative;
  z-index: 2;
  animation: float 4s ease-in-out infinite;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1));
}

.hero-avatar img {
  width: 85%;
  height: 85%;
  position: absolute;
  border-radius: 50%;
  /* ÐÐ¾Ð²Ñ‹Ðµ ÑÐ²Ð¾Ð¹ÑÑ‚Ð²Ð° Ð´Ð»Ñ Ñ†ÐµÐ½Ñ‚Ñ€Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ */
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

.avatar-circle {
  fill: var(--accent-color);
  opacity: 0.1;
}

.avatar-pattern {
  fill: none;
  stroke: var(--accent-color);
  stroke-width: 2;
  opacity: 0.3;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-bg svg {
  width: 100%;
  height: 100%;
}

.hero-bg path {
  fill: var(--accent-color);
  opacity: 0.1;
}

/* Portfolio Sections */
.portfolio-section {
  padding: 5rem 5%;
  max-width: 1400px;
  margin: 0 auto;
}

.portfolio-section h2 {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2vh;
  grid-auto-flow: dense;
  justify-items: stretch;
  align-items: stretch;
  justify-content: center;
  align-content: center;
}

.portfolio-item {
  grid-column: span 4;
  min-height: 300px;
}

.portfolio-item.wide {
  grid-column: span 8;
}

.portfolio-item.tall {
  grid-row: span 2;
}

.portfolio-item.full {
  grid-column: span 12;
  min-height: 400px;
}

.portfolio-item .placeholder-image {
  height: 100%;
  object-fit: cover;
}

.portfolio-content {
  position: relative;
  background-color: var(--secondary-color);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.portfolio-content {
  position: relative;
  height: 300px;
  transition: transform 0.3s ease;
}

.portfolio-content:hover
{
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

.portfolio-image {
  width: 100%;
  height: 100%;
  object-fit: cover; 
  display: block;
}

.image-container {
  width: 100%;
  height: 100%;
  overflow: hidden; 
}

.portfolio-info {
  padding: 1.5rem;
}

.portfolio-info h3 {
  cursor: pointer;
  margin-bottom: 0.5rem;
}

.portfolio-info h3:hover 
{
  color: #5c5c5c;
}

@media (max-width: 1200px) {
  .portfolio-item {
    grid-column: span 6;
  }
  .portfolio-item.wide {
    grid-column: span 6;
  }
}

@media (max-width: 768px) {
  .portfolio-item,
  .portfolio-item.wide,
  .portfolio-item.full {
    grid-column: span 12;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--header-bg);
    padding: 1rem;
    text-align: center;
  }

  .nav-links.active {
    display: flex;
    flex-direction: column;
  }

  .nav-links a {
    margin: 0.5rem 0;
  }

  .hamburger {
    display: flex;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1.2rem;
  }

  .portfolio-section {
    padding: 3rem 5%;
  }
}

a {
  text-decoration: none;
  color: inherit;
}

a:hover,
a:visited,
a:active,
a:focus {
  text-decoration: none;
  color: inherit;
}

/* Contact Section */
.contact-section {
  padding: 5rem 5%;
  text-align: center;
  background-color: var(--secondary-color);
}

.contact-content {
  max-width: 600px;
  margin: 0 auto;
}

.contact-info p {
  margin: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  background-color: var(--secondary-color);
}

/* Animations */
.animate-text {
  animation: fadeInUp 1s ease-out;
  margin-bottom: 2em;
}

.animate-text-delay {
  animation: fadeInUp 1s ease-out 0.3s backwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loader Styles */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  transition: opacity 0.5s;
}

.loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-track {
  stroke: var(--accent-color);
  stroke-width: 4;
  fill: none;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawPath 3s linear infinite;
}

.loader-triangle {
  fill: var(--accent-color);
  animation: moveTriangle 3s linear infinite;
}

@keyframes drawPath {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes moveTriangle {
  0% {
    transform: translateX(-100px);
  }
  100% {
    transform: translateX(300px);
  }
}

/* Slider Section */
.slider-section {
  padding: 5rem 5%;
  background: var(--secondary-color);
}

.slider-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
}

.slider-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.slide {
  min-width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
}

.slide img {
  width: 100%;
  height: 540px;
  background: var(--bg-color);
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  object-fit: cover;
}

.slide-svg:hover {
  transform: translateY(-5px);
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 2;
}

.slider-btn {
  background: var(--header-bg);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-color);
  backdrop-filter: blur(5px);
  transition: all var(--transition-speed);
}

.slider-btn:hover {
  background: var(--accent-color);
  color: var(--bg-color);
  transform: scale(1.1);
}

.dots-container {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-color);
  opacity: 0.3;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.dot.active {
  opacity: 1;
  transform: scale(1.2);
  background: var(--accent-color);
}

/* Gallery Modal */
.gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.modal-open {
  display: flex !important;
}

.modal-content {
  position: relative;
  width: 95%;
  max-width: 1400px;
  height: 90vh;
  background: var(--bg-color);
  border-radius: 15px;
  padding: 2rem;
  overflow: hidden;
}

.modal-slider {
  height: 100%;
  overflow: hidden;
}

.modal-track {
  display: flex;
  flex-wrap: wrap;
  /* gap: 1rem; */
  /* padding: 1rem; */
  height: 100%;
  overflow-y: scroll;
  transition: transform 0.5s ease;
  padding-bottom: 4em;
  justify-content: center;
}

.modal-slide {
  width: calc(33% - 1rem);
  position: relative;
  overflow: hidden;
  background: var(--secondary-color);
  transition: transform 0.3s ease;
  aspect-ratio: 1;
  cursor: pointer;
}

.modal-slide:hover {
  transform: scale(1.02);
}

.modal-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover; 
}

.modal-slide .portfolio-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--header-bg);
  padding: 1rem;
  backdrop-filter: blur(5px);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.modal-slide:hover .portfolio-info {
  transform: translateY(0);
}

@media (max-width: 1024px) {
  .modal-slide {
    width: calc(50% - 1rem);
  }
}

@media (max-width: 768px) {
  .modal-slide {
    width: 100%;
  }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 3;
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  left: 0;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.modal-nav-btn {
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-color);
  backdrop-filter: blur(5px);
  pointer-events: auto;
  transition: all var(--transition-speed);
}

.modal-nav-btn:hover {
  background: var(--accent-color);
  color: var(--bg-color);
  transform: scale(1.1);
}

#modal-title
{
  margin-bottom: 1em;
}