/* ===================================================================
   Aditya Verma — UI/UX Portfolio
   Design concept: the site is skinned like a Figma workspace —
   layers panel (left), properties inspector (right), frame labels,
   dot-grid canvas background.
   =================================================================== */

/* ------------------------------------------------------------------ */
/*  1. DESIGN TOKENS                                                   */
/* ------------------------------------------------------------------ */
:root {
  /* Canvas */
  --canvas:         #14131a;
  --canvas-soft:    #1a1924;
  --canvas-mid:     #1d1c26;

  /* Panels */
  --panel:          #1d1c26;
  --panel-hover:    #232231;
  --panel-border:   rgba(255,255,255,0.08);
  --line:           rgba(255,255,255,0.07);

  /* Text */
  --text-primary:   #f1f0f6;
  --text-secondary: #9b98ab;
  --text-faint:     #6b6878;

  /* Accent palette */
  --accent:         #8c6fff;
  --accent-mid:     #a07bff;
  --accent-soft:    rgba(140,111,255,0.14);
  --accent-glow:    rgba(140,111,255,0.35);
  --accent-2:       #ff7a59;
  --success:        #5fd4a4;

  /* Gradients */
  --grad-hero:      linear-gradient(135deg, rgba(140,111,255,0.18) 0%, transparent 60%);
  --grad-card:      linear-gradient(160deg, #1d1c26 0%, #211f30 100%);
  --grad-accent:    linear-gradient(135deg, #8c6fff 0%, #c084fc 100%);

  /* Typography */
  --mono:    'IBM Plex Mono', monospace;
  --display: 'Space Grotesk', sans-serif;
  --body:    'Inter', sans-serif;

  /* Layout */
  --topbar-h:      52px;
  --toolstrip-w:   48px;
  --layers-w:      224px;
  --inspector-w:   236px;
  --section-px:    64px;

  /* Motion */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-snap: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ------------------------------------------------------------------ */
/*  2. RESETS & BASE                                                   */
/* ------------------------------------------------------------------ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--canvas);
  color: var(--text-primary);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Interactive canvas dot-grid (bg-canvas.js) */
#bgCanvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 0;
}

/* Tool drawing canvas (Frame, Rect, Pen) */
#toolCanvas {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none; /* toggled by JS */
  z-index: 50;
}

/* Annotation layer (Text nodes, Comment pins) */
#annotationLayer {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 155;
}
#annotationLayer > * { pointer-events: auto; }

/* All page content sits above the canvas */
.topbar,
.tool-strip,
.layers-panel,
.inspector,
.workspace {
  position: relative;
  z-index: 1;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; }
::selection { background: var(--accent-soft); color: var(--text-primary); }

.mono { font-family: var(--mono); letter-spacing: 0.02em; }

/* ------------------------------------------------------------------ */
/*  3. KEYFRAME ANIMATIONS                                             */
/* ------------------------------------------------------------------ */
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(95,212,164,0.4); }
  50%       { box-shadow: 0 0 0 5px rgba(95,212,164,0); }
}

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

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

@keyframes fade-slide-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes insp-flash {
  0%   { color: var(--accent); }
  100% { color: var(--text-primary); }
}

@keyframes card-enter {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes shimmer {
  from { background-position: -400px 0; }
  to   { background-position: 400px 0; }
}

/* ------------------------------------------------------------------ */
/*  4. TOP TOOLBAR (Figma-style chrome)                                */
/* ------------------------------------------------------------------ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: rgba(20,19,26,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-border);
  z-index: 200;
}

.topbar-left  { display: flex; align-items: center; gap: 14px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.toolbar-icons { display: flex; align-items: center; gap: 9px; }
.toolbar-icons svg {
  width: 16px; height: 16px;
  stroke: var(--text-faint);
  transition: stroke 0.15s;
}
.toolbar-icons svg:hover { stroke: var(--text-secondary); }

.file-tab {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-secondary);
  padding: 5px 10px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  transition: border-color 0.2s;
}
.file-tab:hover { border-color: rgba(255,255,255,0.16); }
.file-tab .ext { color: var(--accent); }

.status-pill {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11.5px; color: var(--success);
  background: rgba(95,212,164,0.08);
  border: 1px solid rgba(95,212,164,0.25);
  padding: 4px 11px; border-radius: 20px;
}
.status-pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

.share-btn {
  font-family: var(--body); font-size: 13px; font-weight: 600;
  background: var(--grad-accent);
  color: #fff;
  padding: 7px 17px;
  border-radius: 6px;
  border: none;
  transition: opacity 0.2s, transform 0.15s;
  box-shadow: 0 0 18px rgba(140,111,255,0.3);
}
.share-btn:hover { opacity: 0.88; transform: translateY(-1px); }

/* ------------------------------------------------------------------ */
/*  4b. FIGMA TOOL STRIP                                               */
/* ------------------------------------------------------------------ */
.tool-strip {
  position: fixed;
  top: var(--topbar-h); bottom: 0; left: 0;
  width: var(--toolstrip-w);
  background: rgba(20,19,26,0.78);
  border-right: 1px solid var(--panel-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0 10px;
  gap: 2px;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.tool-btn {
  position: relative;
  width: 34px; height: 34px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-faint);
  border: none;
  background: transparent;
  padding: 0;
  transition: background 0.13s, color 0.13s, transform 0.12s;
}
.tool-btn svg { width: 15px; height: 15px; }
.tool-btn:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  transform: scale(1.08);
}
.tool-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(140,111,255,0.3);
}
.tool-btn.active:hover { transform: none; }

/* Shortcut tooltip */
.tool-btn::after {
  content: attr(data-shortcut);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%; transform: translateY(-50%);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 5px;
  padding: 4px 9px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s, transform 0.14s;
  transform: translateY(-50%) translateX(-4px);
  z-index: 300;
}
.tool-btn:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.tool-divider {
  width: 22px; height: 1px;
  background: var(--panel-border);
  margin: 5px 0;
  flex-shrink: 0;
}
.tool-spacer { flex: 1; }

/* Color swatch (accent picker button) */
.tool-color-swatch {
  position: relative;
  width: 30px; height: 28px;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
  flex-shrink: 0;
  margin-bottom: 12px;
}
.swatch-fill {
  position: absolute;
  top: 0; left: 0;
  width: 20px; height: 20px;
  border-radius: 4px;
  border: 1.5px solid rgba(255,255,255,0.25);
  transition: border-color 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.swatch-stroke {
  position: absolute;
  bottom: 0; right: 0;
  width: 16px; height: 16px;
  background: var(--canvas-soft);
  border: 2px solid var(--text-secondary);
  border-radius: 3px;
}
.tool-color-swatch:hover .swatch-fill { border-color: rgba(255,255,255,0.5); }

/* Cursor tool label (#cursorLabel) */
#cursorLabel {
  pointer-events: none;
}
#cursorLabel .cl-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
}
#cursorLabel .cl-text {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.7);
  background: rgba(20,19,26,0.85);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 3px;
  padding: 2px 6px;
}

/* ------------------------------------------------------------------ */
/*  5. LEFT LAYERS PANEL                                               */
/* ------------------------------------------------------------------ */
.layers-panel {
  position: fixed;
  top: var(--topbar-h); bottom: 0;
  left: var(--toolstrip-w);   /* shifted right of tool strip */
  width: var(--layers-w);
  background: rgba(26,25,36,0.72);
  border-right: 1px solid var(--panel-border);
  padding: 22px 14px;
  z-index: 100;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow-y: auto;
}

.layers-panel h6 {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--panel-border);
}

.layer-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s;
  user-select: none;
}
.layer-item:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  transform: translateX(2px);
}
.layer-item.active {
  background: var(--accent-soft);
  color: var(--text-primary);
}
.layer-item .idx {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-faint);
  width: 18px;
  flex-shrink: 0;
}
.layer-item.active .idx { color: var(--accent); }

.layer-icon {
  width: 9px; height: 9px;
  border: 1.3px solid var(--text-faint);
  border-radius: 2px;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
}
.layer-item.active .layer-icon {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 6px var(--accent-glow);
}

/* ------------------------------------------------------------------ */
/*  6. RIGHT PROPERTIES INSPECTOR (signature element)                  */
/* ------------------------------------------------------------------ */
.inspector {
  position: fixed;
  top: var(--topbar-h); bottom: 0; right: 0;
  width: var(--inspector-w);
  background: rgba(26,25,36,0.72);
  border-left: 1px solid var(--panel-border);
  padding: 20px 16px;
  z-index: 100;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow-y: auto;
}

.inspector h6 {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--panel-border);
}

.insp-frame-name {
  font-family: var(--display);
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 1px solid var(--panel-border);
  transition: opacity 0.22s var(--ease-out);
}

.insp-section-title {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 14px 0 6px;
}

.insp-divider {
  height: 1px;
  background: var(--panel-border);
  margin: 12px 0;
}

.insp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 5px 0;
  color: var(--text-secondary);
}
.insp-row span:last-child {
  color: var(--text-primary);
  transition: color 0.3s;
}
.insp-row span:last-child.flash { animation: insp-flash 0.5s ease-out; }

.insp-swatch {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: -1px;
  border: 1px solid var(--panel-border);
  transition: background 0.3s;
}

.insp-cursor {
  display: inline-block;
  width: 1.5px; height: 12px;
  background: var(--accent);
  vertical-align: -2px;
  margin-left: 4px;
  animation: blink-cursor 1.2s step-end infinite;
}

/* ------------------------------------------------------------------ */
/*  7. LAYOUT SHELL                                                    */
/* ------------------------------------------------------------------ */
.workspace {
  margin-left: calc(var(--toolstrip-w) + var(--layers-w));
  margin-right: var(--inspector-w);
  padding-top: var(--topbar-h);
}

.section {
  position: relative;
  padding: 110px var(--section-px);
  border-bottom: 1px dashed var(--line);
}

.frame-tag {
  position: absolute;
  top: 26px; left: var(--section-px);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}
.frame-tag::before { content: '◇'; color: var(--accent); font-size: 10px; }

/* Frame corner selection handles */
.section::before,
.section::after {
  content: '';
  position: absolute;
  width: 7px; height: 7px;
  border-radius: 1px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.3s;
  top: 10px;
}
.section::before { left: 10px; }
.section::after  { right: 10px; }
.section:hover::before,
.section:hover::after { opacity: 0.6; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  display: block;
}

h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
h2 { font-size: 34px; margin-bottom: 28px; }
p  { color: var(--text-secondary); }

/* ------------------------------------------------------------------ */
/*  8. HERO                                                            */
/* ------------------------------------------------------------------ */
.hero {
  min-height: calc(100vh - var(--topbar-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 80px;
  background: var(--grad-hero);
  overflow: hidden;
}

/* Floating frame corners decoration */
.hero-corner {
  position: absolute;
  width: 48px; height: 48px;
  opacity: 0.4;
  pointer-events: none;
}
.hero-corner.tl { top: 52px; left: 20px; border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); }
.hero-corner.tr { top: 52px; right: 20px; border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.hero-corner.bl { bottom: 20px; left: 20px; border-bottom: 2px solid var(--accent); border-left: 2px solid var(--accent); }
.hero-corner.br { bottom: 20px; right: 20px; border-bottom: 2px solid var(--accent); border-right: 2px solid var(--accent); }

.hero-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--grad-accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 22px; font-weight: 700;
  color: #fff;
  margin-bottom: 30px;
  box-shadow: 0 0 0 4px var(--canvas), 0 0 0 5px var(--accent), 0 0 30px var(--accent-glow);
  animation: fade-slide-up 0.6s var(--ease-out) both;
}

.hero-role {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  animation: fade-slide-up 0.7s var(--ease-out) 0.08s both;
}

.hero-cursor {
  display: inline-block;
  width: 2px; height: 14px;
  background: var(--accent);
  vertical-align: -2px;
  margin-left: 3px;
  animation: blink-cursor 1.1s step-end infinite;
}

.hero h1 {
  font-size: clamp(42px, 5.8vw, 74px);
  line-height: 1.04;
  max-width: 820px;
  animation: fade-slide-up 0.75s var(--ease-out) 0.16s both;
}
.hero h1 em { color: var(--accent); font-style: normal; position: relative; }
.hero h1 em::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 0; right: 0;
  height: 2px;
  background: var(--grad-accent);
  border-radius: 2px;
  opacity: 0.5;
}

.hero-sub {
  margin-top: 24px;
  max-width: 540px;
  font-size: 17px;
  line-height: 1.7;
  animation: fade-slide-up 0.8s var(--ease-out) 0.24s both;
}

.hero-cta {
  display: flex; gap: 14px;
  margin-top: 40px;
  animation: fade-slide-up 0.85s var(--ease-out) 0.32s both;
}

.btn-primary, .btn-ghost {
  font-family: var(--body); font-weight: 600; font-size: 14.5px;
  padding: 12px 22px; border-radius: 8px; border: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: transform 0.15s var(--ease-snap), box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn-primary {
  background: var(--grad-accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(140,111,255,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(140,111,255,0.5);
}
.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--panel-border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.scroll-hint {
  margin-top: 56px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  transition: opacity 0.4s;
  animation: fade-slide-up 1s var(--ease-out) 0.5s both;
}
.scroll-hint.hidden { opacity: 0; pointer-events: none; }

/* ------------------------------------------------------------------ */
/*  9. ABOUT                                                           */
/* ------------------------------------------------------------------ */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: start;
}
.about-grid p { font-size: 16px; max-width: 480px; margin-bottom: 18px; }

.about-text p:last-of-type { margin-bottom: 0; }

.toolkit-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.tool-chip {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 5px 13px;
  transition: border-color 0.2s, color 0.2s;
}
.tool-chip:hover { border-color: var(--accent); color: var(--accent); }

.stat-col { display: flex; flex-direction: column; gap: 18px; }
.stat-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 20px 18px;
  transition: border-color 0.25s, transform 0.25s var(--ease-snap);
}
.stat-card:hover { border-color: var(--accent-mid); transform: translateX(-4px); }
.stat-card .num {
  font-family: var(--display);
  font-size: 30px; font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.stat-card .label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* ------------------------------------------------------------------ */
/*  10. CASE STUDIES — FILTER BAR                                      */
/* ------------------------------------------------------------------ */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.tag-btn {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 6px 14px;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.15s;
}
.tag-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.tag-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* ------------------------------------------------------------------ */
/*  11. CASE STUDIES GRID                                              */
/* ------------------------------------------------------------------ */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.case-card {
  position: relative;
  background: var(--grad-card);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  display: block;
  transition: transform 0.28s var(--ease-snap), border-color 0.25s, box-shadow 0.28s;
  animation: card-enter 0.45s var(--ease-out) both;
}
.case-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-mid);
  box-shadow: 0 12px 48px rgba(140,111,255,0.2), 0 0 0 1px rgba(140,111,255,0.15);
}
.case-card.hidden-card { display: none; }

/* Figma selection corners */
.case-card .corner {
  position: absolute;
  width: 14px; height: 14px;
  border-color: var(--accent);
  opacity: 0;
  transition: opacity 0.22s;
  z-index: 2;
}
.case-card:hover .corner { opacity: 1; }
.corner.tl { top: 8px;  left: 8px;  border-top: 2px solid; border-left: 2px solid; }
.corner.tr { top: 8px;  right: 8px; border-top: 2px solid; border-right: 2px solid; }
.corner.bl { bottom: 8px; left: 8px;  border-bottom: 2px solid; border-left: 2px solid; }
.corner.br { bottom: 8px; right: 8px; border-bottom: 2px solid; border-right: 2px solid; }

.case-thumb {
  height: 240px;
  width: 100%;
  background: linear-gradient(135deg, var(--canvas-soft), var(--panel));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 15px; color: var(--text-faint);
  border-bottom: 1px solid var(--panel-border);
  overflow: hidden;
  position: relative;
}
.case-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.case-card:hover .case-thumb img { transform: scale(1.04); }

/* Gradient overlay on thumb */
.case-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(29,28,38,0.6), transparent 60%);
  pointer-events: none;
}

.case-meta { padding: 20px 22px 22px; }

.case-tagline {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.case-meta h3 {
  font-size: 18px;
  margin-bottom: 8px;
  transition: color 0.2s;
}
.case-card:hover .case-meta h3 { color: var(--accent-mid); }

.case-meta p {
  font-size: 13.5px;
  line-height: 1.6;
}

.case-tags {
  display: flex; gap: 6px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.case-tags span {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-faint);
  border: 1px solid var(--panel-border);
  padding: 3px 8px;
  border-radius: 20px;
}

.case-arrow {
  position: absolute;
  bottom: 20px; right: 20px;
  font-family: var(--mono);
  font-size: 18px;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.22s, transform 0.22s;
}
.case-card:hover .case-arrow { opacity: 1; transform: translateX(0); }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 13px;
  border: 1px dashed var(--panel-border);
  border-radius: 12px;
}

/* ------------------------------------------------------------------ */
/*  12. TOOLKIT / SKILLS                                               */
/* ------------------------------------------------------------------ */
.skill-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.skill-group-title {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--panel-border);
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  font-size: 13.5px;
  color: var(--text-secondary);
  transition: border-color 0.2s, color 0.2s, transform 0.2s var(--ease-snap);
}
.skill-item:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  transform: translateX(4px);
}

.skill-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  opacity: 0.6;
}

/* ------------------------------------------------------------------ */
/*  13. EXPERIENCE TIMELINE                                            */
/* ------------------------------------------------------------------ */
.timeline {
  border-left: 1px solid var(--panel-border);
  padding-left: 34px;
  margin-top: 12px;
}

.tl-item {
  position: relative;
  padding-bottom: 48px;
}
.tl-item:last-child { padding-bottom: 0; }

.tl-item::before {
  content: '';
  position: absolute;
  left: -38px; top: 5px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--canvas), 0 0 12px var(--accent-glow);
  transition: box-shadow 0.3s;
}
.tl-item:hover::before { box-shadow: 0 0 0 4px var(--canvas), 0 0 20px var(--accent-glow); }

.tl-version {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  margin-bottom: 4px;
}

.tl-item h3 {
  font-size: 18px;
  margin-bottom: 3px;
}

.tl-role {
  font-size: 13.5px;
  color: var(--accent);
  margin-bottom: 10px;
}

.tl-item ul { margin-top: 10px; }
.tl-item li {
  font-size: 14px;
  color: var(--text-secondary);
  padding-left: 18px;
  position: relative;
  margin-bottom: 7px;
  line-height: 1.6;
}
.tl-item li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--text-faint);
}

/* ------------------------------------------------------------------ */
/*  14. EDUCATION                                                      */
/* ------------------------------------------------------------------ */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.edu-block h3 { font-size: 18px; margin-bottom: 6px; }
.edu-block .meta {
  font-size: 12.5px;
  color: var(--text-faint);
  font-family: var(--mono);
  margin-bottom: 10px;
}
.edu-block p { font-size: 14.5px; }

.cert-item {
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  transition: border-color 0.2s, transform 0.2s var(--ease-snap);
}
.cert-item:hover { border-color: var(--accent); transform: translateX(4px); }
.cert-item strong { font-size: 14px; display: block; margin-bottom: 4px; }
.cert-item .meta { margin-bottom: 0; }

/* ------------------------------------------------------------------ */
/*  15. CONTACT                                                        */
/* ------------------------------------------------------------------ */
.contact-section { position: relative; }

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 28px;
}

.contact-link-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.contact-links a {
  font-family: var(--display);
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
  position: relative;
}
.contact-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out);
}
.contact-links a:hover { color: var(--accent); }
.contact-links a:hover::after { width: 100%; }
.contact-links .arrow { font-family: var(--mono); font-size: 14px; opacity: 0.45; }

.copy-btn {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-faint);
  background: transparent;
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  padding: 3px 8px;
  transition: border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.copy-btn.copied { color: var(--success); border-color: var(--success); }

/* ------------------------------------------------------------------ */
/*  16. FOOTER                                                         */
/* ------------------------------------------------------------------ */
footer {
  padding: 28px var(--section-px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  border-top: 1px solid var(--panel-border);
  position: relative;
}

footer::before,
footer::after {
  content: '◇';
  color: var(--accent);
  opacity: 0.4;
  font-size: 9px;
  position: absolute;
  top: 50%; transform: translateY(-50%);
}
footer::before { left: var(--section-px); }
footer::after  { right: var(--section-px); }

.footer-center { color: var(--text-faint); }

/* ------------------------------------------------------------------ */
/*  17. CASE STUDY DETAIL PAGE                                         */
/* ------------------------------------------------------------------ */
/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--grad-accent);
  z-index: 300;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* Breadcrumb */
.cs-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 30px;
}
.cs-breadcrumb a { transition: color 0.2s; }
.cs-breadcrumb a:hover { color: var(--accent); }
.cs-breadcrumb span { opacity: 0.4; }

/* CS Hero */
.cs-hero { padding-top: 130px; }
.cs-hero h1 {
  font-size: clamp(30px, 4.5vw, 52px);
  max-width: 760px;
  line-height: 1.1;
}

.cs-meta-row {
  display: flex;
  gap: 36px;
  margin-top: 28px;
  flex-wrap: wrap;
  padding: 20px 24px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  width: fit-content;
}
.cs-meta-row div { font-size: 14px; }
.cs-meta-row .k {
  font-family: var(--mono);
  color: var(--text-faint);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.07em;
  margin-bottom: 5px;
}

/* Cover image */
.cs-cover {
  margin-top: 36px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  min-height: 340px;
  background: var(--canvas-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 13px;
}
.cs-cover img { width: 100%; display: block; }

/* Content sections */
.cs-section-block {
  max-width: 740px;
  margin: 52px 0;
  scroll-margin-top: calc(var(--topbar-h) + 24px);
}
.cs-section-block .cs-block-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cs-section-block .cs-block-label::before {
  content: '';
  width: 20px; height: 1px;
  background: var(--accent);
  opacity: 0.5;
}
.cs-section-block h2 { font-size: 24px; margin-bottom: 16px; }
.cs-section-block p  { font-size: 16px; line-height: 1.78; }

/* CS Links block */
.cs-links-block {
  display: flex; gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.cs-link-btn {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent);
  border: 1px solid rgba(140,111,255,0.3);
  border-radius: 6px;
  padding: 9px 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, border-color 0.2s;
}
.cs-link-btn:hover { background: var(--accent-soft); border-color: var(--accent); }

/* Media gallery */
.cs-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.cs-gallery img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
}

/* CS Inspector (right panel, case study-specific) */
.cs-inspector-content {}
.cs-insp-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.cs-insp-value {
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--panel-border);
}
.cs-insp-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  border: 1px solid rgba(140,111,255,0.3);
  border-radius: 3px;
  padding: 2px 6px;
  margin: 2px 2px 0 0;
}

/* CS Layers (left mini-nav) */
.cs-layers-panel {
  position: fixed;
  top: var(--topbar-h); bottom: 0; 
  left: var(--toolstrip-w);
  width: var(--layers-w);
  background: rgba(26,25,36,0.72);
  border-right: 1px solid var(--panel-border);
  padding: 22px 14px;
  z-index: 100;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cs-layers-panel h6 {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--panel-border);
}

.cs-layer-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 9px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s;
  user-select: none;
}
.cs-layer-item:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  transform: translateX(2px);
}
.cs-layer-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.cs-layer-item .cs-l-idx {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-faint);
  width: 18px;
}

/* CS workspace (no margins when panels present) */
.cs-workspace {
  margin-left: calc(var(--toolstrip-w) + var(--layers-w));
  margin-right: var(--inspector-w);
  padding-top: var(--topbar-h);
}
.cs-workspace .section { padding-left: var(--section-px); padding-right: var(--section-px); }

/* Back link */
.back-link {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  transition: color 0.2s;
}
.back-link:hover { color: var(--accent); }

/* ------------------------------------------------------------------ */
/*  18. ADMIN PAGE (overrides applied via inline <style> in admin.html) */
/* ------------------------------------------------------------------ */

/* ------------------------------------------------------------------ */
/*  19. RESPONSIVE                                                     */
/* ------------------------------------------------------------------ */
@media (max-width: 1100px) {
  .tool-strip,
  #toolCanvas,
  #annotationLayer,
  .layers-panel,
  .inspector,
  .cs-layers-panel { display: none; }

  .workspace,
  .cs-workspace {
    margin-left: 0;
    margin-right: 0;
  }

  :root { --section-px: 32px; }

  .section { padding: 80px var(--section-px); }
  .frame-tag { left: var(--section-px); }

  .about-grid,
  .skill-cols,
  .edu-grid { grid-template-columns: 1fr; }

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

  footer {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  footer::before, footer::after { display: none; }
}

@media (max-width: 700px) {
  :root { --section-px: 22px; }

  .hero h1 { font-size: 36px; }
  .hero-cta { flex-direction: column; }
  .hero-avatar { width: 60px; height: 60px; font-size: 18px; }

  .topbar .file-tab,
  .topbar .status-pill { display: none; }

  .cs-meta-row { flex-direction: column; gap: 14px; }

  .cs-gallery { grid-template-columns: 1fr; }

  .contact-links a { font-size: 16px; }

  h2 { font-size: 26px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 30px; }
  .filter-bar { gap: 6px; }
}
