:root {
  --bg: #101010;
  --fg: #f5f5f5;
  --muted: #9a9a9a;
  --accent: #ffffff;
  --font-main: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

[data-theme="light"] {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #666666;
  --accent: #000000;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 960px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 48px 24px;
}

.layout {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 80px;
}

/* LEFT COLUMN */
.profile {
  flex: 0 0 260px;
}

.profile-pic-wrap {
  margin-bottom: 32px;
}

.profile-pic {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid rgba(154, 154, 154, 0.5);
  object-fit: cover;
  transition: border-color 0.15s ease;
}

.profile-pic:hover {
  border-color: var(--accent);
  animation: glitch-hover 0.3s ease-in-out;
}

@keyframes glitch-hover {
  0%, 100% {
    transform: translate(0);
    filter: none;
  }
  20% {
    transform: translate(-2px, 1px);
    filter: hue-rotate(90deg);
  }
  40% {
    transform: translate(2px, -1px);
    filter: hue-rotate(-90deg);
  }
  60% {
    transform: translate(-1px, -1px);
    filter: hue-rotate(45deg);
  }
  80% {
    transform: translate(1px, 1px);
    filter: none;
  }
}

.name {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 4px;
}

.location {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 20px;
}

.links {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 15px;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s ease;
}

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

/* RIGHT COLUMN */
.content {
  flex: 1 1 auto;
  font-size: 16px;
  line-height: 1.5;
}

.section {
  margin-bottom: 32px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.item-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.item-list li {
  margin: 8px 0;
}

.muted {
  color: var(--muted);
}

.work-list {
  position: relative;
  padding-left: 16px;
  border-left: 1px solid rgba(154, 154, 154, 0.2);
}

.work-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  position: relative;
}

.work-list li::before {
  content: '';
  position: absolute;
  left: calc(-16px - 4.5px);
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid rgba(154, 154, 154, 0.4);
}

.work-list li:first-child::before {
  background: var(--muted);
  border-color: var(--muted);
}

/* Horizontal Timeline */
.timeline-horizontal {
  margin-top: 20px;
  padding-top: 16px;
}

.timeline-track {
  position: relative;
  height: 6px;
  background: rgba(154, 154, 154, 0.15);
  border-radius: 3px;
  overflow: visible;
}

.timeline-segment {
  position: absolute;
  height: 100%;
  background: rgba(154, 154, 154, 0.3);
  border-radius: 3px;
  transition: background 0.15s ease;
}

.timeline-segment:hover {
  background: rgba(154, 154, 154, 0.5);
}

.timeline-segment.timeline-current {
  background: var(--muted);
}

.timeline-segment::before {
  content: attr(data-company);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  margin-bottom: 4px;
  opacity: 0.7;
}

.timeline-segment.timeline-current::before {
  opacity: 1;
}

.timeline-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
  opacity: 0.6;
}

.work-role {
  color: var(--muted);
}

.work-year {
  color: var(--muted);
  font-size: 14px;
  opacity: 0.7;
  flex-shrink: 0;
}

.company-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: currentColor;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.company-link:hover {
  opacity: 0.7;
  transform: translateY(-1px);
}

.article-link {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: rgba(154, 154, 154, 0.3);
  text-underline-offset: 2px;
}

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

/* PROJECTS */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-card {
  display: flex;
  gap: 20px;
  align-items: center;
}

.project-text {
  flex: 1 1 auto;
}

.project-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.project-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.project-meta a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.project-meta a:hover {
  color: var(--accent);
}

.project-description {
  font-size: 14px;
  color: var(--muted);
}

.project-image {
  flex: 0 0 120px;
  width: 120px;
  height: 80px;
  border-radius: 8px;
  background-size: 90%;
  background-position: center;
  background-repeat: no-repeat;
  background-color: transparent;
}

.project-links {
  margin-top: 8px;
  display: flex;
  gap: 12px;
  font-size: 13px;
}

.project-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.project-links a:hover {
  color: var(--accent);
}

.project-subline {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  opacity: 0.8;
  line-height: 1.5;
}

.project-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.project-item-content {
  flex: 1;
  min-width: 0;
}

.project-year {
  color: var(--muted);
  font-size: 14px;
  opacity: 0.7;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  main {
    align-items: flex-start;
  }

  .layout {
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
  }

  .profile {
    flex: none;
  }

  .project-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .project-image {
    width: 100%;
    height: 180px;
  }
}

.theme-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.15s ease;
  padding: 0;
}

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

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: block; }

[data-theme="light"] .theme-toggle .sun { display: block; }
[data-theme="light"] .theme-toggle .moon { display: none; }

/* Icon sizing */
.icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.icon-stroke {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Claude Code "Thinking..." Easter Egg */
.thinking-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  color: #DA7756;
  margin-bottom: 12px;
  height: 20px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.thinking-indicator.active {
  opacity: 1;
  transform: translateY(0);
}

.thinking-spinner::before {
  content: "⠋";
  animation: spin 0.8s steps(10, end) infinite;
}

@keyframes spin {
  0% { content: "⠋"; }
  10% { content: "⠙"; }
  20% { content: "⠹"; }
  30% { content: "⠸"; }
  40% { content: "⠼"; }
  50% { content: "⠴"; }
  60% { content: "⠦"; }
  70% { content: "⠧"; }
  80% { content: "⠇"; }
  90% { content: "⠏"; }
}

.thinking-dots::after {
  content: "";
  animation: dots 1.5s steps(1, end) infinite;
}

@keyframes dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}

.profile-pic {
  cursor: pointer;
  animation: glitch 8s ease-in-out infinite;
}

@keyframes glitch {
  0%, 94%, 100% {
    transform: translate(0);
    filter: none;
  }
  95% {
    transform: translate(-2px, 1px);
    filter: hue-rotate(90deg);
  }
  96% {
    transform: translate(2px, -1px);
    filter: hue-rotate(-90deg);
  }
  97% {
    transform: translate(-1px, -1px);
    filter: hue-rotate(45deg);
  }
  98% {
    transform: translate(1px, 1px);
    filter: none;
  }
}

/* Achievement Banner Easter Egg - Terminal Style */
.achievement-banner {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  z-index: 1000;
  pointer-events: none;
}

.achievement-banner.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.achievement-banner.terminal {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.terminal-header {
  background: #161b22;
  color: #8b949e;
  padding: 8px 12px;
  font-size: 11px;
  border-bottom: 1px solid #30363d;
}

.terminal-body {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.terminal-line {
  color: #c9d1d9;
  white-space: nowrap;
}

.terminal-prompt {
  color: #8b949e;
  margin-right: 6px;
}

.terminal-positive {
  color: #3fb950;
}

.terminal-reward {
  color: #3fb950;
  font-weight: 600;
  animation: pulse-green 1s ease infinite;
}

@keyframes pulse-green {
  0%, 100% { text-shadow: 0 0 4px rgba(63, 185, 80, 0.4); }
  50% { text-shadow: 0 0 12px rgba(63, 185, 80, 0.8); }
}
