/* ================================
   RESET / BASE
================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  scroll-behavior: smooth;
  font-family: "Poppins";
}

html {
  font-size: 80%;
  overflow-x: hidden;
  height: 100%;
  overflow-y: scroll;
}

body {
  background: radial-gradient(circle 70em at center, #022102, #011a04);  
  background-attachment: fixed;
  color: var(--text-color);
    height: 100%;

}

/* ================================
   THEME TOKENS
================================ */
:root {
  --bg-color: #080808;
  --second-bg-color: #101010;
  --text-color: #fcf6e6;
  --main-color: #2eaa87;
  --accent-gradient: linear-gradient(270deg, #3f8e77 10%, #96cdbb 100%);
  scrollbar-gutter: stavle both-edges;
}

/* ================================
   GLOBAL ELEMENTS
================================ */
/* Gradient text ONLY on these, not globally */
.logo span,
h1 span,
h2 span,
h3 span,
.hero-title span,
.section-title span,
.gradient-text span {
  background: var(--accent-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}


section {
  min-height: 20vh;
  padding: 10rem 10%;
}

/* Scrollbar styling (Webkit browsers: Chrome, Edge, Safari) */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color); /* scrollbar background */
}

::-webkit-scrollbar-thumb {
  background: var(--accent-gradient);
  border-radius: 10px;
  box-shadow: 0 0 10px var(--main-color);
}

::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--main-color) 70%, white);
}

/* Text selection styling */
::selection {
  background: rgba(24, 103, 78, 0.8); 
  color: var(--text-color);
}



/* ================================
   HEADER / NAV
================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 15%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  z-index: 1000;
}

#menu-icon {
    display: none;
    cursor: pointer;
    transition: 0.3s ease-in-out;
}

#menu-icon img {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(47%) sepia(37%) saturate(529%) hue-rotate(122deg) brightness(87%) contrast(85%);
}

#menu-icon:hover{
    transform: scale(1.05);
}

.logo {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-color);
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

.logo:hover {
  transform: scale(1.05);
}

.navbar a {
  margin-left: 4rem;
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--text-color);
  border-bottom: 3px solid transparent;
  transition: 0.4s ease-in-out;
}

.navbar a:hover {
  color: var(--main-color);
  border-bottom: 3px solid var(--main-color);
}

.mobile-contact {
  display: none;
}

/* ================================
   BUTTONS
================================ */
.gradient-btn {
  padding: 1rem 2rem;
  font-size: 1.8rem;
  color: white;
  letter-spacing: 1px;
  background: var(--accent-gradient);
  border: none;
  border-radius: 3rem;
  cursor: pointer;
  text-wrap: nowrap;
  transition: 0.3s ease-in-out;
}

.gradient-btn:hover {
  transform: scale(1.05);
}

.btn-group {
  display: flex;
  gap: 1.5rem;
}

.btn {
  display: inline-block;
  padding: 1rem 3rem;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--main-color);
  background-color: black;
  border: 2px solid var(--main-color);
  border-radius: 3rem;
  box-shadow: 0 0 25px transparent;
  transition: 0.3s ease-in-out;
  cursor: pointer;
}

.btn:hover {
  transform: scale(1.05);
  background-color: var(--main-color);
  color: black;
  box-shadow:
    0 0 25px var(--main-color),
    0 0 50px var(--main-color);
}

/* ================================
   HOME SECTION
================================ */
.home {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15rem;
  padding-top: 16rem;
}

.home-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.home-content h1 {
  margin-top: 1.5rem;
  font-size: 6rem;
  font-weight: 700;
  line-height: 1;
}

.home-content h3 {
  margin: 1rem 0;
  font-size: 4rem;
}

#typewriter {
  direction: ltr;
  unicode-bidi: plaintext; /* ignore any inherited bidi tricks */
  border-right: 2px solid var(--main-color);
  padding-right: 5px;
  animation: blink 0.7s steps(1) infinite;
}
@keyframes blink { 50% { border-color: transparent; } }



.home-content p {
  font-size: 1.5rem;
  font-weight: 500;
  max-width: 52ch;
}

.home-img img {
  max-width: clamp(200px, 32vw, 450px);
  border-radius: 50%;
  transition: 0.4s ease-in-out;
  border: 3px solid var(--text-color);
  margin-left: -8rem;
}

/* ================================
   SOCIAL ICONS
   (link = circle button, .icon = graphic inside)
================================ */
.social-icons a {
  width: 4rem;
  height: 4rem;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin: 2rem 0.5rem;
}

/* ================================
   PROJECTS
================================ */

.heading{
    text-align: center;
    font-size: 5rem;
    margin: 1.5rem 0;
}

.heading #typewriter {
    font-size: 0.7em;
}

.projects-box{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); /* 300–360 works too */
  gap: 2.4rem;
  align-items: start;   /* don’t center vertically; reduces collision risk */
}

.project-card{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: auto;
    color: inherit;
    text-decoration: none;
    background-color: var(--bg-color);
    border: 2px solid var(--main-color);
    border-radius: 3rem;
    gap: 2rem;
    padding: 2rem 2rem;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 0 5px var(--main-color);
    transition: 0.3s ease;
}
.project-card:hover{
    box-shadow: 0 0 25px var(--main-color),
    0 0 50px var(--main-color);
    transform: scale(1.02);
}

.project-card .project-tags{
   display: flex;
   flex-direction: row;
   align-items: center;
   justify-content: center;
}
.project-card .project-tags .icon {
  margin: 0 -0.5rem;
}

.project-card video,
.project-card img {
  width: 120%; 
  margin-top: -2em;
  max-width: none;     
  height: auto;
  aspect-ratio: 16 / 9; 
  display: block;
  object-fit: cover;   
}

.project-card h3{
    font-size: 3rem;
}
.project-card p{
    font-size: 1.6rem;
}


/* ================================
   ABOUT ME
================================ */

.about{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15rem;
}
.about-content{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
.about-content h1{
  margin-top: 1.5rem;
  font-size: 6rem;
  font-weight: 700;
  line-height: 1;
  align-items: flex-start;
  text-align: left;
}

.about-content p{
  font-size: 1.5rem;
  font-weight: 500;
  max-width: 52ch;
}
.skills h1{
  margin-top: 1.5rem;
  font-size: 6rem;
  font-weight: 700;
  line-height: 2;
  align-items: center;
  text-align: center;
}

.skills-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
}

.skill-card {
  background-color: var(--bg-color);
  border: 2px solid var(--main-color);
  border-radius: 3rem;
  gap: 2rem;
  overflow: hidden;

  padding: 3rem 2rem;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
}
.skill-card h3 {
  font-size: 2.2rem;
}
.skill-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem 1.6rem;
  margin-top: 1rem;
}

.icon {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: scale(var(--icon-scale, 1));
}

.icon svg{
  height: 60px;
  width: 60px;
  fill: var(--main-color);
}

.icon::before{
  content: attr(data-icon);
  position: absolute;
  background-color: var(--text-color);
  color: var(--bg-color);
  text-decoration: none;
  font-size: 2rem;
  padding: 0.8rem;
  border-radius: 100px;
  box-shadow: 0 5px 10px rgba(0,0,0,0.05);
  transform: translateY(-30px) rotate(25deg);
  opacity: 0;
  white-space: nowrap;
  transition: 200ms cubic-bezier(0.25, 0.1, 0.33, 1.88);
}
.icon:hover::before{
  opacity: 1;
  transform: translateY(-80px) rotate(0deg);
}

.icon::after{
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 10px solid var(--text-color);
  opacity: 0;
  transform: translateY(-2px) rotate(25deg);
  transition: 200ms cubic-bezier(0.25, 0.1, 0.33, 1.88);
}
.icon:hover::after{
  opacity: 1;
  transform: translateY(-52px) rotate(0deg);
}

.skill-card:hover {
  box-shadow: none;
  transform: none;
}


/* ================================
   CONTACT FORM
================================ */

.contact h2{
    margin-bottom: 3rem;
    color: var(--text-color);
}
.contact form{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin: 5rem 0;
    text-align: center;
}
.contact form .input-box input,
.contact form textarea{
    width: 100%;
    padding: 2.5rem;
    font-size: 1.8rem;
    color: var(--text-color);
    background-color: var(--bg-color);
    border-radius: 2rem;
    border: 2px solid var(--main-color);
    margin: 1.5rem 0;
    resize: none;
}

/* ================================
   FOOTER
================================ */

.footer{
    padding: 0 0 40px 0;
}
.footer .social-icons{
    text-align: center;
}
.footer ul{
    text-align: center;
    font-size: 1.8rem;
}
.footer ul li{
    display: inline-block;
    margin-left: 20px;
}
.footer ul li a{
    color: white;
    border-bottom: 3px solid transparent;
    transition: 0.3s ease-in-out;
}
.footer ul li a:hover{
    border-bottom: 3px solid var(--main-color);
}

.footer .copyright{
    text-align: center;
    margin-top: 20px;
    font-size: 16px;
}
.footer .copyright a{
    color: var(--main-color);
    text-decoration: none;
}
.footer .copyright a:hover{
    text-decoration: underline;
}

/* ================================
   PROJECT PAGE
================================ */

.project-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 10%;
  gap: 10px;

  font-size: 2.2rem;
}

.project-details > * {
  max-width: 900px;
}

.project-details p {
  margin: 0 auto;
  line-height: 1.4;
  font-size: 0.7em;
}

.project-details h3 {
  margin-top: 50px;
  font-size: 1.5em;
}

.project-details h4 {
  width: 100%;
  font-size: 0.9em;
  align-items: left;
  text-align: left;
  margin-top: 2em;
}

.project-details p.media-text {
  font-size: 0.6em;
  margin-bottom: 1em;
  font-style: italic;
}

.project-details iframe, video {
  width: 100%; 
  height: auto;
  aspect-ratio: 16 / 9; 
  border-radius: 1em;
  object-fit: cover;  
}

.project-details img {
  width: 100%; 
  height: auto;
  border-radius: 1em;
  object-fit: cover;  
  cursor: pointer;
}

.ui-tag {
  display: inline-block;
  padding: 0 0.2em 0 0.2em;
  margin: 0.15em 0 0.15em 0;
  border-radius: 0.5em;  
  background: rgba(128, 128, 128, 0.15);  
  border: solid 1px rgba(128, 128, 128, 0.3);
}

.project-details ul, ol {
  margin-left: 4em;
  font-size: 0.7em;
  margin-top: 1em;
  margin-bottom: 1em;
  width: 100%;
}

.project-details h3 {
  margin-top: 50px;
}

/* ---- Accordion container ---- */
.code-accordion {
  width: 90%;
  border-radius: 8px;
  border: 1px solid var(--text-color);
  margin: 1em 0;
  box-sizing: border-box;
  overflow-x: auto;
}

/* ---- Header ---- */
.code-accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 1);
  border: none;
  cursor: pointer;
  color: var(--text-color);
  font-size: 0.7em;
  text-align: left;
}


/* ---- Icon (arrow) ---- */
.code-accordion-icon {
  transition: transform 0.2s ease;
}

/* Rotated when open */
.code-accordion.open .code-accordion-icon {
  transform: rotate(180deg);
}

/* ---- Panel (where the code lives) ---- */
.code-accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

/* Optional padding for the code area */
.code-accordion-panel pre {
  margin: 0;
  padding: 1rem 1.25rem;
}

/* You can keep your existing code styles: */
code[class="language-cpp"] {
  font-size: 0.7em !important;
  line-height: 1.4em !important;
}

.project-details pre {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
}

pre[class*="language-"] {
  border: none !important;
  box-shadow: none !important;
}

.project-details a {
    color: var(--main-color);
    text-decoration: none;
}

.project-details a:hover{
    text-decoration: underline;
}

  /* Smaller font etc. */
  code[class="language-cpp"] {
    font-size: 0.7em !important;
    line-height: 1.4em !important;
  }

  /* Make code blocks responsive inside project-details */
  .project-details pre {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
  }

  .project-details pre[class*="language-"],
  .project-details pre code[class*="language-"] {
    white-space: pre-wrap !important;   /* override Prism */
  }


/* ================================
   NICE TABLE STYLES

/* Reusable nice table */
.nice-table {
  width: 100%;
  margin: 2rem auto;
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  overflow: hidden;
}

/* Make columns size naturally */
.nice-table th {
  width: 40%;            /* <— no forced width */
  white-space: nowrap;    /* <— prevents breaking th text */
}

/* Cells */
.nice-table th,
.nice-table td {
  padding: 14px 18px;
  font-size: 0.7em;
  vertical-align: middle;
}

/* Left column styling */
.nice-table th {
  text-align: left;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-color);
}

/* Right column */
.nice-table td {
  color: var(--text-color);
}

/* Dividers between rows */
.nice-table tr + tr th,
.nice-table tr + tr td {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Link styling */
.nice-table a {
  color: var(--main-color);
  text-decoration: none;
}

.nice-table a:hover {
  text-decoration: underline;
}


/* ================================
  GALLERY
================================ */

.gallery {
  column-width: 400px;
  column-gap: 1rem;
  width: fit-content;   /* shrink to fit columns */
  margin: 0 auto;       /* center horizontally */
}


.gallery-item {
  break-inside: avoid;     /* prevents splitting */
  margin-bottom: 1rem;     /* spacing between rows */
  border-radius: 0.5rem;     /* round outer wrapper */
  transition: 50ms ease-in-out;
  cursor: pointer;
}

.gallery img,
.gallery video {
  display: block;
  width: 100%;
  height: auto;            /* keep aspect ratio */
  border-radius: 0.8rem;   /* rounded corners for the media itself */
}

.gallery-item:hover {
  transform: scale(1.01);
}

/* ===== Lightbox Overlay ===== */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  padding: 2rem;
}

.lightbox.hidden {
  display: none;
}

.lightbox-media {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 1rem;
  box-shadow: 0 4px 30px rgba(0,0,0,0.6);
  display: none;
}

.close-btn {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 3rem;
  color: white;
  cursor: pointer;
  user-select: none;
}

/* Fade-in effect */
.lightbox:not(.hidden) {
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}


/* ================================
   RESPONSIVE
================================ */

@media(max-width:1285px){
    #menu-icon{
        display: block;
    }
    .navbar{
        position: absolute;
        display: none;
        top: 100%;
        right: 0;
        width: 40%;
        padding: 1rem 3rem;
        background: rgba(0, 0, 0, 0.8);
        border-bottom-left-radius: 2rem;
        border-left: 2px solid var(--main-color);
        border-bottom: 2px solid var(--main-color);
    }
    .navbar a{
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
        color: var(--text-color);
    }
    .navbar.active{
        display: block;
    }
    .mobile-contact{
        display: block;
    }

    .gradient-btn{
        display: none;
    }
    .home{
        flex-direction: column-reverse;
        margin: 5rem 0;
        gap: 5rem;
    }
    .home-content{
        align-items: center;
        text-align: center;
    }
    .home-img img{
        width: 56vw;
        margin-left: 0;
    }
    .projects-box{
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
    .about{
        flex-direction: column-reverse;
        text-align: center;
    }
    .about h2{
        text-align: center;
        margin: 2rem 0;
    }
    .about img{
        min-width: 300px;
        margin-bottom: -130px;
        
    }
    .contact form{
        flex-direction: column;
    }

    .project-details pre {
      /* you can tweak padding on mobile if you want */
      padding: 1rem;
      font-size: 0.6em !important;
    }

    .heading {
      font-size: 3rem;
    }

    .heading #typewriter {
    font-size: 0.7em;
}

.logo {
  font-size: 2rem;
}

  
}