html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}
body {
  line-height: 1;
}
ol,
ul {
  list-style: none;
}
blockquote,
q {
  quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
  content: "";
  content: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}

html {
  box-sizing: border-box;
}

* {
  font-family: "Source Sans 3", sans-serif;
}

/* no formations ---------------------- */

/* color scheme ----------------------  */

:root {
  --primary-color: #2d3250;
  --secondary-color: #424769;
  --accent-color: #676f9d;
  --text-color: #232323;
  --bg-color: #f5f5f5;
  --card-bg: #ffffff;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* -------------------- */

body {
  background-image: url("images/bg.png");

  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.wrapper {
  background-color: var(--card-bg);
  padding: 3rem;
  width: 90%;
  max-width: 1800px;
  box-shadow: 0px 0px 5px 1px rgba(0, 0, 0, 0.75);
  margin: 2rem auto;
  border-radius: 5px;
}

/* Extra Large Screens (4K and above) */
@media screen and (min-width: 2560px) {
  .wrapper {
    max-width: 2200px;
    padding: 4rem;
  }
}

/* Large Screens */
@media screen and (min-width: 1440px) and (max-width: 2559px) {
  .wrapper {
    max-width: 1800px;
  }
}

/* Mobile Screens */
@media screen and (max-width: 768px) {
  .wrapper {
    width: 95%;
    padding: 1.5rem;
    margin: 1rem auto;
  }
}

/* Header Styles - Enhanced */
.headerContent {
  text-align: left;
  margin-bottom: 8rem;
  position: relative;
}

.headerContent h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  transition: transform 0.3s ease;
}

.headerContent h1.hello {
  transform: translateX(-100%);
  opacity: 0;
  animation: slideInFromLeft 0.8s forwards;
}

.headerContent h1.name {
  transform: translateX(100%);
  opacity: 0;
  animation: slideInFromRight 0.8s forwards 0.3s;
}

.headerContent h2 {
  font-size: 1.5rem;
  color: var(--secondary-color);
  font-weight: 600;
  opacity: 0;
  animation: fadeIn 1s forwards 0.8s;
}

@keyframes slideInFromLeft {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInFromRight {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

/* Mobile Responsiveness for Header */
@media screen and (max-width: 768px) {
  .headerContent h1 {
    font-size: 2.5rem;
  }
  
  .headerContent h2 {
    font-size: 1.2rem;
  }
}

/* About Me Section */
.about-me {
  display: flex;
  gap: 2rem;
  align-items: stretch;
  margin-bottom: 4rem;
  padding-top: 2rem;
}

.pfp {
  flex-shrink: 0;
}

.pfp img {
  width: 250px;
  height: 250px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  object-fit: cover;
}

.myInfo {
  flex: 1;
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 250px;
  overflow: hidden;
}

.myInfo h2 {
  margin-bottom: 1rem;
}

.myInfo p {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

/* Projects Section */
#myProjects {
  margin-top: 4rem;
}

#myProjects h2 {
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.projectsContainer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.projectCards {
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.projectImage {
  width: 100%;
  height: 250px;
  overflow: hidden;
}

.projectImage img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.carousel {
  height: 100%;
}

.carousel-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.projectContent {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.projectContent h3 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.projectDescription {
  color: var(--text-color);
  margin-bottom: 1.5rem;
  flex: 1;
}

.tech {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.techIcon {
  width: 25px;
  height: 25px;
  transition: transform 0.2s ease;
}

.techIcon:hover {
  transform: scale(1.2);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  text-decoration: none;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.button:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.button .arrow {
  width: 20px;
  height: 20px;
}

/* Button Styles */
a.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  text-decoration: none;
  transition: all 0.3s ease;
}

a.button:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Footer */
.footer {
  margin-top: 4rem;
  padding: 2rem 0;
  display: flex;
  justify-content: center;
}

.icons {
  display: flex;
  gap: 2rem;
}

.icon-link {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  overflow: hidden;
}

.icon-link::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.icon-img {
  width: 25px;
  height: 25px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
  filter: brightness(0.7);
}

/* Hover animations */
.icon-link:hover {
  transform: translateY(-5px);
}

.icon-link:hover::before {
  opacity: 1;
}

.icon-link:hover .icon-img {
  transform: scale(1.2);
  filter: brightness(0) invert(1);
}

/* Add subtle bounce animation on click */
.icon-link:active {
  transform: scale(0.95) translateY(-5px);
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
  .wrapper {
    padding: 1rem;
  }

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

  .about-me {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .projectsContainer {
    grid-template-columns: 1fr;
  }

  .projectCards {
    margin-bottom: 2rem;
  }

  .projectImage {
    height: 200px;
  }

  .carousel-item img {
    height: 200px;
  }

  .headerContent {
    margin-bottom: 6rem;
  }
  
  .about-me {
    padding-top: 1rem;
  }

  .myInfo {
    height: auto;
    min-height: 250px;
    width: 100%;
  }
}

.corner-icon {
  position: absolute;
  top: 160px;  /* Changed from 170px to 160px */
  right: 200px;
  width: 200px;
  height: auto;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--primary-color);
  overflow: hidden;
  z-index: 1;
}

/* Extra Large Screens (4K and above) */
@media screen and (min-width: 2560px) {
  .corner-icon {
    top: calc(160px + 2%);  /* Adjusted from 170px to 160px */
    right: calc(200px + 5%);
    font-size: 14px;
    width: 250px;
  }
}

/* Large Screens */
@media screen and (min-width: 1440px) and (max-width: 2559px) {
  .corner-icon {
    top: 160px;  /* Adjusted from 170px to 160px */
    right: calc(200px + 2%);
  }
}

/* Tablets and smaller desktops */
@media screen and (min-width: 769px) and (max-width: 1439px) {
  .corner-icon {
    top: 160px;  /* Adjusted from 170px to 160px */
    right: 200px;
  }
}

/* Mobile Screens */
@media screen and (max-width: 768px) {
  .corner-icon {
    display: none;
  }
}

/* Hide corner-icon at 816px or less */
@media screen and (max-width: 867px) {
  .corner-icon {
    display: none;
  }
   .about-me {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }
  .pfp {
    margin-bottom: 0;
  }
  .myInfo {
    width: 100%;
    height: auto;
    min-height: 250px;
    margin-top: 0;
  }
}

@media screen and (min-width: 890px) and (max-width: 1265px) {
  .myInfo {
    height: auto;
    overflow: visible;
  }
}
@media screen and (min-width: 864px) and (max-width: 889px) {
  .myInfo {
    height: auto;
    overflow: visible;
  }
}

.code-line {
  opacity: 0;
  margin: 2px 0;
  animation: fadeInOut 3s linear infinite;
}

.code-line:nth-child(2) {
  animation-delay: 1s;
}

.code-line:nth-child(3) {
  animation-delay: 2s;
}

.code-line:nth-child(4) {
  animation-delay: 3s;
}

.code-line:nth-child(5) {
  animation-delay: 4s;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0; transform: translateY(10px); }
  50% { opacity: 0.7; transform: translateY(0); }
}

/* Mobile adjustment */
@media screen and (max-width: 768px) {
  .corner-icon {
    top: 90px;  /* Adjusted for mobile */
    right: 100px;
    font-size: 10px;
    width: 150px;
  }
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: var(--primary-color);
  border-radius: 50%;
  padding: 1rem;  /* Reduced from 1.5rem to 1rem */
  background-image: linear-gradient(45deg, var(--primary-color), var(--accent-color));
}

.carousel-control-prev,
.carousel-control-next {
  width: 5%;
  opacity: 0.9;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
}

.carousel-indicators button {
  background-color: var(--primary-color) !important;
  opacity: 0.5;
}

.carousel-indicators button.active {
  opacity: 1;
}

.construction-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(45deg, #f6b73c, #e09900);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  text-decoration: none;
  transition: all 0.3s ease;
  align-self: flex-start;
  font-weight: 600;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.construction-badge:hover {
  transform: translateY(-5px);
}
