:root {
    /* Colors */
    --color-bg: #f6f4ef;
    --color-text: #1a1a1a;
    --color-text-light: #525252;
    --color-text-gray: #404040;
    --color-border: #e5e5e5;
    --color-border-light: #d2d0d0;
    --color-surface: #fafafa;
    --color-surface-hover: #f5f5f5;
    --color-footer-bg: #e3d7c1;

    /* Spacing */
    --space-xs: 0.375rem;
    --space-sm: 0.5rem;
    --space-md: 0.75rem;
    --space-lg: 1rem;
    --space-xl: 1.25rem;
    --space-2xl: 1.5rem;
    --space-3xl: 2rem;
    --space-4xl: 2.5rem;
    --space-5xl: 3rem;
    --space-6xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --shadow-sm: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 4px 12px rgba(0, 0, 0, 0.2);

    /* Typography */
    --font-size-xs: 0.7rem;
    --font-size-sm: 0.8125rem;
    --font-size-base: 0.9375rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 2rem;
    --font-size-3xl: 2.75rem;

    /* Layout */
    --container-sm: 40rem;
    --container-md: 56.25rem;
    --container-lg: 900px;
  }

  /* ===================================
  RESET & BASE STYLES
  =================================== */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  body {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI",
      sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }

  a {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
  }

  p {
    font-size: var(--font-size-md);
    color: var(--color-text-gray);
    line-height: 1.7;
    margin-bottom: var(--space-xl);
  }

  ul {
    margin-bottom: var(--space-2xl);
  }

  li {
    margin-bottom: 0.625rem;
    line-height: 1.7;
    color: var(--color-text-gray);
  }

  /* ===================================
  LAYOUT CONTAINERS
  =================================== */
  header {
    max-width: var(--container-md);
    margin: 0 auto;
    padding: var(--space-4xl) var(--space-2xl) var(--space-xl);
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .logo {
    display: none;
  }

  main {
    max-width: var(--container-sm);
    margin: 0 auto;
    padding: 0 var(--space-2xl);
  }

  .container {
    max-width: var(--container-lg);
    margin: 0 auto;
  }

  

  /* ===================================
  UTILITY CLASSES
  =================================== */
  .section-title {
    font-size: 0.85rem;
    letter-spacing: 0.09375rem;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: var(--space-3xl);
    opacity: 0.4;
  }

  .toggle-link {
    color: var(--color-text);
    font-size: var(--font-size-md);
    font-weight: 500;
    cursor: pointer;
    display: inline-block;
    margin-top: var(--space-lg);
    opacity: 0.5;
    transition: opacity var(--transition-fast);
  }

  .toggle-link:hover {
    opacity: 1;
  }

  /* ===================================
  BUTTONS
  =================================== */
  .btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    font-family: inherit;
    letter-spacing: -0.0125rem;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
  }

  .btn:hover {
    transform: translateY(-0.0625rem);
  }

  .btn-primary {
    background: var(--color-text);
    color: white;
  }

  .btn-primary:hover {
    background: #000;
    box-shadow: var(--shadow-sm);
  }

  .btn-secondary {
    background: transparent;
    border: 0.0625rem solid var(--color-border-light);
    color: var(--color-text);
  }

  .btn-secondary:hover {
    border-color: var(--color-text);
  }

  /* ===================================
  HERO SECTION
  =================================== */
  .hero {
    margin-bottom: 7.5rem;
    opacity: 1;
    transform: translateY(0);
  }

  .hero-avatar {
    width: 9.375rem;
    height: 9.375rem;
    border-radius: 10%;
    background: var(--color-text);
    margin-bottom: var(--space-3xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-2xl);
    color: white;
    font-weight: 500;
    overflow: hidden;
  }

  .hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .hero h1 {
    font-size: var(--font-size-3xl);
    font-weight: 600;
    margin-bottom: var(--space-lg);
    letter-spacing: -0.09375rem;
    line-height: 1.1;
  }

  .hero-tagline {
    font-size: var(--font-size-lg);
    color: var(--color-text-light);
    margin-bottom: var(--space-3xl);
    line-height: 1.7;
    max-width: 33.75rem;
  }

  .hero-social {
    display: flex;
    gap: var(--space-xl);
    margin-top: var(--space-3xl);
  }

  .hero-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--space-3xl);
    height: var(--space-3xl);
    opacity: 0.65;
    transition: all var(--transition-base);
    filter: grayscale(1);
  }

  .hero-social a:hover {
    opacity: 1;
    transform: translateY(-0.0625rem);
    filter: grayscale(0);
  }

  .hero-social img {
    width: var(--space-2xl);
    height: var(--space-2xl);
    object-fit: contain;
  }

  .location-badge {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #1e40af;
  }

  /* ===================================
  SECTIONS
  =================================== */
  section {
    margin-bottom: 6rem;
    margin-top: 3rem; 
  }

  section {
    opacity: 0;
    transform: translateY(1.25rem);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  
  section.visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* ===================================
  WORKING TOGETHER SECTION
  =================================== */

  /* Badge */
  .status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-lg);
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #15803d;
    margin-bottom: var(--space-3xl);
    letter-spacing: 0.03em;
    text-transform: uppercase;
  }

  .status-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  }

  @keyframes pulse {
    0%,
    100% {
      opacity: 1;
    }
    50% {
      opacity: 0.4;
    }
  }


  /* Section Title */
  #working-together h2 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--space-xl);
    letter-spacing: -0.02em;
    line-height: 1.3;
  }

  /* Role Tags */
  .role-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin: var(--space-2xl) 0;
  }

  .role-tag {
    padding: var(--space-xs) var(--space-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    color: var(--color-text-light);
    font-weight: 600;
    letter-spacing: 0.05rem;
    text-transform: uppercase;
    transition: all var(--transition-fast);
    opacity: 0.7;
  }

  /* About Extended - FIXED WITH GRID */
  .about-full {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows var(--transition-slow);
    overflow: hidden;
  }

  .about-full.show {
    grid-template-rows: 1fr;
  }

  .about-full-inner {
    min-height: 0;
  }

  /* CTA Buttons */
  .hero-cta {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-3xl);
  }

  /* ===================================
  STACK SECTION
  =================================== */
  .stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
  }

  .stack-card {
    background: var(--color-surface);
    padding: var(--space-xl) 1.125rem;
    border-radius: var(--radius-lg);
    display: flex;
    gap: 0.875rem;
    align-items: center;
    transition: all var(--transition-fast);
    border: 0.0625rem solid transparent;
  }

  .stack-icon {
    width: var(--space-3xl);
    height: var(--space-3xl);
    flex-shrink: 0;
    opacity: 0.9;
  }

  .stack-card strong {
    display: block;
    font-size: var(--font-size-md);
    font-weight: 600;
    letter-spacing: -0.0125rem;
  }

  .stack-card span {
    font-size: var(--font-size-sm);
    margin: 0;
    opacity: 0.5;
  }

  .stack-more {
    display: none;
  }

  .stack-more.show {
    display: contents;
  }

  /* ===================================
  PROJECT CARDS
  =================================== */

  /* Filter Navigation */
  .project-filters {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
  }

  .filter-btn {
    background: none;
    border: none;
    font-size: 1rem;
    color: #666;
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.2s;
    font-family: inherit;
    position: relative;
  }

  .filter-btn:hover {
    color: #333;
  }

  .filter-btn:focus-visible {
    outline: 2px solid #333;
    outline-offset: 4px;
  }

  .filter-btn.active {
    color: #333;
    font-weight: 500;
  }

  .filter-btn.active::after {
    content: "";
    position: absolute;
    bottom: -9px;
    left: 0;
    right: 0;
    height: 2px;
    background: #333;
  }

  /* Projects List */
  .projects-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  /* Project Card */
  .project-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
  }

  .project-card:not(.expanded) {
    cursor: pointer;
  }

  .project-card:not(.expanded):hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  }

  .project-card.hidden {
    display: none;
  }

  /* Compact View */
  .project-card-compact {
    display: flex;
    align-items: stretch;
  }

  .project-thumb-compact {
    width: 280px;
    min-height: 200px;
    flex-shrink: 0;
    overflow: hidden;
    background: #f0f0f0;
  }

  .project-thumb-compact img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 100%;
    transition: transform 0.3s ease;
  }

  .project-card:not(.expanded):hover .project-thumb-compact img {
    transform: scale(1.05);
  }

  .project-info-compact {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    flex: 1;
  }

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

  .tag {
    display: inline-block;
    padding: 4px 12px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .project-info-compact h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #222;
  }

  .project-info-compact p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 16px;
    line-height: 1.5;
  }

  .tech-stack {
    display: flex;
    gap: 12px;
    margin-top: auto;
  }

  .tech-icon {
    width: 28px;
    height: 28px;
    transition: transform 0.2s ease;
  }

  .project-card.expanded {
    margin-top: var(--space-3xl);

  }

  .project-card:not(.expanded):hover .tech-icon {
    transform: translateY(-2px);
  }

  /* Expanded View */
  .project-card-expanded {
    display: none;
    animation: fadeIn 0.3s ease;
  }

  .project-card.expanded .project-card-compact {
    display: none;
  }

  .project-card.expanded .project-card-expanded {
    display: block;
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  .expanded-header {
    position: relative;
    background: #f5f5f5;
    overflow: hidden;
  }

  .expanded-header img {
    width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: center;
    object-fit: cover;
    display: block; /* Removes bottom gap */
    position: relative;
    z-index: 1;
  }

  .expanded-close {
    color: #333 !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    font-size: 24px;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    line-height: 1;
  opacity: 1 !important;
  z-index: 10; 
  }

  .expanded-close:hover {
    background: white;
    transform: rotate(90deg);
  }

  .expanded-close:focus-visible {
    outline: 2px solid #333;
    outline-offset: 2px;
  }

  .expanded-content {
    padding: 32px;
  }

  .expanded-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
  }

  .expanded-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #222;
  }

  .expanded-content > p {
    color: #666;
    margin-bottom: 24px;
  }

  .expanded-section {
    margin-bottom: 24px;
  }

  .expanded-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
  }

  .features-list {
    list-style: none;
    padding-left: 0;
  }

  .features-list li {
    padding: 8px 0 8px 24px;
    position: relative;
    color: #555;
  }

  .features-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #333;
  }

  .expanded-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
  }

  .expanded-tech-item {
    display: flex;
    align-items: center;

    gap: var(--space-sm);
    padding: 0.625rem var(--space-lg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
  }

  .expanded-tech-item img {
    width: 32px;
    height: 32px;
  }

  .expanded-tech-item span {
    font-weight: 500;
    color: #333;
  }

  .screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 16px;
  }

  .screenshots-grid img {
    width: 100%;
  height: 100%;
  /* min-height: 200px; */
  max-height: 400px;
  object-fit: contain; /* Changed from cover to contain - no cropping */
  background: #f5f5f5;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .screenshots-grid img:only-child,
  .screenshots-grid video:only-child {
    max-height: 500px;
    margin: 0 auto;
    max-width: 800px;
  }

  .expanded-links {
    display: flex;
    gap: 12px;
    margin-top: 24px;
  }

  .btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-family: inherit;
    display: inline-block;
    text-align: center;
  }

  .btn:focus-visible {
    outline: 2px solid #333;
    outline-offset: 2px;
  }

  .btn-primary {
    background: #333;
    color: white;
  }

  .btn-primary:hover {
    background: #000;
  }

  .btn-secondary {
    color: #333;
    border: 1px solid #ddd;
  }


  /* Responsive Design */
  @media (max-width: 500px) {
    .project-card-compact {
      flex-direction: column;
    }

    .project-thumb-compact {
      width: 100%;
      height: 220px;
    }

    .project-info-compact {
      padding: 20px;
    }

    .project-info-compact h3 {
      font-size: 1.3rem;
    }

    .expanded-header img {
      height: 200px;
    }

    .expanded-content {
      padding: 24px 20px;
    }

    .expanded-content h2 {
      font-size: 1.5rem;
    }

    .screenshots-grid {
    
            grid-template-columns: 1fr; 
          }

          .screenshots-grid img,
          .screenshots-grid video {
            max-height: 300px;
          }

    .expanded-links {
      flex-direction: column;
    }
  }

  /* Loading State */
  .projects-list.loading {
    opacity: 0.5;
    pointer-events: none;
  }


  /* ===================================
  FOOTER
  =================================== */
  footer {
    background: var(--color-footer-bg);
    border-top: 0.0625rem solid #f0f0f0;
    padding: var(--space-6xl) var(--space-2xl);
    margin-top: var(--space-lg);
  }

  .footer-content {
    max-width: var(--container-md);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-5xl);
    text-align: center;
  }

  .footer-social {
    display: flex;
    gap: var(--space-2xl);
    justify-content: center;
  }

  .footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    opacity: 0.5;
    transition: all var(--transition-base);
    filter: grayscale(0);
  }

  .footer-social a:hover {
    opacity: 1;
    transform: translateY(-0.125rem);
    filter: grayscale(1);
  }

  .footer-social img {
    width: 1.375rem;
    height: 1.375rem;
    object-fit: contain;
  }

  .footer-section {
    max-width: 25rem;
  }

  .footer-section h4 {
    font-size: 0.85rem;
    margin-bottom: var(--space-lg);
    opacity: 0.4;
    text-transform: uppercase;
    letter-spacing: 0.09375rem;
    font-weight: 600;
  }

  .footer-section p {
    opacity: 0.5;
    font-size: var(--font-size-base);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
  }

  .footer-section a {
    display: inline-block;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
    font-size: var(--font-size-base);
    color: var(--color-text);
    font-weight: 500;
  }

  .footer-section a:hover {
    opacity: 1;
  }

  .footer-bottom {
    max-width: var(--container-md);
    margin: 3.5rem auto 0;
    padding-top: var(--space-3xl);
    border-top: 0.0625rem solid rgba(0, 0, 0, 0.08);
    text-align: center;
    opacity: 0.3;
    font-size: 0.875rem;
  }

/* Add this to your new-style.css file */

/* Responsive Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #f0f0f0;
    margin-top: 16px;
  }
  
  .video-container iframe,
  .video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
  }
  
  .video-container video {
    object-fit: cover;
  }
  
  /* HR Separator before buttons */
  .expanded-separator {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 32px 0 24px 0;
    opacity: 0.5;
  }
  
  /* Responsive adjustments */
  @media (max-width: 500px) {
    .video-container {
      padding-bottom: 75%; /* Slightly taller on mobile */
    }
    .expanded-header img {
        height: 220px; 
      }
  }


  /* ===================================
  RESPONSIVE DESIGN
  =================================== */
  @media (max-width: 640px) {
    main {
      padding: 0 var(--space-xl);
    }

    .project-card-compact {
      flex-direction: column;
      align-items: flex-start;
    }

    .project-thumb-compact {
      width: 100%;
      height: 200px;
    }

   

    .expanded-content {
      padding: var(--space-2xl);
    }

    .expanded-content h2 {
      font-size: var(--space-2xl);
    }

    .expanded-links {
      flex-direction: column;
    }

    .btn {
      width: 100%;
      justify-content: center;
    }
  }

  @media (max-width: 37.5rem) {
    header {
      padding: var(--space-3xl) var(--space-xl);
    }

    main {
      padding: 0 var(--space-xl) 5rem;
    }

    .hero {
      margin-bottom: 5rem;
    }

    .hero h1 {
      font-size: 2.25rem;
      letter-spacing: -0.0625rem;
    }

    .hero-tagline {
      font-size: 1.0625rem;
    }

    .hero-cta {
      flex-direction: column;
    }

    .btn {
      width: 100%;
    }

    .stack-card {
      padding: var(--space-lg) var(--space-md);
      flex-direction: column;
      gap: var(--space-sm);
      align-items: center;
      justify-content: center;
      text-align: center;
    }

    .stack-icon {
      width: 1.75rem;
      height: 1.75rem;
    }

    section {
      margin-bottom: 4.5rem;
    }

    #working-together {
      padding: var(--space-3xl) 0;
      margin-bottom: 4.5rem;
    }

    footer {
      padding: var(--space-5xl) var(--space-xl);
    }

    .footer-content {
      gap: var(--space-4xl);
    }
  }