/*=============== GLOBAL STYLES ===============*/
:root {
    --header-height: 3rem;
    
    /*========== Colors ==========*/
    --primary-color: #FFB81C;
    --primary-color-alt: #E6A600;
    --secondary-color: #003DA5;
    --title-color: #eeeeee;
    --text-color: #b3b3b3;
    --text-color-light: #808080;
    --body-color: #121212;
    --container-color: #1e1e1e;
    --border-color: #333333;
    --scroll-bar-color: #333333;
    --scroll-thumb-color: #555555;
    
    /*========== Font and typography ==========*/
    --body-font: 'Poppins', sans-serif;
    --heading-font: 'Roboto', sans-serif;
    --biggest-font-size: 2.5rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
    --smaller-font-size: 0.75rem;
    
    /*========== Font weight ==========*/
    --font-light: 300;
    --font-regular: 400;
    --font-medium: 500;
    --font-semi-bold: 600;
    --font-bold: 700;
    
    /*========== z index ==========*/
    --z-tooltip: 10;
    --z-fixed: 100;
    --z-modal: 1000;
    
    /*========== Transitions ==========*/
    --transition-speed: 0.3s;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--body-color);
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    color: var(--title-color);
    font-weight: var(--font-semi-bold);
    font-family: var(--heading-font);
    line-height: 1.2;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--text-color);
}

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

button, input, textarea {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    outline: none;
    border: none;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: var(--h1-font-size);
    color: var(--title-color);
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 70px;
    height: 3px;
    background-color: var(--primary-color);
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
}

.section-subtitle {
    display: block;
    font-size: var(--small-font-size);
    color: var(--text-color-light);
    margin-top: 1.5rem;
}

.container {
    max-width: 1140px;
    width: calc(100% - 3rem);
    margin: 0 auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: var(--font-medium);
    transition: all var(--transition-speed);
    cursor: pointer;
}

.primary-btn {
    background-color: var(--primary-color);
    color: #000000;
}

.primary-btn:hover {
    background-color: var(--primary-color-alt);
    color: #000000;
}

.secondary-btn {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.secondary-btn:hover {
    background-color: var(--primary-color);
    color: var(--title-color);
}

.img-placeholder {
    background-color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    border-radius: 0.5rem;
    overflow: hidden;
}

.img-placeholder svg {
    width: 30%;
    height: 30%;
    color: var(--text-color-light);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 3px solid var(--primary-color);
    transition: all var(--transition-speed);
}

.profile-img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(255, 184, 28, 0.25);
}

/*=============== HEADER ===============*/
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    background-color: var(--body-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.4s;
    height: 4.5rem;
}

.header .container {
    height: 4.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.logo {
    font-size: 2.1rem;
    font-weight: var(--font-bold);
    color: var(--primary-color);
}

.logo a {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    align-items: center;
    column-gap: 2.3rem;
}

.nav-link {
    color: var(--text-color);
    font-weight: var(--font-medium);
    font-size: 1.18rem;
    transition: all var(--transition-speed);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    bottom: -4px;
    left: 0;
    transition: all var(--transition-speed);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--title-color);
}

/*=============== HOME ===============*/
.home {
    padding-top: calc(var(--header-height) + 5rem);
}

.home-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
}

.home-text {
    display: flex;
    flex-direction: column;
}

.greeting {
    font-size: var(--h3-font-size);
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.name {
    font-size: var(--biggest-font-size);
    font-weight: var(--font-bold);
    color: var(--title-color);
    margin-bottom: 0.5rem;
}

.profession {
    font-size: var(--h2-font-size);
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.profession::after {
    content: '';
    position: absolute;
    width: 70px;
    height: 3px;
    background-color: var(--primary-color);
    left: 0;
    bottom: -10px;
}

.brief-intro {
    margin-bottom: 2rem;
    max-width: 450px;
}

.home-buttons {
    display: flex;
    gap: 1rem;
}

.home-img img {
    position: relative;
    top: 1rem;
    border-radius: 50%;
    width: 35vw;         /* increased from 25vw */
    max-width: 400px;    /* increased from 300px */
    height: auto;
    box-shadow: 0 0 25px var(--main-color);
    cursor: pointer;
    transition: 0.4s ease-in-out;
}


.scroll-down {
    text-align: center;
    margin-top: 5rem;
}

.mouse-wrapper {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-speed);
}

.mouse-wrapper:hover {
    transform: translateY(-5px);
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--text-color-light);
    border-radius: 50px;
    display: flex;
    justify-content: center;
    padding-top: 10px;
}

.wheel {
    width: 4px;
    height: 8px;
    background-color: var(--text-color-light);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(20px);
        opacity: 0;
    }
}

.mouse-label {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

/*=============== ABOUT ===============*/
.about-container-new {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.about-img-card {
  background: #181818;
  border-radius: 1.2rem;
  box-shadow: 0 6px 24px rgba(0,0,0,0.16);
  border: 4px solid var(--primary-color);
  padding: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 320px;
  max-width: 380px;
  min-height: 380px;
}
.about-img {
  width: 100%;
  max-width: 320px;
  border-radius: 1rem;
  object-fit: cover;
  box-shadow: 0 2px 16px rgba(255,184,28,0.10);
}
.about-content-new {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1 1 400px;
  min-width: 320px;
  max-width: 700px;
  justify-content: flex-start;
}
.about-tagline {
  color: var(--primary-color);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
  font-family: 'Montserrat', 'Poppins', 'Roboto Slab', sans-serif;
}
.about-intro {
  color: var(--title-color);
  font-size: 1.13rem;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}
.highlight {
  color: var(--primary-color);
  font-weight: 700;
}
.about-stats-row {
  display: flex;
  gap: 1.2rem;
  margin: 1.2rem 0 0.7rem 0;
  flex-wrap: wrap;
}
.about-stat-card {
  background: #232323;
  border-radius: 0.9rem;
  box-shadow: 0 2px 12px rgba(255,184,28,0.08);
  padding: 1.1rem 2.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 180px;
  max-width: 260px;
  flex: 1 1 220px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.about-stat-card i {
  color: var(--primary-color);
  font-size: 2.1rem;
  margin-bottom: 0.5rem;
}
.stat-number {
  color: var(--primary-color);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
  font-family: 'Montserrat', 'Poppins', 'Roboto Slab', sans-serif;
}
.stat-label {
  color: var(--text-color);
  font-size: 1rem;
  text-align: center;
}
.about-stat-card:hover {
  box-shadow: 0 8px 24px rgba(255, 184, 28, 0.15);
  transform: translateY(-4px) scale(1.04);
}
.about-funfact {
  background: #181818;
  border-radius: 0.7rem;
  color: var(--text-color);
  font-size: 1.08rem;
  padding: 0.7rem 1.2rem;
  margin-bottom: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  box-shadow: 0 2px 8px rgba(255,184,28,0.04);
}
.about-funfact i {
  color: var(--primary-color);
  font-size: 1.3rem;
}
@media (max-width: 900px) {
  .about-container-new {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
  .about-img-card {
    min-width: 220px;
    max-width: 98vw;
    min-height: 220px;
    padding: 0.7rem;
  }
  .about-img {
    max-width: 220px;
  }
  .about-content-new {
    min-width: 0;
    max-width: 98vw;
  }
  .about-stats-row {
    flex-direction: column;
    gap: 0.7rem;
  }
  .about-stat-card {
    max-width: 100%;
    min-width: 0;
    padding: 1rem 1.1rem;
  }
}

/*=============== SKILLS ===============*/
.skills-container {
    display: flex;
    justify-content: center;
}

.skills-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    width: 100%;
}

.skill-box {
    background-color: #252525;
    border-radius: 0.5rem;
    padding: 2rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-speed);
}

.skill-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.skill-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    cursor: pointer;
}

.skill-header i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-right: 0.75rem;
}

.skill-title {
    font-size: var(--h3-font-size);
    color: var(--title-color);
    flex: 1;
}

.skill-arrow {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: all var(--transition-speed);
}

.skill-list {
    row-gap: 1.5rem;
}

.skill-data {
    margin-bottom: 1.5rem;
}

.skill-name {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.skill-name h3 {
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
}

.skill-percentage {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

.skill-bar {
    height: 5px;
    border-radius: 2.5px;
    background-color: rgba(255, 184, 28, 0.2);
    position: relative;
}

.skill-percentage-bar {
    position: absolute;
    left: 0;
    height: 5px;
    border-radius: 2.5px;
    background-color: var(--primary-color);
}

/*=============== PROJECTS ===============*/
/* Projects section separator */
.projects-container {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    align-items: center;
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    align-items: stretch;
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
}

.project-card.dashboard-card {
    background: #232323;
    border-radius: 1.5rem;
    box-shadow: 0 6px 24px rgba(0,0,0,0.16);
    padding: 2.5rem 2.5rem 2.5rem 2.5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    margin-bottom: 0;
    transition: box-shadow 0.3s, transform 0.3s;
    min-height: 340px;
}

.project-card.dashboard-card:hover {
    box-shadow: 0 12px 36px rgba(255, 184, 28, 0.22);
    transform: translateY(-8px) scale(1.02);
}

.project-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-title {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.7rem;
}

.project-description {
    color: var(--text-color);
    font-size: 1.15rem;
    margin-bottom: 1.2rem;
    word-break: break-word;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 1.2rem;
    row-gap: 0.5rem;
}

.tech-tag {
    display: inline-flex;
    align-items: center;
    background: #181818;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 1rem;
    border-radius: 0.5rem;
    padding: 0.4rem 1.1rem;
    margin-bottom: 0.2rem;
    letter-spacing: 0.01em;
    transition: background 0.2s, color 0.2s, border 0.2s, transform 0.18s;
    border: 2px solid var(--primary-color);
    gap: 0.5rem;
    cursor: pointer;
}

.tech-tag:hover {
    background: var(--primary-color);
    color: #000000;
    border-color: #fff;
    transform: scale(1.07);
}

.tech-tag i {
    width: 1.1em;
    height: 1.1em;
    margin-right: 0.3em;
    color: var(--primary-color);
}

.project-links {
    display: flex;
    gap: 1.2rem;
    margin-top: auto;
    align-items: center;
}

.project-link {
    display: flex;
    align-items: center;
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 600;
    transition: color 0.2s;
    padding: 0.2rem;
}

.project-link i {
    width: 2em;
    height: 2em;
    color: var(--primary-color);
}

.project-link:hover {
    color: #fff;
}

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

@media (max-width: 700px) {
    .project-tech {
        gap: 0.4rem;
        row-gap: 0.3rem;
        justify-content: flex-start;
    }
    .tech-tag {
        font-size: 0.95rem;
        padding: 0.35rem 0.8rem;
    }
}

/*=============== CONTACT ===============*/
.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.contact-info.contact-tiles-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #252525;
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-speed);
    min-width: 250px;
    flex: 1 1 220px;
    max-width: 320px;
}

.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.contact-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-title {
    font-size: var(--h3-font-size);
    font-weight: var(--font-medium);
    margin-bottom: 0.5rem;
}

.contact-data {
    display: block;
    font-size: var(--small-font-size);
    color: var(--text-color);
    margin-bottom: 1rem;
    text-align: center;
    word-break: break-all;
}

.contact-link {
    font-size: var(--small-font-size);
    color: var(--primary-color);
    font-weight: var(--font-medium);
    transition: all var(--transition-speed);
}

.contact-link:hover {
    text-decoration: underline;
}

.contact-form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-label {
    position: absolute;
    top: -0.75rem;
    left: 1.25rem;
    font-size: var(--smaller-font-size);
    color: var(--title-color);
    padding: 0 0.25rem;
    background-color: var(--container-color);
    color: var(--title-color);
    z-index: 1;
}

.form-input {
    width: 100%;
    background-color: var(--container-color);
    border: 1.5px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.25rem 1rem;
    font-size: var(--normal-font-size);
    color: var(--text-color);
    transition: all var(--transition-speed);
}

.form-input:focus {
    border-color: var(--primary-color);
}

.form-area {
    height: 11rem;
}

.form-area textarea {
    resize: none;
    height: 100%;
}

.send-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    column-gap: 0.5rem;
    cursor: pointer;
    width: fit-content;
}

.send-icon {
    font-size: 1.25rem;
}

/*=============== FOOTER ===============*/
.footer {
    background-color: var(--primary-color);
    padding: 3rem 0 2rem;
    color: var(--title-color);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-title {
    font-size: var(--h1-font-size);
    color: #ffffff;
}

.footer-subtitle {
    font-size: var(--small-font-size);
    color: rgba(255, 255, 255, 0.7);
}

.footer-social {
    display: flex;
    column-gap: 1.25rem;
}

.footer-social-link {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 1.25rem;
    display: inline-flex;
    transition: all var(--transition-speed);
}

.footer-social-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.footer-copy {
    display: block;
    margin-top: 2rem;
    text-align: center;
    font-size: var(--smaller-font-size);
    color: rgba(255, 255, 255, 0.7);
}

/*=============== SCROLL BAR ===============*/
::-webkit-scrollbar {
    width: 0.6rem;
    background-color: var(--scroll-bar-color);
}

::-webkit-scrollbar-thumb {
    background-color: var(--scroll-thumb-color);
    border-radius: 0.5rem;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-color-light);
}

/*=============== SCROLL UP ===============*/
.scrollup {
    position: fixed;
    right: 1rem;
    bottom: -30%;
    background-color: var(--primary-color);
    padding: 0.5rem;
    border-radius: 0.5rem;
    display: flex;
    color: #ffffff;
    z-index: var(--z-tooltip);
    opacity: 0.8;
    transition: all var(--transition-speed);
}

.scrollup:hover {
    opacity: 1;
    transform: translateY(-5px);
}

.scrollup-icon {
    font-size: 1.5rem;
}

.show-scroll {
    bottom: 5rem;
}

/*=============== ANIMATIONS ===============*/
.fade-in {
    animation: fadeIn 1s ease both;
}

.fade-in-delayed {
    animation: fadeIn 1s ease 0.3s both;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 3px solid var(--primary-color);
    transition: all var(--transition-speed);
}

.profile-img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(255, 184, 28, 0.25);
}

.rounded-image {
    border: 4px solid #ccc;   /* Light gray border */
    border-radius: 50%;       /* Makes the image circular */
    padding: 5px;             /* Optional spacing */
    width: 150px;             /* Optional size - adjust as needed */
    height: 150px;
    object-fit: cover;        /* Ensures the image fits inside the circle */
}

/* --- Enhanced Skills Pop-out Card Styles --- */
.skills-list-new {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}
.skill-group {
  background: #181818;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  border-radius: 0.75rem;
  padding: 1.25rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0;
  font-size: 1.08rem;
  transition: box-shadow 0.3s, transform 0.3s;
}
.skill-group:hover {
  box-shadow: 0 8px 24px rgba(255, 184, 28, 0.15);
  transform: translateY(-4px) scale(1.02);
}
.skill-label {
  min-width: 180px;
  font-weight: 700;
  margin-right: 0.75rem;
  letter-spacing: 0.01em;
  font-size: 1.1rem;
  color: var(--primary-color);
}
.skill-items-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.skill-item {
  display: inline-block;
  padding: 0.45rem 1.2rem;
  background: #111014;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(255,184,28,0.04);
}
.skill-item:hover {
  background: var(--primary-color);
  color: #000000;
  box-shadow: 0 4px 16px rgba(255,184,28,0.15);
}
@media (max-width: 600px) {
  .skills-list-new {
    gap: 1rem;
  }
  .skill-group {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    font-size: 1rem;
  }
  .skill-label {
    margin-bottom: 0.2rem;
    min-width: 0;
    font-size: 1rem;
  }
  .skill-items-list {
    gap: 0.5rem;
  }
  .skill-item {
    font-size: 0.95rem;
    padding: 0.4rem 0.9rem;
  }
}

/* --- Code Rain Animation for Profile Image --- */
.profile-img-animated {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 520px;
  height: 520px;
  margin: 0 auto;
}
#codeRainCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 520px;
  height: 520px;
  z-index: 1;
  pointer-events: none;
  border-radius: 50%;
  overflow: hidden;
}
.profile-img-animated .rounded-image {
  position: relative;
  z-index: 2;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  object-fit: cover;
  border: 10px solid #FFB81C;
  background: #181818;
  transform: translateX(18px);
}
@media (max-width: 600px) {
  .profile-img-animated {
    width: 300px;
    height: 300px;
  }
  #codeRainCanvas {
    width: 300px;
    height: 300px;
  }
  .profile-img-animated .rounded-image {
    width: 200px;
    height: 200px;
  }
}

/* --- Enhanced Horizontal Profiles Section Styles --- */
.profiles-container {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  justify-content: center;
  align-items: center;
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}
.profile-card {
  background: #181818;
  border-radius: 1.5rem;
  box-shadow: 0 6px 24px rgba(0,0,0,0.16);
  padding: 2.5rem 2.5rem 2.5rem 2.5rem;
  width: 100%;
  max-width: 1400px;
  min-height: 260px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  transition: box-shadow 0.3s, transform 0.3s;
  margin-bottom: 0;
  gap: 2.5rem;
}
.profile-card:hover {
  box-shadow: 0 12px 36px rgba(255, 184, 28, 0.22);
  transform: translateY(-8px) scale(1.04);
}
.profile-card .profile-info {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 320px;
  max-width: 400px;
}
.profile-card .profile-heatmap {
  flex: 2.5 1 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
}
.github-heatmap, .leetcode-heatmap {
  width: 100%;
  min-width: 320px;
  max-width: 900px;
  margin: 0 0 0 0;
  border-radius: 0.7rem;
  background: #0d1117;  /* GitHub's dark theme background */
  display: block;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

/* Add GitHub contribution colors */
.github-heatmap rect[data-level="0"] { fill: #161b22; }  /* No contributions */
.github-heatmap rect[data-level="1"] { fill: #0e4429; }  /* 1-3 contributions */
.github-heatmap rect[data-level="2"] { fill: #006d32; }  /* 4-6 contributions */
.github-heatmap rect[data-level="3"] { fill: #26a641; }  /* 7-9 contributions */
.github-heatmap rect[data-level="4"] { fill: #39d353; }  /* 10+ contributions */

.profile-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-color);
  margin-bottom: 1.2rem;
  background: #222;
}
.profile-card h3 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 0.7rem;
  font-weight: 700;
  text-align: center;
}
.profile-card p {
  color: var(--text-color);
  font-size: 1.25rem;
  margin-bottom: 1.2rem;
  text-align: center;
}
.profile-card .btn {
  width: 80%;
  font-size: 1.15rem;
  padding: 1.1rem 0;
  justify-content: center;
  margin-bottom: 0.5rem;
}
@media (max-width: 1200px) {
  .profile-card {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: 98vw;
    padding: 1.5rem 0.5rem 1.2rem 0.5rem;
  }
  .profile-card .profile-info {
    min-width: 0;
    max-width: 98vw;
  }
  .profile-card .profile-heatmap {
    min-width: 0;
    max-width: 98vw;
    align-items: center;
  }
  .github-heatmap, .leetcode-heatmap {
    max-width: 98vw;
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .contact-info.contact-tiles-row {
    flex-direction: column;
    align-items: stretch;
  }
  .contact-card {
    max-width: 100%;
    min-width: 0;
  }
}

.thankyou-footer {
    background: var(--primary-color);
    padding: 3rem 0 2.5rem 0;
    text-align: center;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.08);
}
.thankyou-message {
    color: #fff;
    font-size: 1.35rem;
    font-family: var(--heading-font);
    font-weight: 600;
    letter-spacing: 0.01em;
    margin: 0 auto;
    max-width: 700px;
    line-height: 1.6;
}

@media (max-width: 1100px) {
  .contact-info.contact-tiles-row {
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
    gap: 1.2rem;
  }
  .contact-card {
    flex: 1 1 320px;
    min-width: 260px;
    max-width: 48%;
    margin-bottom: 1.2rem;
  }
}
@media (max-width: 700px) {
  .contact-info.contact-tiles-row {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .contact-card {
    max-width: 100%;
    min-width: 0;
    margin-bottom: 0.8rem;
  }
}
.contact-card {
  transition: box-shadow 0.3s, transform 0.22s, border 0.22s;
}
.contact-card:hover {
  transform: translateY(-8px) scale(1.035);
  box-shadow: 0 12px 32px rgba(255, 184, 28, 0.18), 0 2px 8px rgba(0,0,0,0.10);
  border: 1.5px solid var(--primary-color);
}
.contact-card:hover .contact-icon {
  color: #fff;
  background: var(--primary-color);
  border-radius: 50%;
  padding: 0.3rem;
  transition: background 0.2s, color 0.2s;
}
.contact-card:hover .contact-link {
  color: #000000;
  background: var(--primary-color);
  border-radius: 0.3rem;
  padding: 0.1rem 0.5rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.thankyou-footer-alt {
    background: #121212;
    padding: 2.2rem 0 1.5rem 0;
    text-align: center;
    box-shadow: none;
}
.thankyou-message-alt {
    color: var(--primary-color);
    font-size: 2.1rem;
    font-family: 'Montserrat', 'Poppins', 'Roboto Slab', sans-serif;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin: 0 auto;
    max-width: 900px;
    line-height: 1.5;
    text-shadow: 0 2px 16px rgba(255,184,28,0.18), 0 1px 2px #000;
    text-transform: uppercase;
    border-radius: 0.5rem;
    transition: color 0.2s, text-shadow 0.2s;
}
@media (max-width: 700px) {
  .thankyou-message-alt {
    font-size: 1.2rem;
    padding: 2rem 1rem;
  }
}

.art-btn {
    background: var(--primary-color);
    color: #000000;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 0.7rem;
    padding: 0.9rem 1.6rem;
    box-shadow: 0 2px 8px rgba(255,184,28,0.08);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    text-decoration: none;
    border: none;
}

.art-btn:hover {
    background: var(--primary-color);
    color: #000000;
    transform: translateY(-2px) scale(1.04);
}

/* Force GitHub heatmap to use green/black colors */
.github-heatmap rect[fill="#ebedf0"],
.github-heatmap rect[fill="#fff"],
.github-heatmap rect[fill="#ffffff"] {
  fill: #161b22 !important; /* background/no contributions */
}
.github-heatmap rect[fill="#f9d423"],
.github-heatmap rect[fill="#fbc02d"],
.github-heatmap rect[fill="#ffe066"],
.github-heatmap rect[fill="#ffeb3b"],
.github-heatmap rect[fill="#ffd600"],
.github-heatmap rect[fill="#ffb81c"],
.github-heatmap rect[fill="#ff0"] {
  fill: #0e4429 !important; /* low contributions */
}
.github-heatmap rect[fill="#ffd700"] {
  fill: #006d32 !important; /* medium contributions */
}
.github-heatmap rect[fill="#ffe066"] {
  fill: #26a641 !important; /* high contributions */
}
.github-heatmap rect[fill="#fffde7"] {
  fill: #39d353 !important; /* very high contributions */
}

.project-header-flex {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}
.project-logo {
  width: 128px;
  height: 128px;
  object-fit: contain;
  margin-right: 1rem;
  margin-bottom: 0;
  border: 4px solid var(--primary-color);
  border-radius: 0.5rem;
}
.project-header-flex .project-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: #FFB81C;
  line-height: 1.1;
}

@media (max-width: 600px) {
  .project-logo {
    width: 40px;
    height: 40px;
  }
}

/* LeetCode Dashboard Card Styles */
.leetcode-card {
  min-height: 220px;
  padding: 2.2rem 2.2rem 2rem 2.2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  background: #191919;
  border-radius: 1.3rem;
  box-shadow: 0 6px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(255,184,28,0.04);
  color: #fff;
  position: relative;
  transition: box-shadow 0.22s, transform 0.22s;
}
.leetcode-card.card-info {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
}
.info-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  width: 100%;
}
.leetcode-card.card-info .info-btn {
  margin-top: 2.2rem;
  width: 100%;
  max-width: 320px;
  align-self: center;
  display: block;
}
@media (max-width: 900px) {
  .info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
  }
  .leetcode-card.card-info .info-btn {
    margin-top: 1.2rem;
    max-width: 98vw;
  }
}
@media (max-width: 600px) {
  .leetcode-card.card-info .info-btn {
    margin-top: 0.7rem;
    max-width: 100vw;
  }
}
.pie-and-stats {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  box-sizing: border-box;
}
.pie-chart-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 180px;
  min-width: 180px;
  min-height: 180px;
  max-width: 180px;
  max-height: 180px;
  margin: 0;
  padding: 0;
}
.pie-chart-container canvas {
  width: 160px !important;
  height: 160px !important;
  background: transparent;
  border-radius: 50%;
  display: block;
  margin: 0 auto;
}
.card-pie-chart .center-bar {
  width: 3px;
  min-width: 3px;
  height: 140px;
  background: #FFB81C;
  border-radius: 2px;
  margin: 0 1.5rem;
  align-self: center;
  box-shadow: 0 0 8px rgba(255,184,28,0.10);
}
.problem-stats-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.5rem;
  margin-left: 0;
  min-width: 80px;
}
.stat-row {
  font-size: 1.08rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.7rem;
}
.stat-row.easy span:last-child { color: #00af9b; font-weight: 700; }
.stat-row.medium span:last-child { color: #ffb800; font-weight: 700; }
.stat-row.hard span:last-child { color: #ff2d55; font-weight: 700; }
@media (max-width: 900px) {
  .pie-and-stats {
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
  }
  .pie-chart-container {
    width: 120px;
    height: 120px;
    min-width: 120px;
    min-height: 120px;
    max-width: 120px;
    max-height: 120px;
  }
  .pie-chart-container canvas {
    width: 100px !important;
    height: 100px !important;
  }
  .card-pie-chart .center-bar {
    display: none;
  }
  .problem-stats-list {
    align-items: center;
    min-width: 0;
  }
}
@media (max-width: 600px) {
  .pie-chart-container {
    width: 70px;
    height: 70px;
    min-width: 70px;
    min-height: 70px;
    max-width: 70px;
    max-height: 70px;
  }
  .pie-chart-container canvas {
    width: 50px !important;
    height: 50px !important;
  }
}

/* LeetCode Profile Styles */
.card-info-twocol {
  aspect-ratio: 2 / 1;
  max-width: 700px;
  min-width: 320px;
  min-height: 180px;
  height: auto;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: center !important;
  box-sizing: border-box;
  overflow: hidden;
  gap: 0;
  margin: 0 auto;
  padding: 1.1rem 1.5rem 1.1rem 1.5rem;
  background: #191919;
}
.card-info-twocol .info-cols {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  width: 100%;
  margin-bottom: 1.1rem;
  box-sizing: border-box;
}
.info-col-left, .info-col-right {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.info-col-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.2rem;
  margin-left: 0;
}
.twocol-rating-block .rating-label,
.twocol-rating-block .rank-label {
  font-size: 0.98rem;
  color: #bbb;
  font-weight: 500;
}
.twocol-rating-block .rating-value,
.twocol-rating-block .rank-value {
  font-size: 1.08rem;
  font-weight: 700;
  color: #FFB81C;
  margin-bottom: 0.2rem;
}
.twocol-logo,
.leetcode-logo-large {
  width: 100px !important;
  height: 100px !important;
  max-width: 100%;
  max-height: 100px;
  object-fit: contain;
  display: block;
  margin: 0 0 0 0;
  padding: 12px;
  background: #fff;
  border-radius: 50%;
  border: 4px solid #FFB81C;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
}
.twocol-username {
  font-size: 1.15rem;
  font-weight: 800;
  color: #FFB81C;
  letter-spacing: 0.01em;
  text-align: left;
  margin-bottom: 0.4rem;
}
.card-info-twocol .info-btn {
  margin-top: 0.2rem;
  width: 100%;
  max-width: 220px;
  align-self: center;
  display: flex;
  font-size: 1rem;
  padding: 0.7rem 0;
  border-radius: 0.7rem;
  justify-content: center;
  text-align: center;
}
@media (max-width: 700px) {
  .card-info-twocol {
    aspect-ratio: unset;
    min-height: 120px;
    padding: 0.7rem 0.5rem;
  }
  .card-info-twocol .info-cols {
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.7rem;
  }
  .card-info-twocol .info-btn {
    max-width: 98vw;
    font-size: 0.95rem;
    padding: 0.6rem 0;
  }
  .twocol-username {
    font-size: 0.95rem;
  }
}

.leetcode-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2rem;
  width: 100%;
  height: 500px;
  max-width: 1200px;
  box-sizing: border-box;
  align-items: stretch;
  justify-items: center;
  margin: 0 auto;
}

/* Ensure all grid items have equal dimensions */
.leetcode-grid > * {
  min-height: 0;
  min-width: 0;
}
.leetcode-card {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 1.5rem;
  box-sizing: border-box;
  border: 1px solid #333;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  min-height: 0;
}

/* Profile card specific styling */
.leetcode-card.profile-card {
  justify-content: space-between;
  padding: 2rem 1.5rem;
}

/* Chart card specific styling */
.leetcode-card.chart-card {
  justify-content: flex-start;
}

.leetcode-card.chart-card .leetcode-card-header {
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
  flex-shrink: 0;
}

.leetcode-card.chart-card .chart-container,
.leetcode-card.chart-card .card-line-chart,
.leetcode-card.chart-card .interactive-stats-container {
  flex: 1;
  min-height: 0;
  height: calc(100% - 2rem);
}

/* Ensure each grid position is properly sized */
.leetcode-card:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

.leetcode-card:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

.leetcode-card:nth-child(3) {
  grid-column: 1;
  grid-row: 2;
}

.leetcode-card:nth-child(4) {
  grid-column: 2;
  grid-row: 2;
}

/* Chart container styling */
.chart-container {
  width: 100%;
  height: calc(100% - 4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  padding: 0.5rem;
  box-sizing: border-box;
  margin-top: 1rem;
  padding-bottom: 1rem;
}

.chart-container canvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Heatmap specific styling */
.leetcode-heatmap-svg {
  width: 100%;
  height: auto;
  max-height: calc(100% - 2rem);
  overflow: visible;
}

.leetcode-heatmap-svg text {
  font-size: 0.8rem;
  fill: #bbb;
}

.leetcode-heatmap-svg .month-label {
  font-size: 0.7rem;
  fill: #888;
  text-anchor: middle;
}

/* Interactive stats styling */
.card-interactive-stats {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: visible;
  padding: 1.5rem;
  box-sizing: border-box;
}

.interactive-stats-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}



.stat-bars {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stat-bar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.stat-bar-label {
  min-width: 50px;
  font-size: 0.9rem;
  color: #bbb;
  font-weight: 500;
}

.stat-bar {
  flex: 1;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.8s ease;
  position: relative;
}

/* LeetCode official colors for difficulty levels */
.easy-fill {
  background: linear-gradient(90deg, #00B8A3, #00A394);
}

.medium-fill {
  background: linear-gradient(90deg, #FFC01E, #E6AC00);
}

.hard-fill {
  background: linear-gradient(90deg, #FF2D55, #E6264A);
}

.stat-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

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

.stat-bar-value {
  min-width: 40px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: right;
}

/* Color-coded values matching the bars */
.easy-value {
  color: #00B8A3;
}

.medium-value {
  color: #FFC01E;
}

.hard-value {
  color: #FF2D55;
}

.card-line-chart canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Chart.js specific optimizations */
.card-line-chart .chartjs-render-monitor {
  width: 100% !important;
  height: 100% !important;
}

/* Better chart sizing and positioning */
.card-line-chart {
  position: relative;
}

.card-line-chart canvas {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

/* Ensure chart labels are visible and properly sized */
.card-line-chart .chartjs-tooltip {
  background: rgba(0, 0, 0, 0.8) !important;
  border: 1px solid #333 !important;
  border-radius: 4px !important;
  color: #fff !important;
  font-size: 0.8rem !important;
  padding: 0.5rem !important;
}

/* Responsive grid adjustments */
@media (max-width: 768px) {
  .leetcode-grid {
    height: 400px;
    gap: 1rem;
    max-width: 100%;
  }
  
  .leetcode-card {
    padding: 1rem;
  }
  
  .chart-container {
    height: calc(100% - 3rem);
  }
}

@media (max-width: 480px) {
  .leetcode-grid {
    height: 350px;
    gap: 0.5rem;
    max-width: 100%;
  }
  
  .leetcode-card {
    padding: 0.75rem;
  }
}

.leetcode-profile-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  width: 100%;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.leetcode-profile-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  margin-bottom: 0;
  margin-top: 0.5rem;
}

.leetcode-username-main {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

.leetcode-rating-block {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
}

.leetcode-rating-label {
  color: #bbb;
  font-size: 0.9rem;
}

.leetcode-rating-value {
  color: #FFB81C;
  font-size: 1.1rem;
  font-weight: 700;
}

.leetcode-logo-large {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.twocol-logo {
  width: 50px;
  height: 50px;
}

.twocol-username {
  font-size: 1.3rem;
}

.twocol-rating-block {
  gap: 0.3rem;
}

.info-btn {
  margin-top: 0.1rem;
  margin-bottom: 0;
}

.long-btn {
  width: 100%;
  text-align: center;
}

.leetcode-card-header {
  margin-bottom: 1.5rem;
  text-align: center;
  width: 100%;
  font-size: 1.2rem;
  font-weight: 600;
  color: #FFB81C;
  line-height: 1.2;
}

/* Chart card headers need less spacing */
.leetcode-card.chart-card .leetcode-card-header {
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
}

.leetcode-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
  width: 100%;
}

.leetcode-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #FFB81C;
}

.stat-label {
  font-size: 0.8rem;
  color: #bbb;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-pie-chart {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-line-chart {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-bar-chart {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.leetcode-btn {
  background: #FFB81C;
  color: #000;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
}

.leetcode-btn:hover {
  background: #e6a600;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 184, 28, 0.3);
}

.leetcode-heatmap-svg {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.leetcode-heatmap-svg svg {
  max-width: 100%;
  height: auto;
}

.badge-fallback {
  background: #121212;
  color: #FFB81C;
  border-radius: 4px;
  padding: 2px 8px;
  margin-right: 0.3rem;
  font-weight: 600;
  display: inline-block;
}

.leetcode-card canvas {
  max-width: 100%;
  height: auto !important;
  display: block;
}

.info-cols {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  gap: 0;
}

.info-col-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  padding: 0;
  height: 100%;
  margin-left: 0;
}

.center-bar {
  width: 3px;
  min-width: 3px;
  height: 150px;
  background: #FFB81C;
  border-radius: 2px;
  margin: 0 1.5rem;
  align-self: center;
  box-shadow: 0 0 8px rgba(255,184,28,0.10);
}

.info-col-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.2rem;
  margin-left: 0;
  flex: 1 1 0;
  min-width: 0;
}

@media (max-width: 900px) {
  .leetcode-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, auto);
    gap: 1.2rem;
  }
  .leetcode-card {
    min-height: 120px;
    padding: 1.2rem 0.7rem 1.2rem 0.7rem;
  }
  .pie-and-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
  }
  .card-info-twocol {
    aspect-ratio: unset;
    min-height: 120px;
    padding: 0.7rem 0.5rem;
  }
  .info-cols {
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.7rem;
  }
  .info-col-left, .info-col-right {
    width: 100%;
    max-width: 100vw;
    justify-content: center;
    align-items: center;
  }
  .center-bar {
    display: none;
  }
  .twocol-logo, .leetcode-logo-large {
    width: 80px !important;
    height: 80px !important;
    max-width: 100%;
    max-height: 80px;
    padding: 8px;
  }
  .twocol-username {
    font-size: 1rem;
    text-align: center;
    margin-bottom: 0.2rem;
  }
  .card-info-twocol .info-btn, .long-btn {
    max-width: 100vw;
    width: 100%;
    font-size: 0.98rem;
    padding: 0.7rem 0.2rem;
    border-radius: 0.7rem;
    margin: 0.5rem 0 0 0;
    text-align: center;
    justify-content: center;
    display: flex;
  }
  .leetcode-card.card-line-chart canvas,
  .leetcode-card.card-bar-chart canvas {
    width: 100% !important;
    height: 100px !important;
    min-height: 60px;
    max-height: 120px;
  }
  .leetcode-card.card-pie-chart canvas {
    width: 80px !important;
    height: 80px !important;
    min-height: 50px;
    max-height: 90px;
  }
}
@media (max-width: 600px) {
  .leetcode-grid {
    gap: 0.7rem;
  }
  .leetcode-card {
    padding: 0.7rem 0.2rem 0.7rem 0.2rem;
    min-height: 80px;
  }
  .twocol-logo, .leetcode-logo-large {
    width: 56px !important;
    height: 56px !important;
    max-width: 100%;
    max-height: 56px;
    padding: 4px;
  }
  .card-info-twocol .info-btn, .long-btn {
    font-size: 0.93rem;
    padding: 0.6rem 0.1rem;
    border-radius: 0.5rem;
    margin: 0.4rem 0 0 0;
  }
  .leetcode-card.card-line-chart canvas,
  .leetcode-card.card-bar-chart canvas {
    height: 70px !important;
    min-height: 40px;
    max-height: 80px;
  }
  .leetcode-card.card-pie-chart canvas {
    width: 56px !important;
    height: 56px !important;
    min-height: 30px;
    max-height: 60px;
  }
}

.chart-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
  width: 100%;
  text-align: center;
}
.acceptance-main {
  font-size: 2.1rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}
.acceptance-percent {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-left: 2px;
}
.acceptance-label {
  font-size: 1.05rem;
  color: #bbb;
  font-weight: 600;
  margin-top: 0.1rem;
}
@media (max-width: 900px) {
  .chart-center-text {
    font-size: 1.1rem;
  }
  .acceptance-main {
    font-size: 1.3rem;
  }
  .acceptance-label {
    font-size: 0.95rem;
  }
}
@media (max-width: 600px) {
  .chart-center-text {
    font-size: 0.9rem;
  }
  .acceptance-main {
    font-size: 1rem;
  }
  .acceptance-label {
    font-size: 0.8rem;
  }
}
.pie-chart-container {
  position: relative;
}

.leetcode-card.card-line-chart {
  height: 220px;
  min-height: 220px;
  max-height: 220px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.leetcode-card.card-line-chart canvas {
  height: 180px !important;
  max-height: 180px !important;
  width: 100% !important;
  display: block;
}

@media (max-width: 700px) {
  .leetcode-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, auto);
    gap: 0.7rem;
  }
  .leetcode-card {
    padding: 0.7rem 0.2rem 0.7rem 0.2rem;
    min-height: 80px;
    max-height: unset;
    width: 100%;
    box-sizing: border-box;
  }
  .card-info-twocol {
    padding: 0.7rem 0.3rem;
    min-width: 0;
    max-width: 100vw;
  }
  .info-cols {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
  }
  .info-col-left, .info-col-right {
    width: 100%;
    max-width: 100vw;
    align-items: center;
    justify-content: center;
    min-width: 0;
  }
  .center-bar {
    display: none;
  }
  .twocol-logo, .leetcode-logo-large {
    width: 56px !important;
    height: 56px !important;
    max-width: 100%;
    max-height: 56px;
    padding: 4px;
  }
  .twocol-username {
    font-size: 0.93rem;
    text-align: center;
    margin-bottom: 0.2rem;
  }
  .leetcode-card.card-info .info-btn, .long-btn {
    font-size: 0.93rem;
    padding: 0.6rem 0.1rem;
    border-radius: 0.5rem;
    margin: 0.4rem 0 0 0;
    max-width: 100vw;
    width: 100%;
  }
  .contest-stats-row {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.7rem;
    font-size: 0.93rem;
  }
  .leetcode-card.card-line-chart canvas,
  .leetcode-card.card-bar-chart canvas {
    height: 70px !important;
    min-height: 40px;
    max-height: 80px;
  }
  .leetcode-card.card-pie-chart canvas {
    width: 56px !important;
    height: 56px !important;
    min-height: 30px;
    max-height: 60px;
  }
  .pie-and-stats {
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
  }
  .pie-chart-container {
    width: 70px;
    height: 70px;
    min-width: 70px;
    min-height: 70px;
    max-width: 70px;
    max-height: 70px;
  }
  .problem-stats-list {
    align-items: center;
    min-width: 0;
    font-size: 0.93rem;
  }
  .stat-row {
    font-size: 0.93rem;
    gap: 0.4rem;
  }
  .leetcode-heatmap-svg {
    min-width: 0;
    max-width: 100vw;
    overflow-x: auto;
  }
}
@media (max-width: 500px) {
  .leetcode-card {
    padding: 0.4rem 0.05rem 0.4rem 0.05rem;
    min-height: 60px;
  }
  .leetcode-grid {
    gap: 0.4rem;
  }
  .card-info-twocol {
    padding: 0.4rem 0.1rem;
  }
  .twocol-logo, .leetcode-logo-large {
    width: 38px !important;
    height: 38px !important;
    max-width: 100%;
    max-height: 38px;
    padding: 2px;
  }
  .twocol-username {
    font-size: 0.8rem;
  }
  .leetcode-card.card-info .info-btn, .long-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.05rem;
    border-radius: 0.4rem;
  }
  .contest-stats-row {
    font-size: 0.8rem;
    gap: 0.3rem;
  }
  .stat-row {
    font-size: 0.8rem;
    gap: 0.2rem;
  }
  .pie-chart-container {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    max-width: 38px;
    max-height: 38px;
  }
  .leetcode-heatmap-svg {
    min-width: 0;
    max-width: 100vw;
    overflow-x: auto;
  }
}