/* =======================
1. Global Reset & Scrollbar
======================= */
* {
     margin: 0;
     padding: 0;
     box-sizing: border-box;
     /* outline: 1px solid red; */
}

img {
     filter: invert(1);
}

html {
     overflow: scroll;
     overflow-x: hidden;
}
::-webkit-scrollbar {
     width: 0;  /* Remove scrollbar space */
     background: transparent;  /* Optional: just make scrollbar invisible */
}
::-webkit-scrollbar-thumb {
     background: #FF0000;
}

/* =======================
2. Base Styles & Dark Mode
======================= */
body {
     max-width: 100vw;
}

.dark-mode {
     background-color: #121212;
     color: #ffffff;
}

/* =======================
3. Layout Utilities
======================= */
.flex-row {
     display: flex;
     flex-direction: row;
}

.grid {
     display: grid;
     place-items: center;
     grid-auto-flow: column;
     grid-template-rows: 1fr;
     gap: 40px;
     justify-content: space-between !important;
     padding: 30px;
}

.jc-sb {
     justify-content: space-between !important;
}

.left-align {
     text-align: left !important;
}

/* =======================
4. Card Grid & Card Items
======================= */
.card-grid {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
     width: 90%;
     max-width: 900px;
     gap: 20px;
     box-sizing: border-box;
}

/* Card Item */
.card {
     display: flex;
     flex-direction: column;
     justify-content: center;
     align-items: center;
     gap: 15px;
     border: 2px dashed white;
     border-radius: 8px; 
     /* width: min(100%, 280px)  !important; */
     height: 100%;
     padding: 30px;    
     animation: all 0.3 ease;
     background: rgba(255, 255, 255, 0.05);
     border: 1px solid rgba(255, 255, 255, 0.2);
     border-radius: 12px;
     padding: 20px;
     text-align: left;
     transition: transform 0.3s ease, background 0.3s ease, height 0.4s ease;
}

.card:hover {
     cursor: pointer;
     border-style: solid;
     height: 105%;
}

.socials .card {
     width: min(100%, 280px) !important;
}

.card:hover {
     transform: translateY(-5px);
     background: rgba(255, 255, 255, 0.1);
}

.card li {
     font-family: 'Hack';
     font-size: 1.5rem;
     margin-bottom: 1rem;
     color: #fff;
     border-bottom: 1px solid rgba(255, 255, 255, 0.2);
     padding-bottom: 5px;
}

.card ul {
     list-style: none;
     padding: 0;
}

.card li{
     padding: 8px 0;
     font-size: 1.1rem;
     color: #ccc;
     transition: color 0.2s ease;
}

.card li:hover {
     color: #fff;
}

.card-desc {
     display: none;
}


/* =======================
5. Backgrounds
======================= */
.dotted-bg {
     background-image: radial-gradient(circle at center, #2b2b2b 2px, transparent 2px);
     background-size: 40px 40px; /* Adjust spacing between dots */
     background-color: #121212; /* Background color behind the dots */
     background-attachment: fixed;
     /* Removed animation since keyframes do not animate any property */
}

/* =======================
6. Section Headings & Cursor Animation
======================= */
#sc-one>h2::after {
     content: "";
     width: 4px;
     height: 30px;
     transform: translate(5px, 5px);
     background: white;
     display: inline-block;
     animation: cursor-blink 1.5s steps(2) infinite;
}

@keyframes cursor-blink {
     0% {
          opacity: 0;
     }
     100% {
          opacity: 1;
     }
}

/* =======================
7. Experience Section & Timeline
======================= */
.experience {
     width: 90%;
     max-width: 900px;
     margin: 0 auto;
     padding: 60px 20px;
     text-align: center;
}

.experience h1 {
     font-size: 2.5rem;
     margin-bottom: 30px;
     font-family: "Hack", monospace;
     text-align: center;
}

.timeline {
     position: relative;
     border-left: 2px solid #616161;
     padding-left: 13px;
     margin: 0 auto;
}

.timeline p {
     font-size: calc(140%) !important;
}

.timeline-item {
     margin-bottom: 20px;
     position: relative;
     padding-left: 20px;
     padding: 20px !important;
}

.timeline-item:last-child {
     margin-bottom: 0;
     border-color: linear-gradient(to bottom, #616161 0%, transparent 100%);
}

.timeline-item .year {
     font-weight: bold;
     font-size: 1.1rem;
     color: #f0f0f0;
}

.timeline-item p {
     font-size: 1rem;
     margin-top: 5px;
     color: #ccc;
}

/* =======================
8. Typography
======================= */
h1,
h2,
p,
span,
li {
     text-align: center;
     font-family: "Hack";
}

/* =======================
9. Sections Layout
======================= */
section {
     max-width: 100vw;
     min-height: 100vh;
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     padding: 80px !important;
     box-sizing: border-box;
}

section.grid > h1 {
     display: flex;          /* make h1 a flex container */
     align-items: center;    /* center content vertically */
     justify-content: center;/* center content horizontally */
     width: 90%;             /* match .projects width */
     max-width: 900px;       /* match .projects max-width */
     height: 60%;            /* height reference for vertical centering */
     text-align: center;
     margin: 0 auto;
     box-sizing: border-box;
}

section.grid.jc-sb {
     display: flex;
     flex-direction: column; /* stack heading and projects vertically */
     justify-content: flex-start !important;
     align-items: center;
     gap: 5rem !important; /* space between heading and projects */
}

/* =======================
10. Skills Section
======================= */
.skills h1 {
     font-size: 2.5rem;
     margin-bottom: 2rem;
     text-align: center;
}

.skills {
     display: flex;
     flex-direction: column;
     justify-content: space-between;
}


/* =======================
10.5. Cards
======================= */

/* =======================
Responsive Tweaks
======================= */
@media (max-width: 640px) {
     .experience h1 {
          font-size: 2rem;
     }
     
     .timeline {
          border-left: 2px solid #ccc;
          padding-left: 15px;
     }
     
     .timeline-item .year {
          font-size: 1rem;
     }
     
     .timeline-item p {
          font-size: 0.9rem;
     }
}

@media (max-width: 640px) {
     /* Timeline */
     .timeline {
          border: none;
     }
     /* Ensure section fits screen width naturally */
     section.grid.jc-sb {
          padding: 40px 20px;
          gap: 30px !important; /* slightly smaller gap for mobile */
     }
     
     /* Center the heading */
     section.grid.jc-sb > h1 {
          width: 90%;       /* match .projects width */
          max-width: 400px;
          text-align: center;
          margin: 0 auto;
          display: flex;
          justify-content: center;
          align-items: center;
     }
     
     /* Projects container responsive layout */
     .card-grid {
          width: 90%;       /* match .projects width */
          max-width: 400px;
          text-align: center;
          margin: 0 auto;
          justify-content: center;
          align-items: center;
          font-size: calc(80%);
     }
     
     /* Each project card */
     .card {
          width: 100%;
          max-width: 400px;
          margin: 0 auto;
          height: auto;
     }

     .socials .card {
          width: min(100%, 280px) !important;
     }
     
     /* Prevent horizontal scroll */
     html, body {
          overflow-x: hidden;
     }
     
     /* Timeline-card */
     
}

/* =======================
12. Commented Out: Project Card
======================= */
/* .project-card {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 15px;
border: 2px dashed white;
border-radius: 8px; 
width: 100%;
height: 100%;
padding: 30px;    
animation: all 0.3 ease;
}

.project-card:hover {
cursor: pointer;
border-style: solid;
height: 105%;
} */