/* Reset and base styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: #181c20;
  color: #f5f6fa;
  font-family: 'Poppins', 'Raleway', Arial, sans-serif;
  min-height: 100vh;
  line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5em;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.4rem; }

a {
  color: #7f98c2;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: #f5c518;
}

/* Layout */
.main {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  gap: 2rem;
  padding: 2rem 0;
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.info {
  background: #23272a;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  width: 380px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  top: 3rem;
  left : 8.2rem;
  z-index: 10;
  position: relative;
}
.proimg {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
}
.proimg img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 4px solid #fff;
  object-fit: cover;
  margin-bottom: 0.7rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

.proimg .name {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.proimg .name h1 {
  font-size: 1.4rem;
  color: #f5c518;
  margin-bottom: 0.2rem;
}
.proimg .name h3 {
  font-size: 1rem;
  color: #b0b8c1;
  font-weight: 500;
}

/* Info Card Flip Effect */
.info-card-flip {
  perspective: 1200px;
  width: 100%;
  min-height: 320px;
  position: relative;
}
.info-card-inner {
  position: relative;
  width: 100%;
  min-height: 320px;
  transition: transform 0.7s cubic-bezier(.4,2,.6,1);
  transform-style: preserve-3d;
}
.info-card-flip.flipped .info-card-inner {
  transform: rotateY(180deg);
}
.info-card.front,
.info-card.back {
  position: absolute;
  width: 100%;
  min-height: 320px;
  top: 0;
  left: 0;
  backface-visibility: hidden;
  background: #2c363b;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 1.2rem 1rem;
  transition: box-shadow 0.2s;
}
.info-card.back {
  transform: rotateY(180deg);
  z-index: 2;
}
.info-card.front {
  z-index: 3;
}

/* --- Improved Navigation Buttons --- */
.main-nav {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: stretch;
  margin-bottom: 1rem;
}
.main-nav a {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  font-size: 1.08rem;
  font-weight: 600;
  color: #fff;
  background: #344258;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  text-align: left;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.main-nav a i {
  font-size: 1.2rem;
  color: #f5c518;
  min-width: 22px;
  text-align: center;
}
.main-nav a.active,
.main-nav a:hover {
  background: #f5c518;
  color: #23272a;
  box-shadow: 0 2px 8px rgba(245,197,24,0.10);
}
.main-nav a.active i,
.main-nav a:hover i {
  color: #23272a;
}

.info-card .return {
  display: block;
  background: none;
  border: none;
  color: #f5c518;
  font-size: 1.3rem;
  cursor: pointer;
  margin: 1rem auto 0 auto;
  transition: color 0.2s;
}
.info-card .return:hover {
  color: #fff;
}
.info-card .pi {
  text-align: center;
  font-weight: 700;
  color: #f5c518;
  margin-bottom: 1rem;
}
.info-card .Info {
  margin-top: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.info-card .detail {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.info-card .icon i {
  font-size: 1.5rem;
  color: #f5c518;
}
.info-card .data .heading {
  font-size: 0.95rem;
  color: #b0b8c1;
  font-weight: 500;
}
.info-card .data a {
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  word-break: break-all;
}
.info-card .divider {
  height: 1px;
  background: #3a3f47;
  width: 100%;
  margin: 0.5rem 0;
}

/* Download & Contact Buttons */
.download {
  margin-top: 5rem;
  width: 100%;
  display: flex;
  flex-direction: row;
  gap: 0.7rem;
  justify-content: center;
}
.cv, .contact_me {
  background: #4e5d64;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 0.7rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cv:hover, .contact_me:hover {
  background: #f5c518;
  color: #23272a;
}

.content-wrapper {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
  width: calc(100vw - 400px);
  background: transparent;
  padding: 0 0 2rem 0;
  margin-left: 7rem;
  margin-right: 2rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scrollbar-color: transparent transparent;
}
.content-wrapper::-webkit-scrollbar {
  display: none;
}

.more {
  flex: 1 1 0;
  max-width: 900px;
  width: 100%;
  background: #23272aa1;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  padding: 2.5rem 2rem;
  margin-left: 0;
  margin-bottom: 2rem;
}

.aboutme {
  width: 100%;
}

.article-title {
  font-size: 2rem;
  color: #f5c518;
  margin-bottom: 1.5rem;
}

.contact-form {
  margin-top: 2rem;
}
.form-title {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 1rem;
}
.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.input-wrapper {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.form-input {
  flex: 1 1 200px;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  border: 1px solid #3a3f47;
  background: #181c20;
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: border 0.2s;
}
.form-input:focus {
  border: 1.5px solid #f5c518;
}
textarea.form-input {
  min-height: 100px;
  resize: vertical;
}
.form-btn {
  background: #f5c518;
  color: #23272a;
  border: none;
  border-radius: 8px;
  padding: 0.8rem 0;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.form-btn:disabled {
  background: #b0b8c1;
  color: #23272a;
  cursor: not-allowed;
}

.mapbox {
  width: 100%;
  height: 300px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid #3a3f47;
}
.mapbox iframe {
  width: 100%;
  height: 100%;
  border: none;
  filter: grayscale(1) invert(0.95);
}

/* Social links - icon and text always visible, no split/slide on hover */
.social {
  position: fixed;
  top: 60%;
  left: 110px;
  transform: translateY(-50%);
  z-index: -10;
  transition: all 0.3s;
}

.social ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
}

.social ul li {
  background: #23272a;
  border-radius: 50px 0 0 50px;
  padding: 0.55rem 0.8rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 120px;
  cursor: pointer;
  position: relative;
  z-index: 1;
  overflow: visible;
}

.social ul li.instagram:hover,
.social ul li.instagram:focus-within {
  background: #e1306c; /* Instagram pink */
}
.social ul li.linkedin:hover,
.social ul li.linkedin:focus-within {
  background: #0077b5; /* LinkedIn blue */
}
.social ul li.telegram:hover,
.social ul li.telegram:focus-within {
  background: #0088cc; /* Telegram blue */
}
.social ul li.github:hover,
.social ul li.github:focus-within {
  background: #fff; /* GitHub dark */
}
.social ul li.twitter:hover,
.social ul li.twitter:focus-within {
  background: #fff; /* Twitter blue */
}

.social ul li.github:hover a,
.social ul li.github:focus-within a,
.social ul li.twitter:hover i,
.social ul li.twitter:focus-within i,
.social ul li.github:hover i,
.social ul li.github:focus-within i {
  color: #23272a !important; /* Black icon and text on hover */
}

.social ul li:hover,
.social ul li:focus-within {
    z-index: 2;
    transform: translateX(-95px);
    transition: transform 0.5s ease-in-out;
}

.social ul li a {
  color : #23272a;
  font-size: 1.1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
  white-space: nowrap;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}
.social ul li:hover a,
.social ul li:focus-within a {
  color: #000000;
}
.social ul li i {
  color: #fff;
  font-size: 1.4rem;
  transition: color 0.2s;
  z-index: 2;
}

.social ul li span {
  display: inline-block;
  font-size: 1rem;
  color: inherit;
  background: transparent;
  opacity: 1;
  pointer-events: auto;
  white-space: nowrap;
  padding: 0;
  margin-left: 0.5rem;
  border-radius: 0;
  box-shadow: none;
  transition: none;
}


/* Hamburger styles with animation */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 38px;
  height: 38px;
  background: #23272a;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  z-index: 1002;
  position: fixed;
  top: 18px;
  right: 18px;
  transition: background 0.2s;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 3px;
  margin: 4px 0;
  background: #f5c518;
  border-radius: 2px;
  transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(-45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-8px);
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(45deg);
}

@keyframes hamburger-bounce {
  0% { transform: scale(1);}
  30% { transform: scale(1.2);}
  60% { transform: scale(0.95);}
  100% { transform: scale(1);}
}
.hamburger.active {
  animation: hamburger-bounce 0.4s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}

/* Overlay for menu (optional, for closing menu on click outside) */
.menu-overlay {
  display: none;
}
@media (max-width: 1100px) {
  .menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
  }
  .menu-overlay.active {
    display: block;
  }
}

/* Responsive: Stack layout on tablets and phones */
@media (max-width: 1100px) {
  .main {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    height: auto;
    overflow: visible;
  }
  .hamburger {
    display: flex;
  }
  .info {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    min-width: unset;
    max-width: unset;
    height: 100vh;
    margin: 0;
    border-radius: 0;
    box-shadow: 2px 0 16px rgba(0,0,0,0.18);
    background: #23272a;
    z-index: 1001;
    transition: left 0.3s;
    overflow-y: auto;
    overflow-x : hidden;
    padding: 2rem 1rem 1.5rem 1rem;
    opacity: 0;
    transition: left 0.3s, opacity 0.3s;
  }
  .info.open {
    left: 0;
    opacity: 1;
  }
  .social {
    position: static;
    left: 0;
    top: 0;
    transform: none;
    margin: 1rem 0 0 0;
    flex-direction: row;
    justify-content: center;
    width: 100vw;
    z-index: 10;
  }
  .social ul {
    flex-direction: row;
    gap: 0.5rem;
    justify-content: center;
    width: 100vw;
  }
  .social ul li {
    border-radius: 30px;
    min-width: 40px;
    width: auto;
    padding: 0.5rem 0.7rem;
    margin: 0;
    transition: none !important;
    transform: none !important;
  }
  .social ul li:hover,
  .social ul li:focus-within {
    /* Remove hover translation and z-index change */
    z-index: 1;
    transform: none !important;
    transition: none !important;
  }
  .social ul li span {
    display: none !important;
  }
  .social ul li i {
    font-size: 1.5rem;
    color: #fff;
    transition: none !important;
  }
  .content-wrapper {
    margin-left: 2vw;
    margin-right: 2vw;
    width: 96vw;
    max-width: 100vw;
    height: auto;
    padding: 0;
    overflow: visible;
  }
  .more {
    margin: 1.5rem 0 2rem 0;
    padding: 1.5rem 0.5rem;
    max-width: 100vw;
    border-radius: 12px;
  }
  .cv, .contact_me {
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
    border-radius: 12px;
    gap: 0.3rem;
  }
  .cv i, .contact_me i {
    font-size: 0.95rem;
  }
}

@media (max-width: 768){
  .more {
    margin-bottom : 6rem;
    padding: 1.5rem 0.5rem;
  }
}

/* Extra small screens */
@media (max-width: 600px) {
  .info {
    padding: 1.2rem 0.5rem 1rem 0.5rem;
  }
  .social ul li {
    font-size: 1.2rem;
    padding: 0.3rem 0.5rem;
    min-width: 30px;
    width: auto;
  }
  .social ul li span {
    display: none !important;
  }
  .social ul li i {
    font-size: 1.5rem;
    color: #fff;
    transition: none !important;
  }
  .more {
    margin-bottom : 6rem;
    padding: 1rem 1rem;
  }
  .article-title {
    font-size: 1.2rem;
  }
  .cv, .contact_me {
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
    border-radius: 12px;
    gap: 0.3rem;
  }
  .cv i, .contact_me i {
    font-size: 0.95rem;
  }
  .content-wrapper {
    margin-left: 3vw;
    margin-right: 3vw;
    width: 94vw;
    max-width: 100vw;
    padding: 0;
  }
}

@media (max-width: 500px) {
  .content-wrapper {
    margin-left: 2vw;
    margin-right: 2vw;
    width: 96vw;
    max-width: 100vw;
    padding: 0;
  }
}

/* Print optimizations for printing portfolio page directly */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-family: Arial, Helvetica, sans-serif !important;
  }
  .bgAnimation,
  .hamburger,
  .info,
  .social,
  .download,
  .main-nav-bottom,
  .mapbox,
  .contact-form,
  .filter-list,
  .filter-dropdown,
  .project-item-icon-box {
    display: none !important;
  }
  .main {
    padding: 0 !important;
    height: auto !important;
    display: block !important;
    overflow: visible !important;
  }
  .content-wrapper {
    margin: 0 !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
  }
  .more {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }
  .article-title {
    color: #000000 !important;
  }
  .article-title::before {
    background: #000000 !important;
  }
  h1, h2, h3, h4, h5, h6, p, span, li, a {
    color: #000000 !important;
  }
  .skills-item {
    background: transparent !important;
    box-shadow: none !important;
    border: 1px solid #cccccc !important;
    page-break-inside: avoid;
  }
  .skill-progress-bg,
  .skill-progress-fill {
    display: none !important;
  }
  .timeline-list {
    border-left-color: #000000 !important;
  }
  .timeline-item {
    page-break-inside: avoid;
  }
  .timeline-item::before {
    background: #000000 !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 0 4px #ffffff !important;
  }
}