/* ==========================================================================
   Aavash Gyawali — Modern static portfolio
   Vanilla CSS, clean & reliable. Dark-first with light support.
   ========================================================================== */

/* ==========================================================================
   Reset
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  margin: 0;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}
img,
picture,
video,
canvas,
svg,
object,
embed {
  display: block;
  max-width: 100%;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
p,
h1,
h2,
h3,
h4,
ul,
ol,
figure {
  margin: 0;
  padding: 0;
}
ul,
ol {
  list-style: none;
}
a {
  text-decoration: none;
  color: inherit;
}

/* ==========================================================================
   Theme tokens — Dark (default)
   ========================================================================== */
:root {
  --font-sans:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Helvetica, Arial, "Noto Sans", sans-serif;
  --font-display:
    "Sora", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;

  --color-bg: #07070c;
  --color-surface: #0d0d17;
  --color-surface-2: #14141f;
  --color-surface-3: #1b1b28;
  --color-border: #262635;
  --color-border-strong: #383849;
  --color-text: #f2f2fa;
  --color-text-muted: #a0a0b3;
  --color-text-faint: #70708a;

  --color-accent: #7c6cff;
  --color-accent-hover: #9588ff;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.45);
  --shadow:
    0 12px 28px -12px rgb(0 0 0 / 0.6), 0 2px 8px -2px rgb(0 0 0 / 0.4);
  --shadow-lg:
    0 30px 60px -24px rgb(0 0 0 / 0.7), 0 10px 24px -10px rgb(0 0 0 / 0.5);

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
}

:root[data-theme="light"] {
  --color-bg: #f8f8fc;
  --color-surface: #ffffff;
  --color-surface-2: #f1f1f7;
  --color-surface-3: #e8e8f1;
  --color-border: #e4e4ee;
  --color-border-strong: #cdcdda;
  --color-text: #17171f;
  --color-text-muted: #5a5a6e;
  --color-text-faint: #87879a;

  --color-accent: #5b46f0;
  --color-accent-hover: #4f46e5;

  --shadow-sm: 0 1px 2px 0 rgb(25 25 60 / 0.07);
  --shadow:
    0 12px 28px -14px rgb(25 25 60 / 0.16), 0 2px 6px -4px rgb(25 25 60 / 0.1);
  --shadow-lg:
    0 30px 60px -28px rgb(25 25 60 / 0.24), 0 10px 24px -14px rgb(25 25 60 / 0.14);
}

/* ==========================================================================
   Base
   ========================================================================== */
body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 16px;
  overflow-x: hidden;
  transition: background 0.4s, color 0.4s;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: 999px;
  border: 2px solid var(--color-bg);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-border-strong);
}

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

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.75rem 0;
  position: relative;
}

/* Section header */
.section-head {
  max-width: 640px;
  margin: 0 auto 1.8rem;
  text-align: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.7rem;
}
.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--color-border-strong);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--color-text);
}
.section-desc {
  margin-top: 0.7rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  /* NOTE: no backdrop-filter here — it creates a containing block for
     fixed-position descendants, which breaks the fullscreen mobile menu. */
  background: color-mix(in srgb, var(--color-bg) 74%, transparent);
  border-bottom: 1px solid transparent;
  transition:
    box-shadow 0.3s,
    background 0.3s,
    border-color 0.3s;
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--color-bg) 85%, transparent);
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.3rem;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
  transition: opacity 0.2s;
}
.logo-spark {
  color: var(--color-accent);
}
.logo:hover {
  opacity: 0.85;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-list a {
  position: relative;
  display: inline-block;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color 0.2s, background 0.2s;
}
.nav-list a:hover,
.nav-list a.active {
  color: var(--color-text);
}
.nav-list a.active {
  background: var(--color-surface-2);
}
.nav-list a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.15rem;
  transform: translateX(-50%);
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-accent);
}
.nav-cta .btn {
  margin-left: 0.5rem;
}
.nav-cta .btn-primary {
  background: var(--color-accent);
  box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--color-accent) 55%, transparent);
}
.nav-cta .btn-primary:hover {
  background: var(--color-accent-hover);
}
:root[data-theme="light"] .nav-cta .btn-primary {
  background: var(--color-accent);
  box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--color-accent) 55%, transparent);
}
:root[data-theme="light"] .nav-cta .btn-primary:hover {
  background: var(--color-accent-hover);
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s,
    transform 0.2s;
  outline: none;
}
.theme-toggle:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
  transform: translateY(-1px);
}
.theme-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle .icon-moon {
  display: inline-block;
}
.theme-toggle .icon-sun {
  display: none;
}
:root[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}
:root[data-theme="light"] .theme-toggle .icon-sun {
  display: inline-block;
}

/* Hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.6rem;
  height: 2.6rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  cursor: pointer;
  padding: 0 0.7rem;
  outline: none;
  z-index: 101;
}
.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.menu-toggle.open span:first-child {
  transform: rotate(45deg) translate(4px, 4px);
}
.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open span:last-child {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile menu */
@media (max-width: 767px) {
  .nav-cta {
    display: none;
  }
  .js .menu-toggle {
    display: flex;
    position: relative;
    z-index: 102;
    transition: background 0.2s, border-color 0.2s;
  }
  .js .menu-toggle.open {
    background: var(--color-surface-2);
    border-color: var(--color-accent);
  }
  .js .nav-list {
    display: flex;
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.2rem;
    background: color-mix(in srgb, var(--color-bg) 94%, transparent);
    backdrop-filter: blur(20px);
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 99;
  }
  .js .nav-list.open {
    transform: translateX(0);
  }
  .js .nav-list a {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
  }
  .js .nav-list a.active {
    background: transparent;
  }
  .js .nav-list a.active::after {
    display: none;
  }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.85rem 1.8rem;
  border: none;
  transition:
    transform 0.2s,
    box-shadow 0.25s,
    background 0.25s,
    border-color 0.25s,
    color 0.25s;
  outline: none;
  white-space: nowrap;
}
.btn:active {
  transform: translateY(0) scale(0.97);
}
.btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--color-accent) 55%, transparent);
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -12px color-mix(in srgb, var(--color-accent) 65%, transparent);
}
.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  font-weight: 500;
  font-size: 0.82rem;
  padding: 0.5rem 1rem;
  border-radius: 0.8rem;
}
.btn-ghost:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  transform: translateY(-2px);
}
.btn-sm {
  font-size: 0.82rem;
  padding: 0.5rem 1rem;
  border-radius: 0.8rem;
}
.btn-lg {
  padding: 1rem 2.2rem;
  font-size: 1rem;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 4rem 0 3rem;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-inner {
  position: relative;
  z-index: 2;
}
.hero-content {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3rem;
}
.hero-text {
  animation: fadeInUp 0.7s ease 0.05s both;
}

/* availability badge */
.availability {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  flex-shrink: 0;
}

.hero-greeting {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
}
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 0.9rem;
}
.hero-name-accent {
  color: var(--color-accent);
}
.hero-title {
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 1.1rem;
}
.hero-bio {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 34rem;
  line-height: 1.75;
  margin-bottom: 2rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.9rem;
}

.social-links {
  display: flex;
  gap: 0.7rem;
}
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  transition:
    transform 0.2s,
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
}
.social-links a:hover {
  transform: translateY(-4px);
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-surface-2);
}
.social-links svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Hero visual */
.hero-visual {
  position: relative;
  justify-self: center;
  animation: fadeInUp 0.9s ease 0.15s both;
}
.hero-frame {
  position: relative;
  width: min(310px, 78vw);
  aspect-ratio: 1;
  border-radius: 28px;
  padding: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  box-shadow: var(--shadow-lg);
}
.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 22px;
  background: var(--color-surface);
}

/* ==========================================================================
   Tech stack (inside Skills)
   ========================================================================== */
.tech-strip {
  padding: 0.25rem 0 0.75rem;
}
.tech-strip-label {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: 1.2rem;
}
.tech-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.9rem;
}
.tech-chip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 17px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  transition:
    transform 0.25s,
    border-color 0.25s,
    background 0.25s;
}
.tech-chip img {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: grayscale(0.15);
  transition:
    filter 0.25s,
    transform 0.25s;
}
:root[data-theme="dark"] .chip-dark img {
  filter: invert(1) grayscale(0.15);
}
.tech-chip:hover {
  transform: translateY(-5px);
  border-color: var(--color-accent);
  background: var(--color-surface-3);
  box-shadow: var(--shadow);
}
.tech-chip:hover img {
  filter: grayscale(0);
  transform: scale(1.12);
}
:root[data-theme="dark"] .tech-chip:hover img.chip-dark {
  filter: invert(1);
}

/* ==========================================================================
   Experience timeline
   ========================================================================== */
.timeline {
  position: relative;
  max-width: 760px;
  margin: 0 0 0 auto;
  padding-left: 1.5rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--color-border-strong);
  border-radius: 2px;
  opacity: 0.55;
}
.timeline-item {
  position: relative;
  padding: 0 0 1.3rem 1.5rem;
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.5rem;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 3px solid var(--color-accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--color-accent) 16%, transparent);
}
.timeline-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 14%, transparent);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}
.timeline-toggle {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  width: 100%;
  padding: 0.35rem 0 0;
  margin: 0;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.timeline-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: 6px;
}
.timeline-toggle:hover .timeline-btn-title {
  color: var(--color-accent);
}
.timeline-toggle .timeline-tag {
  margin-bottom: 0;
}
.timeline-btn-head {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 1rem;
  min-width: 0;
}
.timeline-btn-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
  transition: color 0.2s;
}
.timeline-btn-org {
  flex-basis: 100%;
  margin-top: -0.1rem;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}
.timeline-caret {
  margin-left: auto;
  align-self: center;
  width: 20px;
  height: 20px;
  color: var(--color-text-muted);
  transition: transform 0.3s ease, color 0.2s;
}
.timeline-item.open .timeline-caret {
  transform: rotate(180deg);
  color: var(--color-accent);
}
.timeline-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}
.timeline-item.open .timeline-body {
  grid-template-rows: 1fr;
}
.timeline-body-inner {
  overflow: hidden;
  min-height: 0;
}
.period {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-accent);
  white-space: nowrap;
}
.timeline-item .org {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  margin-top: 0.15rem;
}
.timeline-body-inner > p,
.timeline-item .sub-project p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-top: 0.4rem;
}
.timeline-list {
  margin-top: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.timeline-list li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--color-text-muted);
  font-size: 0.93rem;
  line-height: 1.7;
}
.timeline-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.68em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}
.timeline-subtitle {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0.75rem 0 0.3rem;
}
.sub-project {
  margin-top: 0.5rem;
}
.sub-project h5 {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}
.sub-project h5::before {
  content: "-";
  color: var(--color-accent);
  font-size: 0.9rem;
  font-weight: 700;
}

/* ==========================================================================
   Skills / Tools
   ========================================================================== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 1rem;
}
.tool-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.3rem 0.6rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition:
    transform 0.25s,
    box-shadow 0.25s,
    border-color 0.25s;
  cursor: default;
}
.tool-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--color-accent);
}
.tool-item img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  transition: transform 0.25s;
}
.tool-item:hover img {
  transform: scale(1.1);
}
.tool-item[data-name]::after {
  content: attr(data-name);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-align: center;
}

/* ==========================================================================
   Projects
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
  max-width: 940px;
  margin: 0 auto;
}
.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition:
    transform 0.25s,
    box-shadow 0.25s,
    border-color 0.25s;
}
.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--color-accent);
}
.project-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.project-card-status {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 14%, transparent);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}
.project-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s;
}
.project-card-link:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 10%, transparent);
}
.project-card-link svg {
  width: 18px;
  height: 18px;
}
.project-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}
.project-card-desc {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}
.project-card-url {
  margin-top: auto;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-accent);
  word-break: break-all;
  transition: color 0.2s;
}
.project-card-url:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.5rem;
  max-width: 940px;
  margin: 0 auto 2.5rem;
}
.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition:
    transform 0.25s,
    box-shadow 0.25s,
    border-color 0.25s;
}
.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--color-accent);
}
.contact-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: color-mix(in srgb, var(--color-accent) 16%, transparent);
  color: var(--color-accent);
}
.contact-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}
.contact-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.contact-card a {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  word-break: break-word;
  transition: color 0.2s;
}
.contact-card a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.contact-cta {
  text-align: center;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 0 2rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.3rem;
  text-align: center;
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--color-text);
}
.footer-tag {
  font-size: 0.88rem;
  color: var(--color-text-faint);
}
.footer-nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  justify-content: center;
}
.footer-nav-list a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-nav-list a:hover {
  color: var(--color-accent);
}
.footer-copyright {
  font-size: 0.85rem;
  color: var(--color-text-faint);
}

/* ==========================================================================
   Back to top
   ========================================================================== */
#back-to-top {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition:
    opacity 0.3s,
    transform 0.3s,
    border-color 0.2s;
  z-index: 90;
  box-shadow: var(--shadow);
}
#back-to-top.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
#back-to-top:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-3px);
}
#back-to-top svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal.delay-1 {
  transition-delay: 0.05s;
}
.reveal.delay-2 {
  transition-delay: 0.1s;
}
.reveal.delay-3 {
  transition-delay: 0.15s;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }
  .hero-visual {
    order: -1;
  }
  .hero-text {
    text-align: center;
  }
  .hero-bio {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions,
  .social-links {
    justify-content: center;
  }
}
@media (max-width: 767px) {
  .section {
    padding: 2.75rem 0;
  }
  .container {
    padding: 0 1.25rem;
  }
  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .tech-chip {
    width: 52px;
    height: 52px;
  }
  .tech-chip img {
    width: 25px;
    height: 25px;
  }
}
@media (max-width: 380px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}