:root {
      --dark-green: #1a3a2a;
      --medium-green: #2a4a3a;
      --light-green: #3a5a4a;
      --off-white: #f5f5f0;
      --border-color-light: rgba(26, 58, 42, 0.15);
      --border-color-dark: rgba(245, 245, 240, 0.15);
      --button-bg-light: rgba(58, 90, 74, 0.08);
      --button-bg-dark: var(--medium-green);
      --button-bg-hover-light: rgba(58, 90, 74, 0.15);
      --button-bg-hover-dark: var(--light-green);
      --button-bg-active-light: var(--dark-green);
      --button-bg-active-dark: var(--off-white);
      --button-text-active-light: var(--off-white);
      --button-text-active-dark: var(--dark-green);
      --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
      --font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
      --button-border-radius: 20px;
      --filter-dropdown-bg-light: var(--off-white);
      --filter-dropdown-bg-dark: var(--medium-green);
      --filter-dropdown-border-light: var(--border-color-light);
      --filter-dropdown-border-dark: var(--border-color-dark);
      --filter-item-hover-bg-light: rgba(58, 90, 74, 0.08);
      --filter-item-hover-bg-dark: rgba(245, 245, 240, 0.08);
      --status-active-color: #4CAF50;
      --status-idle-color: #FFC107;
      --status-completed-color: #2196F3;
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: var(--font-family);
    }

    html {
        scroll-behavior: smooth;
    }

    body {
      background-color: var(--off-white);
      color: var(--dark-green);
      transition: background-color 0.4s ease, color 0.4s ease;
      overflow-x: hidden;
      font-weight: 400;
      line-height: 1.6;
      padding-bottom: 180px;
    }


    .container {
      width: 100%;
      max-width: 1400px;
      margin: 0 auto;
      padding: 0 20px;
    }

    h1, h2, h3, h4, .nav-item .label, .social-name, .project-title, .detail-card h3, .about-toggle-btn {
        font-weight: 600;
    }
    h1 { font-weight: 700; }
    h2 { font-weight: 700; }
    h3.subheading {
        font-size: clamp(1.6rem, 3.5vw, 2.2rem);
        margin-bottom: 30px;
        margin-top: 0;
        position: relative;
        font-weight: 700;
        letter-spacing: -0.02em;
    }
     h3.subheading::after {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 0;
        width: 40px;
        height: 2px;
        background-color: var(--dark-green);
        transition: background-color 0.4s ease;
    }


    .loader {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: var(--off-white);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 9999;
      transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
      visibility: visible;
      opacity: 1;
    }
    .loader.hidden {
        opacity: 0;
        visibility: hidden;
    }

    .loader-circle {
      width: 50px;
      height: 50px;
      border: 3px solid rgba(58, 90, 74, 0.2);
      border-top: 3px solid var(--dark-green);
      border-radius: 50%;
      animation: spin 1s linear infinite;
    }

    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }

    .landing {
      height: 100vh;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      position: relative;
      text-align: center;
      min-height: 500px;
    }

    .landing h1 {
      font-size: clamp(3rem, 10vw, 8rem);
      letter-spacing: -0.03em;
      opacity: 0;
      transform: translateY(30px);
    }

    .navigation {
      position: fixed;
      bottom: 40px;
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      gap: 10px;
      z-index: 1000;
      padding: 10px 15px;
      border-radius: 50px;
      background-color: rgba(245, 245, 240, 0.6);
      border: 1px solid rgba(26, 58, 42, 0.1);
      backdrop-filter: blur(12px) saturate(180%);
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
      transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }


    .nav-item {
      position: relative;
      padding: 10px;
      width: 40px;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      cursor: pointer;
      overflow: hidden;
      transition: background-color 0.3s ease, width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
      will-change: width;
      -webkit-tap-highlight-color: transparent;
    }

    .nav-item:hover {
      width: 140px;
      background-color: var(--button-bg-hover-light);
      border-radius: 50px;
    }

    .hover-tilt {
        transition: var(--transition), transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    .hover-tilt:hover {
      transform: translateY(-4px) rotate(1.5deg);
      box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    }
    .hover-tilt:not(:hover) {
      transform: translateY(0) rotate(0deg) !important;
    }
     .navigation .hover-tilt:hover {
        box-shadow: none;
        transform: translateY(-4px) rotate(1.5deg);
     }
     .navigation .hover-tilt:not(:hover) {
        transform: translateY(0) rotate(0deg) !important;
     }
     .js-tilt.hover-tilt:hover {
         transform: none !important;
         box-shadow: none !important;
     }
     .js-tilt.hover-tilt:not(:hover) {
         transform: none !important;
     }

    .js-tilt {
      will-change: transform;
      transition: transform 0.05s ease-out;
      transform-style: preserve-3d;
    }

    .nav-item .icon {
      width: 20px;
      height: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      position: absolute;
      left: 10px;
      transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0s;
      color: var(--dark-green);
      transform: scale(1);
    }
    
    .nav-item:not(:hover) .icon {
      transform: scale(1) !important;
    }
    
    /* Ensure icon never rotates or tilts */
    .nav-item .icon svg {
        transform: none !important;
    }
    .nav-item:hover .icon svg {
        transform: none !important;
    }


    .nav-item.active {}

    .nav-item .label {
      position: absolute;
      left: 45px;
      opacity: 0;
      white-space: nowrap;
      transition: opacity 0.3s ease 0.1s, color 0.4s ease;
      font-size: 14px;
      color: var(--dark-green);
    }


    .nav-item:hover .label {
      opacity: 1;
    }

    section {
      padding: 120px 0;
      opacity: 0; /* Initially hidden */
      transform: translateY(30px); /* Initially moved down */
      will-change: opacity, transform;
    }
    
    /* Projects section should be visible when active */
    section#projects.active {
      opacity: 1;
      transform: translateY(0);
    }

    section h2 {
      font-size: clamp(2.5rem, 5vw, 3.5rem);
      margin-bottom: 60px;
      position: relative;
      font-weight: 700;
      letter-spacing: -0.02em;
    }

    section h2::after {
      content: '';
      position: absolute;
      bottom: -15px;
      left: 0;
      width: 50px;
      height: 3px;
      background-color: var(--dark-green);
      transition: background-color 0.4s ease;
    }


    .about-container {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 50px;
      align-items: start;
    }

    @media (max-width: 900px) {
      .about-container {
        grid-template-columns: 1fr;
        gap: 50px;
        align-items: start;
      }
      .about-photo {
        grid-row: 1;
      }
    }

    /* --- Consistent Button Styles --- */
    .btn-base {
        padding: 8px 18px;
        background: none;
        border: 1px solid var(--dark-green);
        color: var(--dark-green);
        font-size: 13px;
        border-radius: var(--button-border-radius);
        cursor: pointer;
        transition: var(--transition);
        font-weight: 500;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        line-height: 1.4;
        white-space: nowrap;
    }
    .btn-base:hover {
        transform: translateY(-2px);
        background-color: var(--button-bg-hover-light);
    }
    .btn-base.active,
    .btn-base:active {
        background-color: var(--button-bg-active-light);
        color: var(--button-text-active-light);
        border-color: var(--button-bg-active-light);
        transform: translateY(0);
    }
    .btn-base:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
        background-color: transparent !important;
        border-color: var(--border-color-light);
        color: var(--dark-green);
    }

    /* Apply base style to specific buttons */
    .about-toggle-btn,
    .pagination-btn,
    .filter-btn,
    .filter-dropdown-btn,
    .project-link,
    .filter-logic-toggle label {
    }
    /* Override specific base styles for toggle labels */
    .filter-logic-toggle label {
        border: none !important;
        background: none !important;
        padding: 8px 14px;
        line-height: 1.4;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Specific adjustments */
    .about-toggle-btn { padding: 10px 20px; font-size: 14px; }
    .project-link { padding: 10px 20px; font-size: 14px; }
    .filter-dropdown-btn { gap: 8px; }
    /* --- End Consistent Button Styles --- */


    .about-toggle-buttons {
        display: flex;
        gap: 15px;
        margin-bottom: 30px;
    }

    .about-content {
      font-size: 1.1rem;
      line-height: 1.7;
      position: relative;
      min-height: 150px;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
    }

    .about-description-content {
       display: block;
       transition: opacity 0.3s ease;
       opacity: 1;
       width: 100%;
       position: relative;
       top: auto;
       left: auto;
       pointer-events: auto;
    }

.about-description-content.hidden {
    display: none;
    margin-bottom: 0;
}

    .about-description-content p {
        margin-bottom: 1.5em;
    }
    .about-description-content p:last-child {
        margin-bottom: 0;
    }

    /* About Me Pagination - Mobile Only */
    #about-professional-pages {
        position: relative;
        min-height: 100px;
        width: 100%;
    }
    .about-pagination-controls {
        display: none;
        margin-top: 20px;
        justify-content: space-between;
        align-items: center;
    }
    .about-page-indicator {
        font-size: 13px; font-weight: 500; opacity: 0.8;
    }

    #about-professional-pages p {
        display: none;
        opacity: 0;
        transition: opacity 0.4s ease-in-out;
        margin-bottom: 1.5em;
    }
     #about-professional-pages p:last-child {
        margin-bottom: 0;
     }
     #about-professional-pages p.active {
        display: block;
        opacity: 1;
        position: relative;
        pointer-events: auto;
    }

    /* Desktop view: Show original paragraphs, hide mobile pagination */
    #about-professional > p { display: block; }
    #about-professional-pages { display: none; }
    .about-pagination-controls { display: none; }

    @media (max-width: 768px) {
        /* Mobile view: Show mobile pagination container and controls */
        #about-professional-pages { display: block; }
        #about-professional-pages p { display: none; }
        #about-professional-pages p.active { display: block; }
        .about-pagination-controls { display: flex; }
    }


    .about-photo {
      position: relative;
      height: 650px;
      width: 100%;
      max-width: 550px;
      border-radius: 8px;
      overflow: hidden;
      justify-self: center;
      aspect-ratio: 550 / 650;
    }

    .swiper-container.about-swiper {
      width: 100%;
      height: 100%;
    }

    .swiper-slide {
      background-position: center;
      background-size: cover;
      width: 100%;
      height: 100%;
      border-radius: 8px;
      overflow: hidden;
      background-color: var(--light-green);
      box-shadow: 0 6px 15px rgba(0,0,0,0.1);
      transition: box-shadow 0.4s ease;
    }

    .swiper-slide-active {
        box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    }

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

    .swiper-pagination {
        bottom: 15px !important;
    }
    .swiper-pagination-bullet {
        background-color: var(--dark-green);
        opacity: 0.6;
        transition: background-color 0.4s ease, opacity 0.3s ease;
    }
    .swiper-pagination-bullet-active {
        background-color: var(--dark-green);
        opacity: 1;
    }

    .marquee {
      overflow: hidden;
      position: relative;
      margin-top: 80px;
      width: 100%;
      padding-top: 10px;
      padding-bottom: 10px;
      -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
      mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    }

    .marquee-inner-wrap {
        display: flex;
        width: max-content;
        animation: marquee 30s linear infinite;
        animation-play-state: running;
    }

    @keyframes marquee {
      0% { transform: translateX(0%); }
      100% { transform: translateX(-50%); }
    }

    .detail-card {
      display: inline-block;
      vertical-align: top;
      padding: 25px 30px;
      background-color: rgba(58, 90, 74, 0.1);
      border-radius: 6px;
      transition: background-color 0.3s ease, transform 0.1s linear;
      margin-right: 25px;
      min-width: 200px;
      text-align: left;
      flex-shrink: 0;
      transform-style: preserve-3d;
    }


    .detail-card h3 {
      font-size: 13px;
      text-transform: uppercase;
      letter-spacing: 1.5px;
      margin-bottom: 12px;
      opacity: 0.7;
      font-weight: 500;
    }

    .detail-card p {
      font-size: 16px;
      font-weight: 500;
    }

    #social .social-container {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
      gap: 30px;
    }

    #social .social-link {
      text-decoration: none;
      color: inherit;
      display: block;
      transform-style: preserve-3d;
      perspective: 1000px;
    }

    #social .social-card {
      background-color: rgba(58, 90, 74, 0.1);
      border-radius: 6px;
      padding: 25px;
      transition: background-color 0.3s ease, transform 0.1s linear;
      cursor: pointer;
      min-height: 100px;
      display: flex;
      align-items: center;
      transform-style: preserve-3d;
      will-change: transform;
      opacity: 0;
      transform: translateY(20px);
    }


    #social .social-icon {
      width: 35px;
      height: 35px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 22px;
      margin-right: 15px;
      flex-shrink: 0;
      color: var(--dark-green);
      opacity: 0.8;
      transition: color 0.4s ease;
    }
     #social .social-icon svg {
         fill: currentColor;
         stroke: none;
         display: block;
         width: 100%;
         height: 100%;
     }


    #social .social-name {
      font-size: 17px;
      font-weight: 600;
    }

    /* Code Section Layout */
    #code .code-layout-container {
        display: flex;
        gap: 50px;
        align-items: flex-start;
    }
    #code .intro-column {
        flex: 1 1 45%;
        max-width: none;
        margin-bottom: 0;
    }
    #code .skills-column {
        flex: 1 1 55%;
    }
    #code .skills-column h3.subheading {
        margin-top: 0;
    }
    #code .skill-accordion {
        margin-top: 0;
    }

    @media (max-width: 900px) {
        #code .code-layout-container {
            flex-direction: column;
            gap: 40px;
        }
        #code .intro-column,
        #code .skills-column {
            flex-basis: auto;
            width: 100%;
        }
        #code .intro-column {
            margin-bottom: 40px;
        }
    }


    #programming-description-pages p {
        display: none;
        opacity: 0;
        transition: opacity 0.4s ease-in-out;
        font-size: 1.1rem;
        line-height: 1.7;
    }
    #programming-description-pages p.active {
        display: block;
        opacity: 1;
    }

    .pagination-controls {
        margin-top: 25px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .page-indicator {
        font-size: 13px;
        font-weight: 500;
        opacity: 0.8;
    }

    /* Skill Accordion Styling */
    .skill-accordion {
        margin: 0;
    }
    .skill-accordion-item {
        border-bottom: 1px solid var(--border-color-light);
        transition: border-color 0.4s ease;
    }
    .skill-accordion-item:first-child {
        border-top: 1px solid var(--border-color-light);
    }

    .skill-accordion-header {
        background: none;
        border: none;
        width: 100%;
        padding: 20px 15px;
        text-align: left;
        font-size: 1.1rem;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: inherit;
        transition: background-color 0.3s ease;
    }
    .skill-accordion-header:hover {
        background-color: rgba(58, 90, 74, 0.05);
    }
    .skill-accordion-header.active {
        background-color: rgba(58, 90, 74, 0.1);
    }

    .accordion-icon {
        transition: transform 0.3s ease;
        stroke: currentColor;
    }
    .skill-accordion-header.active .accordion-icon {
        transform: rotate(180deg);
    }

    .skill-accordion-content {
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .skill-accordion-content .skill-list {
        padding: 25px 15px 30px 15px;
        list-style: none;
        margin: 0;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    .skill-accordion-content .skill-item {
        cursor: default;
        transition: color 0.4s ease;
        background-color: transparent;
        padding: 0;
    }
    .skill-accordion-content .skill-item .skill-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
        font-size: 15px;
    }
    .skill-accordion-content .skill-item .skill-name {
        font-weight: 500;
    }
    .skill-accordion-content .skill-item .skill-percentage {
        font-size: 0.9em;
        opacity: 0.7;
        font-weight: 500;
    }
    .skill-accordion-content .skill-bar {
        height: 8px;
        background-color: rgba(58, 90, 74, 0.2);
        border-radius: 4px;
        overflow: hidden;
        width: 100%;
    }
    .skill-accordion-content .skill-level {
        height: 100%;
        background-color: var(--dark-green);
        border-radius: 4px;
        width: 0%;
    }


    /* Project Section Styling */
    #projects .work-type-selector {
        display: flex;
        gap: 30px;
        margin-bottom: 30px;
        margin-top: 25px;
    }
    #projects .work-type-btn {
        background: none;
        border: none;
        padding: 15px 5px;
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--dark-green);
        cursor: pointer;
        position: relative;
        transition: color 0.3s ease;
        opacity: 0.6;
    }
    #projects .work-type-btn:hover {
        opacity: 0.8;
    }
    #projects .work-type-btn.active {
        opacity: 1;
        color: var(--dark-green);
    }
    #projects .work-type-btn.active::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 0;
        right: 0;
        height: 3px;
        background-color: var(--dark-green);
        transition: background-color 0.4s ease;
    }
    #projects .projects-header {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 50px;
        gap: 20px;
    }
    #projects .filter-controls-group {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
        justify-content: flex-start;
        align-items: center;
    }
    #projects .filter-controls {
        display: flex;
        gap: 15px;
        flex-wrap: wrap;
        align-items: center;
    }
    #projects .filter-logic-toggle {
        flex-shrink: 0;
    }
    #projects .search-container {
        position: relative;
        width: 100%;
        max-width: none;
    }

    /* Dropdown Styles */
    .filter-dropdown {
        position: relative;
        display: inline-block;
    }
    .filter-dropdown-btn .arrow {
        width: 9px;
        height: 9px;
        border-left: 1.5px solid currentColor;
        border-bottom: 1.5px solid currentColor;
        transform: rotate(-45deg) translateY(-1px);
        transition: transform 0.3s ease;
        margin-left: 5px;
    }
    .filter-dropdown-btn.open .arrow {
        transform: rotate(135deg) translateY(1px);
    }

    .filter-dropdown-panel {
        display: none;
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        background-color: var(--filter-dropdown-bg-light);
        border: 1px solid var(--filter-dropdown-border-light);
        border-radius: 8px;
        box-shadow: 0 6px 20px rgba(0,0,0,0.1);
        z-index: 1010;
        padding: 8px;
        min-width: 230px;
        max-height: 320px;
        overflow-y: auto;
        opacity: 0;
        transform: translateY(-5px);
        transition: opacity 0.2s ease-out, transform 0.2s ease-out, background-color 0.4s ease, border-color 0.4s ease;
        pointer-events: none;
    }
    .filter-dropdown-panel.show {
        display: block;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
    .filter-dropdown-panel ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    /* Style for the clickable "Area" item */
    .filter-dropdown-panel .area-nested-trigger > span {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 9px 14px;
        cursor: pointer;
        border-radius: 5px;
        transition: background-color 0.2s ease;
        font-weight: 500;
    }
    .filter-dropdown-panel .area-nested-trigger > span:hover {
        background-color: var(--filter-item-hover-bg-light);
    }
    .filter-dropdown-panel .area-nested-trigger > span .arrow {
        width: 8px;
        height: 8px;
        border-left: 1.5px solid currentColor;
        border-bottom: 1.5px solid currentColor;
        transform: rotate(-45deg) translateY(-1px);
        transition: transform 0.3s ease;
    }
    .filter-dropdown-panel .area-nested-trigger.open > span .arrow {
        transform: rotate(135deg) translateY(1px);
    }
    .nested-area-panel {
        padding-left: 15px;
        margin-top: 5px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }
    .area-nested-trigger.open > .nested-area-panel {
        max-height: 200px;
        overflow-y: auto;
    }
    .filter-dropdown-panel .filter-item {
        display: block;
        padding: 0;
    }
    .filter-dropdown-panel label {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 14px;
        cursor: pointer;
        border-radius: 5px;
        transition: background-color 0.2s ease;
        font-size: 14px;
        font-weight: 400;
        width: 100%;
    }
    .filter-dropdown-panel label:hover {
        background-color: var(--filter-item-hover-bg-light);
    }
    .filter-dropdown-panel input[type="checkbox"] {
        cursor: pointer;
        accent-color: var(--dark-green);
        width: 15px;
        height: 15px;
        flex-shrink: 0;
        margin-top: 1px;
    }
    /* End Dropdown Styles */

    /* Filter Logic Toggle Styles - Segmented Control Look */
    .filter-logic-toggle {
        display: inline-flex;
        align-items: stretch;
        background-color: var(--off-white);
        border-radius: var(--button-border-radius);
        border: 1px solid var(--dark-green);
        overflow: hidden;
        padding: 2px;
        flex-shrink: 0;
        transition: background-color 0.4s ease, border-color 0.4s ease;
        vertical-align: middle;
    }
    .filter-logic-toggle label {
        color: var(--dark-green);
        opacity: 0.7;
        border-radius: var(--button-border-radius);
        transition: var(--transition);
        white-space: nowrap;
        position: relative;
        z-index: 1;
        padding: 8px 14px;
    }
    .filter-logic-toggle label:hover {
        opacity: 1;
    }
    .filter-logic-toggle input[type="radio"] {
        display: none;
    }
    /* Active state uses the contrasting button active colors */
    .filter-logic-toggle input[type="radio"]:checked + label {
        background-color: var(--button-bg-active-light) !important;
        color: var(--button-text-active-light) !important;
        opacity: 1;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    /* End Filter Logic Toggle Styles */

    #projects .search-input { width: 100%; padding: 12px 25px; border: 1px solid var(--border-color-light); background-color: var(--button-bg-light); color: var(--dark-green); border-radius: 30px; font-size: 14px; transition: var(--transition), background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease; }
    #projects .search-input::placeholder { color: var(--dark-green); opacity: 0.6; transition: color 0.4s ease; }

    #projects .projects-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 40px;
        perspective: 1500px;
        min-height: 390px;
        position: relative;
    }
    
    #no-projects-message {
        display: none;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        text-align: center;
        font-size: 1.1rem;
        font-weight: 500;
        opacity: 0.7;
        padding: 20px;
        width: 100%;
    }
    #projects .project-card {
        height: 350px;
        position: relative;
        transform-style: preserve-3d;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        perspective: 1000px;
        opacity: 0;
        transform: translateY(30px);
    }
    
    /* Certificate cards have different styling - no flip, show full image */
    #projects .certificate-card {
        height: 350px;
        transform-style: flat;
        perspective: none;
    }

    #projects .project-card.card-filtered-out {
       display: none !important;
       pointer-events: none;
       opacity: 0;
    }
    
    #projects .project-card:not(.card-filtered-out) {
        display: block;
    }

    #projects .project-front,
    #projects .project-back {
        position: absolute;
        width: 100%;
        height: 100%;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        border-radius: 8px;
        overflow: hidden;
        background-color: rgba(58, 90, 74, 0.08);
        transition: background-color 0.4s ease, border-color 0.4s ease;
        border: 1px solid var(--border-color-light);
    }
    
    /* Certificate front and back don't need absolute positioning */
    #projects .certificate-card .certificate-front {
        position: relative;
        width: 100%;
        height: 100%;
        backface-visibility: visible;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 20px;
        border-radius: 8px;
        overflow: hidden;
        background-color: rgba(58, 90, 74, 0.08);
        border: 1px solid var(--border-color-light);
        transform-style: preserve-3d;
    }
    
    #projects .certificate-card .certificate-thumbnail {
        width: 100%;
        height: 160px;
        margin-bottom: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        overflow: hidden;
    }
    
    #projects .certificate-card .certificate-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border-radius: 4px;
    }
    
    #projects .certificate-card .certificate-info {
        width: 100%;
        padding: 0;
        margin-top: auto;
        margin-bottom: 30px;
        flex-shrink: 0;
        min-height: 0;
        overflow: hidden;
    }
    
    #projects .certificate-card .certificate-info .project-title {
        font-size: 1.15rem;
        margin-bottom: 8px;
        font-weight: 600;
        line-height: 1.3;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    
    #projects .certificate-card .certificate-info .project-tags-container {
        margin-bottom: 10px;
        max-height: 50px;
        overflow: hidden;
    }
    
    #projects .certificate-card .certificate-info .project-description {
        font-size: 13px;
        line-height: 1.5;
        margin-top: 8px;
        opacity: 0.8;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        max-height: 3em;
    }
    
    #projects .certificate-card .certificate-back {
        display: none !important;
    }

    #projects .project-front {
        display: flex;
        flex-direction: column;
        transform-style: preserve-3d;
        will-change: transform;
        z-index: 2;
        transform: rotateY(0deg);
    }
    #projects .project-thumbnail { height: 200px; overflow: hidden; }
    #projects .project-thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
    #projects .project-card:not(.flipped):not(.certificate-card) .project-front:hover .project-thumbnail img { transform: scale(1.08); }
    
    /* Featured Badge - Golden box at corner */
    #projects .featured-badge {
        position: absolute;
        top: 12px;
        right: 12px;
        background: linear-gradient(135deg, #f4d03f 0%, #f39c12 100%);
        color: #1a1a1a;
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        padding: 6px 12px;
        border-radius: 4px;
        box-shadow: 0 2px 8px rgba(243, 156, 18, 0.4);
        z-index: 10;
        pointer-events: none;
    }
    
    /* Certificate cards - click to open image directly, no flip */
    #projects .certificate-card {
        cursor: pointer;
    }
    
    /* Certificate card hover animation - match project cards exactly */
    #projects .certificate-card .certificate-thumbnail img {
        transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    #projects .certificate-card:hover .certificate-thumbnail img {
        transform: scale(1.08);
    }
    
    /* Certificates don't flip - clicking opens the link directly */
    #projects .certificate-card .certificate-back {
        display: none !important;
    }
    
    /* Featured badge for certificate cards */
    #projects .certificate-card .featured-badge {
        position: absolute;
        top: 12px;
        right: 12px;
        background: linear-gradient(135deg, #f4d03f 0%, #f39c12 100%);
        color: #1a1a1a;
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        padding: 6px 12px;
        border-radius: 4px;
        box-shadow: 0 2px 8px rgba(243, 156, 18, 0.4);
        z-index: 10;
        pointer-events: none;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    

    #projects .project-info { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; justify-content: flex-start; align-items: flex-start; }
    #projects .project-title { font-size: 1.15rem; margin-bottom: 8px; font-weight: 600; }

    #projects .project-status {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin-bottom: 10px;
        padding: 3px 6px 3px 6px;
        border-radius: 12px;
        background-color: rgba(58, 90, 74, 0.1);
        transition: background-color 0.4s ease;
    }

    #projects .status-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        flex-shrink: 0;
    }
    #projects .status-dot.status-active { background-color: var(--status-active-color); }
    #projects .status-dot.status-idle { background-color: var(--status-idle-color); }
    #projects .status-dot.status-completed { background-color: var(--status-completed-color); }

    #projects .status-text {
        font-size: 11px;
        font-weight: 500;
        opacity: 0.8;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

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

    #projects .project-category { display: inline-block; font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.8px; padding: 4px 8px; background-color: rgba(58, 90, 74, 0.3); border-radius: 15px; color: var(--dark-green); transition: background-color 0.4s ease, color 0.4s ease; }

     #projects .project-back {
        transform: rotateY(180deg);
        padding: 30px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    #projects .project-back .project-title { margin-bottom: 15px; }
    #projects .project-back .project-description { font-size: 14px; line-height: 1.7; margin-bottom: 25px; flex-grow: 1; opacity: 0.9; }

    .site-footer {
      text-align: center;
      padding: 25px 20px;
      margin-top: 40px;
      font-size: 1.05rem;
      color: var(--dark-green);
      opacity: 0.7;
      transition: color 0.4s ease, opacity 0.4s ease;
    }

    @media (max-width: 768px) {
        body {
            font-size: 15px;
            padding-bottom: 150px;
        }
        .container {
            padding: 0 15px;
        }
        section { padding: 80px 0; }
        section h2 { margin-bottom: 40px; }

        .navigation { bottom: 20px; padding: 8px 10px; gap: 5px; }
        .nav-item { width: 38px; height: 38px; }
        .nav-item:hover {
            width: 140px;
            background-color: var(--button-bg-hover-light);
            border-radius: 50px;
        }
        .nav-item:hover .label {
            opacity: 1;
        }
        .nav-item .label {
            position: absolute;
            left: 45px;
            opacity: 0;
            white-space: nowrap;
            transition: opacity 0.3s ease 0.1s, color 0.4s ease;
            font-size: 14px;
            color: var(--dark-green);
        }
        .nav-item .icon {
            left: 10px;
            transform: scale(1) rotate(0deg);
            transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.4s ease;
        }
        .nav-item:not(:hover) .icon {
            transform: scale(1) rotate(0deg) !important;
        }
    .nav-item:hover .icon {
      transform: scale(1.1) rotate(0deg) !important;
    }

        .btn-base {
             padding: 6px 14px;
             font-size: 12px;
        }
        .about-toggle-btn { padding: 8px 16px; font-size: 13px; }
        .project-link { padding: 7px 14px; font-size: 12px; }


        .marquee {
            margin-top: 60px;
        }
        .detail-card {
            min-width: 180px;
            padding: 20px 25px;
        }
        .detail-card p { font-size: 15px; }

        /* Accordion mobile adjustments */
        .skill-accordion-content .skill-list {
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 15px;
        }
        .skill-accordion-header { padding: 15px 10px; font-size: 1rem; }
        .skill-accordion-content .skill-list { padding: 20px 10px 25px 10px; }
        .skill-accordion-content .skill-item .skill-info { font-size: 14px; }
        .skill-accordion-content .skill-bar { height: 6px; }


        #social .social-container {
            grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
            gap: 15px;
        }
        #social .social-card {
            padding: 15px;
            min-height: 100px;
            flex-direction: column;
            justify-content: center;
            text-align: center;
        }
        #social .social-icon {
            width: 28px;
            height: 28px;
            font-size: 18px;
            margin-right: 0;
            margin-bottom: 8px;
        }
        #social .social-name {
            font-size: 12px;
            line-height: 1.3;
        }

        .about-container {
            gap: 40px;
        }
        .about-photo {
            height: auto;
            width: 90%;
            max-width: 400px;
            margin: 0 auto 30px auto;
        }
        .about-text {
            padding: 0 10px;
        }
        .about-content {
            font-size: 1.1rem;
            line-height: 1.6;
        }
        .about-toggle-buttons {
            justify-content: center;
            gap: 10px;
        }
        #projects .work-type-selector {
            justify-content: center;
            gap: 25px;
            margin-bottom: 25px;
            margin-top: 15px;
        }
        #projects .work-type-btn {
            padding: 12px 5px;
            font-size: 1rem;
        }

        #projects .projects-grid {
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 20px;
            min-height: 280px;
        }
        #projects .project-card {
            height: 250px;
        }
        #projects .project-thumbnail {
            height: 120px;
        }
        #projects .project-info {
            padding: 15px;
            justify-content: flex-start;
        }
        #projects .project-title {
            font-size: 1rem;
            margin-bottom: 6px;
        }
        #projects .project-status {
            margin-bottom: 8px;
            gap: 5px;
            padding: 2px 1px 2px 4px;
            border-radius: 10px;
        }
        #projects .status-dot {
            width: 7px;
            height: 7px;
        }
        #projects .status-text {
            font-size: 10px;
        }
        #projects .project-tags-container {
            gap: 5px;
        }
        #projects .project-category {
            font-size: 8px;
            padding: 3px 6px;
            letter-spacing: 0.6px;
            border-radius: 12px;
        }
        #projects .featured-badge {
            top: 10px;
            right: 10px;
            padding: 4px 8px;
            font-size: 8px;
        }
        

        #projects .project-back {
            padding: 15px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }
         #projects .project-back .project-title {
             font-size: 0.95rem;
             margin-bottom: 8px;
         }
        #projects .project-back .project-description {
            font-size: 11px;
            line-height: 1.5;
            margin-bottom: 12px;
            flex-grow: 1;
            overflow: hidden;
        }

        .site-footer { font-size: 1rem; padding: 20px; margin-top: 50px; }
    }

    @media (min-width: 769px) and (max-width: 992px) {
        .skill-accordion-content .skill-list {
             grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        }
    }

    @media (min-width: 450px) and (max-width: 768px) {
        #social .social-container {
            gap: 20px;
        }
        #social .social-name {
            font-size: 13px;
        }

        #projects .projects-grid {
            grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
        }
         #projects .project-card {
            height: 270px;
         }
         #projects .project-thumbnail {
            height: 130px;
         }

         #projects .project-back {
            padding: 18px;
         }
         #projects .project-back .project-title {
             font-size: 1rem;
             margin-bottom: 10px;
         }
         #projects .project-back .project-description {
            font-size: 12px;
            line-height: 1.6;
            margin-bottom: 15px;
         }
         .about-photo {
             width: 80%;
             max-width: 380px;
         }
    }
