/* This is the required project styling. Will contain essential CSS styles like:
   * Flex property
   * Grid layout
   * Cards and sections
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap');

/* variables */
:root {
  /* Colors */
  --primary-color: #ffcd42;
  --secondary-color: #ffd35c;
  --bg-primary: #ffffff;
  --text-color: #222222;
  --text-color-two: #ffffff;
  --bg-secondary: #000000;
  --card-background: #f4f4f4;
  --bg-secondary-two: #111111;

  --shadow: 0 10px 40px rgba(0, 0, 0, 0.2);

  /* Font Weight */
  --weight-small: 400;
  --weight-semibold: 600;
  --weight-bold: 800;

  /* Max width */
  --width-small: 600px;
  --width-medium: 1100px;
  --width-large: 1300px;
  --accent-color: #FE6E00; /* updated to requested vivid orange */
  --skill-bg: #e8faf0;
  --skill-text: #0b7a44;
  --nav-height: 80px;
}

[data-theme="dark"] {
  --primary-color: #ffcd42;
  --secondary-color: #ffd35c;
  --bg-primary: #000000;
  --text-color: #ffffff;
  --text-color-two: #222222;
  --bg-secondary: #ffffff;
  /* Use very subtle translucent surfaces instead of flat gray blocks */
  --card-background: rgba(255,255,255,0.02);
  --bg-secondary-two: #0f1720;
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

/* Reset default styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: var(--text-color);
}

/* Main styling */
body {
  background: var(--bg-primary);
  color: var(--text-color);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  line-height: 1.6;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--bg-primary);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
  height: var(--nav-height);
  width: 100%;
}

/* ensure content is not hidden under the fixed navbar */
body {
  padding-top: var(--nav-height);
}

/* make images responsive by default */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.navbar .nav-menu {
  display: flex;
  align-items: center;
  background: var(--bg-primary);
}

.navbar .nav-link {
  margin: 0 1rem;
  font-size: 0.8rem;
  font-weight: var(--weight-semibold);
}

.navbar #logo img {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.navbar .btn {
  margin-right: 1.5rem;
}

.fas.fa-arrow-right {
  margin-left: 0.5rem;
  font-size: 0.9rem;
}

/* hamburger */
.hamburger {
  margin-bottom: 0.1rem;
  display: none;
}

.bar {
  display: block;
  width: 23px;
  height: 3px;
  margin: 4px auto;
  transition: all 0.3s ease-in-out;
  border-radius: 30px;
  background-color: var(--bg-secondary);
}

/* Hero section */
#hero {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  align-items: center;
  justify-content: flex-start;
  padding: 6rem 1rem 3rem;
}

.profile-image {
  width: 150px;
  border-radius: 50%;
  animation: bounce 1s infinite alternate;
}

@keyframes bounce {
  from {
    transform: translateY(0px);
  }

  to {
    transform: translateY(-10px);
  }
}

[data-theme="dark"] .intro-card {
  background: var(--card-background);
}

/* Make the header content full-width again (no boxed background/shadow)
   — keep content centered but remove the card appearance. */
.intro-card {
  width: 100%;
  margin: 5.0rem 0 0.8rem;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem; /* reduce vertical gap between H1 and subtitle */
}

.intro-card .profile-image {
  width: 150px;
  height: 150px;
}

.intro-card h1 { font-size: clamp(1.65rem, 4.2vw, 2.6rem); font-weight: 700; margin-top: 0.18rem; }
.intro-card h1 .accent { color: var(--accent-color); background-repeat: no-repeat; }

.content-text h2 { font-size: clamp(0.82rem, 1.8vw, 0.95rem); font-weight: 600; margin: 0 0 0.6rem 0; letter-spacing: 0.2px; }
.content-text h2 .accent { color: var(--accent-color); }

/* Typing caret for subtitle */
.typing {
  border-right: 2px solid var(--accent-color);
  padding-right: 4px;
  white-space: nowrap;
  overflow: hidden;
  animation: caret 1s steps(1) infinite;
}

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

.content-text p { margin: 0.28rem 0 0.6rem; color: var(--text-color); line-height: 1.78; max-width: 100%; display: flex; align-items: center; gap: 0.6rem; }
.content-text p strong { margin-right: 0.4rem; font-size: clamp(0.98rem, 1.6vw, 1.12rem); font-weight: 700; color: var(--text-color); }

.intro-card .content-text p {
  max-width: 820px;
}

/* Skills grid (kept for other sections if used) */
.skills-grid {
  margin-top: 1.2rem;
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-content: center;
}
[data-theme="dark"] .intro-card {
  background: var(--card-background);
}

[data-theme="dark"] .skill-card {
  background: #1a1a1a;
  color: var(--text-color);
}

@media (max-width: 900px) {
  .intro-card { margin: 3.5rem 1rem 1.2rem; padding: 1.6rem; }
  .intro-card .profile-image { width: 120px; height: 120px; }
}

@media (max-width: 600px) {
  .intro-card { padding: 1rem; }
  .skills-grid { gap: 0.6rem; }
  .skill-card { padding: 10px 12px; font-size: 0.95rem; }
}

/* Inline skills (used in intro paragraph) */

.skills-inline {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: nowrap; /* keep in a single row */
  margin-left: 0.12rem;
  overflow: visible;
  padding-bottom: 0;
}


.skill-pill {
  display: inline-flex;
  align-items: center;
  padding: clamp(4px, 1vw, 8px) clamp(6px, 2vw, 10px);
  border-radius: 10px;
  background: var(--skill-bg);
  color: var(--skill-text);
  font-weight: var(--weight-semibold);
  font-size: clamp(0.72rem, 1.4vw, 0.9rem);
  box-shadow: 0 6px 14px rgba(16, 24, 40, 0.03);
  transition: transform 0.14s cubic-bezier(.2,.9,.2,1), box-shadow 0.14s ease, background-color 0.14s ease;
  margin-right: 6px;
  white-space: nowrap;
  flex: 0 1 auto; /* allow shrinking when needed */
  min-width: 0;
  cursor: default;
}


.skill-pill:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 10px 26px rgba(16,24,40,0.08); }

.skill-pill .muted { font-weight: 400; opacity: 0.7; margin-left: 6px; font-size: 0.85em; }

@media (max-width: 480px) {
  .skills-inline { gap: 0.4rem; }
  .skill-pill { padding: 6px 8px; font-size: 0.86rem; }
  .intro-card { margin: 4rem 0.6rem 0.8rem; }
  .intro-card .content-text p { font-size: 0.95rem; }
}

/* Small-screen adjustments: allow wrapping and prevent content cut-off */
@media (max-width: 600px) {
  .content-text p { display: block; align-items: normal; }
  .skills-inline { flex-wrap: wrap; gap: 0.45rem; }
  .skill-pill { font-size: 0.82rem; padding: 6px 8px; }
  #hero { padding-top: calc(var(--nav-height) + 1rem); }
}

/* Header social icons (below Connect button) */

/* Header social icons (below Connect button) */
.header-social {
  margin-top: 0.25rem;
  display: flex;
  gap: 0.9rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.header-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 50%;
  transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
  will-change: transform;
}

.header-social a img {
  width: 22px;
  height: 22px;
  display: block;
}

/* Simple entrance animation for intro elements */
.animate-in {
  opacity: 0;
  transform: translateY(6px);
  animation: enter 600ms ease forwards;
}

@keyframes enter {
  to { opacity: 1; transform: translateY(0); }
}

/* Typing caret for subtitle */
/* removed typing caret (user requested no typing effect) */

/* Scroll reveal helper */
.reveal-on-scroll { opacity: 0; transform: translateY(12px); transition: opacity 420ms ease, transform 420ms ease; }
.reveal-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

/* Default (light theme) — show icons as black */
.header-social img {
  filter: invert(1);
  transition: filter 0.18s ease;
}

/* Hover effect */
.header-social a:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  background-color: rgba(0, 0, 0, 0.05);
}

/* Dark theme — show icons as white (no invert) */
[data-theme="dark"] .header-social img {
  filter: invert(0);
}

[data-theme="dark"] .header-social a:hover {
  background-color: rgba(255, 255, 255, 0.04);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

/* Gentle dark theme surfaces for pills and cards to avoid flat gray boxes */
[data-theme="dark"] .skill-pill {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
  color: #c6f3d9;
}

/* Slight depth for project cards in dark mode without heavy rectangles */
[data-theme="dark"] .project {
  gap: 0.9rem;
}

/* Achievements: hide info until hover, reveal with animation */
#achievements .project-info {
  opacity: 0;
  transform: translateY(8px) scale(0.995);
  transition: opacity 320ms cubic-bezier(.2,.9,.2,1), transform 320ms cubic-bezier(.2,.9,.2,1), box-shadow 320ms ease;
  pointer-events: none;
}

#achievements .card:hover .project-info,
#achievements .card:focus-within .project-info {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  box-shadow: 0 12px 36px rgba(16,24,40,0.08);
}

#achievements .card {
  cursor: pointer;
}

/* Achievement card media */
.achievement-card {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.achievement-card .card-media {
  width: 160px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

@media (max-width: 700px) {
  .achievement-card { flex-direction: column; align-items: stretch; }
  .achievement-card .card-media { width: 100%; height: 180px; }
}

/* Make achievement cards behave like project cards: image fills card and info overlays on hover */
.achievement-card {
  position: relative;
  display: block;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #111;
  color: var(--text-color);
}

.achievement-card .card-media {
  width: 100%;
  height: 220px;
  display: block;
  object-fit: cover;
}

.achievement-card .project-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 65%);
  color: #fff;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 260ms ease, transform 260ms ease;
  pointer-events: none;
}

.achievement-card:hover .project-info,
.achievement-card:focus-within .project-info {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.achievement-card .project-bio h3,
.achievement-card .project-bio p { color: #fff; }

html[data-theme="dark"] body {
  background: linear-gradient(180deg, #030305 0%, #071018 100%);
}

@media (max-width: 600px) {
  .header-social {
    gap: 0.8rem;
    margin-top: 0.8rem;
  }

  .header-social a {
    padding: 10px;
  }

  .header-social a img {
    width: 26px;
    height: 26px;
  }
}

.division {
  width: 100%;
  height: 2px;
  background-color: var(--card-background);
  margin: 5.5rem 0;
}
/* Projects */
#projects {
  display: flex;
  flex-direction: column;
  margin: 2rem auto 5rem;
}

#projects .btn {
  align-self: center;
  margin: 2rem 0;
}

.project {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(250px, auto);
  grid-gap: 0.9rem;
}

.card .project-bio p {
  font-size: 0.88rem;
  margin: 0;
}

.card .project-bio h3 {
  font-size: 1rem;
  margin: 0 0 6px 0;
}

.project-info {
  display: flex;
  justify-content: space-between;
  opacity: 1; /* ensure project text is visible */
  position: static;
  transition: transform 220ms ease, opacity 220ms ease;
  padding: 1rem;
}

/* Scoped achievement rules (more specific to override generic .project-info) */
#achievements .achievement-card {
  width: 100%;
  max-width: 720px; /* keep card a readable width */
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden; /* ensure scaled image is clipped */
  position: relative;
  transition: transform 260ms ease, box-shadow 260ms ease;
}

#achievements .achievement-card .card-media {
  width: 100%;
  height: auto; /* let the image determine height */
  max-height: 520px; /* limit extremely tall images */
  object-fit: contain; /* show the whole image without cropping */
  object-position: center center;
  display: block;
  background: #0f0f0f; /* fill gaps when image aspect ratio doesn't match card */
  transition: transform 260ms ease;
  transform-origin: center center;
}

#achievements .achievement-card .project-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 65%);
  color: #fff;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 260ms ease, transform 260ms ease;
  pointer-events: none;
}

#achievements .achievement-card:hover,
#achievements .achievement-card:focus-within {
  transform: scale(1.02);
  box-shadow: 0 18px 54px rgba(16,24,40,0.12);
}

#achievements .achievement-card:hover .card-media,
#achievements .achievement-card:focus-within .card-media {
  transform: scale(1.04);
}

#achievements .achievement-card:hover .project-info,
#achievements .achievement-card:focus-within .project-info {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Overlay to improve contrast between image and white text */
#achievements .achievement-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.48);
  opacity: 0;
  transition: opacity 260ms ease;
  z-index: 1;
  pointer-events: none;
}

#achievements .achievement-card .card-media {
  position: relative;
  z-index: 0;
}

#achievements .achievement-card .project-info {
  z-index: 2; /* ensure text sits above the overlay */
}

#achievements .achievement-card:hover::before,
#achievements .achievement-card:focus-within::before {
  opacity: 1;
}

/* Slightly reduce overlay in dark theme so it doesn't feel too heavy */
[data-theme="dark"] #achievements .achievement-card::before {
  background: rgba(0,0,0,0.32);
}

/* Hide project info by default for cards that should reveal on hover */
.project-rojgaar .project-info {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 260ms ease, transform 260ms ease;
  pointer-events: none;
}

.project-rojgaar:hover .project-info,
.project-rojgaar:focus-within .project-info {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.project-bio {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: static;
  top: auto;
  left: auto;
}

/* Footer */
#footer {
  background: #111111;
}

#footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  min-height: 160px;
  text-align: center;
}

#footer a {
  font-size: 0.8rem;
  color: #fff;
}

#footer a:hover {
  opacity: 0.6;
}

#footer .social {
  margin: 0.9rem 0;
}

/* Ensure footer social icons sit inline and center horizontally */
#footer .social {
  display: flex;
  flex-direction: row;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

#footer .social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#footer .social img {
  width: 20px;
  height: 20px;
}

#footer .social a {
  margin: 0 0.5rem;
}

#footer p {
  font-size: 0.8rem;
}

/* Responsiveness */

@media (max-width: 1000px) {
  .project {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
}

@media (max-width: 670px) {
  .navbar .nav-menu {
    position: fixed;
    right: -100vw;
    top: 4.5rem;
    flex-direction: column;
    width: calc(80% - 10px);
    transition: 0.3s;
    box-shadow: var(--shadow);
    padding: 2rem;
    border-radius: 5px;
    align-items: flex-start;
  }

  .navbar .btn {
    margin: 0;
    margin-top: 1rem;
  }

  .nav-menu.active {
    right: 20px;
  }

  .nav-menu .nav-link {
    font-size: 0.9rem;
    margin: 0 0.2rem;
  }

  .nav-menu li {
    margin-bottom: 0.5rem;
    width: 100%;
  }

  .nav-menu .btn {
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
  }

  .hamburger {
    display: block;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
  }

  .hamburger.active {
    border: 1px dotted gray;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

@media (max-width: 600px) {
  .project {
    display: grid;
    grid-template-columns: 1fr;
  }

  .header-container .btn {
    border-radius: 5px;
    width: 80%;
  }
}
