/* Reset default browser spacing */
html, body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  background-color: #0f172a;
  color: #f0f0f0;
  font-family: "Inter";
}

/* Text highlight on hover */
.text-highlight {
  text-shadow:
    0 0 20px #54a5ff,
    0 0 20px #54a5ff;
}

/* Scroll reveal animation */
.section {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.section.show {
  opacity: 1;
}

/* Main content wrapper */
.main-content {
  margin-left: 200px; /* space for fixed links */
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  position: relative;
  min-height: 100vh;
}

/* Opening section */
.opening {
  max-width: 100%;
  padding: 0 20%;
  margin: 30px 0;
  align-self: flex-start;
}

.opening-container {
  display: inline-block;
}

.opening-header {
  font-family: "Domine";
  font-weight: bold;
  font-size: 3rem;
}

.auto-type {
  color: #54a5ff;
}

.typed-cursor {
  color: #54a5ff;
}

/* Horizontal rule */
hr {
  border: none;
  height: 2px;
  background-color: #f0f0f0;
  opacity: 1;
}

/* About section */
.about {
  max-width: 100%;
  padding: 0 20%;
}

.about-container {
  display: inline-block;
}

.about-header {
  font-family: "Domine";
  font-size: 2rem;
}

.about-discription {
  font-family: "Inter";
}

.links-container {
  width: 200px;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem;
  background-color: #0f172a;
  box-shadow: 2px 0 0 #f0f0f0;
}

.link {
  align-self: flex-start;
  margin: 1rem;
  text-decoration: none;
  color: #f0f0f0;
  font-family: "Domine";
}

/* Avatar animation */
.avatar-wrapper {
  position: relative;
  width: 50%;
  max-width: 512px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  overflow: hidden;
}

.avatar-img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  top: 0;
  left: 0;
  transition: opacity 0.5s ease-in-out;
}

#avatar { z-index: 1; opacity: 1; }
#laptop { z-index: 2; opacity: 0; }

.avatar-wrapper:hover #avatar { opacity: 0; }
.avatar-wrapper:hover #laptop { opacity: 1; }

/* Floating animation for avatar/check arrow */
.float {
  animation: floatAnimation 3s ease-in-out infinite;
}

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

/* Sub sections (Projects, Certifications, Contact) */
.sub {
  max-width: 100%;
  padding: 0 20%;
  margin: 30px 0;
}

.sub-container {
  display: inline-block;
}

.sub-header {
  font-family: "Domine";
}

/* Lists inside Projects/Certifications/Contact */
.list {
  max-width: 100%;
  padding: 0 20%;
}

.list-container {
  display: flex;
  justify-content: space-between;
  align-self: stretch;
}

.list-header {
  font-family: "Domine";
  font-size: 1rem;
  font-weight: bold;
}

.list-tag {
  font-family: "Domine";
  align-items: center;
  font-size: 1rem;
  font-style: italic;
}

.list-discription {
  font-family: "Inter";
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 15px;
  margin-top: 20px;
}

.project-gallery img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.project-gallery img:hover {
  transform: scale(1.05);
}

/* Forms (Contact section) */
input,
textarea,
button {
  background-color: white;
  font-size: 20px;
  border-radius: 10px;
  border: 1px solid black;
  width: 100%;
  max-width: 500px;
  padding: 10px;
  margin: 20px auto;
  display: block;
  box-sizing: border-box;
}

input:focus,
textarea:focus {
  outline: none;
  border: 1px solid #54a5ff;
  box-shadow:
    0 0 10px #54a5ff,
    0 0 20px #54a5ff;
}

button:hover {
  outline: none;
  border: 1px solid #54a5ff;
  box-shadow:
    0 0 10px #54a5ff,
    0 0 20px #54a5ff;
  cursor: pointer;
}

#charcount {
  text-align: right;
  opacity: 0.5;
  transition: color 0.5s ease;
}

.footer {
  text-align: center;
  padding: 1rem 0;
  color: #888;
  font-size: 0.85rem;
  background-color: #0f172a;
  width: 100%;
  position: absolute;  /* sticks to the bottom */
  bottom: 0;
  left: 0;
}