/* =========================================================
   Design tokens
   bg        #0b0f17  base
   surface   #10161f  cards
   surface-2 #141b26  hover/alt
   border    #212b3a
   text      #dbe3ee
   muted     #7c8aa3
   accent    #4da8ff  primary blue
   accent-2  #59e0c9  terminal green-cyan
   accent-3  #ff8a5c  warm highlight (used sparingly)
   ========================================================= */

:root {
  --bg: #0a0e15;
  --surface: #11161f;
  --surface-2: #161d29;
  --border: #212b3a;
  --text: #dde4ee;
  --muted: #7c8aa3;
  --accent: #4da8ff;
  --accent-soft: rgba(77, 168, 255, 0.12);
  --accent-2: #59e0c9;
  --accent-3: #ff8a5c;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --serif: 'Source Code Pro', var(--mono);
  --radius: 10px;
  --container: 1080px;
  --shadow: 0 1px 2px rgba(0,0,0,0.04), 0 12px 28px -14px rgba(0,0,0,0.35);
}
:root[data-theme="light"] {
  --shadow: 0 1px 2px rgba(20,30,60,0.04), 0 14px 28px -16px rgba(20,30,60,0.14);
}

:root[data-theme="light"] {
  --bg: #fafbfd;
  --surface: #ffffff;
  --surface-2: #f2f4f8;
  --border: #e4e8f0;
  --text: #12182a;
  --muted: #616b80;
  --accent: #2568d6;
  --accent-soft: rgba(37, 104, 214, 0.08);
  --accent-2: #0a8f7c;
  --accent-3: #d4602f;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 15% 0%, rgba(77,168,255,0.08), transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(89,224,201,0.06), transparent 40%);
  overflow-x: hidden;
  transition: background-color .35s ease, color .35s ease;
}

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

.noise-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  opacity: 0.5;
}

/* ---------- layout helpers ---------- */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 120px 24px 40px;
  scroll-margin-top: 90px;
}
.section-tag {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.section-title {
  font-family: var(--mono);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  margin-bottom: 48px;
  letter-spacing: -0.01em;
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(10, 14, 21, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
}
.brand-bracket { color: var(--accent); }
.nav-links { display: flex; gap: 32px; }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.icon { width: 18px; height: 18px; display: inline-block; vertical-align: -3px; fill: currentColor; }
.icon-inline { width: 14px; height: 14px; vertical-align: -2px; margin-right: 2px; }

.theme-toggle {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 50%;
  color: var(--text); position: relative; overflow: hidden;
  transition: border-color .2s ease, transform .2s ease;
}
.theme-toggle:hover { border-color: var(--accent); transform: rotate(15deg); }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
.nav-link {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
  position: relative;
  padding: 4px 0;
  transition: color .2s ease;
}
.nav-link::before { content: "./"; color: var(--accent); opacity: 0; transition: opacity .2s ease; }
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link.active::before { opacity: 1; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); }

/* ---------- custom cursor: diamond + text caret ---------- */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  a, button, .skill-tab { cursor: none; }
}
.cx-cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cx-cursor { display: block; }
}
.cx-cursor {
  position: fixed; top: 0; left: 0;
  width: 0; height: 0;
  pointer-events: none; z-index: 9999;
}
.cx-diamond {
  position: absolute; top: 0; left: 0;
  width: 13px; height: 13px;
  transform: translate(-50%, -50%) rotate(45deg);
  border: 1.5px solid var(--accent);
  border-radius: 3px;
  background: linear-gradient(135deg, rgba(77,168,255,0.18), rgba(89,224,201,0.08));
  box-shadow: 0 0 0 1px rgba(77,168,255,0.08), 0 0 14px rgba(77,168,255,0.45);
  transition: transform .22s cubic-bezier(.16,1,.3,1), width .22s cubic-bezier(.16,1,.3,1),
              height .22s cubic-bezier(.16,1,.3,1), border-color .22s ease, opacity .18s ease,
              background .22s ease, box-shadow .22s ease;
}
.cx-diamond::after {
  content: "";
  position: absolute; top: 50%; left: 50%;
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--accent-2);
  transform: translate(-50%, -50%) rotate(-45deg);
  box-shadow: 0 0 6px rgba(89,224,201,0.9);
}
.cx-caret {
  position: absolute; top: 0; left: 0;
  width: 1.5px; height: 0;
  background: var(--accent-2);
  border-radius: 2px;
  transform: translate(-50%, -50%) scaleY(0);
  opacity: 0;
  box-shadow: 0 0 8px rgba(89,224,201,0.6);
  transition: transform .18s cubic-bezier(.16,1,.3,1), opacity .18s ease, height .18s ease;
}

.cx-cursor.is-hover .cx-diamond {
  width: 30px; height: 30px;
  border-color: var(--accent-2);
  background: rgba(89,224,201,0.12);
  box-shadow: 0 0 0 1px rgba(89,224,201,0.12), 0 0 22px rgba(89,224,201,0.5);
}
.cx-cursor.is-down .cx-diamond { transform: translate(-50%, -50%) rotate(45deg) scale(0.8); }

.cx-cursor.is-text .cx-diamond { opacity: 0; transform: translate(-50%, -50%) rotate(45deg) scale(0.3); }
.cx-cursor.is-text .cx-caret { opacity: 1; height: 22px; transform: translate(-50%, -50%) scaleY(1); }

body.cx-hidden .cx-cursor { opacity: 0; }

/* ---------- hero canvas (particle constellation) ---------- */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 140px;
  position: relative;
  overflow: hidden;
}
.hero-canvas {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  display: block;
}
.hero-grid { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent-2);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 20px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 0 rgba(89,224,201,.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(89,224,201,.5); }
  70% { box-shadow: 0 0 0 8px rgba(89,224,201,0); }
  100% { box-shadow: 0 0 0 0 rgba(89,224,201,0); }
}
.hero h1 {
  font-family: var(--mono);
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.cursor { color: var(--accent); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-role {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 18px;
  margin-top: 14px;
}
.hero-sub {
  color: var(--muted);
  max-width: 480px;
  margin-top: 18px;
  font-size: 16px;
}
.hero-actions { display: flex; gap: 14px; margin-top: 34px; }
.btn {
  font-family: var(--mono);
  font-size: 14px;
  padding: 13px 22px;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: all .2s ease;
  display: inline-block;
}
.btn-primary { background: var(--accent); color: #04101f; border-color: var(--accent); font-weight: 600; }
.btn-primary:hover { background: #6cb8ff; transform: translateY(-1px); }
.btn-ghost { color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* terminal card */
.terminal {
  box-shadow: var(--shadow);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.6);
}
.terminal-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.tdot { width: 10px; height: 10px; border-radius: 50%; }
.tdot-r { background: #ff5f57; } .tdot-y { background: #febc2e; } .tdot-g { background: #28c840; }
.terminal-title { margin-left: 10px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.terminal-body {
  font-family: var(--mono);
  font-size: 13.5px;
  padding: 20px;
  min-height: 260px;
  color: var(--accent-2);
  white-space: pre-wrap;
}
.terminal-body .prompt { color: var(--muted); }
.terminal-body .out { color: var(--text); }
.terminal-body .key { color: var(--accent); }

.scroll-cue {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  width: 24px; height: 38px; border: 1px solid var(--border); border-radius: 14px;
  display: flex; justify-content: center; padding-top: 6px;
}
.scroll-cue span { width: 4px; height: 8px; background: var(--accent); border-radius: 2px; animation: scrolldown 1.6s infinite; }
@keyframes scrolldown { 0% { opacity: 0; transform: translateY(0);} 30%{opacity:1;} 100% { opacity: 0; transform: translateY(10px);} }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; }
.about-text { color: var(--muted); font-size: 15.5px; max-width: 60ch; font-family: var(--serif); line-height: 1.7; margin-bottom: 16px; }
.about-text:last-child { margin-bottom: 0; }
.info-card {
  box-shadow: var(--shadow);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.info-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; align-items: center; }
.info-row:last-child { border-bottom: none; }
.info-key { font-family: var(--mono); color: var(--muted); }
.info-val { font-family: var(--mono); color: var(--text); text-align: right; }
.icon-links { display: flex; gap: 10px; }
.icon-link {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 8px; color: var(--muted);
  transition: all .2s ease;
}
.icon-link .icon { width: 15px; height: 15px; }
.icon-link:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.resume-card {
  box-shadow: var(--shadow);
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.resume-card-text { display: flex; flex-direction: column; }
.resume-card-title { font-size: 14px; font-weight: 600; }
.resume-card-sub { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.btn-sm { padding: 9px 16px; font-size: 12.5px; white-space: nowrap; }
.tag {
  font-family: var(--mono); font-size: 12px; color: var(--accent-2);
  border: 1px solid var(--border); background: var(--surface);
  padding: 6px 12px; border-radius: 100px;
}

/* ---------- experience ---------- */
.project-card {
  box-shadow: var(--shadow);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
}
.project-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.project-head h3 { font-size: 19px; font-weight: 600; }
.project-period { font-family: var(--mono); font-size: 12px; color: var(--accent); border: 1px solid var(--border); padding: 4px 10px; border-radius: 100px; white-space: nowrap; }
.project-stack { font-family: var(--mono); color: var(--muted); font-size: 13px; margin-top: 8px; }
.project-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 24px; }
.project-cols h4 { font-family: var(--mono); font-size: 13px; color: var(--accent-2); margin-bottom: 12px; letter-spacing: .04em; text-transform: uppercase; }
.check-list li, .arrow-list li { color: var(--muted); font-size: 14.5px; font-family: var(--serif); line-height: 1.6; padding: 6px 0 6px 20px; position: relative; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-2); }
.arrow-list li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }

/* ---------- education ---------- */
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.edu-grid h4 { font-family: var(--mono); color: var(--accent-2); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 16px; }
.edu-card {
  box-shadow: var(--shadow);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px;
}
.edu-degree { font-weight: 600; font-size: 16px; }
.edu-school { color: var(--muted); font-size: 14px; margin-top: 4px; }
.edu-period { font-family: var(--mono); color: var(--accent); font-size: 12.5px; margin-top: 10px; }
.cert-list li {
  font-size: 14px; color: var(--text);
  padding: 12px 16px; margin-bottom: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  display: flex; align-items: center; gap: 10px;
}
.cert-icon { color: var(--accent-2); font-family: var(--mono); }

/* ---------- skills ---------- */
.skill-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.skill-tab {
  font-family: var(--mono); font-size: 13px; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border);
  padding: 10px 18px; border-radius: 100px; cursor: pointer;
  transition: all .2s ease;
}
.skill-tab:hover { color: var(--text); border-color: var(--accent); }
.skill-tab.active { color: #04101f; background: var(--accent); border-color: var(--accent); font-weight: 600; }
.skill-panel { display: none; grid-template-columns: 1fr 1fr; gap: 24px 40px; }
.skill-panel.active { display: grid; }
.skill-bar-item { padding: 6px 0; }
.skill-bar-head { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 14px; margin-bottom: 10px; }
.skill-pct { color: var(--accent); }
.skill-bar-track { height: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 100px; overflow: hidden; }
.skill-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 100px;
  transition: width 1.1s cubic-bezier(.16,1,.3,1);
}

/* ---------- contact ---------- */
.contact-section { text-align: center; }
.contact-sub { color: var(--muted); max-width: 480px; margin: 0 auto 12px; font-family: var(--serif); font-size: 16.5px; }
.contact-meta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--mono); font-size: 12.5px; color: var(--accent-2); margin-bottom: 32px;
}
.contact-meta .dot { width: 7px; height: 7px; }
.contact-layout { display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px; text-align: left; max-width: 820px; margin: 0 auto; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-content: start; }
.contact-card {
  box-shadow: var(--shadow);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 16px; transition: all .2s ease;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
.contact-card .icon { width: 22px; height: 22px; color: var(--accent); }
.contact-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.contact-card:hover .icon { color: var(--accent-2); }
.contact-label { font-family: var(--mono); font-size: 12.5px; color: var(--text); }

.contact-form {
  box-shadow: var(--shadow);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 14px;
}
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-family: var(--mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.form-row input, .form-row textarea {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 11px 12px; color: var(--text); font-family: var(--sans); font-size: 14px;
  resize: vertical; transition: border-color .2s ease;
}
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--accent); }
.btn-block { width: 100%; text-align: center; border: none; cursor: pointer; }

.form-alert {
  max-width: 820px; margin: 0 auto 20px; padding: 12px 16px; border-radius: 8px;
  font-family: var(--mono); font-size: 13px; text-align: left;
  border: 1px solid var(--border);
}
.form-alert-success { color: var(--accent-2); border-color: var(--accent-2); background: rgba(89,224,201,0.08); }
.form-alert-error { color: var(--accent-3); border-color: var(--accent-3); background: rgba(255,138,92,0.08); }

/* ---------- footer ---------- */
.site-footer {
  padding: 56px 24px 0;
  color: var(--muted); font-size: 13.5px;
  border-top: 1px solid var(--border); margin-top: 40px;
}
.footer-grid {
  max-width: var(--container); margin: 0 auto;
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px;
  padding-bottom: 40px;
}
.footer-brand .brand { font-size: 16px; }
.footer-tagline {
  margin-top: 14px; font-family: var(--serif); font-size: 14.5px;
  line-height: 1.7; color: var(--muted); max-width: 34ch;
}
.footer-heading {
  font-family: var(--mono); font-size: 12.5px; color: var(--text);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 16px;
}
.footer-list li { margin-bottom: 10px; }
.footer-list a { font-size: 13.5px; color: var(--muted); transition: color .2s ease; }
.footer-list a:hover { color: var(--accent); }
.footer-location { font-size: 13.5px; margin-bottom: 16px; }
.footer-bottom {
  text-align: center; padding: 20px 0 40px;
  border-top: 1px solid var(--border);
  font-family: var(--mono); font-size: 12px;
}

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .about-grid, .edu-grid, .project-cols, .contact-layout { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .skill-panel { grid-template-columns: 1fr; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 20px 24px; gap: 18px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
}
@media (max-width: 480px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- typewriter (hero subtitle) ---------- */
.hero-sub { min-height: 1.6em; display: flex; align-items: baseline; }
.typewriter { color: var(--muted); font-size: 17px; font-family: var(--serif); font-style: italic; }
.tw-cursor { color: var(--accent-2); margin-left: 2px; animation: blink 1s step-end infinite; font-weight: 600; }

/* ---------- job card (experience) ---------- */
.job-card {
  box-shadow: var(--shadow);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 24px;
}
.job-list { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; }
.job-list li {
  color: var(--muted); font-size: 14.5px; font-family: var(--serif); line-height: 1.6; padding: 6px 0 6px 20px; position: relative;
}
.job-list li::before { content: "▹"; position: absolute; left: 0; color: var(--accent); }

.sub-heading {
  font-family: var(--mono); font-size: 13px; color: var(--accent);
  margin: 40px 0 18px; letter-spacing: .06em;
}
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mini-project-card {
  box-shadow: var(--shadow);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; transition: border-color .2s ease, transform .2s ease;
}
.mini-project-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.mini-project-card h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.mini-project-card .project-stack { margin-top: 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag-list li {
  font-family: var(--mono); font-size: 11px; color: var(--accent-2);
  border: 1px solid var(--border); padding: 4px 9px; border-radius: 100px;
}
.project-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 20px; font-family: var(--mono); font-size: 13px;
  color: var(--accent); border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 16px; transition: all .2s ease;
}
.project-link:hover { border-color: var(--accent); background: var(--accent-soft); }
.project-link-sm { margin-top: 14px; font-size: 12px; padding: 7px 12px; }

@media (max-width: 860px) {
  .job-list { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
}

/* ---------- back to top ---------- */
.back-to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease, border-color .2s ease, background .2s ease;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { border-color: var(--accent); color: var(--accent); }
.back-to-top .icon { width: 18px; height: 18px; }
@media (max-width: 600px) {
  .back-to-top { right: 16px; bottom: 16px; width: 42px; height: 42px; }
}

/* ---------- footer social icons ---------- */
.footer-links { display: flex; gap: 10px; }
