/* ==========================================================================
   Table of Contents:
   1. CSS Variables
   2. Reset & Base Styles
   3. Typography
   4. Layout & Container Styles
   5. Navigation
   6. Hero Section
   7. About Section
   8. Skills Section
   9. Work Experience Section
   10. Blog Section
   11. Achievements Section
   12. Theme Toggle & Light/Dark Mode
   13. Animations
   14. Responsive Styles
   ========================================================================== */

/* ==========================================================================
   1. CSS Variables
   ========================================================================== */
:root {
    /* Colors - Dark Theme (Default) */
    --navy: #0a192f;
    --light-navy: #112240;
    --lightest-navy: #233554;
    --slate: #8892b0;
    --light-slate: #a8b2d1;
    --lightest-slate: #ccd6f6;
    --white: #e6f1ff;
    --green: #64ffda;

    /* Typography */
    --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;

    /* Spacing */
    --section-padding: 60px 0;
    --content-max-width: 900px;

    /* Transition */
    --transition: all 0.3s ease;

    /* Borders & Shadows */
    --border-radius: 4px;
    --box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   2. Reset & Base Styles
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--navy);
    color: var(--slate);
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 300;
    line-height: 1.5;
    padding-top: 80px;
}

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

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    background: none;
    border: none;
    cursor: pointer;
}

/* ==========================================================================
   3. Typography
   ========================================================================== */
h1, h2, h3, h4, h5 {
    font-weight: 600;
    color: var(--lightest-slate);
    line-height: 1.2;
}

.big-heading {
    font-size: 60px;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
}

.numbered-heading {
    display: flex;
    align-items: center;
    position: relative;
    margin: 10px 0 40px;
    width: 100%;
    font-size: clamp(26px, 5vw, 32px);
    white-space: nowrap;
    color: var(--lightest-slate);
}

.numbered-heading::after {
    content: "";
    display: block;
    position: relative;
    width: 300px;
    height: 1px;
    margin-left: 20px;
    background-color: var(--lightest-navy);
}

/* Content title styling */
.content-title h3 {
    color: var(--lightest-slate);
    font-size: 32px;
    text-align: center;
    margin-bottom: 50px;
}

.content-title-underline {
    width: 100px;
    height: 2px;
    background: var(--green);
    margin: 0 auto;
    margin-top: 20px;
}

/* ==========================================================================
   4. Layout & Container Styles
   ========================================================================== */
.container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 15px;
    overflow: hidden;
}

/* Grid layouts */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0 15px;
}

.inner {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 50px;
}

/* Common section styles */
.about-section,
#skills,
#work-experience,
#blog,
#achievements,
#team {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: var(--section-padding);
}

#team {
    padding-top: 0;
}

/* ==========================================================================
   5. Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 50px;
    background-color: rgba(17, 34, 64, 0.95);
    backdrop-filter: blur(10px);
    z-index: 999;
    border-bottom: 2px solid rgba(100, 255, 218, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.navbar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(35, 53, 84, 0.1), transparent);
    pointer-events: none;
}

.navbar.scrolled {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
}

.logo {
    flex: 1;
    display: none; /* Hidden by default */
}

.nav-resume {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.nav-links ol {
    display: flex;
    list-style: none;
    gap: 30px;
    justify-content: flex-end;
}

/* Nav link styles and effects */
.nav-links a {
    color: var(--lightest-slate);
    font-family: var(--font-mono);
    font-size: 14px;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--green);
}

/* Underline hover effect */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--green);
    transition: width 0.3s ease;
}

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

.nav-links a.active {
    color: var(--green);
}

/* Resume button styling */
.resume-link {
    color: var(--green);
    border: 1.5px solid var(--green);
    padding: 12px 28px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.resume-link:hover {
    background-color: rgba(100, 255, 218, 0.1);
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.4);
    transform: translateY(-3px);
}

.resume-button {
    margin-top: 40px;
    text-align: center;
}

/* Hamburger menu (hidden by default) */
.hamburger {
    display: none;
    cursor: pointer;
    padding: 10px;
    z-index: 10;
    margin-right: auto;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--green);
    position: relative;
    transition: var(--transition);
}

.hamburger-inner::before {
    content: '';
    position: absolute;
    top: -8px;
}

.hamburger-inner::after {
    content: '';
    position: absolute;
    bottom: -8px;
}

/* Hamburger active state (X shape) */
.hamburger.active .hamburger-inner {
    background-color: transparent;
}

.hamburger.active .hamburger-inner::before {
    top: 0;
    transform: rotate(45deg);
}

.hamburger.active .hamburger-inner::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* ==========================================================================
   6. Hero Section
   ========================================================================== */
.hero {
    min-height: 85vh;
    padding: 0 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: -40px;
}

.hero h1 {
    color: var(--green);
    font-family: var(--font-mono);
    font-size: 16px;
    margin-bottom: 25px;
    font-weight: 400;
    letter-spacing: 1px;
}

.hero h2 {
    color: var(--lightest-slate);
}

.hero h3 {
    color: var(--slate);
}

h2.big-heading {
    font-size: 40px;
}

.hero h3.big-heading {
    font-size: 50px;
    color: var(--light-slate);
    font-weight: 500;
    margin-bottom: 25px;
    opacity: 0.9;
}

.hero p {
    max-width: 540px;
    margin-top: 20px;
    line-height: 1.6;
    font-size: 17px;
    font-weight: 300;
    color: var(--light-slate);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 50px;
    margin-top: 50px;
}

.social-links a {
    color: var(--light-slate);
    font-size: 50px;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--green);
    transform: translateY(-3px);
}



/* ==========================================================================
   7. About Section
   ========================================================================== */
.about-text {
    font-size: 18px;
}

.about-text p {
    margin-bottom: 15px;
}

/* Skills List */
.skills-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 200px));
    gap: 0 10px;
    padding: 0;
    margin: 20px 0 0 0;
    overflow: hidden;
    list-style: none;
}

.skills-list li {
    position: relative;
    margin-bottom: 10px;
    padding-left: 20px;
    font-family: var(--font-mono);
    font-size: 14px;
}

.skills-list li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--green);
    font-size: 14px;
    line-height: 12px;
}

/* Profile Picture */
.about-pic {
    background: transparent;
}

.about-pic .wrapper {
    position: relative;
    max-width: 300px;
}

.about-pic .wrapper::after {
    content: '';
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--green);
    top: 20px;
    left: 20px;
    z-index: 0;
    border-radius: var(--border-radius);
    transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.about-pic img {
    position: relative;
    z-index: 1;
    background-color: var(--white);
    border-radius: var(--border-radius);
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
    filter: brightness(0.85) contrast(1.1);
    border: 2px solid var(--green);
}

.about-pic img:hover {
    filter: none;
    transform: translate(-3px, -3px);
}

.about-pic .wrapper:hover::after {
    transform: translate(3px, 3px);
}

/* ==========================================================================
   8. Skills Section
   ========================================================================== */
.content-box {
    width: 100%;
    max-width: 900px;
}

/* Skill Cards */
.service-item {
    text-align: center;
    margin-bottom: 50px;
    padding: 20px;
    background-color: var(--light-navy);
    border-radius: 8px;
    transition: var(--transition);
}

.service-item:hover {
    transform: translateY(-5px);
    background-color: var(--lightest-navy);
}

.service-item-icon {
    color: var(--green);
    margin-bottom: 20px;
}

.service-item-icon i {
    transition: var(--transition);
}

.service-item:hover .service-item-icon i {
    color: var(--green);
    transform: scale(1.1);
}

.service-item-title h3 {
    color: var(--lightest-slate);
    font-size: 22px;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.service-item:hover .service-item-title h3 {
    color: var(--green);
}

.service-item-des h4 {
    color: var(--slate);
    font-size: 16px;
    font-family: var(--font-mono);
    transition: color 0.3s ease;
}

/* Fix for Font Awesome icon */

/* Fix for Font Awesome icon */
.fa-clock-o {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

/* ==========================================================================
   9. Work Experience Section
   ========================================================================== */
/* Timeline Layout */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--green);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    margin-bottom: 30px;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

/* Timeline Node Markers */
.timeline-item::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--navy);
    border: 4px solid var(--green);
    border-radius: 50%;
    top: 20px;
    z-index: 1;
}

.timeline-item.left::before {
    right: -10px;
}

.timeline-item.right::before {
    left: -10px;
}

/* Experience Content */
.content {
    padding: 20px;
    background: var(--light-navy);
    border-radius: 6px;
    position: relative;
}

.company-logo {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.work-title {
    color: var(--lightest-slate);
    font-size: 20px;
    margin-bottom: 5px;
}

.company-name {
    color: var(--green);
    font-family: var(--font-mono);
    font-size: 16px;
    margin-bottom: 5px;
}

.work-duration {
    color: var(--slate);
    font-family: var(--font-mono);
    font-size: 14px;
    margin-bottom: 15px;
}

.work-description {
    color: var(--light-slate);
    font-size: 16px;
}

.work-description ul {
    padding-left: 20px;
    margin: 10px 0;
}

.work-description li {
    margin-bottom: 10px;
}

/* Tech Stack Tags */
.tech-stack {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tag {
    background: var(--lightest-navy);
    color: var(--green);
    padding: 5px 10px;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 12px;
}

/* ==========================================================================
   10. Blog Section
   ========================================================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.blog-card {
    background-color: var(--light-navy);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.blog-card-inner {
    padding: 30px;
}

.blog-date {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--green);
    margin-bottom: 10px;
}

.blog-title {
    font-size: 22px;
    color: var(--lightest-slate);
    margin-bottom: 15px;
    transition: color 0.2s ease;
}

.blog-card:hover .blog-title {
    color: var(--green);
}

.blog-excerpt {
    color: var(--light-slate);
    font-size: 16px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.blog-read-more {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--green);
    transition: opacity 0.2s ease;
}

.blog-card:hover .blog-read-more {
    opacity: 0.8;
}

.blog-all-button {
    text-align: center;
}

.blog-all-link {
    display: inline-block;
    color: var(--green);
    border: 1.5px solid var(--green);
    padding: 12px 28px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: var(--transition);
    text-decoration: none;
}

.blog-all-link:hover {
    background-color: rgba(100, 255, 218, 0.1);
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.4);
    transform: translateY(-3px);
}

/* Blog Listing Page */
.blog-listing-container {
    max-width: 900px;
    margin: 120px auto 50px;
    padding: 0 20px;
}

.page-title {
    color: var(--lightest-slate);
    font-size: 40px;
    margin-bottom: 40px;
    text-align: center;
}

.blog-listing .blog-card {
    margin-bottom: 30px;
}

/* Single Blog Page */
.blog-single-container {
    max-width: 800px;
    margin: 120px auto 80px;
    padding: 0 20px;
}

.blog-back-link {
    margin-bottom: 30px;
}

.blog-back-link a {
    color: var(--green);
    font-family: var(--font-mono);
    font-size: 14px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.blog-back-link a:hover {
    opacity: 0.8;
}

.blog-content {
    padding: 40px;
    background-color: var(--light-navy);
    border-radius: 6px;
}

.blog-content h1 {
    color: var(--lightest-slate);
    font-size: 32px;
    margin-bottom: 15px;
}

.blog-metadata {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--green);
    margin-bottom: 30px;
}

.blog-body {
    color: var(--light-slate);
    font-size: 18px;
    line-height: 1.6;
}

.blog-body h2 {
    color: var(--lightest-slate);
    font-size: 26px;
    margin: 40px 0 20px;
}

.blog-body h3 {
    color: var(--lightest-slate);
    font-size: 22px;
    margin: 30px 0 15px;
}

.blog-body p {
    margin-bottom: 20px;
}

.blog-body ul, .blog-body ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.blog-body li {
    margin-bottom: 10px;
}

.blog-body code {
    font-family: var(--font-mono);
    background-color: var(--lightest-navy);
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 14px;
}

.blog-body pre {
    background-color: var(--lightest-navy);
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.blog-body pre code {
    background-color: transparent;
    padding: 0;
}

.blog-body a {
    color: var(--green);
    text-decoration: none;
    position: relative;
}

.blog-body a:hover {
    text-decoration: underline;
}

.blog-body blockquote {
    border-left: 3px solid var(--green);
    padding-left: 20px;
    margin-left: 0;
    margin-bottom: 20px;
    font-style: italic;
    color: var(--slate);
}

.blog-body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 20px 0;
}

.blog-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.blog-body th, .blog-body td {
    border: 1px solid var(--lightest-navy);
    padding: 10px;
    text-align: left;
}

.blog-body th {
    background-color: var(--lightest-navy);
    color: var(--lightest-slate);
}

.blog-body .highlight {
    background-color: var(--lightest-navy);
    border-radius: 6px;
    margin-bottom: 20px;
}

/* ==========================================================================
   11. Lab Pages
   ========================================================================== */
.lab-page {
    max-width: 900px;
    margin: 120px auto 80px;
    padding: 0 20px;
}

.lab-intro {
    text-align: center;
    margin-bottom: 40px;
}

.lab-intro p {
    max-width: 680px;
    margin: 15px auto 0;
    color: var(--light-slate);
}

.lab-breadcrumb {
    margin-bottom: 24px;
}

.lab-breadcrumb a {
    color: var(--green);
    font-family: var(--font-mono);
    font-size: 14px;
}

.lab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.lab-card {
    display: block;
    padding: 28px;
    background-color: var(--light-navy);
    border: 1px solid rgba(100, 255, 218, 0.08);
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.lab-card:hover {
    transform: translateY(-5px);
    background-color: var(--lightest-navy);
    border-color: rgba(100, 255, 218, 0.25);
}

.lab-card-label {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--green);
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.4px;
}

.lab-card-title {
    color: var(--lightest-slate);
    font-size: 24px;
    margin-bottom: 12px;
    transition: color 0.2s ease;
}

.lab-card:hover .lab-card-title {
    color: var(--green);
}

.lab-card p {
    color: var(--light-slate);
    font-size: 16px;
    margin-bottom: 18px;
}

.lab-card-arrow {
    color: var(--green);
    font-family: var(--font-mono);
    font-size: 14px;
}

.lab-tool-shell {
    padding: 40px;
    background-color: var(--light-navy);
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

.lab-tool-shell h1 {
    font-size: 32px;
    margin-bottom: 12px;
}

.lab-tool-shell p {
    color: var(--light-slate);
    margin-bottom: 24px;
}

.lab-tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.flashcards-app {
    margin: 30px 0;
}

.flashcards-panel {
    animation: fadeIn 0.3s ease forwards;
}

.flashcards-study-panel,
.flashcards-completion-panel {
    max-width: 640px;
    margin: 0 auto;
}

.flashcards-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.flashcards-section-header--centered {
    justify-content: center;
    text-align: center;
}

.flashcards-heading {
    font-size: 28px;
    margin-bottom: 10px;
}

.flashcards-supporting-text {
    color: var(--light-slate);
    margin-bottom: 0;
}

.flashcards-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.flashcards-stat {
    padding: 18px;
    background-color: var(--lightest-navy);
    border-radius: 6px;
}

.flashcards-stat span {
    display: block;
    color: var(--green);
    font-family: var(--font-mono);
    font-size: 13px;
    margin-bottom: 8px;
}

.flashcards-stat strong {
    color: var(--lightest-slate);
    font-size: 28px;
}

.flashcards-deck-card {
    width: 100%;
    text-align: left;
}

.flashcards-preview-list {
    margin: 12px 0 18px 18px;
    color: var(--light-slate);
    list-style: disc;
}

.flashcards-preview-list li {
    margin-bottom: 8px;
}

.flashcards-preview-list strong {
    color: var(--lightest-slate);
}

.flashcards-card-stage {
    display: flex;
    justify-content: center;
    width: 100%;
    perspective: 1400px;
}

@keyframes flashcard-enter {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.flashcards-card {
    position: relative;
    display: block;
    width: 100%;
    max-width: 560px;
    height: 380px;
    margin: 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    animation: flashcard-enter 0.3s ease-out;
}

.flashcards-card-inner {
    position: relative;
    display: block;
    height: 100%;
    width: 100%;
    transform-style: preserve-3d;
    transform-origin: center center;
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.flashcards-card.is-flipped .flashcards-card-inner {
    transform: rotateY(180deg) scale(1.01);
}

.flashcards-card-face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 32px;
    background-color: var(--lightest-navy);
    border: 1px solid rgba(100, 255, 218, 0.12);
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.flashcards-card-face::after {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(100, 255, 218, 0.08);
    border-radius: 10px;
    pointer-events: none;
}

.flashcards-card-front {
    cursor: pointer;
}

.flashcards-card-back {
    /* room for the answer buttons, which are no longer part of this face */
    padding-bottom: 124px;
    transform: rotateY(180deg);
}

.flashcards-card-copy {
    /* Set by the page script: long cards shrink their text rather than
       growing the card and pushing the answer buttons out of it. */
    --flashcards-text-scale: 1;
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: calc(14px * var(--flashcards-text-scale));
    width: 100%;
    overflow: hidden;
}

.flashcards-word,
.flashcards-meaning {
    color: var(--lightest-slate);
    font-size: calc(clamp(28px, 4vw, 38px) * var(--flashcards-text-scale));
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    overflow-wrap: anywhere;
}

.flashcards-sentence {
    color: var(--light-slate);
    font-size: calc(17px * var(--flashcards-text-scale));
    line-height: 1.6;
    text-align: center;
    overflow-wrap: anywhere;
    margin-bottom: 0;
}

.flashcards-sentence-en {
    color: var(--slate);
    font-size: calc(14px * var(--flashcards-text-scale));
    font-style: italic;
    line-height: 1.5;
    text-align: center;
    overflow-wrap: anywhere;
    margin-bottom: 0;
}

.flashcards-card-meta {
    color: var(--green);
    font-family: var(--font-mono);
    font-size: calc(12px * var(--flashcards-text-scale));
    letter-spacing: 0.5px;
    text-align: center;
}

.flashcards-hint {
    color: var(--green);
    font-family: var(--font-mono);
    font-size: calc(13px * var(--flashcards-text-scale));
    text-align: center;
}

.flashcards-card-actions {
    /* Outside the flipping element on purpose: while the card rotates, a
       button inside it is not where the pointer expects it to be, so clicks
       land on the card and flip it back instead of answering. */
    position: absolute;
    left: 0;
    right: 0;
    bottom: 32px;
    display: flex;
    justify-content: center;
    gap: 80px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease 0.2s;
}

.flashcards-card.is-flipped .flashcards-card-actions,
.flashcards-card.is-flipped .flashcards-icon-button {
    visibility: visible;
}

.flashcards-card.is-flipped .flashcards-card-actions {
    opacity: 1;
    pointer-events: auto;
}

.flashcards-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 1px solid transparent;
    font-size: 28px;
    transition: var(--transition);
}

.flashcards-icon-button:hover {
    transform: translateY(-3px) scale(1.05);
}

.flashcards-icon-button--right {
    color: var(--green);
    background-color: rgba(100, 255, 218, 0.12);
    border-color: rgba(100, 255, 218, 0.3);
}

.flashcards-icon-button--wrong {
    color: #ff6b6b;
    background-color: rgba(255, 107, 107, 0.12);
    border-color: rgba(255, 107, 107, 0.3);
}

.flashcards-secondary-button {
    color: var(--lightest-slate);
    border: 1px solid var(--lightest-navy);
    background-color: var(--lightest-navy);
    padding: 12px 28px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.flashcards-secondary-button:hover {
    color: var(--green);
    transform: translateY(-3px);
}

.flashcards-page-actions {
    justify-content: center;
    margin-top: 24px;
}

.flashcards-card:focus-visible,
.flashcards-deck-card:focus-visible,
.flashcards-secondary-button:focus-visible,
.flashcards-icon-button:focus-visible,
.resume-link:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 4px;
}

.flashcards-completion-panel {
    text-align: center;
}

.flashcards-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.flashcards-progress-bar {
    flex: 1;
    height: 6px;
    background-color: rgba(100, 255, 218, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.flashcards-progress-fill {
    height: 100%;
    background-color: var(--green);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.flashcards-progress-text {
    color: var(--green);
    font-family: var(--font-mono);
    font-size: 13px;
    white-space: nowrap;
}

.flashcards-retry-banner {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 20px;
    padding: 4px 16px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* ==========================================================================
   12. Achievements Section
   ========================================================================== */

.team-member {
    margin: 0 15px;

}

.team-member-info {
    padding: 10px 0 30px 0;

}

h4.team-member-name {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    padding-top: 20px;

}

h4.team-member-designation {
    color: var(--green);
    font-size: 15px;
    font-weight: 700;
    font-style: italic;
    letter-spacing: 1px;
    margin-top: 5px;

}

.team-member {
    margin: 0 auto;
    background-color: var(--light-navy);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    height: 100%;
    width: 95%;
}

.team-member:hover {
    transform: translateY(-5px);
}

.team-member img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: center;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
}

.team-member-info {
    padding: 20px;
    background-color: var(--light-navy);
}

.team-member-name {
    color: var(--lightest-slate);
    font-size: 18px;
    margin-bottom: 5px;
}

.team-member-designation {
    color: var(--green);
    font-size: 16px;
    font-family: var(--font-mono);
}

/* Custom Owl Carousel Styling */
.owl-theme .owl-dots .owl-dot span {
    background: var(--slate);
    width: 10px;
    height: 10px;
    margin: 5px 7px;
}

.owl-theme .owl-dots .owl-dot.active span,
.owl-theme .owl-dots .owl-dot:hover span {
    background: var(--green);
}

.owl-theme .owl-nav [class*=owl-] {
    background: var(--lightest-navy);
    color: var(--green);
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 50%;
    transition: var(--transition);
}

.owl-theme .owl-nav [class*=owl-]:hover {
    background: var(--light-navy);
    color: var(--green);
}

.owl-carousel {
    width: 100%;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.owl-carousel .owl-stage-outer {
    overflow: hidden !important;
    position: relative;
    width: 100%;
}

.owl-carousel .owl-stage {
    position: relative;
    -ms-touch-action: pan-Y;
    touch-action: manipulation;
}

.owl-carousel .owl-item {
    position: relative;
    min-height: 1px;
    float: left;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   12. Theme Toggle & Light/Dark Mode
   ========================================================================== */
/* Theme Toggle Button */
.theme-toggle {
    margin-left: 20px;
}

#theme-toggle-btn {
    background: transparent;
    border: none;
    color: var(--green);
    font-size: 22px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

#theme-toggle-btn:hover {
    background-color: rgba(100, 255, 218, 0.1);
    transform: scale(1.1);
}

/* Light Theme Variables */
[data-theme="light"] {
    --navy: #ffffff;
    --light-navy: #f8f9fb;
    --lightest-navy: #eef1f6;
    --slate: #556270;
    --light-slate: #3b4553;
    --lightest-slate: #1e2a3a;
    --white: #111827;
    --green: #0891b2;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Light theme specific overrides */
[data-theme="light"] .navbar {
    background-color: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(12px);
}

/* Card and panel overrides for light mode */
[data-theme="light"] .content,
[data-theme="light"] .blog-card,
[data-theme="light"] .team-member,
[data-theme="light"] .team-member-info {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .service-item,
[data-theme="light"] .lab-card,
[data-theme="light"] .flashcards-deck-card {
    background-color: #e8edf3;
    border: 1px solid #d5dbe5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .lab-tool-shell {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .service-item:hover {
    background-color: #dde3ec;
    border-color: #c8d0dc;
}

[data-theme="light"] .lab-card:hover,
[data-theme="light"] .flashcards-deck-card:hover {
    background-color: #dde3ec;
    border-color: rgba(8, 145, 178, 0.3);
}

/* Improve text readability in light mode */
[data-theme="light"] body {
    color: var(--slate);
}

[data-theme="light"] .resume-link,
[data-theme="light"] .blog-all-link {
    color: var(--green);
    border-color: var(--green);
}

[data-theme="light"] .resume-link:hover,
[data-theme="light"] .blog-all-link:hover {
    background-color: rgba(8, 145, 178, 0.08);
    box-shadow: 0 0 12px rgba(8, 145, 178, 0.15);
}

/* Improve timeline appearance in light mode */
[data-theme="light"] .timeline::after {
    background: var(--green);
}

[data-theme="light"] .timeline-item::before {
    background: #ffffff;
    border: 3px solid var(--green);
}

/* Profile picture in light mode */
[data-theme="light"] .about-pic img {
    filter: brightness(1) contrast(1);
}

/* Theme toggle button in light mode */
[data-theme="light"] #theme-toggle-btn {
    color: var(--green);
}

[data-theme="light"] #theme-toggle-btn:hover {
    background-color: rgba(8, 145, 178, 0.1);
}

/* Owl carousel slider in light mode */
[data-theme="light"] .owl-theme .owl-nav [class*=owl-] {
    background: #eef1f6;
    color: var(--green);
    border: 1px solid #e5e7eb;
}

[data-theme="light"] .owl-theme .owl-nav [class*=owl-]:hover {
    background: #dde2ea;
    color: var(--green);
}

[data-theme="light"] .owl-theme .owl-dots .owl-dot span {
    background: #cbd5e1;
}

[data-theme="light"] .owl-theme .owl-dots .owl-dot.active span,
[data-theme="light"] .owl-theme .owl-dots .owl-dot:hover span {
    background: var(--green);
}

/* Flashcard overrides for light mode */
[data-theme="light"] .flashcards-card-face {
    background-color: #e8edf3;
    border: 1px solid #d5dbe5;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .flashcards-card-face::after {
    border-color: rgba(8, 145, 178, 0.06);
}

[data-theme="light"] .flashcards-deck-card {
    border: 1px solid #e5e7eb;
}

[data-theme="light"] .flashcards-deck-card:hover {
    border-color: rgba(8, 145, 178, 0.35);
    background-color: #f8f9fb;
}

[data-theme="light"] .flashcards-icon-button--right {
    color: #059669;
    background-color: rgba(5, 150, 105, 0.08);
    border-color: rgba(5, 150, 105, 0.25);
}

[data-theme="light"] .flashcards-icon-button--wrong {
    color: #dc2626;
    background-color: rgba(220, 38, 38, 0.06);
    border-color: rgba(220, 38, 38, 0.2);
}

[data-theme="light"] .flashcards-progress-bar {
    background-color: #e5e7eb;
}

[data-theme="light"] .flashcards-retry-banner {
    background-color: rgba(220, 38, 38, 0.06);
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.15);
}

[data-theme="light"] .flashcards-summary {
    border-color: #e5e7eb;
}

/* ==========================================================================
   13. Animations
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero h1 {
    animation: fadeIn 0.5s ease forwards;
}

.hero h2 {
    animation: fadeIn 0.5s 0.1s ease forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.hero h3 {
    animation: fadeIn 0.5s 0.2s ease forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.hero p {
    animation: fadeIn 0.5s 0.3s ease forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.social-links, .resume-button {
    animation: fadeIn 0.5s 0.4s ease forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

