:root {
    /* === Core Structure === */
    --bg-base: #1A1626;
    --surface: #2A2240;
    --surface-inner: #2A2342;
  
    /* === Brand Colors === */
    --primary: #AF87D7;      /* structural purple */
    --accent: #E19B5A;       /* CTA orange */
  
    /* === Text === */
    --text-primary: #F5F0FA;
    --text-secondary: #C7BDD9;
    --text-third: #A89DBD;
    --error: #E85A6A;

    /* === SIDENAV === */
    --sidenav-bg: linear-gradient(180deg, #1A1626 0%, #2A2342 100%);
  
    /* === Subtle Effects === */
    --border-soft: rgba(175, 135, 215, 0.15);
    --border-focus: rgba(175, 135, 215, 0.4);
  
    --cta-gradient: linear-gradient(
        135deg,
        #AF87D7 0%,
        #E19B5A 100%
    );
    --project-media-bg: linear-gradient(165deg, #2a2940 0%, #1d1831 100%);
    --transition: color 0.2s ease;
  
    --radius: 14px;
  }

  body.light-theme {
    --bg-base: #F4EFF8;
    --surface: #FFFFFF;
    --surface-inner: #EFE7F6;
  
    --text-primary: #2A2342;
    --text-secondary: #5C4F74;
    --text-third: #7A6B94;
  
    --sidenav-bg: linear-gradient(180deg, #F4EFF8 0%, #E9DFF4 100%);

    --border-soft: rgba(175, 135, 215, 0.25);
    --border-focus: rgba(175, 135, 215, 0.5);
    --project-media-bg: linear-gradient(165deg, #f2eaf9 0%, #e8dcf3 100%);
  
    background: var(--bg-base);
    color: var(--text-primary);
  }

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html{
    font-size: clamp(16px, 0.4vw + 13px, 22px);
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
    overscroll-behavior: none;

}


body {
    font-family: "Public Sans", "sans-serif";
    background: var(--bg-base);
    color: var(--text-primary);
    margin: 0;
    overflow-x: hidden;
    position: relative;
}

/* Animated aurora / gradient mesh — drifts slowly behind content */
body::before {
    content: "";
    position: fixed;
    inset: -25%;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 80% 20%, rgba(225, 155, 90, 0.10) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 80%, rgba(175, 135, 215, 0.18) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 60%, rgba(120, 90, 200, 0.08) 0%, transparent 55%);
    animation: aurora-drift 28s ease-in-out infinite alternate;
    will-change: transform;
}

body#certifications-page::before {
    background:
        radial-gradient(ellipse at 20% 20%, rgba(225, 155, 90, 0.10) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(175, 135, 215, 0.18) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(120, 90, 200, 0.07) 0%, transparent 60%);
}

body#projects-page::before {
    background:
        radial-gradient(ellipse at 80% 80%, rgba(225, 155, 90, 0.10) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 20%, rgba(175, 135, 215, 0.18) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 40%, rgba(120, 90, 200, 0.07) 0%, transparent 60%);
}

@keyframes aurora-drift {
    0%   { transform: translate(0, 0)        rotate(0deg)   scale(1);    }
    50%  { transform: translate(3%, -2%)     rotate(1.5deg) scale(1.05); }
    100% { transform: translate(-2%, 2%)     rotate(-1deg)  scale(1.02); }
}

@media (prefers-reduced-motion: reduce) {
    body::before { animation: none; }
}

main {
    margin-left: 70px;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}
/* -- Layout Components -- */

.container {
    max-width: 1600px;
    margin: 0 auto;
    border-radius: 20px;
    background-color: var(--surface);
}



.section{
    padding: 30px 60px;
    text-align: left;
}

.split {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
    justify-content: center; 
    align-items: flex-start;
    width: 100%;
}

.split > * { flex: 1; min-width: 0; }

@media (min-width: 1101px) {
    main > .split:last-of-type {
        justify-content: space-between;
        align-items: flex-start;
        gap: clamp(48px, 6vw, 160px);
        padding-left: clamp(20px, 4vw, 80px);
        padding-right: clamp(20px, 4vw, 80px);
    }

    main > .split:last-of-type > .about-me-box {
        margin-left: 0;
        margin-right: auto;
    }

}


/* The side navigation menu */
.sidenav {
    height: 100%;
    width: 70px;
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;
    background: var(--sidenav-bg);
    overflow-x: hidden;
    padding-top: 100px;
    transition: width 0.3s ease;
    border-right: 1px solid var(--surface-inner);
  }

  .sidenav:hover {
    width: 275px;
  }

  /* The navigation menu links */
  .sidenav a {
    padding: 20px 0 20px 20px;
    text-decoration: none;
    font-size: 25px;
    color: var(--text-third);
    display: flex;
    align-items: center;
    transition: 0.3s;
    white-space: nowrap;
  }

  .sidenav a i {
    width: 30px;
    flex-shrink: 0;
    text-align: center;
  }

  .sidenav a span {
    opacity: 0;
    margin-left: 10px;
    transition: opacity 0.3s ease;
  }

  .sidenav:hover a span {
    opacity: 1;
  }

  .sidenav a:hover {
    color: var(--text-primary);
  }

  .sidenav a.sidenav-active {
    color: var(--primary);
    position: relative;
    background: rgba(175, 135, 215, 0.1);
  }

  .sidenav a.sidenav-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 15%;
    height: 70%;
    width: 4px;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px rgba(175, 135, 215, 0.5);
  }

  .sidenav a.sidenav-active i {
    filter: drop-shadow(0 0 5px rgba(175, 135, 215, 0.4));
  }


  /* Sidenav bottom area (lang + theme) */
.sidenav-bottom {
    position: absolute;
    bottom: max(30px, env(safe-area-inset-bottom, 0px));
    left: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    white-space: nowrap;
}

.sidenav-bottom .lang-switch {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidenav:hover .sidenav-bottom .lang-switch {
    opacity: 1;
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 0;
    font-size: 1.5rem;
    cursor: pointer;
    flex-shrink: 0;
    width: 30px;
    text-align: center;
}

.theme-toggle:hover {
    color: var(--text-primary);
}

/* Language Dropdown */
.lang-dropdown {
    color: var(--text-secondary);
    position: relative;
    margin-left: 40px;
}

.lang-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s ease;
    white-space: nowrap;
}

.lang-dropdown-btn:hover {
    border-color: var(--accent);
}

.lang-dropdown-btn .fa-globe {
    color: var(--accent);
}

.lang-arrow {
    font-size: 0.6rem;
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: transform 0.2s ease, opacity 0.3s ease, width 0.3s ease;
}

.lang-dropdown.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-label {
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.sidenav:hover .lang-label {
    opacity: 1;
    width: auto;
}

.sidenav:hover .lang-arrow {
    opacity: 0.5;
    width: auto;
}

.lang-dropdown-menu {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 6px;
    min-width: 140px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.lang-dropdown.open .lang-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.lang-option:hover {
    background: var(--border-soft);
}

.lang-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: transparent;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.lang-option:hover .lang-dot {
    background: var(--text-third);
}

.lang-option.active-lang .lang-dot {
    background: var(--accent);
}

.lang-option.active-lang {
    color: var(--text-primary);
}


/* Hero */


.hero-section {
    display:flex;
    align-items: center;
    padding: 50px 50px 50px 72px;
    gap: 40px;
}

.headshot img{
    border: 5px solid var(--border-soft);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.35),
        0 0 40px rgba(175, 135, 215, 0.22);
}

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

.text-third{
    color: var(--text-third);
}

.hero-section .text {
    margin-top: 50px;
    flex: 5;
}

.hero-section .text h2{
    font-size: clamp(2rem, 1.6vw + 1rem, 3.2rem);
    white-space: normal;
    line-height: 1.2;
}

.hero-section .text h3{
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 9px;
}

.hero-section .text p{
    color: var(--text-third);
    font-size: 1rem;
    overflow-wrap: anywhere;
}

/* Typewriter line */
.hero-section .text .typewriter-line {
    color: var(--accent);
    font-size: 1rem;
    margin-top: 4px;
    min-height: 1.4em;
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
}

.typewriter-prefix {
    color: var(--text-third);
}

.typewriter {
    color: var(--accent);
    font-weight: 500;
}

.typewriter-caret {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background: var(--accent);
    margin-left: 3px;
    transform: translateY(2px);
    animation: caret-blink 1s steps(2) infinite;
}

@keyframes caret-blink {
    50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .typewriter-caret { animation: none; }
}

.hero-section .text a{
    font-size: 1.25rem;
    display: inline-block;
    padding: 10px 2px;
    color: var(--text-primary);
}

.hero-section .text a:hover{
    color: var(--primary);
}

.hero-section .text .cv a{
    color: var(--text-primary);
    font-size: 18px;
}
/* CV */

.cv #cv{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: min(360px, 100%);
    max-width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 18px;
    box-sizing: border-box;
    border-radius: 999px;
    background: var(--primary);
    color: var(--bg-base);
    font-size: clamp(0.9rem, 2.5vw, 1.125rem);
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 10px 30px rgba(175, 135, 215, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cv #cv:hover{
    transform: translateY(-1px);
}

.cv-section{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    align-self: center;
    padding-top: 60px;
    padding-left: 16px;
    padding-right: 16px;
    text-align: center;
    padding-bottom: 0;
    box-sizing: border-box;
}
.cv-section .info{
    width: 300px;
    height: 100px;
    margin: 12px auto 0;
}
.cv-section .info h5{
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 300;
}

/* skills */

.skills-line {
    width: 100%;
    height: 1px;
    background-color: var(--border-soft);
    border-radius: 10px;
    margin-bottom: 10px;
}

.skills-section{
    padding: 0 0;
    text-align: center;
    overflow: hidden;
    max-width: 100%;
}

.skills-section h2{
    font-size: clamp(1.8rem, 1.25vw + 1rem, 2.8rem);
}

.carousel {
    margin: 10px 0 0;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding-top: 5px;
    padding-bottom: 20px;
}

.track {
    display: flex;
    width: fit-content;
    will-change: transform;
    animation: scroll 35s linear infinite;
    gap: 24px;
}

.track:hover {
    animation-play-state: paused;
}

.card {
    flex: 0 0 auto;
    width: 180px;
    height: 130px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;

    margin-right: 0;
    padding: 12px;

    background-color: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 10px;

    font-size: 24px;
    font-weight: 500;
    color: var(--text-primary);

    transition: transform 0.2s ease, box-shadow 0.2s ease;
}


.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  cursor: pointer;
}

.card img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.card span {
  font-size: 14px;
}


@keyframes scroll {
  from { transform: translateX(0); }
    to { transform: translateX(calc(-100% / 3)); }
}

/* About Me */

.about-me-box{
    max-width: clamp(620px, 45vw, 860px);
    margin: 40px clamp(16px, 4vw, 40px);
    box-sizing: border-box;
}

.about-me-title{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 0 auto 12px;
}

.mini-line {
    width: 30px;
    height: 6px;
    background-color: var(--primary);
    border-radius: 999px;
}

.about-me-title .about-me-text {
    font-size: clamp(1.4rem, 0.9vw + 0.8rem, 2rem);
    letter-spacing: 0.01em;
    font-weight: 400;
}

.about-me-box .card{
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: left;
    width: 100%;
    max-width: clamp(620px, 45vw, 860px);
    min-height: 300px;
    height: auto;
    padding: 20px;
    background-color: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 40px;
    margin-bottom: 20px;
    font-size: 1rem;
    color:var(--text-secondary);
}

/* Experience */

.experience-section{
    width: 100%;
    max-width: clamp(620px, 45vw, 860px);
    margin: 40px clamp(16px, 4vw, 40px);
    box-sizing: border-box;
}

.experience-title{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 0 auto 14px;
}

.experience-title h4{
    font-size: clamp(1.4rem, 0.9vw + 0.8rem, 2rem);
    letter-spacing: 0.01em;
    font-weight: 400;
    color: var(--text-primary);
}

.experience-timeline{
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding-left: 34px;
}

.experience-timeline::before{
    content: "";
    position: absolute;
    left: 8px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    background: var(--border-soft);
}

.experience-item{
    position: relative;
    border-radius: 30px;
    border-bottom: 1px solid var(--border-soft);
    background: transparent;
    padding: 22px 24px;
    color: var(--text-secondary);
}

.experience-item::before{
    content: "";
    position: absolute;
    left: -35px;
    top: 16px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--text-third);
    border: 1px solid var(--border-soft);
}

.experience-item.current::before{
    background: var(--primary);
}

.experience-period{
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.experience-item h5{
    color: var(--text-primary);
    font-size: 22px;
    line-height: 1.1;
    margin-bottom: 6px;
}

.experience-company{
    color: var(--text-third);
    font-size: 1rem;
    margin-bottom: 12px;
}

.experience-item ul{
    margin: 0;
    padding-left: 22px;
    display: grid;
    gap: 6px;
}

.experience-item li{
    font-size: 14px;
    line-height: 1.35;
}
/* Project Cards (shared) */

.featured-project-card {
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    background: var(--surface);
}

.featured-project-media {
    background: radial-gradient(circle at 20% 20%, rgba(175, 135, 215, 0.24) 0%, rgba(175, 135, 215, 0) 60%),
                var(--project-media-bg);
}

.featured-project-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.92;
}

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

.featured-project-content h5 {
    font-size: clamp(1.5rem, 1vw + 0.9rem, 2.2rem);
    line-height: 1.1;
    font-weight: 700;
    color: var(--text-primary);
}

.featured-project-content p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
    max-width: 40ch;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-tags span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
}

.project-actions {
    display: flex;
    gap: 10px;
    margin-top: 2px;
}







/* Projects Page */

.projects-page {
    padding-bottom: 15px;
}

.header-section {
    padding-top: 60px;
    padding-bottom: 40px;
}

.header-section h1 {
    font-size: clamp(2.2rem, 4vw, 3rem);
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.header-section p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 700px;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding-top: 20px;
}

.projects-grid .featured-project-card {
    display: flex;
    flex-direction: column;
    max-height: none;
    min-height: auto;
    border-radius: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.projects-grid .featured-project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.projects-grid .featured-project-media {
    height: 240px;
    min-height: auto;
}

.projects-grid .featured-project-media img {
    transition: transform 0.5s ease;
}

.projects-grid .featured-project-card:hover .featured-project-media img {
    transform: scale(1.05);
}

.projects-grid .featured-project-content {
    padding: 24px;
    flex-grow: 1;
    gap: 16px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.project-category {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(175, 135, 215, 0.1);
    padding: 4px 8px;
    border-radius: 10px;
    letter-spacing: 0.05em;
}

.btn-view-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: var(--bg-base) !important;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.btn-view-code:hover {
    opacity: 0.9;
}

.footer-cta {
    text-align: center;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-soft);
}

.github-prompt p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.btn-github-full {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    border: 2px solid var(--accent);
    color: var(--accent) !important;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-github-full:hover {
    background: var(--accent);
    color: var(--bg-base) !important;
}

@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .header-section h1 {
        font-size: 2.5rem;
    }
}

/* Certificates */


.search input[type=text]{
    background-color: var(--surface-inner);
    color: var(--text-primary);
    border: 1px solid var(--border-soft);
    border-radius: 40px;
    margin-top: 8px;
    font-size: 17px;
    height: 56px;
    width: min(600px, 100%);
    max-width: 100%;
    text-align: left;
    padding-left: 24px;
    outline: none;
    transition: all 0.3s ease;

    /* subtle depth */
    box-shadow:
        inset 0 0 0 1px rgba(175,135,215,0.1),
        0 0 12px rgba(175,135,215,0.3);
}
.search input[type=text]:focus{
    border-color: var(--primary);

    box-shadow:
        inset 0 0 0 1px rgba(175,135,215,0.15),
        0 0 12px rgba(175,135,215,0.35),
        0 0 24px rgba(175,135,215,0.15);
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 40px clamp(16px, 4vw, 60px) 0;
  gap: 30px;
}

.cert-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;    
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.cert-card:hover{
    background: var(--surface-inner);
    cursor: pointer
    
}

.cert-card h3 {
    margin-bottom: 8px;
    overflow-wrap: anywhere;
}

.cert-card a {
    display: inline-block;
    margin-top: 12px;
    color: var(--accent);
}


.cert-image img {
    width: 80px;  
    height: 80px; 
    object-fit: contain;
    border-radius: 8px; 
    flex-shrink: 0;
}

.cert-content {
    display: flex;
    flex-direction: column; 
    text-align: left;
    flex: 1; 
}




/* Responsiveness */

@media (max-width: 1100px) {
    .section {
        padding: 28px 36px;
    }

    .hero-section {
        padding: 40px 24px 40px 40px;
        gap: 28px;
    }

    .hero-section .text {
        margin-top: 0;
    }

    .hero-section .text h2 {
        font-size: 34px;
    }

}

@media (max-width: 900px) {
    .split {
        flex-direction: column;
        gap: 20px;
    }

    main > .split:first-of-type {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    main > .split:first-of-type > .hero-section,
    main > .split:first-of-type > .cv-section {
        flex: 1 1 0;
        min-width: 0;
    }
        
    .cv-section {
        width: 100%;
        align-self: stretch;
        padding-top: 8px;
        margin-top: 0;
    }

    .cv {
        width: 100%;
        max-width: 520px;
        display: flex;
        justify-content: center;
    }

    .cv #cv {
        min-width: 0;
        width: min(520px, 100%);
    }

    .cv-section .info {
        width: min(520px, 100%);
        height: auto;
        margin-top: 10px;
    }

    .hero-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .headshot img {
        width: 160px;
        height: 160px;
    }

    .skills-section h2 {
        font-size: 30px;
    }

    .about-me-box {
        margin-left: 0;
        max-width: 100%;
    }

    .experience-section {
        max-width: 100%;
    }

    .experience-item {
        padding: 18px 18px;
    }

    .cert-grid {
        margin: 28px 20px 0;
        gap: 20px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .search input[type=text] {
        width: 100%;
    }

    .cert-card {
        padding: 18px;
        gap: 16px;
    }
  
}


  
@media (max-width: 600px) {
    .section {
        padding: 20px 14px;
    }

    .hero-section {
        padding: 24px 20px;
        gap: 18px;
    }

    .cv-section {
        padding-top: 0;
        gap: 10px;
    }

    .cv #cv {
        width: 100%;
        min-width: 0;
        font-size: 16px;
        height: 42px;
        padding: 0 14px;
    }

    .cv-section .info h5 {
        font-size: 14px;
        line-height: 1.35;
    }

    .featured-project-content {
        padding: 24px 18px;
    }

    .featured-project-content h5 {
        font-size: 32px;
    }

    .featured-project-content p {
        font-size: 15px;
    }

    .hero-section h2 {
        font-size: 28px;
    }

    .hero-section .text .cv a {
        font-size: 16px;
    }

    .skills-section h2 {
        font-size: 26px;
    }

    .experience-timeline {
        padding-left: 26px;
        gap: 16px;
    }

    .experience-item::before {
        left: -27px;
        width: 14px;
        height: 14px;
    }

    .experience-period {
        font-size: 12px;
    }

    .experience-item h5 {
        font-size: 19px;
    }

    .experience-company {
        font-size: 14px;
    }

    .experience-item li {
        font-size: 13px;
    }

    .track {
        gap: 12px;
    }

    .card {
        width: 130px;
        height: 95px;
        font-size: 16px;
        padding: 10px;
    }

    .card img {
        width: 34px;
        height: 34px;
    }

    .card span {
        font-size: 12px;
    }

    #projects {
        font-size: 20px;
    }

    .search input[type=text]{
        font-size: 15px;
        height: 50px;
        padding-left: 16px;
    }

    .cert-grid {
        margin: 20px 0 0;
        grid-template-columns: 1fr;
    }

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

    .cert-image {
        margin-top: 8px;
        align-self: center; 
    }

    .cert-image img {
        width: 64px;
        height: 64px;
    }

    #cert-heading {
        font-size: 2.5rem;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }
}

@media (min-width: 601px) and (max-width: 700px) {
    main > .split:first-of-type {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    main > .split:first-of-type > .hero-section,
    main > .split:first-of-type > .cv-section {
        flex: 1 1 0;
        min-width: 0;
    }

    .cv-section {
        align-self: center;
        align-items: center;
        text-align: center;
    }

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

    .cv #cv {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .cv-section .info {
        margin-left: auto;
        margin-right: auto;
    }

}

/* Mobile menu button + overlay */
.menu-btn {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 150;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    color: var(--text-primary);
    font-size: 1.25rem;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: background 0.2s ease;
}

.menu-btn:hover {
    background: var(--surface-inner);
}

.sidenav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidenav-overlay.active {
    opacity: 1;
}

@media (max-width: 768px) {
    .menu-btn {
        display: flex;
    }

    .sidenav-overlay {
        display: block;
        pointer-events: none;
    }

    .sidenav-overlay.active {
        pointer-events: auto;
    }

    .sidenav {
        width: 275px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidenav.open {
        transform: translateX(0);
    }

    .sidenav:hover {
        width: 275px;
    }

    .sidenav a span {
        opacity: 1;
    }

    main {
        margin-left: 0;
    }

    .section {
        padding: 20px 20px;
    }

    .header-section {
        padding-top: 72px;
    }

    .hero-section {
        padding-top: 72px;
    }
}

@media (max-width: 380px) {
    .hero-section h2 {
        font-size: 24px;
    }

    .headshot img {
        width: 136px;
        height: 136px;
    }
}

/* =====================================================
   Scroll-reveal animations
   ===================================================== */

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: opacity, transform;
}

.reveal.revealed {
    opacity: 1;
    transform: none;
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* =====================================================
   Section divider with personality
   ===================================================== */

.section-divider {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 48px clamp(20px, 5vw, 80px);
    color: var(--text-third);
}

.section-divider .divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--border-soft) 30%,
        var(--border-soft) 70%,
        transparent 100%
    );
}

.section-divider .divider-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--primary);
    font-size: 0.85rem;
}

.section-divider .divider-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-third);
}

/* =====================================================
   Quick Facts panel (About Me side card)
   ===================================================== */

.about-me-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 22px;
    align-items: stretch;
}

.quick-facts {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    padding: 22px 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: var(--text-secondary);
}

.quick-facts h6 {
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 6px;
}

.fact-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.92rem;
    line-height: 1.4;
}

.fact-row i {
    width: 22px;
    flex-shrink: 0;
    color: var(--primary);
    font-size: 0.95rem;
    padding-top: 3px;
    text-align: center;
}

.fact-row strong {
    color: var(--text-primary);
    font-weight: 600;
}

.fact-row .fact-sub {
    display: block;
    color: var(--text-third);
    font-size: 0.82rem;
    margin-top: 2px;
}

.fact-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fact-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(175, 135, 215, 0.10);
    border: 1px solid var(--border-soft);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 500;
}

.fact-pill .pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6ee7a3;
    box-shadow: 0 0 0 0 rgba(110, 231, 163, 0.7);
    animation: pulse-dot 2s ease-out infinite;
}

@keyframes pulse-dot {
    0%   { box-shadow: 0 0 0 0 rgba(110, 231, 163, 0.5); }
    70%  { box-shadow: 0 0 0 8px rgba(110, 231, 163, 0); }
    100% { box-shadow: 0 0 0 0 rgba(110, 231, 163, 0); }
}

/* Collapse to 1-col earlier — about-me-box sits at ~45vw on wide screens,
   so a 2-col grid inside it needs real estate to breathe. */
@media (max-width: 1200px) {
    .about-me-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   Hackathons / Training inline cards
   ===================================================== */

.highlight-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-secondary);
}

.highlight-card i {
    color: var(--accent);
    font-size: 1.4rem;
    flex-shrink: 0;
}

.highlight-card h6 {
    color: var(--text-primary);
    font-size: 0.95rem;
    margin: 0 0 4px;
    font-weight: 600;
}

.highlight-card p {
    font-size: 0.82rem;
    color: var(--text-third);
    line-height: 1.35;
    margin: 0;
}

.highlight-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

/* =====================================================
   Live demo badge
   ===================================================== */

.projects-grid .featured-project-card {
    position: relative;
}

.demo-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px 5px 8px;
    border-radius: 999px;
    background: rgba(110, 231, 163, 0.12);
    border: 1px solid rgba(110, 231, 163, 0.35);
    color: #6ee7a3;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-decoration: none;
    backdrop-filter: blur(6px);
    transition: background 0.2s ease;
}

.demo-badge:hover {
    background: rgba(110, 231, 163, 0.2);
    color: #6ee7a3 !important;
}

.demo-badge .pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6ee7a3;
    animation: pulse-dot 2s ease-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .demo-badge .pulse-dot { animation: none; }
}

/* Icon placeholder for projects without screenshots */
.featured-project-media.icon-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 3.5rem;
    background: radial-gradient(circle at 30% 30%, rgba(175, 135, 215, 0.30) 0%, rgba(175, 135, 215, 0) 60%),
                var(--project-media-bg);
}

.featured-project-media.icon-placeholder i {
    filter: drop-shadow(0 6px 18px rgba(175, 135, 215, 0.35));
    opacity: 0.85;
}

/* =====================================================
   Certificate filter chips
   ===================================================== */

.cert-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px clamp(16px, 4vw, 60px) 0;
}

.filter-chip {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.filter-chip:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}

.filter-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--bg-base);
}

.filter-chip .chip-count {
    margin-left: 6px;
    opacity: 0.7;
    font-size: 0.75rem;
}

/* Hide cert cards when filtered out */
.cert-card.filter-hidden {
    display: none !important;
}

/* =====================================================
   Custom 404 page
   ===================================================== */

.not-found-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
}

.not-found-content {
    text-align: center;
    max-width: 560px;
}

.not-found-code {
    font-size: clamp(6rem, 18vw, 11rem);
    font-weight: 800;
    line-height: 1;
    background: var(--cta-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.04em;
    margin-bottom: 8px;
}

.not-found-content h1 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: var(--text-primary);
    margin-bottom: 12px;
}

.not-found-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.55;
    margin-bottom: 28px;
}

.not-found-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.not-found-actions a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.not-found-actions .btn-primary {
    background: var(--primary);
    color: var(--bg-base) !important;
    box-shadow: 0 10px 30px rgba(175, 135, 215, 0.25);
}

.not-found-actions .btn-secondary {
    border: 1px solid var(--border-soft);
    color: var(--text-primary) !important;
}

.not-found-actions a:hover {
    transform: translateY(-2px);
}

.not-found-glitch {
    font-family: ui-monospace, "JetBrains Mono", monospace;
    color: var(--text-third);
    font-size: 0.85rem;
    margin-top: 20px;
    opacity: 0.7;
}
