/* ========== Font Import ========== */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap');

/* ========== Reset & Variables ========== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Color System */
  --bg-primary: #0F172A;
  --bg-secondary: #1E293B;
  --bg-card: #1E293B;
  --bg-tertiary: #334155;
  --border: #334155;
  --border-hover: #475569;
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --accent: #22C55E;
  --accent-hover: #16A34A;
  --accent-subtle: rgba(34, 197, 94, 0.1);
  --accent-border: rgba(34, 197, 94, 0.25);
  --red: #EF4444;
  --shadow: rgba(0, 0, 0, 0.25);
  --shadow-hover: rgba(0, 0, 0, 0.4);
  --shadow-accent: rgba(34, 197, 94, 0.15);

  /* Typography */
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Spacing */
  --nav-height: 64px;
  --container-max: 1100px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ========== Navigation ========== */
.nav {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  z-index: 100;
  padding: 0.75rem 0;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.nav.scrolled {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: rgba(51, 65, 85, 0.5);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.5px;
  transition: opacity 0.2s ease;
}

.nav-logo:hover {
  opacity: 0.8;
}

.logo-name {
  color: var(--accent);
  font-weight: 600;
}

.logo-dot {
  color: var(--text-muted);
  font-weight: 400;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ========== Hero ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(34, 197, 94, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 60%, rgba(56, 189, 248, 0.03) 0%, transparent 55%),
    var(--bg-primary);
}

/* Decorative Background Shapes */
.hero-bg-shapes {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
}

.bg-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}

.bg-circle-1 {
  width: 500px;
  height: 500px;
  top: -150px;
  right: 5%;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.06), transparent 70%);
  animation: float 20s ease-in-out infinite;
}

.bg-circle-2 {
  width: 400px;
  height: 400px;
  bottom: 5%;
  left: -5%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.04), transparent 70%);
  animation: float 25s ease-in-out infinite reverse;
}

.bg-square {
  position: absolute;
  width: 200px;
  height: 200px;
  top: 50%;
  right: 15%;
  border: 1px solid rgba(34, 197, 94, 0.06);
  border-radius: 20px;
  transform: rotate(45deg);
  animation: rotate 40s linear infinite;
}

.bg-dots {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, -20px); }
}

@keyframes rotate {
  from { transform: rotate(45deg); }
  to { transform: rotate(405deg); }
}

/* Hero Content Layout */
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  width: 100%;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
  margin: 0 auto;
}

.hero-greeting {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.25rem;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.hero-name {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -1.5px;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
  line-height: 1.1;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.1s forwards;
}

.hero-title {
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.2s forwards;
}

.hero-description {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.3s forwards;
}

.hero-impacts {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.35s forwards;
}

.hero-impacts li {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-left: 1rem;
  border-left: 2px solid var(--accent-border);
  transition: border-color 0.2s ease;
}

.hero-impacts li:hover {
  border-color: var(--accent);
}

.impact-label {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}

.impact-result {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 600;
  font-family: var(--font-mono);
}

.hero-contact {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-start;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.45s forwards;
}

.hero-contact-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  font-size: 0.875rem;
}

.hero-contact-link:hover {
  color: var(--accent);
  transform: translateX(2px);
}

.hero-contact-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.hero-contact-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Right Column */
.hero-right {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Metrics Cards */
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.metric-card {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  opacity: 0;
  animation: fadeInRight 0.6s ease forwards;
}

.metric-card:nth-child(1) { animation-delay: 0.3s; }
.metric-card:nth-child(2) { animation-delay: 0.4s; }
.metric-card:nth-child(3) { animation-delay: 0.5s; }

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(34, 197, 94, 0.1);
  border-color: var(--accent-border);
}

.metric-card:hover::before {
  opacity: 1;
}

.metric-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
  line-height: 1;
  margin-bottom: 0.5rem;
  letter-spacing: -1px;
}

.metric-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Expertise Tags */
.hero-expertise {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  opacity: 0;
  animation: fadeInUp 0.6s ease 0.6s forwards;
}

.expertise-tag {
  display: inline-block;
  padding: 0.5rem 1.15rem;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  border-radius: 20px;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--accent);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
}

.expertise-tag:hover {
  background: rgba(34, 197, 94, 0.15);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--shadow-accent);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ========== Journey Timeline ========== */
.journey-intro {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 3rem;
  max-width: 600px;
}

.journey-timeline {
  position: relative;
  padding: 2rem 0;
  overflow: visible;
}

/* Center vertical line */
.journey-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
  transform: translateX(-50%);
}

.journey-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 3rem;
  width: 100%;
}

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

/* Odd items: content left, logo right */
.journey-item:nth-child(odd) {
  text-align: right;
}

.journey-item:nth-child(odd) .journey-content {
  grid-column: 1;
  padding-right: 3rem;
  justify-self: end;
}

.journey-item:nth-child(odd) .journey-logo {
  grid-column: 2;
  padding-left: 3rem;
}

/* Even items: logo left, content right */
.journey-item:nth-child(even) .journey-logo {
  grid-column: 1;
  padding-right: 3rem;
  justify-self: end;
}

.journey-item:nth-child(even) .journey-content {
  grid-column: 2;
  padding-left: 3rem;
}

/* Timeline dot */
.journey-dot {
  position: absolute;
  top: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--border);
  z-index: 2;
}

/* Current item dot */
.journey-item.current .journey-dot {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
}

/* Content card */
.journey-content {
  max-width: none;
}

/* Current item accent bar */
.journey-item.current .journey-content {
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
}

.journey-item:nth-child(odd).current .journey-content {
  border-left: none;
  border-right: 2px solid var(--accent);
  padding-left: 0;
  padding-right: calc(3rem + 1rem);
}

/* Period badge */
.journey-period {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  margin-bottom: 0.5rem;
}

.journey-item.current .journey-period {
  color: var(--accent);
  background: var(--accent-subtle);
}

.journey-date {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.3px;
}

.journey-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  line-height: 1.4;
}

.journey-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

/* Logo on opposite side */
.journey-logo {
  display: flex;
  align-items: center;
  opacity: 0.7;
  pointer-events: none;
}

.journey-item:nth-child(odd) .journey-logo {
  justify-content: flex-start;
}

.journey-item:nth-child(even) .journey-logo {
  justify-content: flex-end;
}

.journey-logo img {
  display: block;
  width: auto;
  height: 44px;
  object-fit: contain;
}

.journey-highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem 0;
}

.journey-highlights li {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding-left: 0.85rem;
  position: relative;
  margin-bottom: 0.25rem;
}

.journey-highlights li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.journey-item:nth-child(odd) .journey-highlights li {
  padding-left: 0;
  padding-right: 0.85rem;
}

.journey-item:nth-child(odd) .journey-highlights li::before {
  left: auto;
  right: 0;
}

.journey-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.journey-item:nth-child(odd) .journey-tags {
  justify-content: flex-end;
}

.journey-tags span {
  font-size: 0.7rem;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  color: var(--accent);
  border: 1px solid var(--accent-border);
  font-weight: 500;
}

/* ========== Skills Section ========== */
.skills-categories {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.skill-category {
  padding: 0;
}

.skill-category h3 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 1rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: default;
}

.skill-tag svg {
  flex-shrink: 0;
}

.skill-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--shadow);
  border-color: var(--tag-color, var(--accent));
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  border: none;
  font-family: var(--font-sans);
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--accent);
  color: #0F172A;
  font-weight: 600;
  box-shadow: 0 2px 8px var(--shadow-accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.25);
}

.btn-outline {
  border: 1.5px solid var(--border);
  color: var(--text-primary);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-subtle);
  transform: translateY(-2px);
}

/* ========== Sections ========== */
.section {
  padding: 6rem 0;
}

.section-alt {
  background: var(--bg-secondary);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
  color: var(--text-primary);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ========== Projects (card with thumbnail) ========== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--shadow);
}

.project-card:hover {
  box-shadow: 0 12px 40px var(--shadow-hover);
  transform: translateY(-6px);
  border-color: var(--accent-border);
}

.project-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-tertiary);
}

.project-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-thumbnail img {
  transform: scale(1.04);
}

.project-thumbnail-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--text-muted);
  opacity: 0.4;
}

.project-thumbnail-placeholder svg {
  width: 40px;
  height: 40px;
}

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

.project-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  transition: color 0.2s ease;
}

.project-card:hover .project-name {
  color: var(--accent);
}

.project-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-tags span {
  font-size: 0.725rem;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent-border);
  font-weight: 500;
}

.projects-more {
  text-align: center;
  margin-top: 2.5rem;
}

/* ========== Project Detail Page ========== */
.project-detail {
  padding-top: 6rem;
  padding-bottom: 4rem;
  min-height: calc(100vh - 120px);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 2rem;
  transition: color 0.2s ease;
}

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

.back-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.back-link svg {
  width: 18px;
  height: 18px;
}

.project-detail-hero {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
}

.project-detail-hero img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.project-detail-placeholder {
  width: 100%;
  aspect-ratio: 21 / 9;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-muted);
  opacity: 0.4;
}

.project-detail-placeholder svg {
  width: 48px;
  height: 48px;
}

.project-detail-placeholder span {
  font-size: 0.875rem;
}

.project-detail-header {
  margin-bottom: 3rem;
}

.project-detail-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.project-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.project-detail-tags span {
  font-size: 0.775rem;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent-border);
  font-weight: 500;
}

/* Project Detail Content */
.project-detail-content {
  max-width: 800px;
}

.content-section {
  margin-bottom: 3rem;
}

.content-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.content-section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
  color: var(--text-primary);
}

.content-section p {
  font-size: 1.025rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
  max-width: 70ch;
}

.content-section strong {
  color: var(--text-primary);
  font-weight: 600;
}

.content-section a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent-border);
  transition: text-decoration-color 0.2s ease;
}

.content-section a:hover {
  text-decoration-color: var(--accent);
}

/* Remove extra margin from <p> inside <li> (generated by marked) */
.content-section li > p {
  margin-bottom: 0.25rem;
}

.content-section img {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin: 1.5rem 0;
}

.content-section code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-tertiary);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.content-section pre {
  background: #0D1117;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.content-section pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* Lists */
.content-section ul,
.content-section ol {
  margin: 1.25rem 0;
  padding-left: 0;
  line-height: 1.8;
}

.content-section ul {
  list-style: none;
}

.content-section ol {
  list-style: none;
  counter-reset: item;
}

.content-section ul > li {
  position: relative;
  margin: 0.75rem 0;
  padding-left: 2rem;
  color: var(--text-primary);
}

.content-section ul > li::before {
  content: "\2022";
  position: absolute;
  left: 0.5rem;
  color: var(--accent);
  font-weight: 700;
  font-size: 1.2em;
  line-height: 1.4;
}

.content-section ol > li {
  position: relative;
  margin: 0.75rem 0;
  padding-left: 2rem;
  color: var(--text-primary);
  counter-increment: item;
}

.content-section ol > li::before {
  content: counter(item) ".";
  position: absolute;
  left: 0.25rem;
  color: var(--accent);
  font-weight: 700;
  min-width: 1.5rem;
  text-align: left;
}

/* Nested lists */
.content-section ul ul,
.content-section ol ol,
.content-section ul ol,
.content-section ol ul {
  margin: 0.5rem 0;
  padding-left: 0.5rem;
}

.content-section ul ul > li::before {
  content: "\25E6";
  font-size: 1.1em;
}

.content-section ol ol {
  counter-reset: subitem;
}

.content-section ol ol > li {
  counter-increment: subitem;
}

.content-section ol ol > li::before {
  content: counter(subitem, lower-alpha) ".";
}

/* Mermaid diagrams */
.content-section .mermaid {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin: 2rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

.content-section pre.mermaid {
  background: transparent;
  border: none;
  padding: 0;
}

/* Tables */
.content-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.content-section table thead {
  background: rgba(34, 197, 94, 0.08);
}

.content-section table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border);
  font-size: 0.9rem;
}

.content-section table td {
  padding: 0.875rem 1rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.content-section table tbody tr {
  transition: background-color 0.2s ease;
}

.content-section table tbody tr:hover {
  background: rgba(34, 197, 94, 0.04);
}

.content-section table tbody tr:last-child td {
  border-bottom: none;
}

/* Blockquotes */
.content-section blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--accent-subtle);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
}

.content-section blockquote p {
  margin-bottom: 0;
}

/* Horizontal Rule */
.content-section hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
}

/* ========== Contact ========== */
.contact-content {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.contact-text {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-weight: 500;
  color: var(--text-primary);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.contact-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-subtle);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--shadow-accent);
}

.contact-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.contact-link svg {
  width: 20px;
  height: 20px;
}

/* ========== Footer ========== */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-pdf-btn svg {
  width: 14px;
  height: 14px;
}

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

/* ========== Animations ========== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== Responsive ========== */

/* Tablet */
@media (max-width: 1024px) {
  .hero-grid {
    gap: 3rem;
  }

  .hero-metrics {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile */
@media (max-width: 768px) {
  .nav {
    top: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 1rem 2rem 2rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: 0 8px 32px var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  /* Hero Responsive */
  .hero-content {
    text-align: center;
  }

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

  .hero-impacts {
    align-items: center;
  }

  .hero-impacts li {
    max-width: 400px;
    text-align: left;
  }

  .bg-circle-1,
  .bg-circle-2,
  .bg-square {
    display: none;
  }

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

  .section {
    padding: 4rem 0;
  }

  .contact-links {
    flex-direction: column;
    align-items: center;
  }

  .project-detail-header h1 {
    font-size: 1.8rem;
  }

  .content-section pre {
    padding: 1rem;
  }

  /* Journey mobile */
  .journey-timeline::before {
    left: 6px;
    transform: none;
  }

  .journey-item {
    display: block;
    padding-left: 2.5rem;
  }

  .journey-item:nth-child(odd) {
    text-align: left;
  }

  .journey-item:nth-child(odd) .journey-content {
    padding-right: 0;
    justify-self: auto;
  }

  .journey-item:nth-child(even) .journey-content {
    padding-left: 0;
  }

  .journey-dot,
  .journey-item:nth-child(odd) .journey-dot,
  .journey-item:nth-child(even) .journey-dot {
    left: 0;
    transform: none;
    right: auto;
  }

  .journey-item:nth-child(odd) .journey-tags {
    justify-content: flex-start;
  }

  .journey-item:nth-child(odd) .journey-highlights li {
    padding-left: 0.85rem;
    padding-right: 0;
  }

  .journey-item:nth-child(odd) .journey-highlights li::before {
    left: 0;
    right: auto;
  }

  .journey-item.current .journey-content {
    border-left: 2px solid var(--accent);
    padding-left: 1rem;
  }

  .journey-item:nth-child(odd).current .journey-content {
    border-right: none;
    border-left: 2px solid var(--accent);
    padding-right: 0;
    padding-left: 1rem;
  }

  .journey-logo {
    display: none;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .nav-inner {
    padding: 0 1rem;
  }

  .container {
    padding: 0 1.25rem;
  }

  .hero-content {
    padding: 1rem;
  }

  .hero-name {
    font-size: 2.2rem;
    letter-spacing: -1px;
  }

  .hero-description {
    font-size: 0.925rem;
  }

  .hero-contact {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .hero-impacts li {
    font-size: 0.875rem;
  }

  .impact-label {
    font-size: 0.85rem;
  }

  .impact-result {
    font-size: 0.825rem;
  }

  .skill-tag {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
    gap: 0.4rem;
  }

  .skill-tag svg {
    width: 14px;
    height: 14px;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .project-body {
    padding: 1rem 1.25rem;
  }

  .project-detail-header h1 {
    font-size: 1.5rem;
  }
}

/* Extra Small */
@media (max-width: 375px) {
  .hero-name {
    font-size: 1.9rem;
  }

  .expertise-tag {
    font-size: 0.775rem;
    padding: 0.4rem 0.9rem;
  }
}

/* ========== Accessibility ========== */

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }

  .hero-greeting,
  .hero-name,
  .hero-title,
  .hero-description,
  .hero-contact,
  .hero-expertise,
  .metric-card {
    opacity: 1;
    transform: none;
  }
}

/* Focus indicators for keyboard navigation */
.btn:focus-visible,
.nav-toggle:focus-visible,
.project-card:focus-visible,
.contact-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.skill-tag:focus-visible {
  outline: 2px solid var(--tag-color, var(--accent));
  outline-offset: 2px;
}

/* ========== Loading States ========== */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 0px,
    #3B4A63 40px,
    var(--bg-tertiary) 80px
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.skeleton-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-tertiary);
}

.skeleton-body {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.skeleton-title {
  height: 20px;
  width: 60%;
}

.skeleton-desc {
  height: 14px;
  width: 100%;
}

.skeleton-desc:last-child {
  width: 80%;
}

.skeleton-tags {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.skeleton-tag {
  height: 20px;
  width: 50px;
  border-radius: 20px;
}

/* ========== Error States ========== */
.error-container {
  padding: 3rem 2rem;
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.error-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  color: var(--red);
}

.error-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.error-message {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.error-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========== Selection ========== */
::selection {
  background: rgba(34, 197, 94, 0.25);
  color: var(--text-primary);
}

/* ========== Scrollbar ========== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ========== Print Project Details Container ========== */
.print-projects-detail {
  display: none;
}

/* ========== Print Styles ========== */
@media print {
  .print-projects-detail {
    display: block !important;
  }

  .projects-grid {
    display: none !important;
  }

  .print-project {
    page-break-before: always;
    padding: 2rem 0;
  }

  .print-project:first-child {
    page-break-before: avoid;
  }

  .print-project h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1a1a1a !important;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #22C55E !important;
  }

  .print-project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }

  .print-project-tags span {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid #22C55E !important;
    border-radius: 20px;
    color: #16A34A !important;
    background: white !important;
  }

  .print-project .content-section {
    margin-bottom: 2rem;
  }

  .print-project .content-section h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #ccc !important;
  }

  .print-project .content-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
  }

  .print-project .content-section p {
    line-height: 1.6;
    margin-bottom: 0.75rem;
  }

  .print-project .content-section img {
    max-width: 100%;
    border: 1px solid #ddd !important;
    margin: 1rem 0;
  }

  .print-project .content-section code {
    background: #f5f5f5 !important;
    border: 1px solid #ddd !important;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-size: 0.85em;
  }

  .print-project .content-section pre {
    background: #f5f5f5 !important;
    border: 1px solid #ddd !important;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
  }

  .print-project .content-section pre code {
    background: none !important;
    border: none !important;
    padding: 0;
  }

  .print-project .content-section ul,
  .print-project .content-section ol {
    margin: 0.75rem 0;
    padding-left: 0;
  }

  .print-project .content-section ul > li::before {
    color: #16A34A !important;
  }

  .print-project .content-section ol > li::before {
    color: #16A34A !important;
  }

  .print-project .content-section table {
    border: 1px solid #ddd !important;
    margin: 1rem 0;
  }

  .print-project .content-section table th {
    background: #f5f5f5 !important;
    border-bottom: 2px solid #ddd !important;
  }

  .print-project .content-section table td {
    border-bottom: 1px solid #ddd !important;
  }

  *,
  *::before,
  *::after {
    background: white !important;
    color: #1a1a1a !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body {
    font-size: 11pt;
    line-height: 1.5;
  }

  .nav,
  .hero-bg-shapes,
  .hero-scroll,
  .footer-pdf-btn {
    display: none !important;
  }

  .hero {
    min-height: auto;
    padding: 2rem 0;
    page-break-after: avoid;
  }

  .hero-greeting,
  .hero-name,
  .hero-title,
  .hero-description,
  .hero-impacts,
  .hero-contact {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .hero-impacts li {
    border-left-color: #22C55E !important;
  }

  .impact-result {
    color: #16A34A !important;
  }

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

  .section-title::after {
    background: #22C55E !important;
  }

  .journey-timeline::before {
    background: #ccc !important;
  }

  .journey-dot {
    border-color: #ccc !important;
    background: white !important;
  }

  .journey-item.current .journey-dot {
    border-color: #22C55E !important;
    background: #22C55E !important;
  }

  .journey-item.current .journey-content {
    border-left-color: #22C55E !important;
  }

  .journey-item:nth-child(odd).current .journey-content {
    border-right-color: #22C55E !important;
  }

  .journey-tags span,
  .project-tags span {
    border-color: #ccc !important;
    color: #16A34A !important;
  }

  .journey-logo {
    opacity: 0.5 !important;
  }

  .journey-logo img {
    filter: grayscale(1) brightness(0.3);
  }

  .project-card {
    border: 1px solid #ddd !important;
    break-inside: avoid;
  }

  .skill-tag {
    border-color: #ddd !important;
  }

  .fade-in {
    opacity: 1 !important;
    transform: none !important;
  }

  a[href]::after {
    content: none;
  }

  .footer {
    border-top-color: #ddd !important;
  }
}
