@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Code:ital,wght@0,300..800;1,300..800&display=swap');

:root{
    --Primary-background: #0B0510;
    --Primary-text: #F5FEFD;
    --Secondary-color:  #E1EBEE;
    --Complimentary-color: #6495ED;
    --Cursor-white: url('./Assets/img/cursor.png');
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: var(--Primary-background);
    color: var(--Primary-text);
    font-family: "Google Sans Code", monospace;
    scroll-behavior: smooth;
    
}

header{
    position: fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin-left: 84%;
    line-height: 6rem;
    width: 12rem;
}

header nav ul li a{
    text-decoration: none;
    color: var(--Primary-text);
    font-size: 1.2rem;
    font-weight: 500;
}

.logo{
    position: absolute;
    top: 4rem;
    left: 16%;
    /* transform: translateX(-50%); */
    width: 4rem;
    height: 4rem;
    display: flex;
    /* justify-content: center; */
    align-items: center;
}

.logo img{
    width: 100%;
    height: auto;
    margin-bottom: 2rem;
}

.vert-border{
    position: absolute;
    left: 0;
    width: 1px;
    height: 80vh;
    background-color: var(--Primary-text);
}

/* Box Highlight Start */
.navigation nav a {
  text-decoration: none;
  color: var(--Primary-text);
  background: var(--Primary-background);
  position: relative;
  padding: 8px 14px;
  border-radius: 6px;
  width: 0;
  transition: background 0.3s ease, color 0.3s ease, width 0.3s ease;
}

.navigation nav a::after {
  position: absolute;
  background: var(--Secondary-color);
  bottom: 0;
  left: 0;
  width: 0%;
  transition: width 0.3s ease, background 0.3s ease;
}

.navigation nav a.active::after {
  width: 100%;
    background: var(--Secondary-color);
}

.navigation nav a.active {
  background: var(--Secondary-color); 
  color: var(--Primary-background); 
}
/* Box Jighlight End */

section{
  flex-direction: column;
  justify-content: center;
  height: 100vh;
  margin-left: 5rem;
  display: flex;
}

section h1{
  font-weight: 600;
  margin-bottom: 2rem;
  font-size: 5rem;
}

section h2{
  text-decoration: underline;
}

.hero-links{
  position: absolute;
  bottom: 20%; 
}

.hero-links img{
  width: 24px;
  height: auto;
}

.hero-links a:hover img{
  transform: scale(1.2);
  transition: transform 0.3s ease, filter 0.3s ease;
}

span{
  color: var(--Complimentary-color);
  font-weight: 600;
}

#typewriter {
  font-weight: 600;
  display: inline-block;
  border-right: 2px solid var(--Complimentary-color); /* typing cursor */
  white-space: nowrap;
  overflow: hidden;
}

.blink {
  animation: blink 0.6s step-end infinite;
}

@keyframes blink {
  50% { border-color: transparent; }
}

.projects ul{
  padding: 1rem;
}

.projects ul li{
  margin: 1rem 0;
}

.projects a {
  color: var(--Primary-text);
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

/* underline effect */
.projects a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--Complimentary-color);
  transition: width 0.3s ease;
}

.projects a:hover {
  color: var(--Complimentary-color);
}

.projects a:hover::after {
  width: 100%;
}

/* Modal Background */
  .modal {
    display: none; /* hidden by default */
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
  }

  /* Modal Box */
  .modal-content {
    background: var(--Primary-background, var(--Secondary-color));
    color: var(--Primary-text, #000);
    padding: 20px;
    border-radius: 1.5rem;
    width: 90%;
    max-width: 60%;
    text-align: center;
    position: relative;
    animation: fadeIn 0.3s ease;
  }

  /* Close Button */
  .close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
  }

  /* Project Image */
  .modal-content img {
    width: 100%;
    height: auto;
    border-radius: 1rem;
    margin-bottom: 2rem;
  }

  @keyframes fadeIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
  }

/* Default (desktop) styles are already defined above */

/* ===============================
   Mobile Responsiveness
   =============================== */
@media (max-width: 1024px) {
  header {
    margin-left: auto;
    right: 0;
    width: 10rem;
  }

  .logo {
    left: 8%;
  }

  section {
    margin-left: 2rem;
  }

  section h1 {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  /* Make header horizontal instead of vertical sidebar */
  header {
    position: fixed;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 1rem;
    top: 0;
    background-color: var(--Primary-background);
    line-height: normal;
    z-index: 1000;
  }

  header nav ul {
    display: flex;
    gap: 1rem;
    list-style: none;
  }

  header nav ul li a {
    font-size: 1rem;
  }

  .logo {
    position: relative;
    top: 0;
    left: 0;
    margin-right: auto;
  }

  .vert-border {
    display: none;
  }

  section {
    margin-left: 0;
    padding: 6rem 1rem 2rem; /* add top padding to avoid overlap with fixed header */
    height: auto;
    min-height: 100vh;
  }

  section h1 {
    font-size: 2.2rem;
    line-height: 1.2;
  }

  .hero-links {
    position: static;
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  header nav ul li a {
    font-size: 0.9rem;
    margin-top: 1.2rem;
  }

  section h1 {
    font-size: 1.8rem;
  }

  .projects a {
    font-size: 1rem;
  }

  .logo {
    display: none;
  }
}

