@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Poppins:wght@300;400;500;600&display=swap');

:root {
  --primary-color: #0a0a0a;
  --secondary-color: #121212;
  --accent-color: #e0a500;
  --text-light: #f8f8f8;
  --text-mid: #aaaaaa;
  --text-dark: #000000;
  --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

body, html {
  background-color: var(--primary-color);
  background-image: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-light);
  height: 100%;
  margin: 0;
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* Animated background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 30%, rgba(30, 30, 30, 0.4) 0%, transparent 60%),
              radial-gradient(circle at 70% 70%, rgba(20, 20, 20, 0.4) 0%, transparent 60%);
  z-index: -1;
  animation: backgroundPulse 15s infinite alternate;
}

@keyframes backgroundPulse {
  0% {
    opacity: 0.5;
    background-position: 0% 0%;
  }
  50% {
    opacity: 0.7;
    background-position: 100% 100%;
  }
  100% {
    opacity: 0.5;
    background-position: 0% 0%;
  }
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  z-index: 1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  position: relative;
}

h1 {
  font-size: 3.5rem;
  text-align: center;
  color: var(--text-light);
  margin-bottom: 2rem;
  font-weight: 400;
  text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
  animation: fadeInDown 1s ease-out;
}

h1 i {
  color: var(--accent-color);
  font-style: italic;
  position: relative;
  display: inline-block;
  animation: glowText 3s infinite alternate;
}

@keyframes glowText {
  0% {
    text-shadow: 0 0 5px rgba(224, 165, 0, 0.5);
  }
  100% {
    text-shadow: 0 0 15px rgba(224, 165, 0, 0.8), 0 0 20px rgba(224, 165, 0, 0.4);
  }
}

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

h3 {
  font-size: 2.2rem;
  position: relative;
  margin-bottom: 2rem;
  animation: fadeIn 1s ease-out;
}

h3:after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  animation: lineExtend 1.5s forwards ease-out;
}

@keyframes lineExtend {
  to { width: 100px; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-mid);
  opacity: 0;
  animation: fadeInParagraph 0.5s forwards;
  animation-delay: calc(var(--paragraph-index, 0) * 0.2s + 0.5s);
}

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

hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent-color), transparent);
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}

hr::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.cont {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  width: 100%;
  animation: fadeInUp 1s ease-out;
  animation-delay: 0.5s;
  opacity: 0;
  animation-fill-mode: forwards;
  text-align: center;
}

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

.button {
  background-color: transparent;
  border: 1px solid var(--accent-color);
  color: var(--text-light);
  padding: 12px 24px;
  border-radius: 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: var(--transition);
}

.button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: var(--accent-color);
  z-index: -1;
  transition: var(--transition);
  transform: skewX(-15deg);
}

.button:hover {
  color: var(--text-dark);
  border-color: var(--accent-color);
}

.button:hover::before {
  width: 120%;
}

.button::after {
  content: '';
  position: absolute;
  top: 0;
  left: -5px;
  width: 0;
  height: 1px;
  background-color: var(--accent-color);
  transition: var(--transition);
}

.button:hover::after {
  width: calc(100% + 10px);
}

a:link, a:visited {
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
}

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

.typewriter h1 {
  overflow: hidden;
  border-right: 0.08em solid var(--accent-color);
  white-space: nowrap;
  margin: 0 auto;
  animation: 
    typing 3.5s steps(40, end),
    blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--accent-color) }
}

.informationContainer {
  width: 80%;
  max-width: 900px;
  margin: 5rem auto;
  padding: 3rem;
  background-color: rgba(18, 18, 18, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  transform: translateY(20px);
  opacity: 0;
  animation: fadeInContainer 1s forwards ease-out;
  position: relative;
  overflow: hidden;
}

.informationContainer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.02), transparent);
  transform: translateX(-100%);
  animation: lightSweep 5s infinite;
}

@keyframes lightSweep {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

@keyframes fadeInContainer {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.grid {
  width: 90%;
  max-width: 1200px;
  margin: 5rem auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  opacity: 0;
  animation: gridFadeIn 1s forwards ease-out;
}

@keyframes gridFadeIn {
  to { opacity: 1; }
}

.project-card {
  background-color: rgba(18, 18, 18, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: var(--transition);
  transform: translateY(0);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: cardAppear 0.8s forwards;
  animation-delay: calc(var(--card-index, 0) * 0.2s + 0.5s);
}

.project-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--accent-color), transparent);
  transform: scaleX(0);
  transition: transform 0.6s ease;
}

.project-card:hover::after {
  transform: scaleX(1);
}

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

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.return-button {
  position: fixed;
  top: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--secondary-color);
  border: 1px solid var(--accent-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
  z-index: 100;
  opacity: 0;
  animation: buttonAppear 1s forwards ease-out;
  animation-delay: 0.5s;
}

@keyframes buttonAppear {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.return-button:hover {
  transform: scale(1.1) rotate(-10deg);
  box-shadow: 0 8px 20px rgba(224, 165, 0, 0.3);
  background-color: var(--accent-color);
}

.return-button span {
  font-size: 24px;
  color: var(--accent-color);
  transition: var(--transition);
}

.return-button:hover span {
  color: var(--text-dark);
}

/* Adjust iframe to match design */
iframe {
  width: 100%;
  border: none !important;
  background-color: var(--secondary-color) !important;
  margin-bottom: 20px;
  border-radius: 0 !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
}

iframe:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  
  .informationContainer {
    width: 90%;
    padding: 2rem;
  }
  
  .button {
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
  }
}

/* Comprehensive responsive design */
/* Small mobile devices (< 576px) */
@media (max-width: 575px) {
  h1 {
    font-size: 2rem;
  }
  
  h3 {
    font-size: 1.8rem;
  }
  
  .container {
    padding: 0 15px;
    justify-content: center;
    align-items: center;
    text-align: center;
    display: flex;
    flex-direction: column;
  }
  
  .typewriter h1 {
    white-space: normal;
    border-right: none;
    animation: fadeInDown 1s ease-out;
  }
  
  .cont {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 1.5rem auto;
    gap: 15px;
  }
  
  .button {
    display: block;
    width: 80%;
    max-width: 280px;
    margin: 0 auto 15px;
    text-align: center;
    padding: 10px 20px;
  }
  
  .informationContainer {
    width: 95%;
    padding: 1.5rem;
    margin: 3rem auto;
  }
  
  .return-button {
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
  }
  
  .return-button span {
    font-size: 18px;
  }
  
  .grid {
    grid-template-columns: 1fr;
    width: 95%;
    margin: 2rem auto;
    gap: 20px;
  }
  
  .project-card {
    min-height: auto;
    padding: 1.2rem;
  }
  
  .project-card h4 {
    font-size: 1.4rem;
  }
  
  .project-card .project-image {
    height: 160px;
  }
  
  .containerForAbout {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    width: 100%;
  }
  
  .animation {
    margin-left: 0;
    width: 100%;
  }
}

/* Medium devices (tablets, 576px - 991px) */
@media (min-width: 576px) and (max-width: 991px) {
  h1 {
    font-size: 2.8rem;
  }
  
  .container {
    padding: 0 20px;
  }
  
  .cont {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .button {
    width: calc(50% - 10px);
    text-align: center;
  }
  
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    width: 90%;
  }
  
  .informationContainer {
    width: 85%;
    padding: 2rem;
  }
  
  .project-card .project-image {
    height: 160px;
  }
  
  .containerForAbout {
    font-size: 1.3rem;
  }
  
  .animation {
    height: 45px;
  }
  
  .animation > div > div {
    height: 2.5rem;
    margin-bottom: 2.5rem;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .container {
    max-width: 1100px;
  }
  
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

/* Adjust for landscape orientation on mobile */
@media (max-height: 500px) and (max-width: 991px) {
  .container {
    height: auto;
    min-height: 100%;
    padding: 2rem 20px;
  }
  
  h1 {
    margin-bottom: 1rem;
    font-size: 2.2rem;
  }
  
  .cont {
    margin-top: 20px;
  }
  
  .informationContainer {
    margin: 2rem auto;
  }
}

/* Fix for mobile navigation and scrolling */
@media (max-width: 991px) {
  html, body {
    overflow-x: hidden;
  }
  
  body {
    position: relative;
  }
}

/* Mouse trail effect */
.cursor-trail {
  position: fixed;
  width: 5px;
  height: 5px;
  background-color: var(--accent-color);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  filter: blur(1px);
  box-shadow: 0 0 10px var(--accent-color);
}

/* Page transitions */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary-color);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.page-transition.active {
  transform: translateY(0);
}

/* Floating particles */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background-color: rgba(224, 165, 0, 0.3);
  border-radius: 50%;
  animation: float 20s linear infinite;
}

/* Additional project card styles */
.project-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  min-height: 240px;
}

.project-card h4 {
  color: var(--text-light);
  font-size: 1.6rem;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.project-card h4::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.project-card:hover h4::after {
  width: 100%;
}

.project-card p {
  color: var(--text-mid);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.project-card .project-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  margin-bottom: 1.2rem;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-card:hover .project-image {
  transform: scale(1.03);
  border: 1px solid rgba(224, 165, 0, 0.3);
}

.project-card .project-link {
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
  margin-top: auto;
  position: relative;
  transition: var(--transition);
}

.project-card .project-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--accent-color);
  transition: var(--transition);
}

.project-card .project-link:hover::after {
  width: 100%;
}

.project-card .project-link span {
  margin-left: 5px;
  font-size: 1rem;
  transition: var(--transition);
}

.project-card .project-link:hover span {
  transform: translateX(5px);
}

.project-card .tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 1rem 0;
}

.project-card .tech-tag {
  background-color: rgba(224, 165, 0, 0.1);
  color: var(--accent-color);
  padding: 3px 8px;
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  border: 1px solid rgba(224, 165, 0, 0.3);
  transition: var(--transition);
}

.project-card:hover .tech-tag {
  background-color: rgba(224, 165, 0, 0.2);
}

/* The following mobile menu styles can be removed since they're not needed anymore */
.mobile-menu-btn,
.mobile-nav,
.overlay,
.mobile-nav-links {
  display: none !important;
}

/* Touch-specific styles */
.touch-device .button:hover::before,
.touch-device .project-card:hover::after,
.touch-device .project-card:hover h4::after,
.touch-device .project-card:hover .project-image,
.touch-device .project-card:hover .project-link::after,
.touch-device .project-card:hover .tech-tag,
.touch-device .return-button:hover {
  /* Disable hover effects on touch devices */
  transform: none;
  transition: none;
}

/* Active state for touch interactions */
.touch-device .button.touch-active {
  color: var(--text-dark);
}

.touch-device .button.touch-active::before {
  width: 120%;
}

.touch-device .project-card.touch-active {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.touch-device .project-card.touch-active::after {
  transform: scaleX(1);
}

.touch-device .project-card.touch-active h4::after {
  width: 100%;
}

.touch-device .project-card.touch-active .project-image {
  transform: scale(1.02);
  border: 1px solid rgba(224, 165, 0, 0.3);
}

.touch-device .project-card.touch-active .project-link::after {
  width: 100%;
}

.touch-device .project-card.touch-active .tech-tag {
  background-color: rgba(224, 165, 0, 0.2);
}

.touch-device .return-button.touch-active {
  transform: scale(1.1);
  background-color: var(--accent-color);
}

.touch-device .return-button.touch-active span {
  color: var(--text-dark);
}

/* Scroll animation classes */
.project-card:not(.scroll-animated),
.informationContainer:not(.scroll-animated),
h1:not(.scroll-animated),
h3:not(.scroll-animated),
.cont:not(.scroll-animated) {
  opacity: 0;
  transform: translateY(20px);
}

.scroll-animated {
  transition: opacity 0.5s ease, transform 0.5s ease;
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Improve animations on low-powered devices */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .project-card,
  .informationContainer,
  h1, h3, .cont {
    opacity: 1 !important;
    transform: none !important;
  }
  
  .animation > div:first-child {
    animation: none !important;
  }
  
  .typewriter h1 {
    border-right: none;
    white-space: normal;
    animation: none;
  }
}

/* Remove these unused mobile button classes */
.mobile-centered-buttons,
.mobile-centered-button {
  display: none;
}