:root{
  --bg: #0d0f12;
  --surface: #13161b;
  --surface-2: #0f1216;
  --text: #f2f4f6;
  --muted: #a0a6af;
  --line: #1f242c;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0,0,0,.35);
  --ease: cubic-bezier(.22,.61,.36,1);
  --speed-1: 160ms;
  --speed-2: 300ms;
  --maxw: 1120px;
}

* { box-sizing: border-box; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a{ color: inherit; text-decoration: none; }
.container{ width: min(var(--maxw), 92vw); margin-inline:auto; }

/* Header */
header{
  position: sticky; top:0; z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(13,15,18,.85);
  border-bottom: 1px solid var(--line);
}
.nav{ display:flex; align-items:center; justify-content:space-between; padding:14px 0; }
.brand{ font-weight:700; }
.brand small{ color: var(--muted); }
.nav-links{ display:flex; gap:18px; }
.nav-links a{ padding:8px 10px; border-radius:8px; transition:.2s; }
.nav-links a:hover{ background: var(--surface-2); }
.nav-links a.active{ color:#fff; }
.menu-toggle{ display:none; }

/* Sections */
section{ padding:30px 0; scroll-margin-top:80px; border-top:1px solid transparent; }
.section-header{ margin-bottom:26px; }
.eyebrow{ color: var(--muted); text-transform: uppercase; font-size: .78rem; }
h1,h2{ margin:10px 0 8px; }
h1{ font-size:2rem; }
h2{ font-size:1.4rem; }

/* Grid */
.grid{ display:grid; gap:22px; grid-template-columns: repeat(12, 1fr); }
.col-5{ grid-column: span 5; }
.col-7{ grid-column: span 7; }
@media (max-width:900px){
  .col-5,.col-7{ grid-column:1/-1; }
}

/* Hero */
.hero-card{
  background: var(--surface);
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding:28px;
  box-shadow: var(--shadow);
}
.lead{ color:#d7dbe0; }
.btn{
  display:inline-block;
  margin-top:14px;
  padding:10px 14px;
  border-radius:12px;
  background:#fff;
  color:#000;
  font-weight:600;
  transition:.2s;
}
.btn:hover{ transform: translateY(-2px); box-shadow: var(--shadow); }
.avatar{
  aspect-ratio:1/1;
  width:min(280px,70%);
  border-radius:50%;
  background: linear-gradient(180deg, #1a1f26, #111418);
  border:1px solid var(--line);
}

.social{
  margin-left: 75%;
  background-color: #fff;
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding-left:3%;
  padding-right:3%;
  padding-top:1%;
  box-shadow: var(--shadow);
  display: inline-block; 
}
.social ul {
    list-style: none;
    display: flex;
    align-items: center;

    justify-content: center;
    gap: 10%;
    padding: 0;
    margin: 0; 
}
.social img{
    width: 32px;
    height: 32px;
}

/* Cards / Projects */
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  transition: .3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.subtle{ color:var(--muted); }

.project-grid{ display:grid; gap:18px; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); }
.thumb{
  aspect-ratio:16/10;
  border-radius:12px;
  background:linear-gradient(180deg, #191d24, #111418);
  margin-bottom:10px;
}

/* Footer */
footer{ padding:40px 0; border-top:1px solid var(--line); }
footer .container{ display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; }

/* Reveal */
[data-reveal]{ opacity:0; transform:translateY(16px); transition:.4s; }
.reveal-in{ opacity:1; transform:translateY(0); }

.skill-icons {
    font-size: 15px;
    padding-block: 2px;
    border-block: 1px solid;
    display: flex;
    --gap: 5rem;
    gap: var(--gap);
    overflow: hidden;
    user-select: none;

    -webkit-mask: linear-gradient(90deg, transparent, white 20%, white 80%, transparent);
    mask: linear-gradient(90deg, transparent, white 20%, white 80%, transparent);
}

.skill-icons ul {
    list-style: none;
    flex-shrink: 0;
    
    display: flex;
    align-items: center;
    gap: var(--gap);
    animation: scroll 20s linear infinite;

    min-width: 50%;
    justify-content: space-between;
    padding: 0;
    margin: 0;
}

.skill-icons:hover ul {
    animation-play-state: paused;
}

.skill-icons i{
    font-size: 50px;
    display: block;
    
}

.project-links{
    display:flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top:auto;
}
.project-links .btn {
  min-width: 80px;
  padding: 8px 12px;
  font-size: clamp(12px, 2vw, 16px);
  white-space: nowrap;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-100% - var(--gap)));
    }
}

@media (prefers-reduced-motion) {
    .skill-icons ul {
        animation: none;
    }
    
    .skill-icons {
        justify-content: center;
    }
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.4s var(--ease); /* For smooth transition */
  pointer-events: none;
  backdrop-filter: blur(5px); /* semi transparent backround when opened*/
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Modal Content */
.modal-content {
  position: fixed;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition: all 0.4s var(--ease);
  overflow: hidden;
  transform-origin: center center;
}

/* Close Button */
.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  cursor: pointer;
  font-size: 2rem;
  color: var(--muted);
  transition: color 0.2s ease;
  z-index: 1001;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
}

.modal-close-btn:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.2);
}

/* MarkDown text styling*/
.project-details h4 {
  color: var(--text);
  font-size: 1.2rem;
  margin: 2rem 0 1rem 0;
  font-weight: 600;
  border-bottom: 2px solid var(--line);
  padding-bottom: 0.5rem;
}

.project-details h3 {
  color: var(--text);
  font-size: 2rem;
  margin-bottom: 2rem;
  font-weight: 700;
}

.project-details p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.project-details ul {
  margin: 1rem 0;
  padding-left: 0;
  list-style: none;
}

.project-details ul li {
  color: var(--muted);
  margin-bottom: 0.8rem;
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.5;
}

.project-details ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.project-details ul li strong {
  color: var(--text);
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .modal-content.active {
    width: 95vw !important;
    height: 90vh !important;
    padding: 30px 20px !important;
  }
  
  .project-details h3 {
    font-size: 1.5rem;
  }
  
  .project-details h4 {
    font-size: 1.1rem;
  }
}

/* Smooth scrolling for modal content */
.modal-content {
  scroll-behavior: smooth;
}

/* Custom scrollbar for modal */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: var(--surface);
}

.modal-content::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* Card header with toggle and static info */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.static-info {
    flex: 1;
    color: var(--muted);
    font-size: 0.9rem;
}

.static-info strong {
    color: #fff;
    font-weight: 600;
}

/* Bio Content */
.card ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.card li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 20px;
}

.card li:before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--muted);
}

.card li:last-child {
    margin-bottom: 0;
}
.card a h3{
    color: #60a5fa
}
/* Bio content animations */
.bio-content {
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.bio-short {
    max-height: 200px;
}

.bio-long {
    max-height: 600px;
}

.bio-list {
    transition: opacity 0.3s ease;
}

.bio-list.fade-out {
    opacity: 0;
}

/* Toggle switcher */
.bio-toggle-container {
    position: relative;
    flex-shrink: 0;
}

.bio-toggle {
    position: relative;
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    width: 120px;
    height: 32px;
}

.toggle-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
    color: #fff;
}

.toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: #fff;
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.bio-toggle.expanded .toggle-slider {
    left: calc(50% + 4px);
}

.bio-toggle.expanded .toggle-option.short {
    color: #fff;
}

.bio-toggle.expanded .toggle-option.long {
    color: #0d0f12;
}

.bio-toggle:not(.expanded) .toggle-option.short {
    color: #0d0f12;
}

.bio-toggle:not(.expanded) .toggle-option.long {
    color: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .static-info {
        order: 2;
    }
    
    .bio-toggle-container {
        order: 1;
        align-self: flex-end;
    }
}

.thumb img{
    border-radius: 12px;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar img{
    border-radius: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;  
  }

.experience-details ul li{
  margin-top: 20px;
}