/* ============================================================
   RESET
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { background: none; border: none; cursor: pointer; }

/* ============================================================
   VARIABLES
============================================================ */
:root {
  /* Chrome */
  --c-title:      #1a1a1a;
  --c-activity:   #1a1a1a;
  --c-sidebar:    #1e1e1e;
  --c-tabs:       #1a1a1a;
  --c-tab-active: #252526;
  --c-editor:     #1e1e1e;
  --c-status:     #7c3aed;

  /* Heights / widths */
  --h-title:    40px;
  --h-tabs:     35px;
  --h-status:   26px;
  --w-activity: 48px;
  --w-sidebar:  230px;

  /* Text */
  --text:       #d4d4d4;
  --text-muted: #6b7280;
  --text-dim:   #4b5563;
  --border:     rgba(255,255,255,0.07);
  --border-mid: rgba(255,255,255,0.12);

  /* Brand */
  --lime:       #82ff1f;
  --lime-dim:   rgba(130,255,31,0.1);
  --lime-glow:  rgba(130,255,31,0.2);

  /* Syntax */
  --syn-keyword:  #569cd6;
  --syn-type:     #4ec9b0;
  --syn-string:   #ce9178;
  --syn-comment:  #608b4e;
  --syn-variable: #9cdcfe;
  --syn-key:      #9cdcfe;
  --syn-punct:    #d4d4d4;
}

/* ============================================================
   BASE
============================================================ */
body {
  font-family: 'Inter', sans-serif;
  background: var(--c-editor);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ============================================================
   EDITOR CHROME LAYOUT
   Fixed: title-bar, activity-bar, sidebar, tab-bar, status-bar
   Scrollable: editor-pane
============================================================ */
.title-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--h-title);
  background: var(--c-title);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 300;
  user-select: none;
}

.title-bar__dots {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-shrink: 0;
}

.win-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.win-dot--red    { background: #ff5f57; }
.win-dot--yellow { background: #febc2e; }
.win-dot--green  { background: #28c840; }

.title-bar__center {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

.title-bar__logo { color: var(--lime); flex-shrink: 0; }
.title-bar__sep  { opacity: 0.4; }
.title-bar__project { font-weight: 500; }

#title-file {
  color: var(--text);
  font-weight: 500;
}

.title-bar__actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-shrink: 0;
}

.title-action {
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: color 150ms;
}
.title-action:hover { color: var(--text); }

/* Activity Bar */
.activity-bar {
  position: fixed;
  top: var(--h-title);
  left: 0;
  bottom: var(--h-status);
  width: var(--w-activity);
  background: var(--c-activity);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 200;
}

.activity-bar__top,
.activity-bar__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  gap: 2px;
}

.act-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color 150ms;
  position: relative;
}
.act-btn:hover { color: var(--text); }
.act-btn--active {
  color: var(--text);
  border-left: 2px solid var(--lime);
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: var(--h-title);
  left: var(--w-activity);
  bottom: var(--h-status);
  width: var(--w-sidebar);
  background: var(--c-sidebar);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 200;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.sidebar__header {
  padding: 10px 14px 6px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
}

.sidebar__section {
  padding: 8px 14px 4px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 600;
}

/* File tree items */
.ft-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 14px 3px 28px;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms, color 120ms;
}

.ft-item:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

.ft-item.ft-active {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

.ft-item--open {
  padding-left: 14px;
}

.ft-item--static {
  opacity: 0.5;
}

.ft-folder { margin-bottom: 2px; }

.ft-folder__label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 14px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.78rem;
}
.ft-folder__label:hover { color: var(--text); }

.ft-chevron { transition: transform 200ms; }

.ft-folder__body { padding-left: 8px; }

/* File type dots */
.ft-tsx-dot,
.tab__tsx {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #569cd6;
  flex-shrink: 0;
}
.ft-json-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: #e8a74b;
  flex-shrink: 0;
}
.ft-md-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: #519aba;
  flex-shrink: 0;
}

/* Tab Bar */
.tab-bar {
  position: fixed;
  top: var(--h-title);
  left: calc(var(--w-activity) + var(--w-sidebar));
  right: 0;
  height: var(--h-tabs);
  background: var(--c-tabs);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  z-index: 200;
}

.tab-bar::-webkit-scrollbar { display: none; }

.tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  white-space: nowrap;
  transition: background 150ms, color 150ms;
  flex-shrink: 0;
}

.tab:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

.tab--active {
  background: var(--c-tab-active);
  color: var(--text);
  border-top: 1px solid var(--lime);
}

/* Status Bar */
.status-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--h-status);
  background: var(--c-status);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 300;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.9);
}

.status-bar__left,
.status-bar__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: default;
  padding: 0 4px;
  border-radius: 3px;
}
.status-item:hover { background: rgba(255,255,255,0.15); }

.status-item--branch { font-weight: 600; }

/* ============================================================
   EDITOR PANE (scrollable content)
============================================================ */
.editor-pane {
  margin-top: calc(var(--h-title) + var(--h-tabs));
  margin-left: calc(var(--w-activity) + var(--w-sidebar));
  margin-bottom: var(--h-status);
  min-height: calc(100vh - var(--h-title) - var(--h-tabs) - var(--h-status));
}

/* ============================================================
   CODE SECTIONS
============================================================ */
.code-section {
  padding: 48px 56px 64px;
  border-bottom: 1px solid var(--border);
  max-width: 1000px;
}

.code-section--last {
  border-bottom: none;
  min-height: 60vh;
}

.code-section__crumb {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 28px;
}

.crumb-file { color: var(--text-muted); }

.section-comment {
  margin-bottom: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 36px;
  line-height: 1.1;
}

/* ============================================================
   SYNTAX HIGHLIGHTING
============================================================ */
.code-block {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  line-height: 1.8;
  white-space: pre;
  color: var(--text);
  tab-size: 2;
}

.syn-comment  { color: var(--syn-comment); }
.syn-keyword  { color: var(--syn-keyword); }
.syn-type     { color: var(--syn-type); }
.syn-string   { color: var(--syn-string); }
.syn-variable { color: var(--syn-variable); }
.syn-key      { color: var(--syn-key); }
.syn-punct    { color: var(--syn-punct); }
.syn-brace    { color: var(--text-muted); }

/* ============================================================
   HERO SECTION
============================================================ */
.hero-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
  margin-top: 8px;
}

.hero-code {
  background: #252526;
  border: 1px solid var(--border-mid);
  border-radius: 8px;
  padding: 28px 32px;
  overflow-x: auto;
}

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

.hero-avatar {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: top;
  border-radius: 12px;
  border: 1px solid var(--border-mid);
  max-height: 260px;
}

.hero-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.hero-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--lime);
  animation: pulse 2.5s ease-in-out infinite;
}

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

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============================================================
   BUTTONS
============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: var(--lime);
  color: #111;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: background 150ms, transform 150ms;
  text-align: center;
}
.btn-primary:hover { background: #90ff30; transform: translateY(-1px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid var(--border-mid);
  transition: background 150ms, color 150ms;
  text-align: center;
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: var(--text); }

/* ============================================================
   PROJECT CARDS
============================================================ */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pcard {
  background: #252526;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 28px 28px;
  transition: border-color 200ms, box-shadow 200ms, transform 200ms;
}

.pcard:hover {
  border-color: rgba(130,255,31,0.3);
  box-shadow: 0 0 0 1px rgba(130,255,31,0.08), 0 4px 24px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

.pcard__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.pcard__cat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--lime);
  opacity: 0.8;
}

.pcard__dates {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.pcard__body {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 28px;
  align-items: start;
}

.pcard__title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 10px;
}

.pcard__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}

.pcard__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pcard__stack span {
  background: rgba(255,255,255,0.05);
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.pcard__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.pcard__stat-num {
  display: block;
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--lime);
  line-height: 1;
}

.pcard__stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 3px;
}

.pcard__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.pcard__links--solo { margin-top: 8px; }

.pcard__link {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 5px;
  white-space: nowrap;
  transition: background 150ms;
}

.pcard__link--detail {
  background: rgba(255,255,255,0.07);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.pcard__link--detail:hover { background: rgba(255,255,255,0.12); color: var(--text); }

.pcard__link--site {
  background: var(--lime-dim);
  color: var(--lime);
  border: 1px solid rgba(130,255,31,0.2);
}
.pcard__link--site:hover { background: rgba(130,255,31,0.18); }

/* ============================================================
   EXPERIENCE
============================================================ */
.experience-list {
  display: flex;
  flex-direction: column;
}

.experience-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  align-items: start;
}

.experience-item:last-child { border-bottom: 1px solid var(--border); }

.experience-item__left {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 2px;
}

.location-pill {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--border-mid);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  width: fit-content;
}

.location-pill--lime {
  background: var(--lime-dim) !important;
  color: var(--lime) !important;
  border-color: rgba(130,255,31,0.25) !important;
  font-weight: 600;
}

.exp-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dim);
  line-height: 1;
}

.slash { color: var(--lime); }

.experience-item__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.experience-item__header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.exp-dates {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}

.exp-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exp-bullets li {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding-left: 18px;
  position: relative;
}

.exp-bullets li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--lime);
  font-size: 0.7rem;
  top: 4px;
}

/* Education block */
.edu-block {
  margin-top: 40px;
  padding: 24px 28px;
  background: #252526;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.edu-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  align-items: start;
}

.edu-item__body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.edu-item__body p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.edu-activities {
  margin-top: 8px;
  font-size: 0.8rem !important;
  color: var(--text-dim) !important;
  font-family: 'JetBrains Mono', monospace;
}

/* ============================================================
   SKILLS
============================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.skill-group__title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.skill-chips {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skill-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #252526;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: border-color 150ms, color 150ms;
}

.skill-chip:hover {
  border-color: rgba(130,255,31,0.25);
  color: var(--text);
}

.skill-chip img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.skill-chip--text { font-size: 0.8rem; }

/* ============================================================
   OUTCOMES ROW
============================================================ */
.outcomes-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.outcome-card--editor {
  background: #252526;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  transition: border-color 200ms, transform 200ms;
}

.outcome-card--editor:hover {
  border-color: rgba(130,255,31,0.25);
  transform: translateY(-2px);
}

.outcome-card--editor .outcome-stat {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--lime);
  line-height: 1;
}

.outcome-card--editor .outcome-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
}

.outcome-card--editor .outcome-desc {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 8px;
  line-height: 1.4;
}

/* ============================================================
   CONTACT
============================================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 48px;
  align-items: start;
  margin-top: 20px;
}

.contact-heading {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--text);
  line-height: 1;
  margin-bottom: 16px;
}

.contact-lime { color: var(--lime); }

.contact-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.contact-photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: top;
  border-radius: 10px;
  border: 1px solid var(--border-mid);
  margin-bottom: 14px;
  max-height: 200px;
}

.contact-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  display: block;
  margin-bottom: 2px;
}

.contact-title {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
}

/* ============================================================
   SCROLL REVEAL
============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 480ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

.revealed {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* ============================================================
   RESPONSIVE — collapse sidebar on small screens
============================================================ */
@media (max-width: 1100px) {
  :root { --w-sidebar: 180px; }
  .code-section { padding: 40px 40px 56px; }
}

@media (max-width: 860px) {
  .activity-bar { display: none; }
  .sidebar { display: none; }
  .tab-bar { left: 0; }
  .editor-pane { margin-left: 0; }
  .hero-layout { grid-template-columns: 1fr; }
  .hero-profile { flex-direction: row; flex-wrap: wrap; gap: 16px; }
  .hero-avatar { width: 100px; height: 100px; }
  .pcard__body { grid-template-columns: 1fr; }
  .pcard__right { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .outcomes-row { grid-template-columns: 1fr 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .edu-item { grid-template-columns: 1fr; }
  .experience-item { grid-template-columns: 1fr; gap: 12px; }
  .experience-item__left { flex-direction: row; align-items: center; }
  .title-bar__actions { display: none; }
  .code-section { padding: 32px 24px 48px; }
}

@media (max-width: 560px) {
  :root { --h-title: 38px; --w-activity: 0px; --w-sidebar: 0px; }
  .tab-bar { overflow-x: auto; }
  .tab { padding: 0 12px; font-size: 0.72rem; }
  .skills-grid { grid-template-columns: 1fr; }
  .outcomes-row { grid-template-columns: 1fr 1fr; }
  .title-bar__center { font-size: 0.72rem; }
  .code-section { padding: 24px 16px 40px; }
  .hero-code { padding: 20px; }
  .code-block { font-size: 0.78rem; }
}
