/* ═══════════════════════════════════════════════════════
   Anthony Bollas — Portfolio
   Dark Circuit Board Theme
═══════════════════════════════════════════════════════ */

/* ─── Variables ─── */
:root {
  --bg:             #06090f;
  --surface:        #0c1220;
  --surface-2:      #101828;
  --surface-3:      #162032;
  --border:         #1a2a3e;
  --border-bright:  #1f3a5a;

  --cyan:           #00d4ff;
  --cyan-dim:       #0099bb;
  --cyan-glow:      rgba(0, 212, 255, 0.35);
  --cyan-glow-sm:   rgba(0, 212, 255, 0.15);

  --green:          #00ff9f;
  --green-dim:      #00bb74;

  --text:           #c8d8ea;
  --text-dim:       #6a8aaa;
  --text-muted:     #3a5570;

  --circuit-line:   #0f1e30;
  --circuit-active: var(--cyan);

  --sidebar-w:      290px;
  --connector-w:    90px;
  --radius:         8px;
  --radius-lg:      14px;

  --transition:     0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Light Mode Variables ─── */
body.light-mode {
  --bg:             #eef4fc;
  --surface:        #ffffff;
  --surface-2:      #e2edf8;
  --surface-3:      #d4e4f4;
  --border:         #b8d0e8;
  --border-bright:  #82b0d8;

  --cyan:           #1a6fc4;
  --cyan-dim:       #1558a0;
  --cyan-glow:      rgba(26, 111, 196, 0.28);
  --cyan-glow-sm:   rgba(26, 111, 196, 0.14);

  --green:          #00875a;
  --green-dim:      #006644;

  --text:           #0d1e30;
  --text-dim:       #3d5878;
  --text-muted:     #7a9ab8;

  --circuit-line:   #c0d8f0;
  --circuit-active: var(--cyan);
}

/* Light mode — override hardcoded backgrounds */
body.light-mode .sidebar {
  background: linear-gradient(180deg, rgba(220,234,250,0.99) 0%, rgba(210,228,248,0.99) 100%);
}

body.light-mode .content-area {
  background: rgba(238, 244, 252, 0.97);
}

body.light-mode .circuit-connector {
  background: rgba(210, 228, 248, 0.7);
}

body.light-mode .hobby-card,
body.light-mode .trip-photo-card,
body.light-mode .timeline-item,
body.light-mode .project-card,
body.light-mode .skill-group,
body.light-mode .edu-card,
body.light-mode .contact-card {
  background: #ffffff;
}

/* Light mode — fix hardcoded #fff text (invisible on light bg) */
body.light-mode .profile-name,
body.light-mode .section-header h2,
body.light-mode .job-title,
body.light-mode .project-title,
body.light-mode .edu-details h3,
body.light-mode .contact-card-body h3 {
  color: var(--text);
}

/* Canvas — very subtle on light background */
body.light-mode #circuit-canvas {
  opacity: 0.06;
  mix-blend-mode: multiply;
}

/* SVG traces — recolor for light mode */
body.light-mode #trace-svg path[stroke-width="1.5"] {
  stroke: #b8d0e8;
}
body.light-mode #trace-svg path[stroke-width="2"] {
  stroke: #1a6fc4;
  filter: drop-shadow(0 0 4px rgba(26,111,196,0.5)) drop-shadow(0 0 10px rgba(26,111,196,0.25));
}
body.light-mode #trace-svg circle {
  fill: #1a6fc4;
  filter: drop-shadow(0 0 5px rgba(26,111,196,0.9)) drop-shadow(0 0 12px rgba(26,111,196,0.5));
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow: hidden;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* ─── Circuit Canvas Background ─── */
#circuit-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

/* ─── Main Layout ─── */
.layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-w) var(--connector-w) 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ═══════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════ */
.sidebar {
  display: flex;
  flex-direction: column;
  padding: 2rem 1.25rem 1.5rem;
  background: linear-gradient(180deg, rgba(8,14,26,0.99) 0%, rgba(6,10,20,0.99) 100%);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(12px);
  overflow-y: auto;
  scrollbar-width: none;
  position: relative;
}
.sidebar::-webkit-scrollbar { display: none; }

/* Sidebar vertical grid lines for depth */
.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      180deg,
      transparent,
      transparent 39px,
      var(--circuit-line) 39px,
      var(--circuit-line) 40px
    );
  opacity: 0.4;
  pointer-events: none;
}

/* ─── Profile ─── */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.avatar-ring {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  box-shadow: 0 0 24px var(--cyan-glow), 0 0 60px rgba(0, 255, 159, 0.1);
  margin-bottom: 1rem;
  animation: ring-pulse 3s ease-in-out infinite;
}

@keyframes ring-pulse {
  0%, 100% { box-shadow: 0 0 24px var(--cyan-glow), 0 0 60px rgba(0, 255, 159, 0.1); }
  50%       { box-shadow: 0 0 36px rgba(0, 212, 255, 0.5), 0 0 80px rgba(0, 255, 159, 0.18); }
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid var(--bg);
}

.profile-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
}

.profile-title {
  font-size: 0.72rem;
  color: var(--cyan);
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.profile-location {
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: dot-blink 2s ease-in-out infinite;
}

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

/* ─── Circuit Nav ─── */
.circuit-nav {
  position: relative;
  flex: 1;
  padding: 1.5rem 0;
}

.rail-line {
  position: absolute;
  left: 20px;
  top: 1.5rem;
  bottom: 1.5rem;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--border-bright) 10%, var(--border-bright) 90%, transparent);
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
  position: relative;
}

.nav-item:hover { background: rgba(0, 212, 255, 0.05); }
.nav-item:hover .nav-label { color: var(--cyan); }

/* Node (the dot on the rail) */
.node-wrap {
  position: relative;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 14px; /* aligns to rail center */
}

.node {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-bright);
  border: 2px solid var(--border-bright);
  transition: all var(--transition);
  position: relative;
  z-index: 2;
}

.node-glow {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0;
  filter: blur(6px);
  transition: opacity var(--transition);
}

.nav-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-dim);
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color var(--transition);
}

/* Active nav item */
.nav-item.active .node {
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-glow);
}

.nav-item.active .node-glow { opacity: 0.6; }

.nav-item.active .nav-label {
  color: var(--cyan);
  text-shadow: 0 0 12px var(--cyan-glow);
}

/* ─── Sidebar Footer (social links) ─── */
.sidebar-footer {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.social-link {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all var(--transition);
}

.social-link svg { width: 16px; height: 16px; }

.social-link:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 12px var(--cyan-glow-sm);
  background: rgba(0, 212, 255, 0.06);
}

/* ─── Open-to-Work Badge ─── */
.open-to-work-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.55rem;
  padding: 0.28rem 0.7rem;
  font-size: 0.68rem;
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: 0.06em;
  color: var(--green);
  background: rgba(0, 255, 159, 0.08);
  border: 1px solid rgba(0, 255, 159, 0.28);
  border-radius: 20px;
  animation: badge-pulse 2.4s ease-in-out infinite;
}

.otw-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: dot-blink 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 255, 159, 0); }
  50%       { box-shadow: 0 0 10px 2px rgba(0, 255, 159, 0.12); }
}

/* ─── Resume Download Button ─── */
.resume-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin: 0.85rem 0 0.65rem;
  padding: 0.6rem 1rem;
  font-size: 0.78rem;
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(0, 212, 255, 0.06);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: pointer;
}

.resume-download-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.resume-download-btn:hover {
  background: rgba(0, 212, 255, 0.12);
  border-color: var(--cyan);
  box-shadow: 0 0 16px var(--cyan-glow-sm);
  color: #fff;
}

.resume-download-btn:hover svg {
  transform: translateY(2px);
}

/* ─── Theme Toggle Button ─── */
.theme-toggle {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.theme-toggle svg {
  width: 15px;
  height: 15px;
  pointer-events: none;
}

.theme-toggle:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 12px var(--cyan-glow-sm);
  background: rgba(0, 212, 255, 0.06);
}

body.light-mode .theme-toggle:hover {
  background: rgba(26, 111, 196, 0.08);
}

/* Sun shown in dark mode, moon shown in light mode */
.icon-moon { display: none; }
body.light-mode .icon-sun  { display: none; }
body.light-mode .icon-moon { display: block; }

/* Mobile toggle — same size as the social link icons */
.theme-toggle-mobile {
  width: 26px;
  height: 26px;
}
.theme-toggle-mobile svg { width: 12px; height: 12px; }

/* ═══════════════════════════════════════════
   CIRCUIT CONNECTOR
═══════════════════════════════════════════ */
.circuit-connector {
  position: relative;
  background: rgba(6,9,15,0.6);
  overflow: visible;
}

#trace-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Inactive traces */
.trace-path-bg {
  fill: none;
  stroke: var(--circuit-line);
  stroke-width: 2;
}

/* Active animated trace */
.trace-path-active {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 2;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px var(--cyan)) drop-shadow(0 0 10px var(--cyan-glow));
}

/* Traveling charge dot */
.charge-dot {
  fill: #fff;
  filter: drop-shadow(0 0 5px var(--cyan)) drop-shadow(0 0 12px var(--cyan));
}

/* ═══════════════════════════════════════════
   CONTENT AREA
═══════════════════════════════════════════ */
.content-area {
  position: relative;
  overflow: hidden;
  padding: 2rem 2.5rem 2rem 1.5rem;
  display: flex;
  align-items: flex-start;
  background: rgba(7, 11, 20, 0.94);
  border-left: 1px solid var(--border);
}

/* ─── Content Box ─── */
.content-box {
  position: absolute;
  inset: 0;
  padding: 2rem 2.5rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateX(24px);
  pointer-events: none;
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  background: transparent;
}

.content-box::-webkit-scrollbar { width: 4px; }
.content-box::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.content-box.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
}

/* Left accent border on content box */
.content-area::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10%;
  bottom: 10%;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 12px var(--cyan-glow);
  transition: opacity var(--transition);
}

/* ─── Section Header ─── */
.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.section-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--cyan);
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.08em;
}

.section-header h2 {
  font-size: 1.65rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.section-body {
  flex: 1;
}

/* ─── Sub Headings ─── */
.sub-heading {
  font-size: 0.8rem;
  font-family: 'Share Tech Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cyan);
  margin-bottom: 1rem;
  margin-top: 2rem;
}

/* ═══════════════════════════════════════════
   ABOUT SECTION
═══════════════════════════════════════════ */
.bio {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.75;
  max-width: 680px;
}

/* Hobbies */
.hobby-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.hobby-card {
  background: #0d1724;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 0.5rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 500;
  transition: all var(--transition);
}

.hobby-card:hover {
  border-color: var(--cyan-dim);
  color: var(--text);
  background: var(--surface-2);
}

.hobby-icon {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}

/* Trip Photos */
.trips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.trip-photo-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: #0d1724;
  border: 1px solid var(--border);
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
}

.trip-photo-card::after {
  content: '⤢';
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  font-size: 1rem;
  color: var(--cyan);
  opacity: 0;
  transition: opacity var(--transition);
  text-shadow: 0 0 8px var(--cyan);
}

.trip-photo-card:hover {
  border-color: var(--cyan);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,212,255,0.18);
}

.trip-photo-card:hover::after {
  opacity: 1;
}

.trip-photo-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.trip-photo-card:hover img {
  transform: scale(1.04);
}

.trip-caption {
  font-size: 0.72rem;
  color: var(--text-dim);
  padding: 0.45rem 0.6rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

/* Placeholder card */
.placeholder-card {
  border-style: dashed;
  border-color: var(--border-bright);
  cursor: default;
}
.placeholder-card::after { display: none; }

.placeholder-img {
  height: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  text-align: center;
  padding: 0.5rem;
}

.placeholder-img span { font-size: 1.8rem; }

.placeholder-img code {
  font-size: 0.6rem;
  color: var(--text-muted);
  background: var(--surface-3);
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  font-family: 'Share Tech Mono', monospace;
}

/* ── Lightbox ── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(6px);
}

.lightbox-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.lightbox-inner img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 0 60px rgba(0,212,255,0.15);
  object-fit: contain;
  display: block;
}

.lightbox-caption {
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: none;
  color: var(--cyan);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition);
}
.lightbox-close:hover { color: #fff; }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--cyan);
  font-size: 1.4rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}
.lightbox-nav:hover { background: rgba(0,212,255,0.15); border-color: var(--cyan); }
.lightbox-prev { left: -3.5rem; }
.lightbox-next { right: -3.5rem; }

/* ═══════════════════════════════════════════
   EXPERIENCE SECTION
═══════════════════════════════════════════ */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.timeline-item {
  background: #0d1724;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  position: relative;
  transition: border-color var(--transition);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--cyan), var(--green));
  border-radius: 3px 0 0 3px;
  opacity: 0;
  transition: opacity var(--transition);
}

.timeline-item:hover { border-color: var(--border-bright); }
.timeline-item:hover::before { opacity: 1; }

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.85rem;
  gap: 1rem;
}

.job-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.job-company {
  font-size: 0.78rem;
  color: var(--cyan);
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: 0.05em;
  margin-top: 0.15rem;
}

.job-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: 'Share Tech Mono', monospace;
  white-space: nowrap;
  background: var(--surface-2);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.job-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.job-bullets li {
  font-size: 0.82rem;
  color: var(--text-dim);
  padding-left: 1rem;
  position: relative;
  line-height: 1.6;
}

.job-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--cyan-dim);
}

/* ═══════════════════════════════════════════
   PROJECTS SECTION
═══════════════════════════════════════════ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.project-card {
  background: #0d1724;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(0,212,255,0.04), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.project-card:hover {
  border-color: var(--cyan-dim);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,212,255,0.12);
}

.project-card:hover::after { opacity: 1; }

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.project-icon { font-size: 1.5rem; }

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.stack-tag {
  font-size: 0.6rem;
  font-family: 'Share Tech Mono', monospace;
  color: var(--cyan-dim);
  background: rgba(0, 212, 255, 0.07);
  border: 1px solid rgba(0, 212, 255, 0.15);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.project-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.project-desc {
  font-size: 0.81rem;
  color: var(--text-dim);
  line-height: 1.65;
  flex: 1;
}

.project-footer {
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.project-link {
  font-size: 0.78rem;
  color: var(--cyan);
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: 0.04em;
  transition: text-shadow var(--transition);
}

.project-link:hover { text-shadow: 0 0 10px var(--cyan-glow); }

/* ═══════════════════════════════════════════
   SKILLS SECTION
═══════════════════════════════════════════ */
.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.skill-group {
  background: #0d1724;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  transition: border-color var(--transition);
}

.skill-group:hover { border-color: var(--border-bright); }

.skill-group-title {
  font-size: 0.78rem;
  font-family: 'Share Tech Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-icon { font-size: 1rem; }

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

.skill-tag {
  font-size: 0.75rem;
  color: var(--text);
  background: var(--surface-3);
  border: 1px solid var(--border-bright);
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  transition: all var(--transition);
}

.skill-tag:hover {
  background: rgba(0, 212, 255, 0.08);
  border-color: var(--cyan-dim);
  color: var(--cyan);
  box-shadow: 0 0 8px var(--cyan-glow-sm);
}

/* ─── Skill Tier Labels ─── */
.skill-tier {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.skill-tier:last-child { margin-bottom: 0; }

.skill-tier-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.65rem;
  font-family: 'Share Tech Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.skill-tier-label::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skill-tier.tier-expert .skill-tier-label { color: var(--cyan); }
.skill-tier.tier-expert .skill-tier-label::before { background: var(--cyan); box-shadow: 0 0 5px var(--cyan); }
.skill-tier.tier-expert .skill-tag { border-color: rgba(0,212,255,0.25); }

.skill-tier.tier-proficient .skill-tier-label { color: var(--green); }
.skill-tier.tier-proficient .skill-tier-label::before { background: var(--green); box-shadow: 0 0 5px var(--green); }
.skill-tier.tier-proficient .skill-tag { border-color: rgba(0,255,159,0.2); }

.skill-tier.tier-familiar .skill-tier-label { color: var(--text-dim); }
.skill-tier.tier-familiar .skill-tier-label::before { background: var(--text-dim); }
.skill-tier.tier-familiar .skill-tag { opacity: 0.8; }

/* ─── Project Proof (topology / screenshots) ─── */
.project-proof {
  margin-top: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.project-diagram {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.project-proof:hover .project-diagram {
  transform: scale(1.02);
}

.project-diagram-caption {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: 'Share Tech Mono', monospace;
  text-align: center;
  padding: 0.4rem 0.75rem;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  letter-spacing: 0.04em;
}

/* ─── Terminal Proof Block ─── */
.terminal-block {
  margin-top: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid #1a2a3e;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.71rem;
  line-height: 1.55;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  background: #1a2535;
  border-bottom: 1px solid #0f1e30;
}

.t-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.t-dot.t-red    { background: #ff5f57; }
.t-dot.t-yellow { background: #febc2e; }
.t-dot.t-green  { background: #28c840; }

.t-title {
  margin-left: 0.4rem;
  font-size: 0.63rem;
  color: #4a6080;
  letter-spacing: 0.04em;
}

.terminal-body {
  background: #070d14;
  padding: 0.7rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #1a2a3e #070d14;
}

.t-line       { color: #c8d8ea; white-space: nowrap; }
.t-prompt     { color: #00d4ff; margin-right: 0.4em; }
.t-ps         { color: #4fc3f7; margin-right: 0.4em; }
.t-success    { color: #00ff9f; }
.t-key        { color: #7ab0d8; }
.t-val        { color: #00d4ff; }
.t-header     { color: #3d5878; }
.t-data       { color: #c8d8ea; padding-left: 0.5em; }
.t-spacer     { height: 0.4em; }

/* ─── Social Proof Quote ─── */
.social-proof-quote {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--surface-2);
  border-left: 3px solid var(--cyan);
  border-radius: 0 var(--radius) var(--radius) 0;
  position: relative;
}

.social-proof-quote blockquote {
  font-size: 0.85rem;
  color: var(--text);
  font-style: italic;
  line-height: 1.65;
  margin-bottom: 0.6rem;
}

.social-proof-quote blockquote::before {
  content: '"';
  font-size: 2rem;
  color: var(--cyan-dim);
  line-height: 0;
  vertical-align: -0.55em;
  margin-right: 0.15em;
  font-style: normal;
}

.quote-attribution {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: 'Share Tech Mono', monospace;
}

.quote-attribution .li-icon {
  width: 14px;
  height: 14px;
  color: #0a66c2;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   EDUCATION SECTION
═══════════════════════════════════════════ */
.edu-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.edu-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: #0d1724;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  transition: all var(--transition);
  position: relative;
}

.edu-card:hover {
  border-color: var(--border-bright);
  transform: translateX(4px);
}

.edu-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.edu-details h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.2rem;
}

.edu-school {
  font-size: 0.8rem;
  color: var(--cyan-dim);
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: 0.03em;
  margin-bottom: 0.15rem;
}

.edu-year {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'Share Tech Mono', monospace;
}

.cert-badge {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.65rem;
  font-family: 'Share Tech Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green);
  background: rgba(0, 255, 159, 0.08);
  border: 1px solid rgba(0, 255, 159, 0.25);
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 255, 159, 0.3); }
  50%       { box-shadow: 0 0 0 6px rgba(0, 255, 159, 0); }
}

/* ═══════════════════════════════════════════
   CONTACT SECTION
═══════════════════════════════════════════ */
.contact-intro {
  font-size: 0.9rem;
  color: var(--text-dim);
  max-width: 520px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #0d1724;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem;
  transition: all var(--transition);
  cursor: pointer;
}

.contact-card:hover {
  border-color: var(--cyan);
  background: var(--surface-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 0 1px rgba(0,212,255,0.15);
}

.contact-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  flex-shrink: 0;
  transition: all var(--transition);
}

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

.contact-card:hover .contact-card-icon {
  background: rgba(0, 212, 255, 0.15);
  box-shadow: 0 0 16px var(--cyan-glow-sm);
}

.contact-card-body { flex: 1; }

.contact-card-body h3 {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.15rem;
}

.contact-card-body p {
  font-size: 0.73rem;
  color: var(--text-dim);
  font-family: 'Share Tech Mono', monospace;
}

.contact-card-arrow {
  color: var(--text-muted);
  font-size: 1rem;
  transition: all var(--transition);
}

.contact-card:hover .contact-card-arrow {
  color: var(--cyan);
  transform: translateX(3px);
}

/* ═══════════════════════════════════════════
   SCROLLBAR — Content area
═══════════════════════════════════════════ */
.content-box { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }

/* ═══════════════════════════════════════════
   ENTRANCE ANIMATION
═══════════════════════════════════════════ */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sidebar  { animation: fade-up 0.6s ease both; }
.content-box.active { animation: none; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET  (≤ 1024px)
   Sidebar layout preserved, just tighter dimensions
═══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  :root {
    --sidebar-w:   210px;
    --connector-w: 65px;
  }

  .content-area { padding: 1.75rem 1.5rem 1.75rem 1.25rem; }
  .content-box  { padding: 1.75rem 1.5rem 1.75rem 1.5rem; }

  .section-header h2 { font-size: 1.4rem; }
  .hobby-grid        { grid-template-columns: repeat(2, 1fr); }
  .trips-grid        { grid-template-columns: repeat(2, 1fr); }
  .contact-grid      { grid-template-columns: 1fr; }
  .projects-grid     { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE  (≤ 767px)
   Layout switches from 3-column grid → flex column stack.
   Sidebar becomes a fixed top header. Content scrolls below.
═══════════════════════════════════════════════════════════════ */

/* Profile social icons: hidden on desktop, shown on mobile */
.profile-social-mobile { display: none; }

@media (max-width: 767px) {

  /* ── Body: prevent page-level scroll ── */
  body { overflow: hidden; }

  /* ── Layout: flex column, full viewport, no page scroll ── */
  .layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    /* reset desktop grid values */
    grid-template-columns: unset;
    grid-template-rows: unset;
  }

  /* ── Circuit connector: completely hidden ── */
  .circuit-connector { display: none; }

  /* ── Sidebar → compact top header ── */
  .sidebar {
    flex-shrink: 0;          /* never shrink */
    flex-direction: column;
    padding: 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    animation: none;
    position: static;        /* no sticky; flex order keeps it at top */
    z-index: 50;
  }

  .sidebar::before { display: none; }

  /* ── Profile row: avatar | info | social icons ── */
  .profile {
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid var(--border);
    gap: 0.65rem;
    overflow: hidden;
  }

  .avatar-ring {
    width: 42px;
    height: 42px;
    min-width: 42px;
    flex-shrink: 0;
    margin-bottom: 0;
    animation: none;
    box-shadow: 0 0 10px var(--cyan-glow);
  }

  .profile-info-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    flex: 1;
    min-width: 0;             /* allow text to truncate */
    overflow: hidden;
  }

  .profile-name {
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .profile-title  { font-size: 0.58rem; margin-bottom: 0; }
  .profile-location { font-size: 0.66rem; }

  /* Social icons live in the profile row on mobile */
  .profile-social-mobile {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
    align-items: center;
  }

  .profile-social-mobile .social-link {
    width: 26px;
    height: 26px;
  }

  .profile-social-mobile .social-link svg {
    width: 12px;
    height: 12px;
  }

  /* Hide the original bottom footer social links on mobile */
  .sidebar-footer { display: none; }

  /* ── Nav → horizontal scrollable tab bar ── */
  .circuit-nav {
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    flex: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .circuit-nav::-webkit-scrollbar { display: none; }

  .rail-line { display: none; }

  .nav-list {
    flex-direction: row;
    gap: 0;
    padding: 0 0.25rem;
  }

  .nav-item {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.5rem 0.7rem;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: border-color var(--transition), background var(--transition);
  }

  .nav-item:hover {
    background: rgba(0, 212, 255, 0.04);
    border-bottom-color: var(--border-bright);
  }

  .nav-item.active {
    border-bottom-color: var(--cyan);
    background: rgba(0, 212, 255, 0.06);
  }

  .nav-item.active .nav-label {
    color: var(--cyan);
    text-shadow: 0 0 8px var(--cyan-glow);
  }

  /* Shrink node dot to small pip */
  .node-wrap { width: 5px; height: 5px; margin-left: 0; }
  .node      { width: 5px; height: 5px; border-width: 1px; }
  .node-glow { display: none; }

  .nav-item.active .node {
    background: var(--cyan);
    border-color: var(--cyan);
    box-shadow: 0 0 6px var(--cyan);
  }

  .nav-label { font-size: 0.65rem; letter-spacing: 0.04em; }

  /* ── Content area → takes remaining height, scrolls internally ── */
  .content-area {
    flex: 1;
    min-height: 0;            /* required for flex child to shrink */
    padding: 0;
    border-left: none;
    overflow-y: auto;
    overflow-x: hidden;
    display: block;
    -webkit-overflow-scrolling: touch;
  }

  .content-area::before { display: none; }

  /* ── Content boxes: hidden by default, flex when active ── */
  .content-box {
    position: static;
    inset: auto;
    opacity: 1;
    transform: none;
    pointer-events: none;
    display: none;
    padding: 1.25rem 1rem 3rem;
    height: auto;
    min-height: 0;
    overflow-x: hidden;
    word-break: break-word;
  }

  .content-box.active {
    display: flex;
    pointer-events: all;
    animation: mobile-fade-in 0.25s ease both;
  }

  @keyframes mobile-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* ── Section styles ── */
  .section-header { margin-bottom: 1.25rem; padding-bottom: 0.75rem; flex-wrap: wrap; gap: 0.5rem; }
  .section-header h2 { font-size: 1.25rem; }

  .bio        { font-size: 0.88rem; max-width: 100%; }
  .sub-heading { margin-top: 1.25rem; }

  .hobby-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }

  .trips-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .trip-photo-card img { height: 110px; }

  .timeline-header { flex-direction: column; gap: 0.15rem; }
  .job-date        { font-size: 0.68rem; align-self: flex-start; }
  .timeline-item   { padding: 0.9rem 0.9rem 0.9rem 1.1rem; }

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

  .edu-card { padding: 0.9rem; gap: 0.75rem; flex-wrap: wrap; }
  .edu-details { min-width: 0; }
  .cert-badge {
    position: static;
    transform: none;
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.6rem;
  }

  .contact-grid  { grid-template-columns: 1fr; gap: 0.7rem; }
  .contact-intro { font-size: 0.85rem; margin-bottom: 1.1rem; }

  /* Lightbox */
  .lightbox-inner { max-width: 95vw; }
  .lightbox-inner img { max-height: 72vh; }
  .lightbox-prev { left: -1.75rem; }
  .lightbox-next { right: -1.75rem; }

  /* Open-to-work badge — hide on mobile to keep header compact */
  .open-to-work-badge { display: none; }

  /* Resume button — compact pill that spans full width below the nav */
  .resume-download-btn {
    display: flex;
    margin: 0;
    padding: 0.45rem 1rem;
    font-size: 0.68rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: rgba(0, 212, 255, 0.04);
    justify-content: center;
  }

  /* Social proof quote — compact on mobile */
  .social-proof-quote { padding: 0.75rem 0.9rem; margin-top: 1rem; }
  .social-proof-quote blockquote { font-size: 0.8rem; }

  /* Skill tiers — tighten spacing */
  .skill-tier { gap: 0.4rem; margin-bottom: 0.6rem; }
  .skill-tier-label { font-size: 0.6rem; }
}

/* ── Very small phones (≤ 374px) ── */
@media (max-width: 374px) {
  .trips-grid { grid-template-columns: 1fr; }
  .hobby-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-label  { font-size: 0.58rem; }
  .nav-item   { padding: 0.45rem 0.55rem; }
  .profile-name { font-size: 0.85rem; }
}
