﻿*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #fef1e4;
  --surface: #fff8f1;
  --border: #ead8c6;
  --border-strong: #d8bfa6;
  --text-primary: #050505;
  --text-secondary: #2d2d2d;
  --text-tertiary: #555555;
  --accent: #2563eb;
  --accent-light: #edf4ff;
  --accent-hover: #1d4ed8;
  --particle-color: #744700;
  --tag-bg: #f8e5d2;
  --tag-text: #1f1f1f;
  --cert-bg: #edf4ff;
  --cert-text: #1e40af;
  --radius: 10px;
  --radius-sm: 6px;
}

[data-theme="dark"] {
  --bg: #111110;
  --surface: #1a1917;
  --border: #2a2826;
  --border-strong: #3a3835;
  --text-primary: #f0ede8;
  --text-secondary: #9a9690;
  --text-tertiary: #5a5855;
  --accent: #5b8dee;
  --accent-light: #1a2340;
  --accent-hover: #7aa6f2;
  --particle-color: #5b8dee;
  --tag-bg: #232220;
  --tag-text: #c0bdb8;
  --cert-bg: #151d30;
  --cert-text: #7aabf0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}

/* for skip to main transition */
.skip-to-main {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  z-index: 9999;
  font-size: 14px;
  font-weight: 500;
}

.skip-to-main:focus {
  top: 0;
}

/* to focus on the visibility styles */
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.nav-links a:focus-visible,
.nav-logo:focus-visible,
.theme-toggle:focus-visible,
#sound-toggle:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -2px;
}

/* scroll progress bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent);
  z-index: 200;
  transition: width 0.1s linear;
}

/* nav bar */
nav {
  position: fixed;
  top: 16px;
  left: clamp(1rem, 4vw, 4rem);
  right: clamp(1rem, 4vw, 4rem);
  z-index: 100;
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 1rem;
  pointer-events: none;
}

.nav-logo {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.38);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--accent);
  text-decoration: none;
  pointer-events: auto;
  transition: transform 0.15s, border-color 0.15s, background 0.2s;
}

[data-theme="dark"] .nav-logo {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(17, 17, 16, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.nav-logo:hover {
  border-color: rgba(91, 141, 238, 0.55);
  transform: translateY(-1px);
}

.nav-links {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  min-height: 54px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  pointer-events: auto;
}

[data-theme="dark"] .nav-links {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(17, 17, 16, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.nav-links a {
  font-size: 14px;
  color: var(--text-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 19px;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s, transform 0.15s;
}

.nav-links a:hover {
  color: var(--accent);
  background: rgba(91, 141, 238, 0.12);
  transform: translateY(-1px);
}

.nav-controls {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  pointer-events: auto;
}

.theme-toggle,
#sound-toggle {
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  color: #050505;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.38);
  transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.15s;
  flex-shrink: 0;
}

[data-theme="dark"] .theme-toggle,
[data-theme="dark"] #sound-toggle {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(17, 17, 16, 0.78);
  color: #fef1e4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.theme-toggle:hover,
#sound-toggle:hover {
  border-color: rgba(5, 5, 5, 0.22);
  color: #050505;
  background: rgba(5, 5, 5, 0.06);
  transform: translateY(-1px);
}

[data-theme="dark"] .theme-toggle:hover,
[data-theme="dark"] #sound-toggle:hover {
  border-color: rgba(254, 241, 228, 0.28);
  color: #fef1e4;
  background: rgba(254, 241, 228, 0.08);
}

.theme-toggle svg { width: 20px; height: 20px; transition: transform 0.4s ease; }
.theme-toggle:active svg { transform: rotate(30deg); }

#sound-toggle svg { width: 20px; height: 20px; }

/* overall layout */
main { padding-top: 88px; }
section { padding: 5rem clamp(1.5rem, 8vw, 8rem); }

.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 2rem;
}

/* hero */
#hero {
  min-height: calc(100vh - 58px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 4rem;
  padding-bottom: 4rem;
  position: relative;
  overflow: hidden;
}

/* hero's canvas */
#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}

/* Secondary-page shooting-star canvases */
#blogs,
#github-journey {
  position: relative;
  overflow: hidden;
}

#blogs-canvas,
#github-journey-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}

#blogs > :not(#blogs-canvas),
#github-journey > :not(#github-journey-canvas) {
  position: relative;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

h1 span { font-weight: 500; }

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 560px;
  margin-bottom: 2.5rem;
  font-weight: 300;
}

/* for typing cursor effect */
.typing-cursor {
  animation: blink 0.7s step-end infinite;
}

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

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--text-primary);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn-primary:hover { background: #333; transform: translateY(-1px); }

[data-theme="dark"] .btn-primary {
  background: var(--accent);
  color: #fff;
}

[data-theme="dark"] .btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, transform 0.1s;
}

.btn-secondary:hover { border-color: var(--text-secondary); color: var(--text-primary); transform: translateY(-1px); }

.hero-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.hero-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.15s;
}

.hero-link:hover { color: var(--text-primary); }
.hero-link svg { width: 15px; height: 15px; }

/* the dividers */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* for project cards */
#projects { background: var(--surface); }

/* project filter bar */
.filter-bar {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 5px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.filter-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

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

/* hidden project card filter */
.project-card.hidden {
  opacity: 0;
  transform: scale(0.97);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

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

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--bg);
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.project-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  font-size: 18px;
}

.project-icon img {
  width: 22px;
  height: 22px;
  display: block;
}

.project-card h3 {
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.project-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1.25rem;
  font-weight: 300;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1.25rem;
}

.tag {
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 9px;
  background: var(--tag-bg);
  color: var(--tag-text);
  border-radius: 20px;
  font-family: 'DM Mono', monospace;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: gap 0.15s;
}

.project-link:hover { gap: 8px; }
.project-link svg { width: 13px; height: 13px; }

/* project card expander */
.card-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.project-card[data-expanded="true"] .card-detail {
  max-height: 400px;
}

/* skills */
#skills { background: var(--bg); }

.skills-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.skills-group { margin-bottom: 2rem; }

.skills-group h3 {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
}

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

.chip {
  font-size: 13px;
  padding: 5px 13px;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  background: var(--surface);
  font-weight: 400;
}

.certifications-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.cert-badge {
  font-size: 11px;
  font-weight: 500;
  font-family: 'DM Mono', monospace;
  padding: 3px 8px;
  background: var(--cert-bg);
  color: var(--cert-text);
  border-radius: 4px;
  white-space: nowrap;
}

.cert-name {
  font-size: 13.5px;
  color: var(--text-secondary);
  font-weight: 300;
}

/* education section and the timeline effect */
#education { background: var(--surface); }

.timeline {
  position: relative;
  padding-left: 1.75rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--border);
}

.timeline-entry {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-entry:last-child { padding-bottom: 0; }

.timeline-marker {
  position: absolute;
  left: -1.75rem;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--accent);
  transform: translateX(-4px);
}

.timeline-date {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
  font-family: 'DM Mono', monospace;
}

.timeline-institution {
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.timeline-qualification {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.timeline-highlight {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 300;
  line-height: 1.6;
  max-width: 560px;
}


/* contact section */
#contact { background: var(--surface); }

.contact-inner { max-width: 540px; }

.contact-inner h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.contact-inner h2 span { font-weight: 500; }

.contact-inner p {
  font-size: 14.5px;
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 2rem;
  line-height: 1.65;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

.contact-row:hover { color: var(--text-primary); }

.contact-icon {
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  flex-shrink: 0;
}

.contact-icon svg { width: 16px; height: 16px; }

/* the footer */
footer {
  padding: 2rem clamp(1.5rem, 8vw, 8rem);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

footer p {
  font-size: 12.5px;
  color: var(--text-tertiary);
  font-weight: 300;
}

/* fade-in effect */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease, border-color 0.15s;
  will-change: opacity, transform;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

.blog-card,
.repo-timeline-entry,
.repo-detail {
  will-change: opacity, transform;
}

/* adding responsiveness */
@media (max-width: 700px) {
  .skills-layout { grid-template-columns: 1fr; }

  nav {
    top: 12px;
    left: 0.85rem;
    right: 0.85rem;
    grid-template-columns: 44px 1fr auto;
    gap: 0.55rem;
  }

  .nav-logo,
  .theme-toggle,
  #sound-toggle {
    width: 44px;
    height: 44px;
  }

  .nav-controls { gap: 6px; }

  .nav-links {
    min-height: 44px;
    gap: 0.1rem;
    padding: 4px;
  }

  .nav-links a {
    min-height: 34px;
    padding: 0 9px;
    font-size: 12.5px;
  }

  main { padding-top: 78px; }
}

@media (max-width: 520px) {
  nav {
    grid-template-columns: 44px auto;
    grid-template-areas:
      "logo controls"
      "links links";
  }

  .nav-logo { grid-area: logo; }
  .nav-controls { grid-area: controls; }
  .nav-links {
    grid-area: links;
    justify-self: center;
    margin-top: 0.35rem;
  }

  main { padding-top: 124px; }
}

/* back-to-top button */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, border-color 0.15s, color 0.15s, background 0.15s;
  z-index: 99;
}

#back-to-top svg {
  width: 16px;
  height: 16px;
}

#back-to-top:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
  background: var(--tag-bg);
}

#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

/* for custom cursor which i still have not added yet because i still dont't know what should i use for the custom cursor... */
#custom-cursor {
  position: fixed;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  mix-blend-mode: difference;
  transition: transform 0.1s ease;
  z-index: 9999;
}

#custom-cursor.cursor-hover {
  transform: scale(2.5);
}

/* for the certifiction gird */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.cert-badge-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.cert-badge-card .cert-badge {
  align-self: flex-start;
}

.cert-badge-card .cert-name {
  flex: 1;
}

.cert-badge-card a {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.15s;
}

.cert-badge-card a:hover { opacity: 0.75; }

/* the about section */
.about-inner {
  max-width: 620px;
}

.about-inner p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-weight: 300;
  line-height: 1.7;
}

.about-inner p:last-child { margin-bottom: 0; }

.about-link {
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s;
}

.about-link:hover { opacity: 0.8; }

/* My blog page */
.page-intro {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.page-intro h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.page-intro p {
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.7;
}

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 720px;
}

.blog-card {
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.15s;
}

.blog-card:hover { border-color: var(--border-strong); }

.blog-meta {
  font-family: 'DM Mono', monospace;
  font-size: 11.5px;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.blog-card h2 {
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 0.65rem;
  color: var(--text-primary);
}

.blog-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  font-weight: 300;
}

.blog-card p + p { margin-top: 0.65rem; }

.blog-back {
  margin-top: 2.5rem;
  max-width: 720px;
}

.nav-links a.is-active {
  color: var(--accent);
  background: rgba(91, 141, 238, 0.12);
}

/* sound toggle button (mute state) */
#sound-toggle.sound-muted {
  opacity: 0.55;
}

/* card toggle button */
.card-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 0.75rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.15s;
}

.card-toggle:hover { opacity: 0.75; }

.card-detail {
  margin-top: 0.75rem;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.card-detail p { margin-bottom: 0.5rem; }
.card-detail p:last-child { margin-bottom: 0; }
.card-detail strong { color: var(--text-primary); font-weight: 500; }

/* GitHub journey timeline page */
#github-journey { background: var(--bg); }

.github-journey-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.github-timeline-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
}

.github-timeline-scroll::-webkit-scrollbar { height: 5px; }
.github-timeline-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.github-timeline {
  display: flex;
  align-items: stretch;
  min-width: max-content;
  padding: 2rem 1.5rem 1rem;
}

.github-timeline::before {
  top: 2.45rem;
  right: 1.5rem;
  bottom: auto;
  left: 1.5rem;
  width: auto;
  height: 1px;
}

.repo-timeline-entry {
  display: block;
  flex: 0 0 220px;
  min-height: 130px;
  padding: 2rem 1rem 0.5rem;
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: opacity 0.15s;
  scroll-snap-align: start;
}

.github-timeline .timeline-marker {
  left: 1rem;
  top: 0.45rem;
  border-color: var(--bg);
  transform: translateX(-50%);
}

.repo-timeline-entry:hover .timeline-institution {
  color: var(--accent);
}

.repo-timeline-entry.is-active .timeline-marker {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .repo-timeline-entry.is-active .timeline-marker {
  box-shadow: 0 0 0 3px rgba(91, 141, 238, 0.25);
}

.repo-timeline-entry.is-active .timeline-institution {
  color: var(--accent);
}

.repo-type-badge {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 10px;
  font-family: 'DM Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.repo-type-badge.personal { color: var(--accent); }
.repo-type-badge.collaborative { color: #7c3aed; }

[data-theme="dark"] .repo-type-badge.collaborative { color: #a78bfa; }

.timeline-year-divider {
  position: relative;
  z-index: 1;
  flex: 0 0 4rem;
  align-self: flex-start;
  margin: 0;
  padding: 0;
  background: var(--bg);
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  text-align: center;
  transform: translateY(-0.65rem);
}

.repo-detail {
  position: static;
  min-height: 280px;
}

.repo-detail-placeholder {
  color: var(--text-tertiary);
  font-weight: 300;
  font-size: 14px;
}

.repo-detail h2 {
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 0.65rem;
  color: var(--text-primary);
}

.repo-short {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.65;
  font-weight: 300;
  margin-bottom: 1rem;
}

.repo-about p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  font-weight: 300;
}

.repo-about p + p { margin-top: 0.65rem; }

.repo-detail .project-link { margin-top: 1.25rem; }

@media (max-width: 900px) {
  .github-timeline-scroll {
    margin-right: -1.5rem;
    padding-right: 1.5rem;
  }

  .repo-timeline-entry {
    flex-basis: min(72vw, 220px);
  }
}
