/* Typing Section */
.spacer{
    min-height: 70vh;
}
  
.blink-typing h1{
    position: absolute;
    top: 50%;
    left: 30%;
    transform: translate(-50%, -50%);
    font-size: 50;
    text-align: center;
    pointer-events: none;
    font-family: 'Droid Sans', serif;
}


/* Wrapper for both typewriter and image */
.typewriter-image-wrapper {
    display: flex;
    align-items: center; /* Aligns text and image vertically */
    justify-content: space-between; /* Keeps typewriter on left and image on right */
    width: 100%; /* Makes the container take full width */
    margin-bottom: 10px;
}

/* Image container */
.image-container {
    display: flex;
    justify-content: flex-start; /* Aligns image to the right */
}
  
.image-container img {
    margin-top: 10%;
    max-width: 70%; /* Sets a small image size */
    height: auto; /* Keeps aspect ratio */
    margin-left: 10%;
}

@media (max-width: 768px) {
    .image-container img {
        max-width: 50%; /* Make image smaller on mobile */
        margin-top: 20%;
        margin-left: 25%;  /* Adjust margin as needed */
        margin-bottom: 20%;
    }
}


.typewriter {
    display: inline-flex;
    flex-grow: 1; /* Ensures the typewriter text takes up available space on the left */
    width: auto;
}

.typewriter h1 {
    max-width: 18ch; /* Adjusted to fit the length of "Hi I am karam" */
    display: inline-block;
    overflow: hidden; /* Ensures the content is not revealed until the animation */
    border-right: .15em solid rgba(255, 165, 0, 0.7);; /* The typewriter cursor */
    white-space: nowrap; /* Keeps the content on a single line */
    margin: 0 auto; /* Gives that scrolling effect as the typing happens */
    letter-spacing: .15em; /* Adjust as needed */
    animation: 
      typing 3s steps(20, end), /* Adjusted duration and steps to fit the text length */
      blink-caret .75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 18ch; } /* Adjusted to fit the length of "Hi I am karam" */
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: orange; }
}

/* Responsive adjustments */
@media(max-width: 800px) {
    .typewriter h1 {
        font-size: 30px;
        margin-left: 20%;
    }
}