*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --cursor-default: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><defs><radialGradient id='g' cx='0.35' cy='0.35' r='0.8'><stop offset='0%' stop-color='%232dd4bf'/><stop offset='100%' stop-color='%230b3b34'/></radialGradient></defs><circle cx='11' cy='11' r='7' fill='url(%23g)' stroke='%23f8b24b' stroke-width='2'/></svg>") 11 11, default;
  background: #050816;
  --bg-2: #141c2e;
  --text-0: #f3f4f6;
  --text-1: #c7d2fe;
  --text-muted: #a3acc2;
  --card: rgba(20, 26, 41, 0.72);
  --border: rgba(130, 150, 190, 0.18);
  --accent: #2dd4bf;
  --accent-2: #f8b24b;
  --glow: rgba(45, 212, 191, 0.35);
  --shadow: 0 20px 60px rgba(4, 8, 20, 0.55);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", "Space Grotesk", "Helvetica Neue", sans-serif;
  cursor: var(--cursor-default);
  background: radial-gradient(circle at 15% 20%, rgba(45, 212, 191, 0.14), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(248, 178, 75, 0.14), transparent 45%),
    linear-gradient(140deg, var(--bg-0), var(--bg-2));
  color: var(--text-0);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(600px circle at var(--pointer-x, 20%) var(--pointer-y, 30%), rgba(45, 212, 191, 0.12), transparent 55%);
  pointer-events: none;
  z-index: -1;
  transition: opacity 240ms ease;
}

.bg-system {
  position: fixed;
  inset: 0;
  z-index: -4;
  pointer-events: none;
  overflow: hidden;
}

.bg-base {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(0, 255, 180, 0.08), transparent 30%),
    radial-gradient(circle at 90% 80%, rgba(180, 0, 255, 0.08), transparent 30%),
    radial-gradient(circle at 60% 40%, rgba(0, 160, 255, 0.06), transparent 35%),
    linear-gradient(140deg, #050816, #0a1224 45%, #0b1222 65%, #0b1020);
}

.aurora {
  position: absolute;
  inset: 0;
  filter: blur(70px);
  opacity: 0.8;
}

.blob {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.35), transparent 60%);
  mix-blend-mode: screen;
  animation: blobFloat 28s ease-in-out infinite;
  transform: translate3d(0, 0, 0);
}

.blob-1 {
  top: -12%;
  left: -8%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.4), transparent 60%);
  animation-duration: 32s;
}

.blob-2 {
  top: 10%;
  right: -12%;
  background: radial-gradient(circle, rgba(90, 180, 255, 0.35), transparent 60%);
  animation-duration: 36s;
}

.blob-3 {
  bottom: -18%;
  left: 15%;
  background: radial-gradient(circle, rgba(180, 80, 255, 0.32), transparent 60%);
  animation-duration: 30s;
}

.blob-4 {
  bottom: 5%;
  right: 12%;
  background: radial-gradient(circle, rgba(248, 178, 75, 0.28), transparent 60%);
  animation-duration: 34s;
}

.blob-5 {
  top: 35%;
  left: 40%;
  background: radial-gradient(circle, rgba(120, 255, 210, 0.25), transparent 60%);
  animation-duration: 38s;
}

.particles {
  position: absolute;
  inset: 0;
  opacity: 0.45;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(210, 240, 255, 0.5);
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.4);
  animation: particleFloat 24s linear infinite;
}

.bg-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at 50% 25%, rgba(45, 212, 191, 0.18), transparent 55%),
    radial-gradient(480px circle at 72% 35%, rgba(248, 178, 75, 0.14), transparent 60%);
  opacity: 0.7;
  animation: glowPulse 18s ease-in-out infinite;
}

.bg-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='120' height='120' filter='url(%23n)' opacity='0.15'/></svg>");
  opacity: 0.05;
  mix-blend-mode: soft-light;
}

.ambient {
  position: fixed;
  inset: -40% 0 0;
  background: radial-gradient(circle at 20% 20%, rgba(45, 212, 191, 0.18), transparent 55%),
    radial-gradient(circle at 75% 10%, rgba(248, 178, 75, 0.2), transparent 50%);
  filter: blur(80px);
  z-index: -2;
  opacity: 0.65;
}

@media (prefers-reduced-motion: no-preference) {
  .ambient {
    animation: ambientShift 22s ease-in-out infinite;
  }

  body::before {
    animation: cursorGlow 12s ease-in-out infinite;
  }
}

@keyframes ambientShift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(2%, -3%, 0) scale(1.05);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes blobFloat {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(3%, -4%, 0) scale(1.08);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes particleFloat {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 0.3;
  }
  50% {
    opacity: 0.7;
  }
  100% {
    transform: translate3d(0, -80px, 0);
    opacity: 0.3;
  }
}

@keyframes glowPulse {
  0% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    opacity: 0.5;
  }
}

@keyframes cursorGlow {
  0% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.7;
  }
  100% {
    opacity: 0.35;
  }
}

a {
  color: inherit;
  text-decoration: none;
  cursor: var(--cursor-pointer);
}

a:hover,
a:focus {
  color: var(--accent);
}

main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

img {
  max-width: 100%;
  display: block;
}

.site-header {
  position: sticky;
  top: 1rem;
  z-index: 20;
  margin: 1rem auto 0;
  max-width: 1160px;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  background: rgba(12, 16, 28, 0.86);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.4), rgba(248, 178, 75, 0.35));
  color: var(--text-0);
  font-family: "Space Grotesk", sans-serif;
}

.logo-text {
  font-family: "Space Grotesk", sans-serif;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  font-weight: 500;
  color: var(--text-muted);
}

.site-nav a {
  transition: color 180ms ease;
}

.nav-cta {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.15);
  border: 1px solid rgba(45, 212, 191, 0.4);
  color: var(--text-0);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 0.35rem;
  cursor: pointer;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.18), rgba(248, 178, 75, 0.18));
  border: 1px solid rgba(45, 212, 191, 0.45);
  box-shadow: 0 10px 25px rgba(6, 12, 28, 0.45);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.nav-toggle-bar {
  display: block;
  width: 6px;
  height: 6px;
  background: radial-gradient(circle, var(--accent), var(--accent-2));
  margin: 4px auto;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.6);
}

.nav-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 35px rgba(6, 12, 28, 0.6);
  border-color: rgba(248, 178, 75, 0.6);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  padding: 4rem 0 2.5rem;
  align-items: center;
}

.hero-content h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.5rem, 4vw, 3.6rem);
  margin: 0 0 1rem;
}

.accent {
  color: var(--accent);
}

.lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.3rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.5rem 0;
}

.chip {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.3);
  color: var(--text-0);
  font-size: 0.85rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 180ms ease, box-shadow 180ms ease;
  cursor: var(--cursor-pointer);
}

.btn.primary {
  background: linear-gradient(120deg, rgba(45, 212, 191, 0.95), rgba(248, 178, 75, 0.95));
  color: #08101a;
  box-shadow: 0 14px 30px rgba(45, 212, 191, 0.2);
}

.btn.ghost {
  border: 1px solid var(--border);
  color: var(--text-0);
  background: rgba(12, 16, 28, 0.6);
}

.btn:hover {
  transform: translateY(-2px);
}

.hero-social {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

.hero-social a {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(12, 16, 28, 0.6);
  border: 1px solid var(--border);
  transition: transform 180ms ease, box-shadow 180ms ease;
  cursor: var(--cursor-pointer);
}

.hero-social a:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(4, 8, 20, 0.4);
}

.touch-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.8), rgba(45, 212, 191, 0.2));
  border: 1px solid rgba(248, 178, 75, 0.7);
  box-shadow: 0 0 20px rgba(45, 212, 191, 0.6);
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 120ms ease, transform 120ms ease;
}

.touch-cursor.is-active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.profile-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.6rem;
  max-width: 420px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.profile-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(45, 212, 191, 0.4);
  opacity: 0.35;
  pointer-events: none;
}

.profile-photo {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(248, 178, 75, 0.35);
  margin-bottom: 1.5rem;
}

.profile-meta h2 {
  margin: 0 0 0.4rem;
  font-family: "Space Grotesk", sans-serif;
}

.profile-meta p {
  color: var(--text-muted);
  margin: 0;
}

.profile-stats {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.8rem;
}

.stat-label {
  font-size: 0.75rem;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-value {
  font-weight: 600;
}

.section-title {
  margin: 4rem 0 2rem;
}

.section-title h2 {
  margin: 0.6rem 0 0;
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
  font-family: "Space Grotesk", sans-serif;
}

.about-grid,
.skills-grid,
.projects-grid {
  display: grid;
  gap: 1.5rem;
}

.about-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.about-card,
.skill-card,
.project-card,
.contact-card,
.resume-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.about-card h3,
.skill-card h3 {
  margin-top: 0;
  font-family: "Space Grotesk", sans-serif;
}

.skills-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.skill-card {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at top, rgba(45, 212, 191, 0.12), transparent 55%),
    linear-gradient(160deg, rgba(13, 18, 32, 0.9), rgba(12, 16, 28, 0.7));
  box-shadow: 0 20px 60px rgba(5, 10, 22, 0.6);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.skill-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(45, 212, 191, 0.25);
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease;
}

.skill-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 80px rgba(6, 12, 28, 0.7);
  border-color: rgba(248, 178, 75, 0.35);
}

.skill-card:hover::after {
  opacity: 1;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.skill-tags span {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(45, 212, 191, 0.2), rgba(248, 178, 75, 0.12));
  border: 1px solid rgba(45, 212, 191, 0.45);
  font-size: 0.85rem;
}

.experience .timeline {
  margin-top: 2rem;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.3rem;
  bottom: 0;
  left: 16px;
  width: 1px;
  background: rgba(130, 150, 190, 0.3);
}

.timeline-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.timeline-marker {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 0.35rem;
  box-shadow: 0 0 12px var(--glow);
}

.timeline-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.4rem;
}

.timeline-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1rem;
}

.projects-featured {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.projects-grid {
  margin-top: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.project-card {
  overflow: hidden;
  padding: 0;
}

.project-card .project-visual {
  height: 180px;
  overflow: hidden;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease;
}

.project-card:hover img {
  transform: scale(1.05);
}

.project-body {
  padding: 1.4rem;
}

.project-body h3 {
  margin-top: 0;
  font-family: "Space Grotesk", sans-serif;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0.8rem;
}

.project-tags span {
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(248, 178, 75, 0.35);
  color: var(--text-1);
}

.project-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--accent);
}

.resume {
  margin-top: 4rem;
}

.resume-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.contact-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: start;
}

.contact-card a {
  color: var(--accent);
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.form-group span {
  color: var(--accent-2);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(130, 150, 190, 0.35);
  background: rgba(10, 14, 24, 0.6);
  color: var(--text-0);
  font-family: inherit;
  cursor: text;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: 1px solid rgba(45, 212, 191, 0.5);
}

.form-group small {
  color: #f87171;
}

#formStatus {
  margin-top: 0.5rem;
  font-weight: 600;
}

.footer {
  text-align: center;
  padding: 2rem 1.5rem 3rem;
  color: var(--text-muted);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 600ms ease, transform 600ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.scroll-up [data-reveal]:not(.is-visible) {
  transform: translateY(-22px);
}

@media (max-width: 900px) {
  .site-header {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.75rem 0;
    display: none;
  }

  .site-header.nav-open .site-nav {
    display: flex;
  }
}

@media (max-width: 700px) {
  .hero {
    padding-top: 2.5rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
  }

  [data-reveal] {
    transition: none;
  }

  .project-card img {
    transition: none;
  }

  .blob,
  .bg-glow,
  .ambient,
  .particle {
    animation: none;
  }
}

/* Manual theme class override (used by JS toggle) */
.theme-dark {
  --bg-1: #071124;
  --bg-2: #081226;
  --accent: #7dd3fc;
  --muted: #fda893;
  color-scheme: dark;
}

/* apply dark visuals when .theme-dark is present on documentElement/html */
.theme-dark body {
  background: linear-gradient(120deg, #071124, #081226);
  color: #e6eef6
}

.theme-dark header {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.04)
}

.theme-dark .profile-summary,
.theme-dark .project-item,
.theme-dark form.contact-form {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04)
}

.theme-dark .tag {
  opacity: 0.95
}

.theme-dark .skill-badge {
  background: rgba(255, 255, 255, 0.02);
  color: #e6eef6
}

.theme-dark a {
  color: #93c5fd
}

.theme-dark body::before {
  opacity: 0.9
}

/* Make headings white in dark mode */
.theme-dark .profile-details h1,
.theme-dark section.skills h2,
.theme-dark section.tech-stack h2,
.theme-dark section.projects h2,
.theme-dark section.experience h2,
.theme-dark section.resume h2,
.theme-dark section.contact h2 {
  color: #ffffff;
}

/* Tech stack dark mode styling */
.theme-dark .tech-category {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.theme-dark .tech-category:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.theme-dark .category-title {
  color: #ff8c42;
  border-bottom: 2px solid #ff8c42;
}

/* Make project title headings consistent with link color */
.theme-dark .project-content h3 {
  color: #93c5fd;
}

/* reveal animation - optimized for all screen modes */
.reveal {
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1), 
              transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
  will-change: auto; /* Reset will-change after animation */
}

/* Reduced motion support - instant reveal */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  
  .reveal.revealed {
    opacity: 1;
    transform: none;
  }
}

/* Mobile optimizations - shorter distance and duration */
@media (max-width: 640px) {
  .reveal {
    transform: translateY(10px) scale(0.99);
    transition: opacity 400ms cubic-bezier(0.16, 1, 0.3, 1), 
                transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
  }
}

/* Tablet optimizations */
@media (min-width: 641px) and (max-width: 1024px) {
  .reveal {
    transform: translateY(15px) scale(0.985);
    transition: opacity 500ms cubic-bezier(0.16, 1, 0.3, 1), 
                transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
  }
}

/* Performance optimization for animations */
@media (prefers-reduced-motion: no-preference) {
  .reveal:not(.revealed) {
    will-change: opacity, transform;
  }
}

/* theme toggle button */
.theme-toggle {
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.05rem;
  padding: 6px 8px;
  border-radius: 8px;
  transition: transform 180ms ease, background 180ms ease;
}

.theme-toggle:hover {
  transform: translateY(-3px);
  background: rgba(2, 6, 23, 0.04)
}

/* Responsive tweaks */
@media (max-width: 640px) {
  .profile-summary {
    justify-content: center;
    text-align: center;
  }

  .profile-details {
    flex-basis: 100%;
  }

  nav a {
    margin-left: 1rem;
    font-size: 0.9rem;
  }

  .project-item {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .project-content {
    flex-basis: 100%;
  }

  .project-year {
    margin-left: 0;
    margin-top: 0.6rem;
  }
}