/* =========================
   style.css — refreshed for projects + modal fixes
   ========================= */

/* Theme variables */
:root {
  --primary: #00aaff;
  --dark: #0f172a;
  --light: #f8fafc;
  --header-height: 72px;
  --container-max: 1100px;
  --glass: rgba(255, 255, 255, 0.03);
}

/* Reset & base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  color: var(--light);
  background: var(--dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

/* Layout container */
.container {
  width: 90%;
  max-width: var(--container-max);
  margin: 0 auto;
}

/* =========================
   Header (desktop + mobile)
   ========================= */

/* support both .site-header and legacy header#header */
.site-header,
header#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1400;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: saturate(120%) blur(6px);
  -webkit-backdrop-filter: saturate(120%) blur(6px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

/* inner layout */
.header-container,
header#header>.container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-height);
}

/* Logo */
.logo,
header#header .logo {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--light);
  text-decoration: none;
  display: inline-block;
}

.logo span,
header#header .logo span {
  color: var(--primary);
}

/* Desktop nav */
.nav,
header#header nav {
  display: block;
}

.nav-list {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

/* Right align nav (keeps logo left, nav right) */
.header-container {
  justify-content: space-between;
}

.header-container .nav {
  margin-left: auto;
}

.nav-link {
  color: var(--light);
  text-decoration: none;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 6px;
  transition: color .22s ease, transform .18s ease, background .18s ease, box-shadow .18s;
  outline: none;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--primary);
  transform: translateY(-2px);
}

.nav-link:focus-visible {
  box-shadow: 0 0 0 4px rgba(0, 170, 255, 0.08), inset 0 -3px 0 var(--primary);
  border-radius: 6px;
}

.nav-link.active {
  color: var(--primary);
  box-shadow: inset 0 -3px 0 var(--primary);
}

/* Legacy nav fallback */
header#header nav ul {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

header#header nav a {
  color: var(--light);
  text-decoration: none;
  transition: color .3s;
  padding: 6px 8px;
  border-radius: 6px;
}

header#header nav a:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

/* Hamburger (mobile) */
.menu-toggle,
header#header .menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: 8px;
  color: var(--light);
  z-index: 1410;
}

.menu-toggle:focus {
  outline: 2px solid rgba(0, 170, 255, 0.18);
  border-radius: 6px;
}

/* hamburger bars */
.hamburger {
  display: inline-block;
  width: 24px;
  height: 18px;
  position: relative;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--light);
  border-radius: 2px;
  position: absolute;
  left: 0;
  right: 0;
  transition: transform .25s ease, opacity .25s ease;
}

.hamburger span:nth-child(1) {
  top: 0;
}

.hamburger span:nth-child(2) {
  top: 8px;
}

.hamburger span:nth-child(3) {
  bottom: 0;
}

/* mobile slide-in panel */
.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 280px;
  max-width: 86%;
  background: rgba(6, 10, 20, 0.98);
  transform: translateX(110%);
  transition: transform .34s cubic-bezier(.2, .9, .2, 1);
  z-index: 1450;
  box-shadow: -20px 40px 80px rgba(2, 6, 23, 0.6);
  padding-top: calc(var(--header-height) + 12px);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  overflow-y: auto;
}

.mobile-nav.open {
  transform: translateX(0);
}

.mobile-nav-list {
  list-style: none;
  padding: 1.5rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-nav-link {
  color: var(--light);
  text-decoration: none;
  font-size: 1.05rem;
  padding: .6rem .8rem;
  border-radius: 8px;
  display: inline-block;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.02);
  outline: none;
}

.mobile-nav-link:focus-visible {
  box-shadow: 0 0 0 4px rgba(0, 170, 255, 0.06);
  border-radius: 8px;
}

/* hamburger -> X when open */
.menu-toggle.open .hamburger span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.open .hamburger span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open .hamburger span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* responsive: show hamburger; hide desktop nav */
@media (max-width: 880px) {
  .nav {
    display: none;
  }

  header#header nav {
    display: none;
  }

  /* legacy fallback */
  .menu-toggle {
    display: block;
  }
}

/* center container at large widths */
@media (min-width: 1200px) {
  .header-container {
    max-width: 1200px;
    margin: 0 auto;
  }
}

/* =========================
   HERO — full-bleed
   ========================= */
#hero {
  position: relative;
  height: 100vh;
  /* fills viewport */
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

/* hero bg + helpful top gradient */
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: blur(6px);
  z-index: 1;
  transition: background-image 1s ease-in-out;
}

.hero-bg::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 160px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0));
  z-index: 2;
  pointer-events: none;
}

/* subtle overlay for readability; pointer-events none so header remains clickable */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 2;
  pointer-events: none;
}

.hero-text {
  position: relative;
  z-index: 3;
  max-width: 880px;
  padding: 0 1rem;
}

.hero-text h2 {
  font-size: 2.5rem;
  margin-bottom: .4rem;
  color: var(--light);
  line-height: 1.05;
}

.hero-text span {
  color: var(--primary);
}

/* --- Typewriter Additions (non-intrusive) --- */
.typed {
  color: var(--primary);
  font-weight: 700;
  margin-left: 6px;
}

/* Caret next to typed text */
.cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 4px;
  background: var(--light);
  vertical-align: -0.1em;
  animation: blink 0.85s steps(1) infinite;
}

/* Optional: solid caret while typing (toggled in JS) */
.cursor.typing {
  animation: none;
}

@keyframes blink {

  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

/* Respect reduced motion: stop caret blinking */
@media (prefers-reduced-motion: reduce) {
  .cursor {
    animation: none !important;
    opacity: 1 !important;
  }
}

.btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 10px 20px;
  margin-top: 15px;
  text-decoration: none;
  border-radius: 6px;
  transition: background .3s, transform .15s;
}

.btn:hover,
.btn:focus {
  background: #008ecc;
  transform: translateY(-2px);
  outline: none;
}

.btn:focus-visible {
  box-shadow: 0 0 0 6px rgba(0, 170, 255, 0.08);
}

/* small button utility */
.btn-sm {
  font-size: .92rem;
  padding: 8px 12px;
}

/* =========================
   Sections & anchor safety
   ========================= */
/* scroll-margin-top makes anchors land below the fixed header */
.section {
  padding: 4rem 0;
  scroll-margin-top: calc(var(--header-height) + 12px);
}

/* =========================
   Projects grid & cards (fixed sizing and behaviour)
   ========================= */

/* Use auto-fill so multiple cards appear consistently; lower min width if you want more columns */
.projects-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-auto-rows: 1fr;
  /* helps keep rows balanced */
  align-items: start;
  /* avoid stretching items vertically */
  justify-items: stretch;
  margin-top: 1.25rem;
}

/* Each card should be fully width of its grid cell and not force extra rows/columns */
.project-card {
  width: 100%;
  max-width: 100%;
  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);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.45);
  display: flex;
  flex-direction: column;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s;
  min-height: 0;
  /* don't force a large min-height */
  cursor: pointer;
  will-change: transform;
  /* ensure it contributes only to its own grid cell */
  align-self: start;
}

/* Hover / focus */
.project-card:focus-visible {
  outline: 3px solid rgba(0, 170, 255, 0.12);
  outline-offset: 6px;
  transform: translateY(-6px)
}

.project-card:hover,
.project-card:focus {
  transform: translateY(-6px);
  border-color: rgba(0, 170, 255, 0.14)
}

/* Media / image area — prefer aspect-ratio (modern) with fallback */
.project-figure {
  position: relative;
  background: #07111a;
  width: 100%;
  overflow: hidden;
  flex: 0 0 auto;
  aspect-ratio: 16/9;
}

@supports not (aspect-ratio: 1/1) {
  .project-figure::before {
    content: "";
    display: block;
    padding-top: 56.25%
  }

  /* 16:9 fallback */
}

.project-figure img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform .6s ease, filter .6s ease;
}

.project-card:hover .project-figure img {
  transform: scale(1.06)
}

/* Badge pill */
.project-pill {
  position: absolute;
  left: 12px;
  top: 12px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--light);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .82rem;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

/* Content */
.project-content {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto
}

.project-name {
  margin: 0;
  font-size: 1.06rem;
  color: var(--light)
}

.project-summary {
  margin: 0;
  color: rgba(248, 250, 252, 0.86);
  font-size: .95rem;
  line-height: 1.45
}

/* Meta & actions */
.project-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: auto
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.tag {
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: .78rem;
  color: var(--light);
  border: 1px solid rgba(255, 255, 255, 0.03)
}

.project-cta {
  display: flex;
  gap: 8px;
  align-items: center
}

/* Buttons */
.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 8px
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--light);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 8px 12px;
  border-radius: 8px
}

/* =========================
   Modal
   ========================= */
.project-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.6);
  z-index: 1600;
  padding: 28px;
}

.project-modal.open {
  display: flex
}

.project-modal-panel {
  width: 100%;
  max-width: 980px;
  background: linear-gradient(180deg, #07111a, #081222);
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 0;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.7);
  position: relative;
}

@media (max-width:920px) {
  .project-modal-panel {
    grid-template-columns: 1fr;
    max-width: 720px
  }
}

/* top-right close icon */
.project-modal-panel>.modal-close {
  position: absolute;
  right: 16px;
  top: 10px;
  background: transparent;
  border: none;
  font-size: 28px;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  z-index: 1700;
  padding: 6px;
  line-height: 1;
}

.project-modal-panel>.modal-close:focus-visible {
  outline: 3px solid rgba(0, 170, 255, 0.12);
  border-radius: 6px
}

/* media & body */
.modal-media {
  background: #061018;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center
}

.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block
}

.modal-media img[src=""] {
  display: none
}

.modal-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: rgba(248, 250, 252, 0.95)
}

.modal-body h3 {
  margin: 0;
  font-size: 1.25rem
}

.modal-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  align-items: center
}

/* in-body small close button */
.project-modal .modal-body .modal-close {
  position: relative;
  right: auto;
  top: auto;
  font-size: .95rem;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--light);
  cursor: pointer;
}

.project-modal .modal-body .modal-close:focus-visible {
  outline: 3px solid rgba(0, 170, 255, 0.10)
}

/* small screen adjustments */
@media (max-width:480px) {
  .project-modal {
    padding: 12px
  }

  .project-modal-panel>.modal-close {
    right: 10px;
    top: 8px
  }

  .project-modal .modal-body .modal-close {
    padding: 6px 10px;
    font-size: .9rem
  }
}

/* =========================
   Forms
   ========================= */
form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

input,
textarea {
  padding: 10px;
  border: none;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--light);
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(0, 170, 255, 0.12);
  box-shadow: 0 4px 18px rgba(0, 170, 255, 0.04);
}

button {
  border: none;
  cursor: pointer;
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  background: #020617;
}

/* =========================
   ABOUT section
   ========================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.25rem;
  align-items: center;
}

@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: 360px 1fr;
    gap: 3rem;
  }
}

.profile-img {
  width: 100%;
  max-width: 360px;
  height: auto;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.6);
  border: 5px solid rgba(255, 255, 255, 0.03);
  display: block;
}

/* header + bluish underline */
.section-header h2 {
  font-size: 2rem;
  margin: 0 0 .5rem 0;
  color: var(--light);
}

.section-underline {
  width: 72px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), var(--primary));
  margin-bottom: 1rem;
  box-shadow: 0 6px 20px rgba(0, 170, 255, 0.12);
}

/* about paragraphs */
.about-body p {
  color: rgba(248, 250, 252, 0.92);
  font-size: 1rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* skill chips */
.skills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: .75rem;
}

.skill {
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: .875rem;
  color: var(--light);
  border: 1px solid rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(4px);
}

/* =========================
   Animations & reveal utility
   ========================= */
.animate-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms cubic-bezier(.2, .9, .2, 1), transform 600ms cubic-bezier(.2, .9, .2, 1);
  will-change: opacity, transform;
}

.animate-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

.stagger {
  transition-delay: var(--stagger-delay, 0ms);
}

/* small helpers */
.hidden {
  display: none !important;
}

.center {
  text-align: center;
}

/* =========================
   Responsive fine-tuning
   ========================= */
@media (max-width: 880px) {
  .profile-img {
    max-width: 280px;
    height: auto;
  }

  .hero-text h2 {
    font-size: 1.8rem;
  }

  .section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .container {
    width: 95%;
  }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }

  .project-figure img {
    transform: none !important;
  }

  .animate-up {
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
  }
}



/* 
.btn-send:hover{
  background: #008ecc;
  transform: translateY(-2px);
  outline: none;
  box-shadow: 0 0 0 6px rgba(0, 170, 255, 0.08);
} */

/* End of stylesheet */







/* skills_portion */



/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.skill-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.2rem;
  text-align: center;
  color: var(--light);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transform: translate(0, 0) scale(1);
  opacity: 1;
  transition: transform 0.8s cubic-bezier(.2, .9, .2, 1), opacity 0.8s;
}

.skill-card img {
  max-width: 60px;
  height: 60px;
  margin-bottom: 0.6rem;
  pointer-events: none;
  user-select: none;
}

.skill-card p {
  font-size: 0.9rem;
  margin: 0;
}

/* Initial scattered state (JS will randomize) */
.skill-card.scattered {
  opacity: 0;
  transform: translate(var(--tx, 0), var(--ty, 0)) rotate(var(--rot, 0)) scale(0.8);
}


/* =========================
   More About Section
   ========================= */
.more-about {
  background: #fff;
  color: #111;
}

.more-about-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.more-about-text {
  flex: 1 1 450px;
}

.more-about-text h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #0f172a;
}

.more-about-text p {
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  color: #374151;
}

.more-about-illustration {
  flex: 1 1 400px;
  display: flex;
  justify-content: center;
}

.more-about-illustration img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}

/* Appear-up animation */
.animate-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(.2, .9, .2, 1);
}

.animate-up.in-view {
  opacity: 1;
  transform: translateY(0);
}


/* More About Me section skill tags */
.keyword-light {
  background: rgba(15, 23, 42, 0.06);
  /* subtle dark overlay on white */
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.1);
  padding: 6px 12px;
  font-size: 0.88rem;
  border-radius: 999px;
  display: inline-block;
  transition: background 0.3s ease, transform 0.2s ease;
}

.keyword-light:hover {
  background: rgba(0, 170, 255, 0.08);
  transform: translateY(-2px);
}



/* extras */
.btn:hover {
  background: #008ecc;
  transform: translateY(-2.5px);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 170, 255, 0.08);
}


.send_button {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 10px 20px;
  margin-top: 15px;
  text-decoration: none;
  border-radius: 6px;
  transition: background .1s, transform .1s;
}


.send_button:hover {
  background: #008ecc;
  transform: translateY(-2.5px);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 170, 255, 0.08);
  transition: 0ms;
}


img {
  pointer-events: none;
}

/* css for contact icons */

.contact-links {
  margin-top: 2rem;
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  color: var(--light);
}

.contact-links a {
  color: var(--light);
  text-decoration: none;
  margin: 0 8px;
  transition: color 0.3s ease;
}

.contact-links a i {
  margin-right: 6px;
  color: var(--primary);
}

.contact-links a:hover {
  color: var(--primary);
}

.contact-links .divider {
  margin: 0 10px;
  color: rgba(255,255,255,0.3);
}


/* Prevent horizontal overflow during animations */
html, body {
  max-width: 100%;
  /* overflow-x: hidden; */
}

/* Contain transforms in the skills section */
#skills {
  position: relative;
  overflow: hidden;
}


@media (max-width: 768px) {
  .modal-media {
    background: #061018;
    max-height: 160px;
    min-height: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}


/* temporary update: hide projects until ready */
.project-card{
  display: none;
}