:root {
    --card-bg-light: linear-gradient(to bottom right, #ffffff, #f9f9ff);
    --card-bg-dark: rgba(35, 35, 35, 0.9);
    --text-color-light: #222;
    --text-color-dark: #f0f0f0;
    --heading-color-light: #3d1e5f;
    --heading-color-dark: #ffffff;
    --link-color-light: #0645ad;
    --link-color-dark: #8ab4f8;
    --pill-bg: #4f46e5;
    --pill-hover: #6d5dfc;
}

/* === GLOBAL RESET === */
body {
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    color: #3d1e5f;
    line-height: 1.6;
    font-size: 1rem;
    background: linear-gradient(to bottom right, #d8eefe, #f1e7ff);
    scroll-behavior: smooth;
}

body.home .section-card {
    margin-top: 10px;
    /* lower than 100px for home page */
}


p {
    color: #333;
    font-size: 1.05em;
}

body.dark {
    background: linear-gradient(to bottom right, #1c1c1c, #111);
    color: #f4f4f4;
}

/* === DARK MODE GENERAL TEXT === */
body.dark p,
body.dark li,
body.dark ul {
    color: #ccc;
}

/* === HEADER === */
header {
    margin-top: 80px;
    text-align: center;
    background: transparent;
    padding: 40px 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

h1 {
    font-size: 3em;
    margin-bottom: 10px;
}

h2 {
    font-size: 2em;
    margin: 30px 0 10px;
    color: #4b2c7c;
    border: none;
    /* remove line under h2 */
}

h3 {
    font-size: 1.2em;
    margin-top: 20px;
    color: #5e4487;
}

/* === MAIN CONTENT === */
main {
    padding: 20px;
}

ul {
    margin-left: 20px;
}

ul li {
    margin-bottom: 10px;
}

/* === FOOTER === */
footer {
    text-align: center;
    padding: 1rem;
}

footer .social-links {
    margin-top: 0.5rem;
}

footer .social-links a {
    margin: 0 12px;
    text-decoration: none;
    display: inline-block;
}

footer .social-links .icon {
    transition: fill 0.3s ease;
    fill: currentColor; /* inherits text color */
    vertical-align: middle;
}

/* Light mode colors */
body:not(.dark) footer {
    color: #222;
}
body:not(.dark) footer .social-links a:hover {
    color: #0077b5; /* LinkedIn blue */
}
body:not(.dark) footer .social-links a:last-child:hover {
    color: #333; /* GitHub dark */
}

/* Dark mode colors */
body.dark footer {
    color: #ddd;
}
body.dark footer .social-links a:hover {
    color: #70b5f9; /* LinkedIn light blue */
}
body.dark footer .social-links a:last-child:hover {
    color: #fff; /* GitHub white */
}

/* === SKILLS GRID === */
.skills-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* Center-align the rows */
    gap: 16px;
    /* Space between pills */
    padding: 20px;
}

.skill-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #5440f1;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1rem;
    min-width: 120px;
    max-width: 160px;
    height: 48px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.skill-pill:hover {
    transform: scale(1.05);
}

.skill {
    background-color: #6c63ff;
    color: white;
    text-align: center;
    padding: 8px;
    border-radius: 5px;
    font-weight: bold;
    transition: transform 0.2s;
}

.skill:hover {
    transform: scale(1.05);
    background-color: #574fd6;
}

/* === RESUME VIEWER === */
.resume-viewer {
    margin-top: 20px;
    border: 2px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.resume-viewer iframe {
    width: 100%;
    height: 500px;
    border: none;
}

/* === FLOATING PILL NAV === */
.floating-pill-nav {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 32px;
    padding: 4px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    font-size: 0.95rem;
}

.nav-item {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 18px;
    transition: background 0.2s, color 0.2s;
}

.nav-item:hover,
.nav-item.active {
    background-color: #eeeeee;
    color: #000;
}

.nav-toggle {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 8px;
    border-left: 1px solid #ddd;
    margin-left: 6px;
}

/* === DARK MODE === */
body.dark {
    background: linear-gradient(135deg, #0f0f0f, #1c1c1c);
}

body.dark header,
body.dark footer {
    background-color: #1e1e1e;
    border-color: #444;
}

body.dark main {
    background-color: #1b1b1b;
}

body.dark a {
    color: #90caf9;
}

body.dark .floating-pill-nav {
    background-color: rgba(30, 30, 30, 0.8);
    box-shadow: 0 6px 16px rgba(255, 255, 255, 0.08);
}

body.dark .nav-item {
    color: #f4f4f4;
}

body.dark .nav-item:hover,
body.dark .nav-item.active {
    background-color: #333;
    color: #fff;
}

body.dark .nav-toggle {
    color: #f4f4f4;
    border-left: 1px solid #555;
}

body.dark .skill {
    background-color: #4444aa;
}

.section-card {
    background: var(--card-bg-light);
    color: var(--text-color-light);
    padding: 2rem;
    margin: 2rem auto;
    max-width: 90%;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, color 0.3s ease;
    margin-top: 100px;
}

.section-card h2,
.section-card h3 {
    color: var(--heading-color-light);
}

.section-card a {
    color: var(--link-color-light);
    text-decoration: underline;
}

.section-card a:hover {
    text-decoration: none;
}

body.dark .section-card {
    background: rgba(35, 35, 35, 0.9);
    color: #f0f0f0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

body.dark .section-card h2,
body.dark .section-card h3 {
    color: var(--heading-color-dark);
}

body.dark .section-card p,
body.dark .section-card li {
    color: #ccc;
}

body.dark .section-card a {
    color: var(--link-color-dark);
}

body.dark .section-card a:hover {
    color: #9cd3ff;
}


/* === SCROLL ANIMATION CLASSES === */
.animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-intro {
    color: #bfbfbf;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 800px;
}

/* === EDUCATION === */
.education-entry {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-color-light);
}

.education-entry strong {
    color: var(--heading-color-light);
}

body.dark .education-entry {
    color: #ccc;
}

body.dark .education-entry strong {
    color: #fff;

}
