/* =============================================
   Oksana Fedko Portfolio — Consolidated Theme
   Pink accent: #ef5285
   ============================================= */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scrollbar-gutter: stable;
}

body {
  font-family: "Roboto", Helvetica, Arial, sans-serif;
  min-width: 320px;
  font-size: 16px;
  line-height: 1.55;
  color: #000;
  background-color: #f4f4f4;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #ef5285;
  text-decoration: none;
  transition: all 0.2s ease-out;
}

a:hover,
a:focus {
  color: #e01557;
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid #ef5285;
  outline-offset: 2px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Roboto", Helvetica, Arial, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: #000;
  margin-top: 0;
}

h1 {
  font-size: 48px;
}

h2 {
  font-size: 38px;
}

h3 {
  font-size: 32px;
}

h4 {
  font-size: 24px;
}

h5 {
  font-size: 16px;
}

h6 {
  font-size: 14px;
}

h1,
h2,
h3 {
  margin-bottom: 24px;
}

p {
  margin: 0 0 24px;
}

hr {
  margin-top: 24px;
  margin-bottom: 24px;
  border: 0;
  border-top: 1px solid #cdcdcd;
}

ul {
  list-style: none;
  padding: 0;
}

/* --- Layout --- */
.site-container {
  display: flex;
  min-height: 100vh;
}

/* --- Sidebar --- */
#sidebar {
  padding: 40px 15px 40px 15px;
  width: 25%;
  flex-shrink: 0;
  position: relative;
}

@media (max-width: 767px) {
  #sidebar {
    position: fixed;
    top: 0;
    left: -70%;
    width: 70%;
    height: 100vh;
    z-index: 1000;
    background: #f4f4f4;
    transition: left 0.25s ease-out;
    overflow-y: auto;
    padding: 40px 20px;
  }

  #sidebar.active {
    left: 0;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  #sidebar {
    width: 33.33%;
  }
}

.sidebar-heading {
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.sidebar-heading a {
  color: #000;
  text-decoration: none;
}

.sidebar-heading a:hover {
  color: #ef5285;
  text-decoration: none;
}

.sidebar-p {
  color: #666;
  font-size: 14px;
}

.sidebar-menu {
  padding-left: 20px;
  margin-bottom: 40px;
}

.sidebar-menu li {
  margin-bottom: 5px;
}

.sidebar-menu li a {
  color: #555;
  text-decoration: none;
}

.sidebar-menu li::before {
  content: '\203A';
  margin: 0 5px 0 -15px;
  color: #999;
}

.sidebar-menu li.active a {
  color: #ef5285;
  font-weight: bold;
}

.sidebar-menu li.active::before {
  color: #ef5285;
}

.sidebar-menu li:hover a {
  text-decoration: none;
  color: #ef5285;
}

.sidebar-menu li:hover::before {
  color: #ef5285;
}

.logo-img {
  display: block;
  margin: 0 26px 20px;
  border-radius: 50%;
}

/* --- Social Buttons --- */
.social {
  margin-top: 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: solid 1px #999;
  color: #999;
  transition: all 0.2s ease-out;
  text-decoration: none;
}

.social a:hover {
  color: #ef5285;
  border-color: #ef5285;
  text-decoration: none;
}

.social a svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.social--big a {
  width: 60px;
  height: 60px;
}

.social--big a svg {
  width: 24px;
  height: 24px;
}

/* --- Copyright --- */
.copyright {
  color: #999;
  font-size: 13px;
  margin-top: 20px;
}

.copyright .credit {
  margin-bottom: 10px;
}

.copyright .credit a {
  color: #999;
}

@media (max-width: 991px) {
  .copyright {
    text-align: center;
  }

  .copyright .credit {
    text-align: center;
  }
}

/* --- Main Content Area --- */
.content-column {
  flex: 1;
  min-width: 0;
  padding: 40px 15px 0;
}

.content-column.white-background {
  background: #fff;
}

/* --- Mobile Nav Toggle --- */
.mobile-nav {
  display: none;
  margin-bottom: 20px;
  padding: 15px 15px 0;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 767px) {
  .mobile-nav {
    display: flex;
  }

  .content-column {
    padding-top: 10px;
  }
}

.mobile-nav .btn-menu {
  background: transparent;
  border: 1px solid #ef5285;
  color: #ef5285;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease-out;
}

.mobile-nav .btn-menu:hover {
  background: #ef5285;
  color: #fff;
}

.mobile-nav .btn-menu svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.mobile-nav-heading {
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
}

.mobile-nav-heading a {
  color: #000;
  text-decoration: none;
}

.mobile-nav-heading a:hover {
  color: #ef5285;
  text-decoration: none;
}

/* Mobile overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
}

.sidebar-overlay.active {
  display: block;
}

/* --- Portfolio Grid (Masonry) --- */
.grid {
  padding: 5px 0;
}

.portfolio-grid {
  padding: 0 15px;
  position: relative;
}

.portfolio-grid .masonry-item {
  position: absolute;
  width: 25%;
}

@media (max-width: 1199px) {
  .portfolio-grid .masonry-item {
    width: 33.333%;
  }
}

@media (max-width: 991px) {
  .portfolio-grid .masonry-item {
    width: 50%;
  }
}

@media (max-width: 575px) {
  .portfolio-grid .masonry-item {
    width: 100%;
  }
}

.portfolio-grid-full {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  margin: 0 -15px;
}

.portfolio-grid-full .masonry-item {
  padding: 0 15px;
}

.portfolio-grid-full .box-masonry {
  margin: 0 0 15px;
}

.portfolio-grid-full .box-masonry-image img {
  max-height: 85vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* --- Masonry Card --- */
.box-masonry {
  background: #fff;
  margin: 0 8px 15px;
  position: relative;
  box-shadow: 0 0 5px #ccc;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  flex-direction: column;
}

.box-masonry:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.box-masonry h3 {
  font-size: 16px;
  line-height: 1.5;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.box-masonry h3 a {
  color: #000;
  text-decoration: none;
}

.box-masonry h3 a:hover {
  color: #ef5285;
  text-decoration: none;
}

.box-masonry-image {
  display: block;
  position: relative;
  min-height: 100px;
  background: transparent;
  flex-grow: 0;
  overflow: hidden;
}

.box-masonry-image img {
  width: 100%;
  height: auto;
  margin: 0 auto;
}

/* Hover overlay */
.box-masonry-image.with-hover-overlay::before {
  display: block;
  position: absolute;
  content: " ";
  background: #fff;
  opacity: 0;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  transition: opacity 0.2s ease-out;
}

.box-masonry:hover .box-masonry-image.with-hover-overlay::before {
  opacity: 0.8;
}

/* Hover arrow icon */
.box-masonry-image.with-hover-icon::after {
  display: block;
  position: absolute;
  width: 100%;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.2s ease-out;
  content: '\203A';
  text-align: center;
  font-size: 50px;
  color: #555;
}

.box-masonry:hover .box-masonry-image.with-hover-icon::after {
  opacity: 0.7;
}

.box-masonry-text {
  padding: 15px 20px;
  flex-shrink: 0;
  min-height: 74px;
}

.box-masonry-text p {
  color: #666;
  font-size: 14px;
}

.box-masonry-hover-text-header {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 15px 20px;
  opacity: 0;
  transition: opacity 0.2s ease-out;
  color: #333;
  background: rgba(255, 255, 255, 0.92);
}

.box-masonry-hover-text-header p {
  font-size: 14px;
  color: #555;
}

.box-masonry-hover-text-header h3 a {
  color: #333;
}

.box-masonry:hover .box-masonry-hover-text-header {
  opacity: 1;
}

.box-masonry-description p {
  color: #666;
  font-size: 14px;
}

/* --- Content Column Content --- */
.content-column-content {
  padding: 0 20px 20px;
}

@media (min-width: 1200px) {
  .content-column-content {
    padding-left: 40px;
    padding-right: 40px;
  }
}

/* --- Responsive Images --- */
.img-responsive {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.content-column-content p.lead {
  color: #555;
}

.content-column-content h1 {
  font-size: 24px;
  margin: 10px 0;
}

.content-column-content h2 {
  font-size: 18px;
  margin: 10px 0;
}

.content-column-content p,
.content-column-content li {
  color: #555;
}

.content-column-content ul li::before {
  content: '\203A';
  margin: 0 5px 0 -15px;
  color: #ef5285;
}

.content-column-content .img-responsive {
  max-height: calc(100vh - 109px);
  width: auto;
  margin: 0 auto;
}

/* --- About Page --- */
.about-container {
  overflow: hidden;
}

img.about-img {
  float: left;
  margin: 0 30px 30px 0;
  max-width: 280px;
}

div.about-text {
  overflow: hidden;
}

@media (max-width: 555px) {
  img.about-img {
    float: none;
    max-width: 100%;
    margin: 0 0 20px;
  }

  div.about-text {
    display: inline-block;
    width: 100%;
  }
}

/* --- Contact Page --- */
.contact-social-buttons {
  margin-top: 25px;
}

.contact-social-buttons .social--big {
  margin-bottom: 24px;
  padding: 5px 0;
}

.contact-form {
  margin-bottom: 20px;
  max-width: 550px;
}

/* --- Forms --- */
label {
  font-weight: normal;
  color: #555;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 5px;
}

.form-control {
  display: block;
  width: 100%;
  height: 38px;
  padding: 6px 12px;
  font-size: 16px;
  line-height: 1.55;
  color: #555;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 0;
  box-shadow: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.form-control:focus {
  border-color: #ef5285;
  outline: 0;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(239, 82, 133, 0.6);
}

textarea.form-control {
  height: auto;
  resize: vertical;
}

.form-group {
  margin-bottom: 20px;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-weight: 400;
  font-family: "Roboto", Helvetica, Arial, sans-serif;
  padding: 6px 12px;
  font-size: 16px;
  line-height: 1.55;
  border-radius: 0;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease-out;
  border: 1px solid transparent;
}

.btn-ghost {
  color: #ef5285;
  background-color: transparent;
  border-color: #ef5285;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  color: #fff;
  background-color: #ef5285;
  border-color: #ef5285;
  text-decoration: none;
}

.btn-ghost:focus-visible {
  outline: 2px solid #ef5285;
  outline-offset: 2px;
}

/* Full-width send button on contact page */
.contact-form .btn-ghost {
  width: 100%;
  padding: 12px 24px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* --- 404 --- */
/* Uses content-column-content styles */

/* --- Utilities --- */
.text-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- Responsive: hide sidebar on mobile, show toggle --- */
@media (max-width: 767px) {
  .site-container {
    flex-direction: column;
  }
}

/* --- Entrance Animations --- */
.masonry-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.masonry-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animation delay for items in view */
.masonry-item:nth-child(2) {
  transition-delay: 0.05s;
}

.masonry-item:nth-child(3) {
  transition-delay: 0.1s;
}

.masonry-item:nth-child(4) {
  transition-delay: 0.15s;
}

/* --- Enhanced Hover Effects --- */
.box-masonry-image img {
  transition: transform 0.3s ease-out;
}

.box-masonry:hover .box-masonry-image img {
  transform: scale(1.03);
}

/* --- Dark Mode Toggle Button --- */
.theme-toggle {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #555;
  display: inline-flex;
  align-items: center;
  transition: color 0.3s ease, transform 0.3s ease;
  line-height: 0;
  position: absolute;
  top: 40px;
  right: 15px;
}

/* On desktop: pin to top-right corner of the page */
@media (min-width: 992px) {
  .theme-toggle {
    position: fixed;
    top: 12px;
    right: 24px;
    margin-top: 0;
    z-index: 1000;
    background: rgba(244, 244, 244, 0.7);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    justify-content: center;
    backdrop-filter: blur(4px);
  }
}

.theme-toggle:hover {
  color: #ef5285;
  transform: rotate(15deg);
}

.theme-toggle .sun {
  display: block;
}

.theme-toggle .moon {
  display: none;
}

/* --- Dark Mode (class-based) --- */
body.dark-mode {
  color: #e0e0e0;
  background-color: #1a1a1a;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
  color: #f0f0f0;
}

body.dark-mode #sidebar {
  background-color: #1a1a1a;
}

body.dark-mode .sidebar-heading a {
  color: #f0f0f0;
}

body.dark-mode .sidebar-p {
  color: #aaa;
}

body.dark-mode .sidebar-menu li a {
  color: #bbb;
}

body.dark-mode .mobile-nav-heading a {
  color: #f0f0f0;
}

body.dark-mode .content-column.white-background {
  background: #222;
}

body.dark-mode .box-masonry {
  background: #2a2a2a;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

body.dark-mode .box-masonry:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

body.dark-mode .box-masonry h3 a {
  color: #f0f0f0;
}

body.dark-mode .box-masonry-text p,
body.dark-mode .box-masonry-description p {
  color: #999;
}

body.dark-mode .box-masonry-hover-text-header {
  background: rgba(30, 30, 30, 0.92);
  color: #e0e0e0;
}

body.dark-mode .box-masonry-hover-text-header h3 a {
  color: #e0e0e0;
}

body.dark-mode .box-masonry-hover-text-header p {
  color: #aaa;
}

body.dark-mode .content-column-content p,
body.dark-mode .content-column-content li {
  color: #bbb;
}

body.dark-mode .content-column-content h1 {
  color: #f0f0f0;
}

body.dark-mode .form-control {
  background-color: #333;
  border-color: #555;
  color: #e0e0e0;
}

body.dark-mode .form-control:focus {
  border-color: #ef5285;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .2), 0 0 8px rgba(239, 82, 133, 0.4);
}

body.dark-mode label {
  color: #bbb;
}

body.dark-mode .copyright,
body.dark-mode .copyright .credit a {
  color: #777;
}

body.dark-mode .social a {
  border-color: #666;
  color: #999;
}

body.dark-mode .mobile-nav .btn-menu {
  border-color: #ef5285;
  color: #ef5285;
}

body.dark-mode .theme-toggle {
  color: #ccc;
}

@media (min-width: 992px) {
  body.dark-mode .theme-toggle {
    background: rgba(26, 26, 26, 0.7);
  }
}

body.dark-mode .theme-toggle:hover {
  color: #ef5285;
}

body.dark-mode .theme-toggle .sun {
  display: none;
}

body.dark-mode .theme-toggle .moon {
  display: block;
}