/* Global reset and font */
@import url('https://fonts.cdnfonts.com/css/nimbus-sans');
body, h1, h2, h3, h4, h5, h6, p, span {
  line-height: 1.2;
  font-stretch: normal;
  margin: 0;
  padding: 0;
  font-family: 'Nimbus Sans', sans-serif;
}

/* Top Headline (sticky) */
.top-headline { 
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #e1e1e1; /* background so it doesn’t overlap */
  display: flex; 
  justify-content: space-between; 
  padding: 20px 40px; 
  font-size: 1rem; 
  font-weight: 600; 
  text-transform: capitalize; 
}

/* Hero Section */
.hero { 
  display: flex; 
  justify-content: center; 
  align-items: center; 
  height: 120vh; 
  gap: 20px; 
  padding: 0 40px; 
}
.hero-title .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
}
.hero-text h1.hero-title { 
  font-size: 8rem; 
  line-height: 1.1; 
  font-weight: 700; 
  text-align: left;
}
.hero-photo img { 
  max-height: 250px; 
  border-radius: 12px; 
  transition: filter 0.6s ease, transform 0.6s ease;
}
.hero-photo img:hover {
  filter: contrast(120%) saturate(110%) brightness(105%);
  transform: scale(1.03);
}
.user-image img {
  width: 100%;
  height: auto;
  max-width: 280px; /* adjust if needed */
  border-radius: 50%;
  object-fit: cover;
  image-rendering: auto;   /* ensures smooth scaling */
  -webkit-transform: translateZ(0); /* fix blur on some browsers */
}

/* Letter animation */
.letter-anim { 
  display: inline-block; 
  font-style: italic; 
  transition: transform 0.3s ease; 
}
.letter-anim:hover { 
  transform: rotate(-20deg) scale(1.3); 
}

/* About Section - side by side */
.about-wrapper { 
  display: flex; 
  justify-content: space-between; 
  align-items: flex-start; 
  max-width: 1100px; 
  margin: 200px auto; 
  gap: 60px; 
}
.about-text { width: 60%; }
.about-description { width: 80%; }
.about h2 { font-size: 5rem; margin-bottom: 20px; font-weight: normal; }
.about p { font-size: 2rem; line-height: 1.6; }

/* Ticker - bigger single row */
.ticker { 
  width: 100%; 
  overflow: hidden; 
  white-space: nowrap; 
  border-top: 1px solid #ddd; 
  border-bottom: 1px solid #ddd; 
  padding: 30px 0; 
  font-size: 4rem; 
  font-weight: bold;
  background: repeating-linear-gradient(to right, #f9f9f9 0px, #f9f9f9 40px, #eee 40px, #eee 41px); 
}
.ticker-wrapper { display: flex; will-change: transform; }
.ticker-content { padding-right: 50px; text-transform: uppercase; }

/* Projects Section with visible grid */
.projects { 
  position: relative;
  width: 100%;
  padding: 60px 40px;
  background: repeating-linear-gradient(90deg, #d6d6d6 0px, #d6d6d6 80px, #c0c0c0 80px, #c0c0c0 81px,
                                        transparent 81px, transparent 160px),
              repeating-linear-gradient(0deg, #d6d6d6 0px, #d6d6d6 80px, #c0c0c0 80px, #c0c0c0 81px,
                                        transparent 81px, transparent 160px);
  --axisScale: 0;
}
.projects::before {
  content:"";
  position:absolute;
  left:50%;
  top:0;
  bottom:0;
  width:4px;
  background:#000;
  transform:translateX(-50%) scaleY(var(--axisScale));
  transform-origin: top;
  will-change: transform;
}

/* Zigzag timeline projects */
.project-section {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #333;
  transform: translateX(-50%);
  animation: drawLine 3s linear forwards;
}

@keyframes drawLine {
  from { height: 0; }
  to { height: 100%; }
}

.project {
  position: relative;
  width: 45%;
  padding: 30px;
  margin: 60px 0;
  background: none;
}

.project:nth-child(odd) {
  left: 0;
  text-align: right;
}

.project:nth-child(even) {
  left: 55%;
  text-align: left;
}

.timeline-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  background: #333;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.project:nth-child(even) { transform: translateX(-10%); }
.project:nth-child(odd) { transform: translateX(10%); }
.project img {
  width: 45%;
  margin: 0 auto;
  border-radius: 12px;
  transition: transform 0.5s ease, opacity 0.5s ease;
}
.project img:hover { transform: scale(1.05) rotate(-1deg); opacity:0.95; }

/* Contact Section */
.contact { 
  text-align: center; 
  margin: 260px auto; 
}
.contact h2 { 
  font-size: 9rem; /* bigger */
  font-weight:bold; 
  text-transform: uppercase; 
  overflow:hidden; 
  white-space:nowrap; 
  border-right:0em solid rgb(255, 255, 255); 
}
.no-blue { color: #000; }

/* Footer + Back to Top */
footer { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  padding: 40px; 
  border-top:1px solid #ddd; 
}
#backToTop { 
  padding:6px 12px; 
  font-size:0.9rem; 
  background:#000; 
  color:#fff; 
  border:none; 
  cursor:pointer; 
  border-radius:3px; 
}
#backToTop:hover { background:#333; }

/* Cursor */
.cursor { 
  width: 28px; 
  height: 28px; 
  border: 2px solid rgba(245,246,248,1); 
  border-radius:50%; 
  position:fixed; 
  top:0; left:0; 
  pointer-events:none; 
  z-index:9999; 
  background:transparent; 
  transition: width 0.2s ease, height 0.2s ease, background 0.2s ease, border-color 0.2s ease; 
}

/* Responsive */
@media (max-width:1024px){
  .hero-text h1.hero-title{ font-size:6rem; } 
  .about-wrapper{ flex-direction:column; gap:40px; } 
  .about-text,.about-description{ width:100%; } 
  .project{ margin:120px auto; } 
  .project img{ width:100%; } 
}
@media(max-width:600px){
  .hero-text h1.hero-title{ font-size:4rem; } 
  .ticker-content{ font-size:2rem; } 
}

/* --- Additions --- */

/* Remove background from sticky headline when scrolled */
.top-headline.scrolled {
  background: transparent !important;
  transition: background 0.4s ease;
}

/* Typewriter effect for LET’S DESIGN IT RIGHT */
.contact h2.typewriter {
  display: inline-block;
  font-weight: bold;
  font-size: 8rem;
  color: #000;
  white-space: nowrap;
}

/* blinking cursor using ::after pseudo-element */
.contact h2.typewriter::after {
  content: "|";
  display: inline-block;
  margin-left: 2px;
  animation: blink-cursor 0.7s step-end infinite;
}

@keyframes blink-cursor {
  50% { opacity: 0; }
}