/* --- CSS Reset & Variables --- */
    :root {
      --primary: #2563eb;          /* Royal Blue */
      --primary-light: #eff6ff;    /* Light sky-blue background tint */
      --primary-dark: #1d4ed8;     /* Deep primary blue */
      --secondary: #0ea5e9;        /* Sky Blue */
      --accent: #06b6d4;           /* Cyan Accent */
      --success: #10b981;          /* Emerald Green */
      --bg-page: #f8fafc;          /* Slate 50 base bg */
      --bg-card: rgba(255, 255, 255, 0.85);
      --text-dark: #0f172a;        /* Slate 900 */
      --text-muted: #475569;       /* Slate 600 */
      --border-color: rgba(226, 232, 240, 0.8);
      --card-border: rgba(255, 255, 255, 0.5);
      --font-headings: 'Outfit', sans-serif;
      --font-body: 'Inter', sans-serif;
      
      --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
      --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
      --shadow-lg: 0 10px 15px -3px rgba(37, 99, 235, 0.08), 0 4px 6px -4px rgba(37, 99, 235, 0.08);
      --shadow-xl: 0 20px 25px -5px rgba(37, 99, 235, 0.12), 0 8px 10px -6px rgba(37, 99, 235, 0.12);
      
      --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
      --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

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

    html {
      scroll-behavior: smooth;
      font-size: 16px;
    }

    body {
      font-family: var(--font-body);
      color: var(--text-dark);
      background-color: var(--bg-page);
      line-height: 1.6;
      overflow-x: hidden;
    }

    h1, h2, h3, h4, h5, h6 {
      font-family: var(--font-headings);
      font-weight: 700;
      color: var(--text-dark);
      line-height: 1.25;
    }

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

    a:hover {
      color: var(--primary-dark);
    }

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

    li {
      list-style: none;
    }

    /* --- Language Display Logic --- */
    body[data-lang="vi"] [lang="en"],
    body[data-lang="vi"] [lang="tw"] {
      display: none !important;
    }
    body[data-lang="en"] [lang="vi"],
    body[data-lang="en"] [lang="tw"] {
      display: none !important;
    }
    body[data-lang="tw"] [lang="vi"],
    body[data-lang="tw"] [lang="en"] {
      display: none !important;
    }

    /* --- Common Layout & Section Styles --- */
    .container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 1.5rem;
      width: 100%;
    }

    section {
      padding: 6rem 0;
      position: relative;
    }

    .section-title {
      text-align: center;
      margin-bottom: 3.5rem;
      position: relative;
    }

    .section-title h2 {
      font-size: 2.25rem;
      margin-bottom: 0.75rem;
      background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      display: inline-block;
    }

    .section-title p {
      color: var(--text-muted);
      font-size: 1.1rem;
      max-width: 600px;
      margin: 0 auto;
    }

    .section-title::after {
      content: '';
      display: block;
      width: 50px;
      height: 4px;
      background: linear-gradient(90deg, var(--primary), var(--accent));
      margin: 1rem auto 0;
      border-radius: 2px;
    }

    /* --- Buttons & UI Elements --- */
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      padding: 0.75rem 1.75rem;
      border-radius: 50px;
      font-family: var(--font-headings);
      font-weight: 600;
      font-size: 1rem;
      cursor: pointer;
      transition: var(--transition-normal);
      border: none;
      outline: none;
    }

    .btn-primary {
      background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
      color: white;
      box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
    }

    .btn-primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
      color: white;
    }

    .btn-secondary {
      background-color: white;
      color: var(--primary);
      border: 1px solid var(--border-color);
      box-shadow: var(--shadow-sm);
    }

    .btn-secondary:hover {
      background-color: var(--primary-light);
      border-color: var(--primary);
      transform: translateY(-2px);
    }

    /* --- Glassmorphism Card Style --- */
    .glass-card {
      background: var(--bg-card);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border: 1px solid var(--card-border);
      border-radius: 20px;
      box-shadow: var(--shadow-lg);
      transition: var(--transition-normal);
    }

    /* --- Header & Navigation --- */
    header {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      z-index: 1000;
      background: rgba(248, 250, 252, 0.8);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border-bottom: 1px solid var(--border-color);
      transition: var(--transition-fast);
    }

    header.scrolled {
      padding: 0.5rem 0;
      box-shadow: var(--shadow-md);
      background: rgba(255, 255, 255, 0.9);
    }

    .nav-container {
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 70px;
    }

    .logo {
      font-family: var(--font-headings);
      font-size: 1.5rem;
      font-weight: 800;
      background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .nav-right {
      display: flex;
      align-items: center;
      gap: 1.5rem;
    }

    .nav-menu {
      display: flex;
      gap: 1.5rem;
    }

    .nav-link {
      font-weight: 500;
      font-family: var(--font-headings);
      color: var(--text-muted);
      position: relative;
      padding: 0.5rem 0;
    }

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

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

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

    .nav-link.active {
      color: var(--primary);
      font-weight: 600;
    }

    /* Language Switcher Styling */
    .lang-switcher {
      display: flex;
      gap: 0.25rem;
      background-color: rgba(226, 232, 240, 0.6);
      padding: 0.25rem;
      border-radius: 8px;
      border: 1px solid var(--border-color);
    }

    .lang-btn {
      background: transparent;
      border: none;
      padding: 0.35rem 0.65rem;
      border-radius: 6px;
      font-size: 0.75rem;
      font-weight: 700;
      font-family: var(--font-headings);
      cursor: pointer;
      color: var(--text-muted);
      transition: var(--transition-fast);
    }

    .lang-btn:hover {
      color: var(--primary);
    }

    .lang-btn.active {
      background-color: white;
      color: var(--primary);
      box-shadow: var(--shadow-sm);
    }

    .nav-toggle {
      display: none;
      font-size: 1.5rem;
      background: none;
      border: none;
      cursor: pointer;
      color: var(--text-dark);
    }

    /* --- Hero Section --- */
    #hero {
      min-height: 100vh;
      display: flex;
      align-items: center;
      padding-top: 100px;
      padding-bottom: 4rem;
      background: radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
                  radial-gradient(circle at 10% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
    }

    .hero-wrapper {
      display: grid;
      grid-template-columns: 1.2fr 0.8fr;
      gap: 4rem;
      align-items: center;
    }

    .hero-content {
      display: flex;
      flex-direction: column;
      gap: 1.5rem;
    }

    .hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      align-self: flex-start;
      background-color: var(--primary-light);
      color: var(--primary);
      padding: 0.5rem 1.25rem;
      border-radius: 30px;
      font-weight: 600;
      font-size: 0.875rem;
      border: 1px solid rgba(37, 99, 235, 0.15);
    }

    .hero-title {
      font-size: 3.5rem;
      font-weight: 800;
      letter-spacing: -0.025em;
    }

    .hero-subtitle {
      font-size: 1.35rem;
      color: var(--primary-dark);
      font-weight: 600;
      font-family: var(--font-headings);
    }

    .hero-tagline {
      font-size: 1.2rem;
      color: var(--text-muted);
      border-left: 4px solid var(--accent);
      padding-left: 1.25rem;
      font-style: italic;
      line-height: 1.6;
      background: linear-gradient(90deg, rgba(6, 182, 212, 0.05), transparent);
      padding-top: 0.5rem;
      padding-bottom: 0.5rem;
    }

    .hero-cta {
      display: flex;
      gap: 1rem;
      margin-top: 1rem;
    }

    .hero-visual {
      display: flex;
      justify-content: center;
      align-items: center;
      position: relative;
    }

    /* Animated Avatar Frame */
    .avatar-frame {
      width: 320px;
      height: 320px;
      border-radius: 50%;
      position: relative;
      display: flex;
      justify-content: center;
      align-items: center;
      background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
      padding: 8px;
      box-shadow: 0 20px 40px rgba(37, 99, 235, 0.2);
    }

    .avatar-frame::before {
      content: '';
      position: absolute;
      top: -15px;
      left: -15px;
      right: -15px;
      bottom: -15px;
      border-radius: 50%;
      border: 2px dashed var(--accent);
      animation: rotate-dashed 40s linear infinite;
      opacity: 0.5;
    }

    .avatar-inner {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      background: white;
      overflow: hidden;
      display: flex;
      justify-content: center;
      align-items: center;
      position: relative;
    }

    .avatar-inner svg {
      width: 90%;
      height: 90%;
    }

    @keyframes rotate-dashed {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    /* --- About/Intro Section --- */
    #about {
      background-color: white;
    }

    .about-grid {
      display: grid;
      grid-template-columns: 0.8fr 1.2fr;
      gap: 4rem;
      align-items: center;
    }

    .about-info-box {
      padding: 2.5rem;
      display: flex;
      flex-direction: column;
      gap: 1.25rem;
    }

    .about-info-title {
      font-size: 1.5rem;
      color: var(--primary);
      display: flex;
      align-items: center;
      gap: 0.75rem;
      margin-bottom: 0.5rem;
    }

    .about-info-list {
      display: grid;
      grid-template-columns: 1fr;
      gap: 1rem;
    }

    .about-info-item {
      display: flex;
      align-items: center;
      gap: 1rem;
      font-size: 1rem;
      color: var(--text-dark);
    }

    .about-info-item i {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background-color: var(--primary-light);
      color: var(--primary);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.9rem;
    }

    .about-text-content {
      display: flex;
      flex-direction: column;
      gap: 1.5rem;
    }

    .about-text-p {
      font-size: 1.1rem;
      color: var(--text-muted);
      text-align: justify;
    }

    .highlight-card-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1.5rem;
      margin-top: 1rem;
    }

    .highlight-card {
      padding: 1.5rem;
      border-left: 4px solid var(--primary);
    }

    .highlight-card h4 {
      font-size: 1.2rem;
      margin-bottom: 0.5rem;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .highlight-card p {
      font-size: 0.9rem;
      color: var(--text-muted);
    }

    /* --- Skills Section (Horizontal Card Grid) --- */
    .skills-grid-horizontal {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 1.5rem;
      width: 100%;
    }

    .skill-card {
      padding: 2rem;
      display: flex;
      flex-direction: column;
      gap: 1.25rem;
      border: 1px solid var(--border-color);
      height: 100%;
    }

    .skill-card:hover {
      transform: translateY(-6px);
      box-shadow: var(--shadow-xl);
      border-color: var(--primary);
    }

    .skill-card-header {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }

    .skill-card-header i {
      width: 42px;
      height: 42px;
      border-radius: 10px;
      background-color: var(--primary-light);
      color: var(--primary);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.25rem;
    }

    .skill-card-header h3 {
      font-size: 1.25rem;
      color: var(--text-dark);
    }

    .skill-card-desc {
      font-size: 0.9rem;
      color: var(--text-muted);
      line-height: 1.5;
      min-height: 4.5rem;
    }

    .skill-items-list {
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      margin-top: auto;
      border-top: 1px dashed var(--border-color);
      padding-top: 1.25rem;
    }

    .skill-items-list li {
      font-size: 0.9rem;
      color: var(--text-dark);
      position: relative;
      padding-left: 1.25rem;
      font-weight: 500;
    }

    .skill-items-list li::before {
      content: '✦';
      position: absolute;
      left: 0;
      color: var(--accent);
    }

    /* --- Experience (Timeline) Section --- */
    #experience {
      background-color: white;
    }

    /* Timeline Legend / Annotations styling */
    .timeline-legend {
      display: flex;
      justify-content: center;
      gap: 2.5rem;
      margin-bottom: 3rem;
      flex-wrap: wrap;
      background-color: var(--primary-light);
      padding: 1rem 2rem;
      border-radius: 16px;
      border: 1px dashed rgba(37, 99, 235, 0.2);
      width: fit-content;
      margin-left: auto;
      margin-right: auto;
    }

    .legend-item {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }

    .legend-dot {
      display: inline-block;
      border-radius: 50%;
      background-color: white;
    }

    .legend-dot.major {
      width: 18px;
      height: 18px;
      border: 3px solid var(--primary);
      box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    }

    .legend-dot.minor {
      width: 14px;
      height: 14px;
      border: 3px solid #94a3b8;
      box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.15);
      cursor: pointer;
    }

    .legend-text {
      font-size: 0.875rem;
      font-weight: 600;
      color: var(--text-muted);
    }

    .timeline {
      position: relative;
      max-width: 800px;
      margin: 0 auto;
      padding: 2rem 0;
    }

    .timeline::before {
      content: '';
      position: absolute;
      top: 0;
      bottom: 0;
      left: 32px;
      width: 4px;
      background: linear-gradient(to bottom, var(--primary), var(--accent));
      border-radius: 2px;
    }

    .timeline-item {
      position: relative;
      margin-bottom: 3rem;
      padding-left: 80px;
    }

    .timeline-dot {
      position: absolute;
      left: 20px;
      top: 24px;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: white;
      border: 4px solid var(--primary);
      box-shadow: 0 0 0 6px var(--primary-light);
      z-index: 2;
      transition: var(--transition-normal);
    }

    .timeline-item:hover .timeline-dot {
      background: var(--accent);
      border-color: var(--primary-dark);
      transform: scale(1.15);
    }

    /* Styles for Major Node Type (Always visible) */
    .timeline-item:not(.minor-node) .timeline-card {
      cursor: default;
    }

    .timeline-item:not(.minor-node) .timeline-details {
      max-height: none;
      opacity: 1;
      margin-top: 1.5rem;
      padding-top: 1.25rem;
      border-top: 1px dashed var(--border-color);
      display: block;
    }

    /* --- Sub-timeline (Nested Minor Jobs) --- */
    .sub-timeline {
      margin-top: 1.5rem;
      padding-top: 1.5rem;
      border-top: 1px dashed var(--border-color);
    }

    .sub-timeline-title {
      font-size: 1rem;
      font-weight: 700;
      color: var(--text-dark);
      margin-bottom: 1.25rem;
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      font-family: var(--font-headings);
      cursor: pointer;
      user-select: none;
      transition: color var(--transition-fast);
    }

    .sub-timeline-title:hover {
      color: var(--primary);
    }

    .sub-timeline-title i:first-child {
      color: var(--primary);
    }

    .sub-timeline-toggle-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 24px;
      height: 24px;
      border-radius: 50%;
      background-color: var(--primary-light);
      color: var(--primary);
      border: 1px solid rgba(37, 99, 235, 0.1);
      font-size: 0.75rem;
      transition: var(--transition-fast);
      margin-left: 0.5rem;
    }
    
    .sub-timeline-title:hover .sub-timeline-toggle-icon {
      background-color: var(--primary);
      color: white;
      transform: scale(1.1);
    }

    .sub-timeline.expanded .sub-timeline-toggle-icon {
      transform: rotate(180deg);
    }
    
    .sub-timeline.expanded .sub-timeline-title:hover .sub-timeline-toggle-icon {
      transform: rotate(180deg) scale(1.1);
    }

    /* Collapsible Sub-timeline content container */
    .sub-timeline-content {
      display: none;
      animation: subSlideDownFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }

    .sub-timeline.expanded .sub-timeline-content {
      display: block;
    }

    .sub-timeline-track-container {
      position: relative;
      height: 45px;
      margin: 1.5rem 0.5rem;
      background-color: var(--primary-light);
      border-radius: 20px;
      border: 1px solid rgba(37, 99, 235, 0.1);
      padding: 0 1.5rem;
      display: flex;
      align-items: center;
    }

    .sub-timeline-line {
      position: absolute;
      left: 1.5rem;
      right: 1.5rem;
      top: 50%;
      transform: translateY(-50%);
      height: 4px;
      background: #cbd5e1; /* slate 300 base line */
      border-radius: 2px;
      z-index: 1;
    }

    .sub-timeline-progress {
      position: absolute;
      left: 0;
      top: 0;
      height: 100%;
      background: linear-gradient(90deg, var(--primary), var(--accent));
      border-radius: 2px;
      z-index: 2;
      transition: width var(--transition-normal);
    }

    .sub-timeline-node {
      position: absolute;
      top: 50%;
      transform: translate(-50%, -50%);
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: white;
      border: 3px solid #94a3b8;
      cursor: pointer;
      z-index: 5;
      transition: var(--transition-normal);
      box-shadow: var(--shadow-sm);
    }

    .sub-timeline-node:hover {
      border-color: var(--primary);
      background-color: var(--accent);
      transform: translate(-50%, -50%) scale(1.25);
    }

    .sub-timeline-node.active {
      border-color: var(--primary-dark);
      background-color: var(--primary);
      width: 16px;
      height: 16px;
      box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
    }

    /* Sub-timeline Node Tooltip */
    .sub-tooltip {
      position: absolute;
      bottom: 150%;
      left: 50%;
      transform: translateX(-50%) translateY(8px);
      background-color: var(--text-dark);
      color: white;
      padding: 0.4rem 0.8rem;
      border-radius: 6px;
      font-size: 0.75rem;
      font-weight: 500;
      white-space: nowrap;
      opacity: 0;
      pointer-events: none;
      transition: var(--transition-fast);
      box-shadow: var(--shadow-md);
      z-index: 10;
      line-height: 1.35;
    }

    .sub-tooltip::before {
      content: '';
      position: absolute;
      top: 100%;
      left: 50%;
      transform: translateX(-50%);
      border-width: 5px;
      border-style: solid;
      border-color: var(--text-dark) transparent transparent transparent;
    }

    .sub-timeline-node:hover .sub-tooltip {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }

    /* Sub-timeline details container */
    .sub-job-card {
      display: none;
      background-color: white;
      border: 1px solid var(--border-color);
      border-radius: 12px;
      padding: 1.25rem;
      margin-top: 1rem;
      box-shadow: var(--shadow-sm);
      animation: subSlideDownFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }

    .sub-job-card.active {
      display: block;
    }

    .sub-job-card-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 1rem;
      margin-bottom: 0.75rem;
      border-bottom: 1px dashed var(--border-color);
      padding-bottom: 0.5rem;
    }

    .sub-job-card-title h4 {
      font-size: 1.05rem;
      color: var(--text-dark);
      font-weight: 700;
    }

    .sub-job-card-company {
      font-size: 0.875rem;
      font-weight: 600;
      color: var(--primary);
      display: flex;
      align-items: center;
      gap: 0.35rem;
      margin-top: 0.15rem;
    }

    .sub-job-card-date {
      font-size: 0.75rem;
      font-weight: 600;
      color: var(--text-muted);
      background-color: var(--primary-light);
      padding: 0.2rem 0.6rem;
      border-radius: 20px;
      border: 1px solid rgba(37, 99, 235, 0.1);
      white-space: nowrap;
    }

    .sub-job-card-details ul {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      margin-top: 0.5rem;
    }

    .sub-job-card-details li {
      font-size: 0.875rem;
      color: var(--text-muted);
      position: relative;
      padding-left: 1.25rem;
      line-height: 1.5;
    }

    .sub-job-card-details li::before {
      content: '✦';
      position: absolute;
      left: 0;
      color: var(--accent);
    }

    /* Label markers for start and end years on track */
    .sub-timeline-label {
      position: absolute;
      font-size: 0.75rem;
      font-weight: 700;
      color: var(--text-muted);
      bottom: -22px;
    }
    .sub-timeline-label.start {
      left: 0.5rem;
    }
    .sub-timeline-label.end {
      right: 0.5rem;
    }

    @keyframes subSlideDownFadeIn {
      from {
        opacity: 0;
        transform: translateY(-8px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* Responsive queries for sub-timeline */
    @media (max-width: 640px) {
      .sub-timeline-track-container {
        display: none !important; /* Hide track slider on mobile and use standard stacked layout list */
      }
      .sub-job-card {
        display: block !important; /* Always show them stacked on mobile */
        margin-bottom: 1rem;
        background-color: var(--primary-light);
      }
    }

    .timeline-card {
      padding: 1.75rem;
      overflow: hidden;
      border: 1px solid var(--border-color);
    }

    .timeline-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 1rem;
    }

    .timeline-title h3 {
      font-size: 1.25rem;
      color: var(--text-dark);
      margin-bottom: 0.25rem;
    }

    .timeline-company {
      font-size: 1rem;
      font-weight: 600;
      color: var(--primary);
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .timeline-date {
      font-size: 0.875rem;
      color: var(--text-muted);
      background-color: var(--primary-light);
      padding: 0.25rem 0.75rem;
      border-radius: 30px;
      white-space: nowrap;
      font-weight: 500;
      border: 1px solid rgba(37, 99, 235, 0.1);
    }

    .timeline-details {
      margin-top: 1.5rem;
      padding-top: 1.25rem;
      border-top: 1px dashed var(--border-color);
    }

    .timeline-details ul {
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
    }

    .timeline-details li {
      position: relative;
      padding-left: 1.5rem;
      font-size: 0.95rem;
      color: var(--text-muted);
      text-align: justify;
    }

    .timeline-details li::before {
      content: '✦';
      position: absolute;
      left: 0;
      color: var(--accent);
    }

    /* --- Projects Section --- */
    .projects-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 2rem;
    }

    .project-card {
      overflow: hidden;
      display: flex;
      flex-direction: column;
      height: 100%;
      cursor: pointer;
    }

    .project-card:hover {
      transform: translateY(-6px);
      box-shadow: var(--shadow-xl);
      border-color: var(--primary-dark);
    }

    .project-img-wrapper {
      position: relative;
      aspect-ratio: 16/10;
      background: linear-gradient(135deg, #1e3a8a, #0f172a);
      overflow: hidden;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .project-img-placeholder {
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .project-img-placeholder svg {
      width: 60%;
      height: 60%;
      opacity: 0.8;
      transition: transform var(--transition-normal);
    }

    .project-card:hover .project-img-placeholder svg {
      transform: scale(1.1) rotate(2deg);
    }

    .project-body {
      padding: 1.5rem;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      flex-grow: 1;
    }

    .project-tag {
      font-size: 0.75rem;
      text-transform: uppercase;
      font-weight: 700;
      color: var(--accent);
      letter-spacing: 0.05em;
    }

    .project-card h3 {
      font-size: 1.35rem;
      color: var(--text-dark);
    }

    .project-desc {
      font-size: 0.9rem;
      color: var(--text-muted);
      line-height: 1.5;
    }

    .project-techs {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      margin-top: auto;
      padding-top: 0.75rem;
    }

    .tech-pill {
      font-size: 0.75rem;
      font-weight: 600;
      background-color: var(--primary-light);
      color: var(--primary);
      padding: 0.25rem 0.6rem;
      border-radius: 4px;
    }

    /* --- Modals for Project Detail & Chatbot --- */
    .modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(15, 23, 42, 0.6);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      z-index: 2000;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      pointer-events: none;
      transition: opacity var(--transition-normal);
    }

    .modal-overlay.active {
      opacity: 1;
      pointer-events: auto;
    }

    .modal-container {
      width: 90%;
      max-width: 800px;
      max-height: 90vh;
      overflow-y: auto;
      border-radius: 24px;
      background: white;
      box-shadow: var(--shadow-xl);
      border: 1px solid var(--border-color);
      transform: translateY(30px);
      transition: transform var(--transition-normal);
      display: none;
    }

    .modal-overlay.active .modal-container {
      transform: translateY(0);
    }

    .modal-header {
      padding: 1.5rem 2rem;
      border-bottom: 1px solid var(--border-color);
      display: flex;
      justify-content: space-between;
      align-items: center;
      position: sticky;
      top: 0;
      background: white;
      z-index: 10;
    }

    .modal-title h3 {
      font-size: 1.5rem;
      color: var(--text-dark);
    }

    .modal-close {
      background: none;
      border: none;
      font-size: 1.5rem;
      cursor: pointer;
      color: var(--text-muted);
      transition: var(--transition-fast);
    }

    .modal-close:hover {
      color: var(--text-dark);
      transform: scale(1.1);
    }

    .modal-body {
      padding: 2rem;
      display: flex;
      flex-direction: column;
      gap: 1.5rem;
    }

    .modal-showcase {
      border-radius: 12px;
      overflow: hidden;
      aspect-ratio: 16/9;
      background: linear-gradient(135deg, #1e3a8a, #0891b2);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .modal-showcase svg {
      width: 45%;
      height: 45%;
    }

    .modal-info-grid {
      display: grid;
      grid-template-columns: 2fr 1fr;
      gap: 2rem;
    }

    .modal-desc-col {
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }

    .modal-desc-col h4, .modal-meta-col h4 {
      font-size: 1.1rem;
      color: var(--primary-dark);
      margin-bottom: 0.25rem;
    }

    .modal-desc-text {
      color: var(--text-muted);
      font-size: 0.975rem;
      line-height: 1.6;
      text-align: justify;
    }

    .modal-meta-col {
      display: flex;
      flex-direction: column;
      gap: 1.25rem;
      background-color: var(--primary-light);
      padding: 1.5rem;
      border-radius: 16px;
      border: 1px solid rgba(37, 99, 235, 0.1);
      height: fit-content;
    }

    .meta-list {
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
    }

    .meta-item {
      font-size: 0.875rem;
    }

    .meta-label {
      font-weight: 700;
      color: var(--text-dark);
      display: block;
      margin-bottom: 0.15rem;
    }

    .meta-value {
      color: var(--text-muted);
    }

    /* --- Category Badge (project card, hybrid category system) --- */
    .project-img-wrapper {
      position: relative;
    }

    .category-badge {
      position: absolute;
      top: 0.75rem;
      left: 0.75rem;
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      padding: 0.35rem 0.75rem;
      border-radius: 999px;
      font-size: 0.75rem;
      font-weight: 700;
      background: rgba(255, 255, 255, 0.92);
      color: var(--primary-dark);
      box-shadow: var(--shadow-md);
      backdrop-filter: blur(4px);
    }

    .category-badge.category-demo-class {
      color: var(--success);
    }

    /* --- Enriched Sidebar Spec Items (list / result types) --- */
    .meta-list-items {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 0.4rem;
      margin-top: 0.35rem;
    }

    .meta-list-items li {
      color: var(--text-muted);
      font-size: 0.875rem;
      padding-left: 1.2rem;
      position: relative;
    }

    .meta-list-items li::before {
      content: '\f00c';
      font-family: 'Font Awesome 6 Free';
      font-weight: 900;
      position: absolute;
      left: 0;
      top: 0.1rem;
      color: var(--accent);
      font-size: 0.75rem;
    }

    .meta-result-stat {
      font-family: var(--font-headings);
      font-size: 1.75rem;
      font-weight: 800;
      background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
      margin: 0.35rem 0;
    }

    .meta-result-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      width: 100%;
      padding: 0.55rem 0.9rem;
      border: 1px solid rgba(37, 99, 235, 0.25);
      border-radius: 10px;
      background: white;
      color: var(--primary-dark);
      font-weight: 600;
      font-size: 0.85rem;
      cursor: pointer;
      transition: var(--transition-fast);
    }

    .meta-result-btn i {
      transition: var(--transition-fast);
    }

    .meta-result-btn:hover {
      background: var(--primary);
      color: white;
      border-color: var(--primary);
    }

    .meta-result-btn:hover i {
      transform: translateY(2px);
    }

    /* --- "demo-class" Category: Session Blocks --- */
    @keyframes dcFadeInUp {
      from {
        opacity: 0;
        transform: translateY(18px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .dc-session {
      scroll-margin-top: 90px;
      border-radius: 18px;
      padding: 1.5rem;
      margin-bottom: 1.25rem;
      border: 1px solid var(--border-color);
      animation: dcFadeInUp var(--transition-slow) both;
    }

    .dc-session--primary {
      background: linear-gradient(160deg, var(--primary-light) 0%, rgba(255, 255, 255, 0.4) 100%);
      border-left: 4px solid var(--primary);
      animation-delay: 0.05s;
    }

    .dc-session--accent {
      background: linear-gradient(160deg, rgba(6, 182, 212, 0.08) 0%, rgba(255, 255, 255, 0.4) 100%);
      border-left: 4px solid var(--accent);
      animation-delay: 0.15s;
    }

    .dc-session-header {
      display: flex;
      align-items: center;
      gap: 0.85rem;
      margin-bottom: 0.85rem;
      flex-wrap: wrap;
    }

    .dc-session-badge {
      display: inline-block;
      padding: 0.3rem 0.75rem;
      border-radius: 999px;
      font-size: 0.75rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: white;
      background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    }

    .dc-session-title {
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .dc-session-title i {
      color: var(--primary-dark);
      font-size: 1.1rem;
    }

    .dc-session--accent .dc-session-title i {
      color: var(--accent);
    }

    .dc-session-title h5 {
      font-family: var(--font-headings);
      font-size: 1.05rem;
      color: var(--text-dark);
    }

    /* --- Media Placeholder / Gallery --- */
    .dc-media-placeholder {
      margin-top: 1rem;
      border: 2px dashed var(--accent);
      border-radius: 14px;
      padding: 1.75rem 1rem;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.5rem;
      color: var(--text-muted);
      font-size: 0.85rem;
      text-align: center;
      background: rgba(255, 255, 255, 0.5);
    }

    .dc-media-placeholder i {
      font-size: 1.5rem;
      color: var(--accent);
    }

    .dc-media-grid {
      margin-top: 1rem;
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
      gap: 0.75rem;
    }

    .dc-media-grid img,
    .dc-media-grid video {
      width: 100%;
      height: 110px;
      object-fit: cover;
      border-radius: 10px;
      cursor: pointer;
      transition: var(--transition-fast);
      box-shadow: var(--shadow-sm);
    }

    .dc-media-grid img:hover {
      transform: scale(1.04);
      box-shadow: var(--shadow-md);
    }

    /* --- Worksheet Results / Animated Bars --- */
    .dc-results {
      margin-top: 1.25rem;
      padding: 1.25rem;
      border-radius: 14px;
      background: rgba(255, 255, 255, 0.7);
      border: 1px solid var(--border-color);
    }

    .dc-results-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      flex-wrap: wrap;
      gap: 0.75rem;
      margin-bottom: 1rem;
    }

    .dc-results-header h6 {
      font-family: var(--font-headings);
      font-size: 0.95rem;
      color: var(--text-dark);
    }

    .dc-results-stat {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      text-align: right;
    }

    .dc-results-stat-value {
      font-family: var(--font-headings);
      font-size: 1.4rem;
      font-weight: 800;
      color: var(--primary-dark);
    }

    .dc-results-stat-label {
      font-size: 0.7rem;
      color: var(--text-muted);
      max-width: 220px;
    }

    .dc-bar-item {
      margin-bottom: 1rem;
    }

    .dc-bar-item:last-child {
      margin-bottom: 0;
    }

    .dc-bar-info {
      display: flex;
      justify-content: space-between;
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--text-dark);
      margin-bottom: 0.3rem;
    }

    .dc-bar-pct {
      color: var(--primary-dark);
    }

    .dc-bar-track {
      width: 100%;
      height: 10px;
      border-radius: 999px;
      background: var(--border-color);
      overflow: hidden;
    }

    .dc-bar-fill {
      height: 100%;
      width: 0%;
      border-radius: 999px;
      background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
      transition: width 1.1s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .dc-bar-note {
      margin-top: 0.4rem;
      font-size: 0.78rem;
      color: var(--text-muted);
      line-height: 1.5;
    }

    /* --- Conclusion Callout --- */
    .dc-conclusion {
      display: flex;
      align-items: flex-start;
      gap: 1rem;
      padding: 1.5rem;
      border-radius: 18px;
      background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
      color: white;
    }

    .dc-conclusion i {
      font-size: 1.5rem;
      margin-top: 0.15rem;
    }

    .dc-conclusion h5 {
      font-family: var(--font-headings);
      font-size: 1.05rem;
      margin-bottom: 0.4rem;
    }

    .dc-conclusion p {
      font-size: 0.9rem;
      line-height: 1.6;
      opacity: 0.95;
    }

    /* --- Media Lightbox --- */
    .lightbox-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(15, 23, 42, 0.85);
      z-index: 3000;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      pointer-events: none;
      transition: opacity var(--transition-normal);
    }

    .lightbox-overlay.active {
      opacity: 1;
      pointer-events: auto;
    }

    .lightbox-overlay img {
      max-width: 90%;
      max-height: 85vh;
      border-radius: 12px;
      box-shadow: var(--shadow-xl);
    }

    /* --- Worksheet Gallery (Tiết 1) --- */
    .dc-worksheet {
      margin-top: 1.25rem;
    }

    .dc-worksheet h6 {
      font-family: var(--font-headings);
      font-size: 0.95rem;
      color: var(--text-dark);
      margin-bottom: 0.75rem;
    }

    .dc-worksheet-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 0.85rem;
      margin-bottom: 1rem;
    }

    .dc-worksheet-grid img {
      width: 100%;
      aspect-ratio: 3 / 4.25;
      object-fit: cover;
      object-position: top;
      border-radius: 12px;
      cursor: pointer;
      border: 1px solid var(--border-color);
      transition: var(--transition-fast);
      box-shadow: var(--shadow-sm);
    }

    .dc-worksheet-grid img:hover {
      transform: scale(1.02);
      box-shadow: var(--shadow-md);
    }

    .dc-worksheet-cta {
      width: 100%;
      font-size: 0.9rem;
      padding: 0.65rem;
    }

    /* --- Interactive Differential-Drive Simulation Widget --- */
    .sim-widget {
      margin-top: 1.25rem;
      border: 1px solid var(--border-color);
      border-radius: 16px;
      padding: 1rem;
      background: rgba(255, 255, 255, 0.6);
    }

    .sim-stage-wrap {
      position: relative;
      background: var(--bg-page);
      border-radius: 12px;
      overflow: hidden;
      margin-bottom: 1rem;
    }

    .sim-stage-wrap svg {
      width: 100%;
      height: auto;
      display: block;
    }

    .sim-badge {
      position: absolute;
      top: 10px;
      font-size: 0.7rem;
      font-weight: 600;
      padding: 4px 10px;
      border-radius: 999px;
      background: white;
      border: 1px solid var(--border-color);
      color: var(--text-muted);
    }

    .sim-badge-mode { left: 10px; }
    .sim-badge-radius { right: 10px; display: none; }

    .sim-badge-status {
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      align-items: center;
      gap: 0.35rem;
      color: var(--primary-dark);
      background: var(--primary-light);
      border-color: rgba(37, 99, 235, 0.2);
    }

    .sim-controls {
      display: flex;
      flex-direction: column;
      gap: 0.85rem;
      margin-bottom: 1rem;
    }

    .sim-slider-row {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }

    .sim-slider-row label {
      font-size: 0.8rem;
      color: var(--text-muted);
      width: 80px;
      flex-shrink: 0;
    }

    .sim-slider-row span {
      font-size: 0.8rem;
      font-weight: 600;
      min-width: 32px;
      text-align: right;
      color: var(--text-dark);
    }

    .sim-widget input[type="range"] {
      flex: 1;
      -webkit-appearance: none;
      appearance: none;
      height: 4px;
      border-radius: 2px;
      background: var(--border-color);
      outline: none;
    }

    .sim-widget input[type="range"]::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: var(--primary);
      cursor: pointer;
    }

    .sim-widget input[type="range"]::-moz-range-thumb {
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: var(--primary);
      border: none;
      cursor: pointer;
    }

    .sim-button-row {
      display: flex;
      gap: 0.5rem;
      flex-wrap: wrap;
      margin-bottom: 0.85rem;
    }

    .sim-widget button {
      flex: 1;
      min-width: 100px;
      font-size: 0.78rem;
      font-family: var(--font-body);
      padding: 0.5rem 0.6rem;
      background: white;
      color: var(--text-dark);
      border: 1px solid var(--border-color);
      border-radius: 8px;
      cursor: pointer;
      transition: var(--transition-fast);
    }

    .sim-widget button:hover {
      background: var(--primary-light);
      border-color: var(--primary);
    }

    .sim-widget button:active {
      transform: scale(0.98);
    }

    .sim-record-row {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      margin-bottom: 0.85rem;
    }

    .sim-record-row button {
      flex: 0 0 auto;
      min-width: 0;
    }

    .sim-rec-indicator {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      font-size: 0.78rem;
      color: #c0392b;
      font-weight: 600;
    }

    .sim-rec-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #c0392b;
      animation: simBlink 1s step-start infinite;
    }

    @keyframes simBlink {
      0%, 100% { opacity: 1; }
      50% { opacity: 0; }
    }

    .sim-widget button.recording {
      background: #c0392b;
      color: white;
      border-color: #c0392b;
    }

    .sim-stats-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 0.6rem;
    }

    .sim-stat-card {
      background: var(--primary-light);
      border-radius: 10px;
      padding: 0.6rem 0.75rem;
    }

    .sim-stat-card p:first-child {
      font-size: 0.68rem;
      color: var(--text-muted);
      margin: 0 0 0.2rem;
    }

    .sim-stat-card p:last-child {
      font-size: 0.95rem;
      font-weight: 700;
      color: var(--text-dark);
      margin: 0;
    }

    @media (max-width: 480px) {
      .sim-slider-row label {
        width: 64px;
        font-size: 0.72rem;
      }
      .sim-widget button {
        min-width: 0;
        font-size: 0.7rem;
      }
    }

    /* --- Interactive Socratic Chatbot Demo --- */
    .chatbot-demo-box {
      border: 1px solid var(--border-color);
      border-radius: 16px;
      overflow: hidden;
      box-shadow: var(--shadow-md);
      display: flex;
      flex-direction: column;
      height: 380px;
      background-color: #f8fafc;
    }

    .chatbot-header {
      background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
      color: white;
      padding: 0.85rem 1.25rem;
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }

    .chatbot-avatar {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background-color: rgba(255, 255, 255, 0.2);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.95rem;
    }

    .chatbot-info h5 {
      color: white;
      font-size: 0.9rem;
      font-weight: 600;
    }

    .chatbot-info span {
      font-size: 0.7rem;
      opacity: 0.8;
      display: block;
    }

    .chat-messages {
      flex-grow: 1;
      padding: 1.25rem;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 1rem;
      background-color: #f1f5f9;
    }

    .chat-bubble {
      max-width: 80%;
      padding: 0.75rem 1rem;
      border-radius: 16px;
      font-size: 0.875rem;
      line-height: 1.4;
      position: relative;
      animation: message-fade-in 0.3s ease forwards;
    }

    @keyframes message-fade-in {
      from { opacity: 0; transform: translateY(5px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .chat-bubble.bot {
      background-color: white;
      color: var(--text-dark);
      align-self: flex-start;
      border-bottom-left-radius: 4px;
      box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    }

    .chat-bubble.user {
      background-color: var(--primary);
      color: white;
      align-self: flex-end;
      border-bottom-right-radius: 4px;
      box-shadow: 0 1px 2px rgba(37,99,235,0.1);
    }

    .chat-options-container {
      padding: 0.85rem 1.25rem;
      background-color: white;
      border-top: 1px solid var(--border-color);
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }

    .chat-options-title {
      font-size: 0.75rem;
      text-transform: uppercase;
      font-weight: 700;
      color: var(--text-muted);
      margin-bottom: 0.25rem;
    }

    .chat-options-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
    }

    .chat-opt-btn {
      background-color: var(--primary-light);
      color: var(--primary);
      border: 1px solid rgba(37, 99, 235, 0.15);
      border-radius: 30px;
      padding: 0.45rem 1rem;
      font-size: 0.8rem;
      font-weight: 500;
      cursor: pointer;
      transition: var(--transition-fast);
      text-align: left;
    }

    .chat-opt-btn:hover {
      background-color: var(--primary);
      color: white;
      border-color: var(--primary);
    }

    .chat-opt-btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      pointer-events: none;
    }

    .chatbot-reset-btn {
      align-self: flex-end;
      background: none;
      border: none;
      color: var(--text-muted);
      cursor: pointer;
      font-size: 0.85rem;
      display: flex;
      align-items: center;
      gap: 0.25rem;
    }

    .chatbot-reset-btn:hover {
      color: var(--primary);
    }

    /* --- Contact Section --- */
    #contact {
      background: radial-gradient(circle at 10% 20%, rgba(6, 182, 212, 0.04) 0%, transparent 40%);
    }

    .contact-grid {
      display: grid;
      grid-template-columns: 1fr 1.5fr;
      gap: 4rem;
      align-items: flex-start;
    }

    .contact-info {
      display: flex;
      flex-direction: column;
      gap: 2rem;
    }

    .contact-card {
      padding: 2rem;
      display: flex;
      flex-direction: column;
      gap: 1.5rem;
    }

    .contact-detail-row {
      display: flex;
      align-items: center;
      gap: 1.25rem;
    }

    .contact-icon {
      width: 48px;
      height: 48px;
      border-radius: 12px;
      background-color: var(--primary-light);
      color: var(--primary);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.25rem;
      box-shadow: 0 4px 6px rgba(37, 99, 235, 0.05);
    }

    .contact-content h4 {
      font-size: 0.9rem;
      text-transform: uppercase;
      color: var(--text-muted);
      letter-spacing: 0.05em;
    }

    .contact-content p {
      font-size: 1.05rem;
      font-weight: 600;
      color: var(--text-dark);
    }

    .contact-socials-group {
      display: flex;
      gap: 1rem;
      margin-top: 0.5rem;
    }

    .social-btn {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background-color: white;
      border: 1px solid var(--border-color);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-muted);
      font-size: 1.1rem;
      box-shadow: var(--shadow-sm);
      transition: var(--transition-normal);
    }

    .social-btn:hover {
      background-color: var(--primary);
      color: white;
      border-color: var(--primary);
      transform: translateY(-2px);
    }

    .contact-form-card {
      padding: 2.5rem;
    }

    .form-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1.5rem;
    }

    .form-group {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }

    .form-group.full-width {
      grid-column: span 2;
    }

    .form-label {
      font-size: 0.875rem;
      font-weight: 600;
      color: var(--text-dark);
    }

    .form-input {
      padding: 0.75rem 1rem;
      border-radius: 10px;
      border: 1px solid var(--border-color);
      background-color: white;
      font-family: var(--font-body);
      font-size: 0.95rem;
      outline: none;
      transition: var(--transition-fast);
    }

    .form-input:focus {
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    }

    textarea.form-input {
      resize: vertical;
      min-height: 120px;
    }

    /* --- Footer --- */
    footer {
      background-color: #0f172a;
      color: #94a3b8;
      padding: 3rem 0;
      border-top: 1px solid #1e293b;
      text-align: center;
    }

    .footer-content {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 1.5rem;
    }

    .footer-logo {
      font-family: var(--font-headings);
      font-size: 1.75rem;
      font-weight: 800;
      color: white;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .footer-tagline {
      font-size: 0.95rem;
      max-width: 500px;
      margin: 0 auto;
      line-height: 1.6;
    }

    .footer-copy {
      font-size: 0.8rem;
      color: #64748b;
      margin-top: 1rem;
    }

    /* --- Toast Notification System --- */
    .toast-container {
      position: fixed;
      bottom: 2rem;
      right: 2rem;
      z-index: 3000;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
    }

    .toast {
      background: white;
      border-left: 5px solid var(--success);
      padding: 1rem 1.5rem;
      border-radius: 10px;
      box-shadow: var(--shadow-xl);
      display: flex;
      align-items: center;
      gap: 1rem;
      transform: translateX(120%);
      transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      min-width: 300px;
    }

    .toast.show {
      transform: translateX(0);
    }

    .toast-icon {
      color: var(--success);
      font-size: 1.25rem;
    }

    .toast-message {
      font-size: 0.9rem;
      font-weight: 500;
      color: var(--text-dark);
    }

    /* --- Responsive Queries --- */
    @media (max-width: 1024px) {
      .projects-grid {
        grid-template-columns: repeat(2, 1fr);
      }
      .skills-grid-horizontal {
        grid-template-columns: repeat(2, 1fr);
      }
    }

    @media (max-width: 768px) {
      section {
        padding: 4rem 0;
      }
      
      .hero-wrapper {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
      }

      .hero-badge {
        align-self: center;
      }

      .hero-title {
        font-size: 2.75rem;
      }

      .hero-tagline {
        border-left: none;
        border-top: 4px solid var(--accent);
        padding-left: 0;
        padding-top: 1rem;
      }

      .hero-cta {
        justify-content: center;
      }

      .avatar-frame {
        width: 260px;
        height: 260px;
      }

      .about-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
      }

      .form-grid {
        grid-template-columns: 1fr;
      }

      .form-group.full-width {
        grid-column: span 1;
      }

      .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        align-items: center;
        padding: 3rem 0;
        gap: 2.5rem;
        box-shadow: var(--shadow-lg);
        transition: var(--transition-normal);
        z-index: 999;
      }

      .nav-menu.active {
        left: 0;
      }

      .nav-toggle {
        display: block;
      }

      .modal-info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
      }

      .modal-meta-col {
        order: -1;
      }

      .dc-results-header {
        align-items: flex-start;
      }

      .dc-results-stat {
        align-items: flex-start;
        text-align: left;
      }
    }

    @media (max-width: 640px) {
      .skills-grid-horizontal {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 480px) {
      .projects-grid {
        grid-template-columns: 1fr;
      }
      
      .timeline::before {
        left: 20px;
      }
      
      .timeline-item {
        padding-left: 50px;
      }
      
      .timeline-dot {
        left: 8px;
        width: 20px;
        height: 20px;
        border-width: 3px;
      }
      
      .hero-title {
        font-size: 2.25rem;
      }
      
      .hero-cta {
        flex-direction: column;
      }
      
      .highlight-card-row {
        grid-template-columns: 1fr;
      }
    }

    /* --- Print Stylesheet Configuration --- */
    @media print {
      header, 
      footer, 
      .hero-cta,
      .timeline-trigger,
      .modal-overlay,
      .contact-form-card,
      .contact-socials-group,
      .toast-container,
      .chatbot-demo-box,
      .project-img-wrapper,
      #contact,
      .section-title::after,
      .timeline-legend {
        display: none !important;
      }

      body {
        background: white !important;
        color: black !important;
        font-size: 11pt;
        line-height: 1.4;
      }

      section {
        padding: 1.5rem 0 !important;
        page-break-inside: avoid;
      }

      .container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
      }

      .section-title {
        text-align: left !important;
        margin-bottom: 1rem !important;
      }

      .section-title h2 {
        font-size: 16pt !important;
        background: none !important;
        -webkit-text-fill-color: initial !important;
        color: #1e3a8a !important;
        border-bottom: 2px solid #2563eb;
        width: 100%;
        display: block;
        padding-bottom: 3px;
      }

      .section-title p {
        display: none;
      }

      #hero {
        min-height: auto !important;
        padding-top: 0 !important;
        padding-bottom: 1.5rem !important;
        background: none !important;
      }

      .hero-wrapper {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
      }

      .hero-content {
        gap: 0.5rem !important;
      }

      .hero-title {
        font-size: 24pt !important;
        margin-bottom: 2px;
      }

      .hero-subtitle {
        font-size: 14pt !important;
        color: #2563eb !important;
      }

      .hero-tagline {
        font-size: 10pt !important;
        border-left: 3px solid #000;
        background: none !important;
        padding: 0.25rem 0 0.25rem 0.75rem !important;
      }

      .about-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
      }

      .about-info-box {
        padding: 0 !important;
        border: none !important;
        background: none !important;
      }

      .about-info-list {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.5rem !important;
      }

      .about-info-item {
        font-size: 9pt !important;
      }

      .about-info-item i {
        display: none !important;
      }

      .highlight-card-row {
        display: none !important;
      }

      .skills-grid-horizontal {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
        display: grid !important;
      }

      .skill-card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        background: none !important;
        padding: 1rem !important;
        page-break-inside: avoid;
      }

      .skill-card-desc {
        min-height: auto !important;
      }

      .timeline {
        padding: 0 !important;
      }

      .timeline::before {
        display: none !important;
      }

      /* On print, hide sub-timeline tracks and show all nested sub-job cards stacked */
      .sub-timeline-track-container {
        display: none !important;
      }
      .sub-job-card {
        display: block !important;
        opacity: 1 !important;
        border: 1px solid #ccc !important;
        margin-top: 0.5rem !important;
        padding: 1rem !important;
        page-break-inside: avoid;
        background: none !important;
        box-shadow: none !important;
      }

      .timeline-item {
        padding-left: 0 !important;
        margin-bottom: 1.5rem !important;
        page-break-inside: avoid;
      }

      .timeline-dot {
        display: none !important;
      }

      .timeline-card {
        padding: 0 !important;
        border: none !important;
        background: none !important;
        box-shadow: none !important;
      }

      .timeline-details {
        max-height: none !important;
        opacity: 1 !important;
        margin-top: 0.5rem !important;
        padding-top: 0.5rem !important;
        border-top: 1px solid #ddd !important;
        display: block !important;
      }

      .timeline-details li {
        font-size: 9pt !important;
        color: #333 !important;
      }

      .projects-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
      }

      .project-card {
        border: none !important;
        box-shadow: none !important;
        background: none !important;
        page-break-inside: avoid;
      }

      .project-body {
        padding: 0 !important;
      }

      .project-body h3 {
        font-size: 11pt !important;
        color: #1e3a8a;
      }

      .project-desc {
        font-size: 9.5pt !important;
        color: #333 !important;
        margin-top: 0.25rem;
      }

      .project-techs {
        margin-top: 0.25rem !important;
        padding-top: 0 !important;
      }

      .tech-pill {
        background: none !important;
        color: black !important;
        border: 1px solid #ccc !important;
        padding: 1px 4px !important;
        font-size: 8pt !important;
      }
    }
