/* ─────────────────────────────────────────────────────────────
   Austin Souto-Maior · Portfolio Styles
   ───────────────────────────────────────────────────────────── */

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

:root {
  --bg:          #ffffff;
  --bg2:         #f8f8f9;
  --bg3:         #f1f1f3;
  --bg4:         #e8e8ec;
  --border:      rgba(0,0,0,0.07);
  --border2:     rgba(0,0,0,0.13);
  --text:        #111114;
  --text2:       #4a4a5a;
  --text3:       #9898aa;
  --accent:      #1a6ef5;
  --accent2:     #0f5ce0;
  --accent-dim:  rgba(26,110,245,0.07);
  --accent-glow: rgba(26,110,245,0.12);
  --mono:        'IBM Plex Mono', monospace;
  --display:     'Syne', sans-serif;
}

[data-theme="dark"] {
  --bg:          #0a0a0c;
  --bg2:         #111115;
  --bg3:         #18181e;
  --bg4:         #1f1f28;
  --border:      rgba(255,255,255,0.07);
  --border2:     rgba(255,255,255,0.12);
  --text:        #e8e8ef;
  --text2:       #9090a8;
  --text3:       #5a5a72;
  --accent:      #5ab4f2;
  --accent2:     #3d9fe0;
  --accent-dim:  rgba(90,180,242,0.08);
  --accent-glow: rgba(90,180,242,0.15);
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

::selection { background: var(--accent-glow); color: var(--accent); }

/* ─── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 2px; }

/* ─── THEME TOGGLE ───────────────────────────────────────────── */
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: none; border: 1px solid var(--border2);
  border-radius: 8px; cursor: pointer;
  color: var(--text3);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.theme-toggle svg { width: 16px; height: 16px; pointer-events: none; }
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ─── GRID BG ────────────────────────────────────────────────── */
.grid-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 80%);
}

[data-theme="dark"] .grid-bg {
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
}

/* ─── NAV ────────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  height: 64px;
  background: rgba(255,255,255,0.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, border-color 0.3s;
}

[data-theme="dark"] nav {
  background: rgba(10,10,12,0.88);
}

.nav-right {
  display: flex; align-items: center; gap: 1rem;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 13px; font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.nav-logo span { color: var(--text3); }

.nav-links {
  display: flex; gap: 2rem;
  list-style: none; align-items: center;
}
.nav-links a {
  font-family: var(--mono);
  font-size: 12px; font-weight: 400;
  color: var(--text2);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

.nav-resume {
  color: var(--accent) !important;
  border: 1px solid rgba(26,110,245,0.35);
  padding: 6px 14px;
  border-radius: 4px;
  transition: background 0.2s, border-color 0.2s !important;
}
.nav-resume:hover {
  background: var(--accent-dim);
  border-color: var(--accent) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px;
  background: none; border: none;
}
.nav-toggle span {
  display: block; width: 22px; height: 1.5px;
  background: var(--text2); border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ─── SECTIONS ───────────────────────────────────────────────── */
section {
  position: relative; z-index: 1;
  padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 5vw, 4rem);
  max-width: 1100px; margin: 0 auto;
}

/* ─── SECTION HEADER ─────────────────────────────────────────── */
.section-header { margin-bottom: 3rem; }

.section-tag {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: flex; align-items: center; gap: 10px;
}
.section-tag::after {
  content: ''; flex: 1; max-width: 60px;
  height: 1px; background: var(--accent);
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* ─── HERO ───────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 100px;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  width: 100%;
}

.hero-content { display: flex; flex-direction: column; }

/* ─── DEV PANELS (visual) ────────────────────────────────────── */
.hero-visual {
  display: flex; flex-direction: column; gap: 1rem;
  opacity: 0; animation: fadein 0.8s 0.7s forwards;
  align-self: center;
  min-width: 0;
}

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

.dev-panel {
  border-radius: 10px;
  border: 1px solid var(--border2);
  overflow: hidden;
  animation: float 6s ease-in-out infinite;
  box-shadow: 0 8px 32px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
  transition: border-color 0.3s, box-shadow 0.3s;
}

[data-theme="dark"] .dev-panel {
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.2);
}

.term-panel {
  animation-delay: 1.5s;
  animation-duration: 7s;
  margin-left: 1.5rem;
}

.panel-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}

.panel-dots { display: flex; gap: 6px; align-items: center; }
.dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }

.panel-title {
  font-family: var(--mono); font-size: 11px;
  color: var(--text3); flex: 1; text-align: center;
  letter-spacing: 0.03em;
}
.panel-lang {
  font-family: var(--mono); font-size: 10px;
  color: var(--accent); background: var(--accent-dim);
  padding: 1px 7px; border-radius: 3px;
  letter-spacing: 0.05em;
}

.panel-body {
  padding: 1rem 1.25rem;
  background: var(--bg2);
  overflow: hidden;
}

/* ─── CODE PANEL ─────────────────────────────────────────────── */
.code-body { font-family: var(--mono); font-size: 12px; line-height: 1.8; }

.code-line {
  display: block; white-space: pre;
  border-radius: 3px; padding: 0 4px; margin: 0 -4px;
}
.code-line--active { background: var(--accent-dim); }

.ln { color: var(--text3); user-select: none; margin-right: 16px; display: inline-block; width: 16px; text-align: right; }

/* Syntax colours */
.kw       { color: #8b5cf6; }                         /* keywords: import, const, return */
.fn       { color: var(--accent); }                   /* function / component names      */
.str      { color: #16a34a; }                         /* strings                         */
.id       { color: var(--text); }                     /* identifiers                     */
.pu       { color: var(--text3); }                    /* punctuation                     */
.attr     { color: #ea580c; }                         /* JSX attributes                  */
.tag-name { color: #0891b2; }                         /* JSX tag names                   */

[data-theme="dark"] .kw       { color: #c084fc; }
[data-theme="dark"] .str      { color: #4ade80; }
[data-theme="dark"] .attr     { color: #fb923c; }
[data-theme="dark"] .tag-name { color: #22d3ee; }

/* blinking cursor on active line */
.cursor {
  display: inline-block; width: 2px; height: 13px;
  background: var(--accent); vertical-align: middle;
  margin-left: 1px;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ─── TERMINAL PANEL ─────────────────────────────────────────── */
/* ─── CRM PIPELINE PANEL ─────────────────────────────────────── */
.crm-panel {
  animation-delay: 1.5s;
  animation-duration: 7s;
  margin-left: 1.5rem;
  overflow: visible;
}

/* Re-clip just the panel-bar so its bg stays within rounded corners */
.crm-panel .panel-bar {
  border-radius: 10px 10px 0 0;
}

.crm-live {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 10px;
  color: #16a34a;
  background: rgba(22,163,74,0.08);
  padding: 1px 7px; border-radius: 3px;
  letter-spacing: 0.05em;
}
[data-theme="dark"] .crm-live { color: #4ade80; background: rgba(74,222,128,0.1); }

.crm-live-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #16a34a; flex-shrink: 0;
  animation: blink 1.4s ease-in-out infinite;
}
[data-theme="dark"] .crm-live-dot { background: #4ade80; }

.crm-body {
  padding: 0.75rem 1rem 0.6rem;
}

.crm-cols {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.crm-col {
  display: flex; flex-direction: column;
}

.crm-col-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.4rem;
}
.crm-col-label {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text3);
}
.crm-col-count {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  color: var(--text3);
  background: var(--bg4);
  border-radius: 99px; padding: 0 5px; min-width: 16px; text-align: center;
  transition: background 0.3s, color 0.3s;
}
.crm-col-count--won { background: rgba(22,163,74,0.12); color: #16a34a; }
[data-theme="dark"] .crm-col-count--won { background: rgba(74,222,128,0.12); color: #4ade80; }

.crm-cards {
  display: flex; flex-direction: column; gap: 4px;
  min-height: 140px;
}

.crm-card {
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 5px;
  padding: 5px 7px;
  display: flex; flex-direction: column; gap: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.crm-card--won {
  border-color: rgba(22,163,74,0.35);
  background: rgba(22,163,74,0.04);
}
[data-theme="dark"] .crm-card--won {
  border-color: rgba(74,222,128,0.25);
  background: rgba(74,222,128,0.05);
}

/* Empty slot — card stays in DOM (preserves height) but is invisible */
.crm-card--empty {
  opacity: 0;
  pointer-events: none;
}

/* Highlight pulse when a card "arrives" in a column */
.crm-card--highlight {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

/* Mover fades out before jumping columns */
.crm-card--moving {
  opacity: 0.2;
  transition: opacity 0.25s ease;
}

.crm-co {
  font-family: var(--mono); font-size: 9.5px;
  color: var(--text); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.crm-val {
  font-family: var(--mono); font-size: 9px;
  color: var(--text3);
}
.crm-card--won .crm-val { color: #16a34a; }
[data-theme="dark"] .crm-card--won .crm-val { color: #4ade80; }

.crm-footer {
  display: flex; justify-content: space-between;
  margin-top: 0.65rem; padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.crm-stat {
  font-family: var(--mono); font-size: 10px; color: var(--text3);
}
.crm-stat strong { color: var(--text); font-weight: 600; }
.crm-stat--won strong { color: #16a34a; }
[data-theme="dark"] .crm-stat--won strong { color: #4ade80; }

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 12px; color: var(--accent);
  letter-spacing: 0.15em; text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 12px;
  opacity: 0; animation: fadein 0.6s 0.1s forwards;
}
.hero-eyebrow::before {
  content: ''; display: block;
  width: 32px; height: 1px; background: var(--accent);
}

.hero-name {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1.25rem;
  opacity: 0; animation: slidein 0.7s 0.2s forwards;
}
.hero-name .dim { color: var(--text3); }

.hero-title {
  font-family: var(--mono);
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  color: var(--text2);
  margin-bottom: 2rem;
  opacity: 0; animation: fadein 0.6s 0.4s forwards;
}
.hero-title .tag {
  display: inline-block;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(26,110,245,0.2);
  border-radius: 3px;
  padding: 1px 7px; font-size: 11px;
  margin: 0 2px; vertical-align: middle;
}

.hero-bio {
  max-width: 560px;
  font-size: 1.05rem; color: var(--text2);
  line-height: 1.75; margin-bottom: 2.5rem;
  opacity: 0; animation: fadein 0.6s 0.5s forwards;
}

.hero-actions {
  display: flex; gap: 1rem; flex-wrap: wrap; align-items: center;
  opacity: 0; animation: fadein 0.6s 0.6s forwards;
}

.hero-socials {
  display: flex; gap: 1.25rem; align-items: center;
  margin-top: 3.5rem;
  opacity: 0; animation: fadein 0.6s 0.8s forwards;
}
.hero-socials a {
  font-family: var(--mono); font-size: 11px;
  color: var(--text3); text-decoration: none;
  letter-spacing: 0.05em;
  display: flex; align-items: center; gap: 6px;
  transition: color 0.2s;
}
.hero-socials a:hover { color: var(--accent); }
.hero-socials .sep { color: var(--text3); font-size: 10px; }

.hero-scroll {
  position: absolute; bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  opacity: 0; animation: fadein 1s 1.2s forwards;
}
.hero-scroll span {
  font-family: var(--mono); font-size: 10px;
  color: var(--text3); letter-spacing: 0.12em; text-transform: uppercase;
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--text3), transparent);
  animation: scrollpulse 2s ease-in-out infinite;
}

/* ─── BUTTONS ────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  color: #ffffff;
  background: var(--accent);
  padding: 12px 24px; border-radius: 4px;
  text-decoration: none; border: none; cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); }
.btn-primary svg { width: 14px; height: 14px; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 13px; font-weight: 400;
  color: var(--text2); background: transparent;
  padding: 12px 24px; border-radius: 4px;
  text-decoration: none; cursor: pointer;
  border: 1px solid var(--border2);
  transition: color 0.2s, border-color 0.2s, transform 0.15s;
}
.btn-ghost:hover { color: var(--text); border-color: rgba(0,0,0,0.3); transform: translateY(-1px); }

/* ─── ABOUT ──────────────────────────────────────────────────── */
#about .about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: start;
}

.about-text p {
  color: var(--text2); line-height: 1.8;
  margin-bottom: 1.25rem; font-size: 1rem;
}
.about-text p strong { color: var(--text); font-weight: 600; }

.about-details {
  display: flex; flex-direction: column; gap: 1rem; margin-top: 2rem;
}
.detail-row {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 12px;
}
.detail-label { color: var(--text3); width: 80px; flex-shrink: 0; }
.detail-value { color: var(--text2); }
.detail-value a { color: var(--accent); text-decoration: none; }
.detail-value a:hover { text-decoration: underline; }

.about-img-wrap { position: relative; }
.about-img-wrap img {
  width: 100%; max-width: 360px;
  aspect-ratio: 1; object-fit: cover;
  border-radius: 8px; display: block;
  filter: grayscale(20%);
  border: 1px solid var(--border2);
}
.about-img-wrap::before {
  content: '';
  position: absolute; inset: 0; max-width: 360px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-glow), transparent 60%);
  pointer-events: none; z-index: 1;
}
.img-border {
  position: absolute; top: 12px; left: 12px;
  width: 100%; max-width: 360px;
  aspect-ratio: 1;
  border: 1px solid rgba(26,110,245,0.2);
  border-radius: 8px; z-index: -1;
}

/* ─── PROJECTS ───────────────────────────────────────────────── */
#projects .projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 1.75rem;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  transition: border-color 0.25s, transform 0.2s, background 0.25s;
}
.project-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.project-card:hover { border-color: var(--border2); background: var(--bg3); transform: translateY(-3px); }
.project-card:hover::before { opacity: 1; }

.project-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 1rem;
}

.project-logo {
  width: 48px; height: 48px;
  border-radius: 10px;
  border: 1px solid var(--border2);
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
  padding: 6px;
}
.project-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}
.project-logo svg { width: 22px; height: 22px; stroke: var(--text3); flex-shrink: 0; }

.project-links { display: flex; gap: 12px; align-items: center; }
.project-links a { color: var(--text3); transition: color 0.2s; text-decoration: none; }
.project-links a:hover { color: var(--accent); }
.project-links svg { width: 16px; height: 16px; }

.project-name {
  font-size: 1.05rem; font-weight: 600;
  color: var(--text); margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
.project-desc {
  font-size: 0.9rem; color: var(--text2);
  line-height: 1.7; margin-bottom: 1.5rem; flex: 1;
}
.project-stack { display: flex; flex-wrap: wrap; gap: 6px; }
.stack-tag {
  font-family: var(--mono);
  font-size: 10px; font-weight: 500;
  color: var(--text3);
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 3px; padding: 3px 8px;
  letter-spacing: 0.04em; text-transform: uppercase;
}

.project-footer {
  margin-top: 1.25rem; padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.project-site-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  color: var(--accent); text-decoration: none;
  letter-spacing: 0.04em; transition: gap 0.2s;
}
.project-site-link:hover { gap: 9px; }
.project-site-link svg { width: 12px; height: 12px; flex-shrink: 0; }

/* ─── SKILLS ─────────────────────────────────────────────────── */
#skills .skills-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}
#skills .skills-grid .skill-group:nth-child(-n+3) { grid-column: span 2; }
#skills .skills-grid .skill-group:nth-child(n+4)  { grid-column: span 3; }

.skill-group {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 1.5rem;
}
.skill-group-label {
  font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem;
  padding-bottom: 0.75rem; border-bottom: 1px solid var(--border);
}
.skill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-pill {
  font-family: var(--mono); font-size: 12px;
  color: var(--text2); background: var(--bg3);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 5px 10px;
  transition: color 0.2s, border-color 0.2s;
}
.skill-pill:hover { color: var(--accent); border-color: rgba(26,110,245,0.3); }

/* ─── EXPERIENCE ─────────────────────────────────────────────── */
#experience .timeline {
  position: relative; padding-left: 1.5rem;
}
#experience .timeline::before {
  content: '';
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 1px; background: var(--border2);
}

.timeline-item {
  position: relative;
  padding-left: 2rem; padding-bottom: 3rem;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute; left: -1.5rem; top: 5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.timeline-meta {
  display: flex; justify-content: space-between;
  align-items: baseline; flex-wrap: wrap;
  gap: 0.5rem; margin-bottom: 0.35rem;
}
.timeline-role {
  font-size: 1.05rem; font-weight: 600;
  color: var(--text); letter-spacing: -0.01em;
}
.timeline-period {
  font-family: var(--mono); font-size: 11px;
  color: var(--text3); letter-spacing: 0.04em;
}
.timeline-company {
  font-family: var(--mono); font-size: 12px;
  color: var(--accent); margin-bottom: 1rem;
}
.timeline-bullets {
  list-style: none; display: flex; flex-direction: column; gap: 0.5rem;
}
.timeline-bullets li {
  font-size: 0.9rem; color: var(--text2);
  line-height: 1.65; padding-left: 1.25rem; position: relative;
}
.timeline-bullets li::before {
  content: '▸'; position: absolute; left: 0;
  color: var(--accent); font-size: 10px; top: 4px;
}

/* ─── CONTACT ────────────────────────────────────────────────── */
#contact { text-align: center; }
#contact .contact-inner { max-width: 600px; margin: 0 auto; }
#contact .section-tag { justify-content: center; }
#contact .section-tag::after { display: none; }
#contact .contact-text {
  color: var(--text2); font-size: 1rem;
  line-height: 1.8; margin: 1.5rem 0 2.5rem;
}
.contact-links {
  display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap;
}

/* ─── FOOTER ─────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem clamp(1.5rem, 5vw, 4rem);
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 1rem;
  position: relative; z-index: 1;
}
.footer-copy {
  font-family: var(--mono); font-size: 11px;
  color: var(--text3); letter-spacing: 0.04em;
}
.footer-copy span { color: var(--accent); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
  font-family: var(--mono); font-size: 11px;
  color: var(--text3); text-decoration: none; transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }

/* ─── ANIMATIONS ─────────────────────────────────────────────── */
@keyframes fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slidein {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scrollpulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.15); }
}

.reveal {
  opacity: 1; transform: translateY(0);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── MOBILE ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  nav { padding: 0 1.25rem; }

  .nav-links {
    display: none; flex-direction: column; gap: 0;
    position: fixed; top: 64px; left: 0; right: 0;
    background: rgba(255,255,255,0.97);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
  }
  [data-theme="dark"] .nav-links {
    background: rgba(10,10,12,0.97);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block; padding: 0.85rem 1.5rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-resume { margin: 0.5rem 1.5rem; display: inline-flex; }
  .nav-toggle { display: flex; }

  /* Hero: stack to single column on tablet/mobile */
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  /* Panels shrink and lose offset on mobile */
  .crm-panel { margin-left: 0.75rem; }

  .code-body  { font-size: 11px; }

  #about .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-img-wrap { max-width: 260px; }

  #skills .skills-grid { grid-template-columns: repeat(2, 1fr); }
  #skills .skills-grid .skill-group:nth-child(-n+3),
  #skills .skills-grid .skill-group:nth-child(n+4) { grid-column: span 1; }
}

/* Panels hidden on very small screens to keep hero clean */
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .btn-primary, .btn-ghost { width: 100%; justify-content: center; }

  .hero-visual { display: none; }

  #skills .skills-grid { grid-template-columns: 1fr; }
}