/* ============================================
   Theme tokens
   Light = default (and :root[data-theme="light"]).
   Dark  = :root[data-theme="dark"] OR a system-dark
            user without an explicit override.
   ============================================ */
:root,
:root[data-theme="light"] {
    --bg:               #ffffff;
    --bg-soft:          #f8f9fa;
    --surface:          #ffffff;
    --text:             #333333;
    --text-muted:       #666666;
    --text-strong:      #14142a;
    --border:           rgba(20, 20, 42, 0.10);
    --border-strong:    rgba(20, 20, 42, 0.20);
    --shadow:           0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-strong:    0 8px 25px rgba(20, 20, 42, 0.15);
    --nav-bg:           rgba(255, 255, 255, 0.95);
    --nav-border:       rgba(20, 20, 42, 0.10);
    --social-bg:        rgba(255, 255, 255, 0.9);
    --social-bg-hover:  rgba(255, 255, 255, 1);
    --accent:           #357abd;
    --accent-strong:    #14142a;
    --accent-on:        #ffffff;
    --skills-chip-bg:   #ffffff;
    --skills-chip-text: #34495e;
    --floating-tint-a:  rgba(20, 20, 42, 0.05);
    --floating-tint-b:  rgba(53, 122, 189, 0.08);
    --cta-ghost-hover:  rgba(53, 122, 189, 0.05);
    --cli-bg:           #f5f5f7;
    --cli-titlebar:     #e5e5ea;
    --cli-text:         #1c1c1e;
    --cli-title:        #5b5b66;
    --cli-prompt:       #2a7a3f;
    --cli-output:       #357abd;
    --cli-border:       #d1d1d6;
    --cli-shadow:       0 20px 60px rgba(0, 0, 0, 0.20);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg:               #0e0f14;
        --bg-soft:          #14161d;
        --surface:          #1a1d26;
        --text:             #e6e8ef;
        --text-muted:       #9aa0b4;
        --text-strong:      #ffffff;
        --border:           rgba(255, 255, 255, 0.08);
        --border-strong:    rgba(255, 255, 255, 0.18);
        --shadow:           0 4px 15px rgba(0, 0, 0, 0.40);
        --shadow-strong:    0 8px 25px rgba(0, 0, 0, 0.55);
        --nav-bg:           rgba(14, 15, 20, 0.85);
        --nav-border:       rgba(255, 255, 255, 0.08);
        --social-bg:        rgba(26, 29, 38, 0.85);
        --social-bg-hover:  rgba(26, 29, 38, 1);
        --accent:           #5aa3e6;
        --accent-strong:    #357abd;
        --accent-on:        #ffffff;
        --skills-chip-bg:   #1a1d26;
        --skills-chip-text: #c8cce0;
        --floating-tint-a:  rgba(255, 255, 255, 0.05);
        --floating-tint-b:  rgba(90, 163, 230, 0.10);
        --cta-ghost-hover:  rgba(90, 163, 230, 0.10);
        --cli-bg:           #0f1117;
        --cli-titlebar:     #14172a;
        --cli-text:         #d6d8e6;
        --cli-title:        #8a8fa3;
        --cli-prompt:       #4ade80;
        --cli-output:       #5aa3e6;
        --cli-border:       #1f2230;
        --cli-shadow:       0 20px 60px rgba(0, 0, 0, 0.50);
    }
}

:root[data-theme="dark"] {
    --bg:               #0e0f14;
    --bg-soft:          #14161d;
    --surface:          #1a1d26;
    --text:             #e6e8ef;
    --text-muted:       #9aa0b4;
    --text-strong:      #ffffff;
    --border:           rgba(255, 255, 255, 0.08);
    --border-strong:    rgba(255, 255, 255, 0.18);
    --shadow:           0 4px 15px rgba(0, 0, 0, 0.40);
    --shadow-strong:    0 8px 25px rgba(0, 0, 0, 0.55);
    --nav-bg:           rgba(14, 15, 20, 0.85);
    --nav-border:       rgba(255, 255, 255, 0.08);
    --social-bg:        rgba(26, 29, 38, 0.85);
    --social-bg-hover:  rgba(26, 29, 38, 1);
    --accent:           #5aa3e6;
    --accent-strong:    #357abd;
    --accent-on:        #ffffff;
    --skills-chip-bg:   #1a1d26;
    --skills-chip-text: #c8cce0;
    --floating-tint-a:  rgba(255, 255, 255, 0.05);
    --floating-tint-b:  rgba(90, 163, 230, 0.10);
    --cta-ghost-hover:  rgba(90, 163, 230, 0.10);
    --cli-bg:           #0f1117;
    --cli-titlebar:     #14172a;
    --cli-text:         #d6d8e6;
    --cli-title:        #8a8fa3;
    --cli-prompt:       #4ade80;
    --cli-output:       #5aa3e6;
    --cli-border:       #1f2230;
    --cli-shadow:       0 20px 60px rgba(0, 0, 0, 0.50);
}

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

html, body {
    height: 100%;
    font-family: 'Roboto', Arial, sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    cursor: none;
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--nav-border);
    z-index: 1000;
    padding: 15px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-strong);
    letter-spacing: -0.5px;
    text-decoration: none;
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(135deg, var(--accent-strong) 0%, var(--accent) 100%);
    border-radius: 1px;
}

/* Theme toggle button */
.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.25s ease;
    padding: 0;
    font-size: 0.95em;
    line-height: 1;
}

.theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.theme-toggle:active {
    transform: scale(0.92);
}

/* Show the icon that means "switch TO" the other theme. */
:root[data-theme="light"] .theme-icon-dark,
:root:not([data-theme]) .theme-icon-dark { display: inline-block; }
:root[data-theme="light"] .theme-icon-light,
:root:not([data-theme]) .theme-icon-light { display: none; }
:root[data-theme="dark"] .theme-icon-light { display: inline-block; }
:root[data-theme="dark"] .theme-icon-dark { display: none; }

/* ============================================
   Custom Cursor — Luminous Halo
   ============================================ */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
}

.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--accent);
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.2s ease, height 0.2s ease, background-color 0.2s ease;
    will-change: transform;
}

.cursor-ring.halo-active {
    width: 45px;
    height: 45px;
    background-color: rgba(53, 122, 189, 0.1);
}

/* Restore pointer on interactive elements since body has cursor:none */
a,
button,
[role="button"],
input,
label,
select,
textarea {
    cursor: pointer;
}

input[type="text"],
input[type="email"],
input[type="search"],
textarea {
    cursor: text;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    min-height: 72vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 110px 0 70px; /* Account for fixed navbar */
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 900px;
    padding: 0 20px;
}

.profile-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent);
    box-shadow: 0 8px 25px var(--shadow-strong);
    transition: transform 0.3s ease;
}

.profile-pic:hover {
    transform: scale(1.05);
}

.name-section {
    text-align: left;
}

.name-section .name {
    margin-bottom: 8px;
}

.name-section .title {
    margin-bottom: 0;
}

.name {
    font-size: 4em;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 10px;
    letter-spacing: -1px;
    animation: fadeInUp 1s ease-out;
}

.title {
    font-size: 1.5em;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.subtitle {
    font-size: 1.2em;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.cta-primary {
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--accent-strong) 0%, var(--accent) 100%);
    color: var(--accent-on);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(20, 20, 42, 0.2);
    border: 2px solid transparent;
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(20, 20, 42, 0.3);
}

.cta-secondary {
    padding: 15px 30px;
    background: transparent;
    color: var(--accent);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1em;
    border: 2px solid var(--accent);
    transition: all 0.3s ease;
}

.cta-secondary:hover {
    background: var(--cta-ghost-hover);
    transform: translateY(-2px);
}

/* ============================================
   About Section
   ============================================ */
.about-section {
    padding: 64px 0;
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.about-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 56px;
    align-items: start;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    color: var(--accent);
    font-size: 0.8em;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.about-copy h2 {
    max-width: 760px;
    margin-bottom: 18px;
    color: var(--text-strong);
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    line-height: 1.12;
    font-weight: 700;
}

.about-copy p {
    max-width: 760px;
    color: var(--text-muted);
    font-size: 1.02em;
    line-height: 1.8;
}

.about-traits {
    display: grid;
    gap: 14px;
}

.about-trait {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 14px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    line-height: 1.6;
}

.about-trait:first-child {
    padding-top: 4px;
}

.about-trait:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.about-trait i {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    background: var(--surface);
    border: 1px solid var(--border);
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--floating-tint-a), var(--floating-tint-b));
    animation: float 20s ease-in-out infinite;
}

.shape-1 {
    width: 200px;
    height: 200px;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    animation-delay: -5s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    animation-delay: -10s;
}

/* ============================================
   Projects Section — Timeline Layout
   ============================================ */
.projects {
    padding: 80px 0;
    background: var(--bg-soft);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

/* ============================================
   Projects Section (projects.html)
   ============================================ */
.projects-section {
    padding: 100px 0 40px;
    background: var(--bg);
    min-height: calc(100vh - 80px);
}

/* ============================================
   Blog Filters
   ============================================ */
.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 48px 0 0;
}

.filter-btn {
    padding: 7px 18px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ============================================
   Blogs Section (blogs.html)
   ============================================ */
.blogs-section {
    padding: 100px 0 40px; /* top clears fixed navbar */
    background: var(--bg-soft);
}

/* ============================================
   Subscribe Section
   ============================================ */
.subscribe-section {
    padding: 80px 0;
    background: var(--bg);
}

.subscribe-card {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
    padding: 48px 40px;
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.subscribe-icon {
    font-size: 2em;
    color: var(--accent);
    margin-bottom: 16px;
}

.subscribe-card h2 {
    font-size: 1.6em;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 10px;
}

.subscribe-card p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 28px;
    font-size: 0.95em;
}

.subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.subscribe-input-group {
    display: flex;
    gap: 10px;
}

.subscribe-input-group input[type="email"] {
    flex: 1;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 0.95em;
    outline: none;
    transition: border-color 0.2s ease;
}

.subscribe-input-group input[type="email"]:focus {
    border-color: var(--accent);
}

.subscribe-btn {
    padding: 12px 20px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-strong) 0%, var(--accent) 100%);
    color: #fff;
    border: none;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.subscribe-btn:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}

.subscribe-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.subscribe-note {
    font-size: 0.78em;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 0 !important;
}

.subscribe-success {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #28a745;
    font-weight: 500;
    font-size: 0.95em;
}

.subscribe-success.visible {
    display: flex;
}

/* ============================================
   Timeline — 3-column grid layout
   date (200px) | dot-track (56px) | content (1fr)
   ============================================ */

.timeline-title {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 48px;
    padding-top: 10px;
}

.timeline-container {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}

/* Vertical line — sits in the centre of the dot-track column */
.timeline-container::before {
    content: '';
    position: absolute;
    top: 8px;
    /* 200px date col + 28px (half of 56px dot col) */
    left: 228px;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent) 0%, var(--border) 100%);
    border-radius: 1px;
}

/* Each row */
.timeline-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    margin-bottom: 48px;
    transition: opacity 0.2s ease;
    width: 100%;
}

.timeline-item:hover {
    opacity: 1;
}

/* Column 1: date */
.timeline-date {
    order: 1; /* Force to be first visually */
    flex: 0 0 200px; /* Fixed width 200px */
    text-align: right;
    padding-right: 20px;
    padding-top: 2px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8em;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* Column 2: dot (centred over the vertical line) */
.timeline-dot {
    order: 2; /* Force to be second visually */
    flex: 0 0 56px; /* Fixed width 56px */
    display: flex;
    justify-content: center;
    position: relative;
    margin-top: 3px;
    z-index: 2;
}

.timeline-dot::after {
    content: '';
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--surface);
    border: 2.5px solid var(--accent);
    box-shadow: 0 0 0 3px rgba(53, 122, 189, 0.12);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.timeline-item:hover .timeline-dot::after {
    transform: scale(1.25);
    border-color: var(--accent-strong);
    box-shadow: 0 0 0 4px rgba(53, 122, 189, 0.2), 0 4px 12px rgba(53, 122, 189, 0.3);
}

/* Column 3: content */
.timeline-body {
    order: 3; /* Force to be third visually */
    flex: 1; /* Takes remaining space */
    padding-left: 20px;
    padding-bottom: 8px;
}

.timeline-body h3 {
    font-size: 1.15em;
    color: var(--text-strong);
    margin-bottom: 8px;
    font-weight: 600;
    line-height: 1.45;
}

.project-short-desc {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.93em;
    margin: 0;
}


.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-strong);
}

.project-icon {
    font-size: 3em;
    color: var(--accent);
    margin-bottom: 20px;
}

.project-card h3 {
    font-size: 1.4em;
    color: var(--text-strong);
    margin-bottom: 15px;
    font-weight: 600;
}

.project-card p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.project-tech span {
    background: linear-gradient(135deg, var(--accent-strong) 0%, var(--accent) 100%);
    color: var(--accent-on);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
    border: 1px solid transparent;
}

/* ============================================
   Dual-Sided History Timeline (Home Page)
   ============================================ */
.dual-timeline-section {
    padding: 64px 0 80px;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

.dual-timeline-section::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -100px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle at center, rgba(30, 144, 255, 0.08) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

[data-theme="dark"] .dual-timeline-section::before {
    background: radial-gradient(circle at center, rgba(30, 144, 255, 0.05) 0%, transparent 60%);
}

.dt-title {
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-strong);
    position: relative;
    z-index: 1;
}

.dt-subtitle {
    font-size: 0.95em;
    color: var(--text-muted);
    margin-bottom: 42px;
    position: relative;
    z-index: 1;
}

.dual-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-top: 20px;
}

.dual-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    background-color: #d8d8d8;
    z-index: 0;
}

[data-theme="dark"] .dual-timeline::before {
    background-color: #444;
}

.dual-timeline.flat-grid {
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    grid-auto-rows: minmax(70px, auto);
    gap: 10px 0;
}

.dt-year-marker {
    background-color: var(--bg);
    color: #999;
    font-size: 0.85em;
    font-weight: 500;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: start;
    padding: 8px 0;
}

.dt-left-card {
    justify-self: end;
    margin-right: 30px;
}

.dt-right-card {
    justify-self: start;
    margin-left: 30px;
}

.dt-card {
    padding: 16px 20px;
    border-radius: 4px;
    color: #ffffff;
    width: 100%;
    max-width: 380px;
    position: relative;
    margin-bottom: 4px;
}

.dt-card h4 {
    font-size: 1em;
    font-weight: 500;
    margin-bottom: 4px;
    color: #ffffff;
}

.dt-card p {
    font-size: 0.85em;
    opacity: 0.9;
    margin: 0;
}

.dt-card-date {
    display: none;
    font-size: 0.8em;
    font-weight: 600;
    margin-bottom: 6px;
    opacity: 0.9;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}



/* Specific Card Colors */
.card-red { background-color: #c9343f; }
.card-purple { background-color: #6b5cd1; }
.card-teal { background-color: #017a9a; }
.card-green { background-color: #3e7b57; }
.card-pink { background-color: #c8376f; }

.card-tall {
    min-height: 250px;
}

@media (max-width: 768px) {
    .dual-timeline::before {
        display: block;
        left: 16px;
        transform: none;
    }
    .dual-timeline.flat-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding-left: 36px;
        position: relative;
    }
    .dt-year-marker {
        display: none;
    }
    .dt-left-card, .dt-right-card {
        margin: 0;
        max-width: 100%;
        width: 100%;
    }
    .dt-card {
        position: relative;
    }
    .dt-card::before {
        content: '';
        position: absolute;
        top: 22px;
        left: -26px; /* Centered perfectly on the 16px vertical line */
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background-color: var(--surface);
        border: 3px solid var(--accent);
        box-shadow: 0 0 0 3px rgba(53, 122, 189, 0.12);
        z-index: 2;
    }
    .dt-card-date {
        display: block;
    }
}


.project-title-link {
    color: var(--text-strong);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}

.project-title-link:hover {
    color: var(--accent);
}

.project-title-link .fa-github {
    font-size: 0.85em;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.project-title-link:hover .fa-github {
    color: var(--accent);
}

/* ============================================
   Social Panel
   ============================================ */
.social-panel {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 10;
}

/* ============================================
   Blog List — Chronological Layout
   ============================================ */
.blog-list {
    list-style: none;
    padding: 0;
    margin: 48px 0 0;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.blog-entry {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 0 32px;
    padding: 32px 0;
    border-bottom: 1px solid var(--border);
    transition: opacity 0.2s ease;
    align-items: start;
}

.blog-entry:last-child {
    border-bottom: none;
}

.blog-entry-date {
    padding-top: 4px;
    text-align: right;
}

.blog-entry-date time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78em;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.blog-entry-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.blog-entry-title {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.blog-title-link {
    color: var(--text-strong);
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
}

.blog-title-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.25s ease;
}

.blog-title-link:hover {
    color: var(--accent);
}

.blog-title-link:hover::after {
    width: 100%;
}

.blog-entry.featured .blog-title-link {
    color: var(--accent);
}

.blog-entry-excerpt {
    font-size: 0.93em;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

.blog-entry-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.blog-category-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78em;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.blog-category-tag i {
    color: var(--accent);
    font-size: 0.9em;
}

.blog-featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72em;
    font-weight: 600;
    color: var(--accent);
    background: rgba(53, 122, 189, 0.1);
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.blog-featured-badge i {
    font-size: 0.85em;
}

.social-link {
    color: var(--accent);
    font-size: 1.5em;
    text-decoration: none;
    padding: 12px;
    border-radius: 50%;
    background: var(--social-bg);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.social-link:hover {
    color: var(--text-strong);
    background: var(--social-bg-hover);
    transform: scale(1.05);
    box-shadow: 0 4px 15px var(--shadow-strong);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(90deg);
    }
    50% {
        transform: translateY(-40px) rotate(180deg);
    }
    75% {
        transform: translateY(-20px) rotate(270deg);
    }
}


/* ============================================
   Skills Section
   ============================================ */
.skills-section {
    padding: 64px 0 80px;
    background: var(--bg-soft);
    position: relative;
}

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

.skills-category {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skills-category:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
}

.skills-category h3 {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-strong);
    display: flex;
    align-items: center;
    gap: 8px;
}

.skills-category h3 i {
    color: var(--accent);
}

.skills-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skills-chips span {
    background: var(--skills-chip-bg);
    color: var(--skills-chip-text);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.skills-chips span:hover {
    background: var(--accent);
    color: var(--accent-on);
    border-color: transparent;
    transform: scale(1.05);
}

/* ============================================
   Project Tags
   ============================================ */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.project-tag {
    font-size: 0.72em;
    font-weight: 500;
    color: var(--accent);
    background: rgba(53, 122, 189, 0.08);
    border: 1px solid rgba(53, 122, 189, 0.15);
    padding: 3px 10px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

[data-theme="dark"] .project-tag {
    background: rgba(90, 163, 230, 0.08);
    border-color: rgba(90, 163, 230, 0.15);
}

/* ============================================
   Blog Post Detail Page
   ============================================ */
.blog-post-section {
    padding: 120px 0 80px;
    background: var(--bg);
}

.blog-post-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.blog-post-header {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 30px;
}

.blog-post-meta-top {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.blog-post-title {
    font-size: 2.5em;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-strong);
    margin-bottom: 20px;
}

.blog-post-meta-bottom {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.85em;
    color: var(--text-muted);
}

.blog-post-content {
    font-size: 1.1em;
    line-height: 1.8;
    color: var(--text);
}

.blog-post-content p {
    margin-bottom: 24px;
}

.blog-post-content h2 {
    font-size: 1.6em;
    font-weight: 600;
    margin: 40px 0 16px;
    color: var(--text-strong);
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.blog-post-content h3 {
    font-size: 1.25em;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--text-strong);
}

.blog-post-content ul, .blog-post-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.blog-post-content li {
    margin-bottom: 8px;
}

.blog-post-content pre {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    margin-bottom: 24px;
}

.blog-post-content code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
}

.blog-post-content blockquote {
    border-left: 4px solid var(--accent);
    background: var(--bg-soft);
    padding: 16px 24px;
    margin: 0 0 24px 0;
    font-style: italic;
    color: var(--text-muted);
}

.back-to-blogs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    margin-top: 40px;
    transition: color 0.2s ease;
}

.back-to-blogs:hover {
    color: var(--accent-strong);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .navbar {
        padding: 10px 0;
    }

    .nav-container {
        padding: 0 20px;
    }

    .nav-links {
        gap: 20px;
    }

    .hero {
        padding: 96px 0 54px;
        min-height: auto;
    }

    .profile-section {
        flex-direction: column;
        gap: 20px;
    }

    .profile-pic {
        width: 120px;
        height: 120px;
    }

    .name-section {
        text-align: center;
    }

    .name {
        font-size: 2.5em;
    }

    .title {
        font-size: 1.2em;
    }

    .subtitle {
        font-size: 1em;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-primary, .cta-secondary {
        width: 200px;
        text-align: center;
    }

    .projects {
        padding: 60px 0;
    }

    .about-section {
        padding: 48px 0;
    }

    .about-layout {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .about-copy h2 {
        font-size: 2rem;
    }

    .about-trait {
        grid-template-columns: 38px 1fr;
        gap: 12px;
    }

    .about-trait i {
        width: 38px;
        height: 38px;
    }

    .dual-timeline-section {
        padding: 48px 0 72px;
    }

    .container {
        padding: 0 20px;
    }

    .projects h2 {
        font-size: 2em;
        margin-bottom: 40px;
    }

    .projects-grid, .skills-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .social-panel {
        right: 20px;
        flex-direction: row;
        top: auto;
        bottom: 30px;
        transform: none;
        gap: 15px;
    }

    .dual-timeline-section {
        padding-bottom: 132px;
    }

    .floating-shape {
        display: none;
    }
}

@media (max-width: 480px) {
    .nav-brand {
        font-size: 1.3em;
    }

    .nav-links {
        gap: 15px;
    }

    .name {
        font-size: 2em;
    }

    .hero-content {
        padding: 0 15px;
    }

    .projects h2 {
        font-size: 1.8em;
    }

    .social-panel {
        bottom: 20px;
        right: 15px;
        gap: 12px;
    }

    .social-link {
        padding: 10px;
        font-size: 1.3em;
    }


    .theme-toggle {
        width: 32px;
        height: 32px;
        font-size: 0.85em;
    }
}

@media (hover: none), (pointer: coarse) {
    .cursor-dot,
    .cursor-ring {
        display: none !important;
    }

    body {
        cursor: auto;
    }
}

/* ============================================
   CLI Intro — themed to match the page
   ============================================ */
.cli-intro {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: var(--cli-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, background-color 0.25s ease;
}

body.intro-active .cli-intro {
    opacity: 1;
    pointer-events: auto;
}

.cli-intro.fading {
    opacity: 0;
}

.cli-window {
    width: min(720px, 92vw);
    border-radius: 10px;
    overflow: hidden;
    background: var(--cli-bg);
    border: 1px solid var(--cli-border);
    box-shadow: var(--cli-shadow);
}

.cli-titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--cli-titlebar);
}

.cli-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.cli-dot-r { background: #ff5f57; }
.cli-dot-y { background: #febc2e; }
.cli-dot-g { background: #28c840; }

.cli-title {
    margin-left: auto;
    color: var(--cli-title);
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    font-size: 0.8rem;
}

.cli-body {
    padding: 22px 24px 28px;
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--cli-text);
    min-height: 220px;
    background: var(--cli-bg);
}

.cli-line {
    white-space: pre-wrap;
    word-break: break-word;
}

.cli-prompt {
    color: var(--cli-prompt);
    margin-right: 8px;
}

.cli-caret {
    color: var(--cli-prompt);
    margin-left: 2px;
}

.cli-caret-blink {
    animation: caretBlink 1s steps(2) infinite;
}

.cli-output .cli-line .cli-prompt {
    color: var(--cli-output);
}

@keyframes caretBlink {
    50% { opacity: 0; }
}

/* Hide the hero while the intro plays, and pause its stagger
   so it re-runs from t=0 when the intro ends. */
body.intro-active .hero {
    opacity: 0;
    visibility: hidden;
}

body.intro-active .name,
body.intro-active .title,
body.intro-active .subtitle {
    animation-play-state: paused;
    opacity: 0;
}

/* Reduced motion: skip the intro entirely. */
@media (prefers-reduced-motion: reduce) {
    .cli-intro {
        display: none !important;
    }
    body.intro-active .hero {
        opacity: 1;
        visibility: visible;
    }
    body.intro-active .name,
    body.intro-active .title,
    body.intro-active .subtitle {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 480px) {
    .cli-body {
        font-size: 0.85rem;
        padding: 18px 18px 22px;
        min-height: 200px;
    }
    .cli-title {
        font-size: 0.7rem;
    }
}

/* ============================================
   Responsive — Blog List & Timeline
   ============================================ */
@media (max-width: 768px) {
    /* Blog list: stack date above content */
    .blog-entry {
        grid-template-columns: 1fr;
        gap: 6px 0;
        padding: 24px 0;
    }

    .blog-entry-date {
        text-align: left;
        padding-top: 0;
    }

    /* Timeline: collapse to single column */
    .timeline-container::before {
        left: 8px;
    }

    .timeline-item {
        display: block;
        position: relative;
        padding-left: 32px;
        margin-bottom: 36px;
        width: 100%;
    }

    .timeline-dot {
        position: absolute;
        left: 0;
        top: 4px;
        width: 16px;
        height: 16px;
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 2;
        margin: 0;
    }

    .timeline-date {
        display: block;
        text-align: left;
        padding: 0;
        margin-bottom: 6px;
        font-size: 0.85em;
        color: var(--accent);
    }

    .timeline-body {
        padding: 0;
        margin: 0;
        width: 100%;
    }

    /* Blog post detail responsive */
    .blog-post-section {
        padding-top: 100px;
    }
    .blog-post-title {
        font-size: 2em;
    }
    .blog-post-content {
        font-size: 1em;
    }
}
