:root {
  --bg: #0a0a0a;
  --bg-soft: #111112;
  --border: #262626;
  --text: #f2f2f0;
  --text-muted: #9a9a95;
  --accent: #8fae5d;
  --accent-soft: rgba(143, 174, 93, 0.12);
  --radius: 999px;
  --radius-card: 14px;
  --maxw: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

main {
  flex: 1 0 auto;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px 24px;
}

header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.logo-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.logo span {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}

nav.main-nav {
  display: flex;
  gap: 28px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

nav.main-nav a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--text);
}

.mail-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.mail-copy:hover {
  border-color: var(--accent);
  color: var(--text);
}

@media (max-width: 480px) {
  .mail-copy {
    font-size: 12px;
    padding: 8px 12px;
  }
}

.copy-email {
  position: relative;
}

.copy-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--text);
  color: var(--bg);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 5;
}

.copy-tooltip.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

button.pill-btn {
  font: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.footer-email {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.footer-email:hover {
  color: var(--text);
}

.info-card .value.copy-email {
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.info-card .value.copy-email:hover {
  color: var(--accent);
}

@media (max-width: 640px) {
  nav.main-nav {
    position: static;
    transform: none;
    gap: 16px;
  }
  .header-inner {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 12px;
  }
  .logo span {
    display: none;
  }
}

.hero {
  position: relative;
  padding: 110px 24px 70px;
  text-align: center;
  overflow: hidden;
}

#cursor-trail-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  overflow: visible;
  pointer-events: none;
  z-index: -1;
}

.trail-dot {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff, var(--accent) 140%);
  box-shadow: 0 0 10px 1px var(--accent-soft);
  transform: translate(-50%, -50%) scale(0.5);
  opacity: 0;
  pointer-events: none;
  animation: trail-fade 1500ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  will-change: transform, opacity, filter;
}

@keyframes trail-fade {
  0% {
    transform: translate(-50%, -50%) scale(0.45);
    opacity: 0;
    filter: blur(0px);
  }
  12% {
    opacity: var(--dot-opacity, 0.3);
  }
  45% {
    transform: translate(-50%, -50%) scale(1.05);
    opacity: calc(var(--dot-opacity, 0.3) * 0.55);
    filter: blur(0.5px);
  }
  100% {
    transform: translate(-50%, -50%) scale(1.9);
    opacity: 0;
    filter: blur(2.5px);
  }
}

@media (prefers-reduced-motion: reduce) {
  #cursor-trail-layer {
    display: none;
  }
}

.dot-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 0 auto 40px;
  opacity: 0.9;
}

.dot-grid .row {
  display: flex;
  gap: 10px;
}

.dot-grid .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff, var(--accent) 140%);
  box-shadow: 0 0 14px 2px var(--accent-soft);
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
  font-weight: 600;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero .subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 28px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.section-head p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

section {
  padding: 60px 24px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

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

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-soft);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.project-thumb {
  aspect-ratio: 16 / 10;
  background:
    repeating-linear-gradient(135deg, rgba(143, 174, 93, 0.08) 0 2px, transparent 2px 14px),
    linear-gradient(160deg, #17181a, #0d0e0f);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.project-body {
  padding: 18px 20px 22px;
}

.project-body .tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
  display: block;
}

.project-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
}

.project-body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.cta-section {
  margin-top: 50px;
  padding-top: 90px;
  border-top: 1px solid var(--border);
}

.cta-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-soft);
  padding: 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.3;
  background: radial-gradient(circle,
    rgba(143, 174, 93, 0.55) 0%,
    rgba(143, 174, 93, 0.28) 30%,
    rgba(143, 174, 93, 0.1) 55%,
    rgba(143, 174, 93, 0) 75%);
  animation: aurora-drift 24s ease-in-out infinite;
}

.aurora-bg::after {
  content: "";
  position: absolute;
  inset: -10%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
  opacity: 0.05;
  mix-blend-mode: overlay;
}

.aurora-blob--1 {
  width: 46vw;
  height: 46vw;
  max-width: 520px;
  max-height: 520px;
  top: -14%;
  left: -10%;
  animation-duration: 22s;
}

.aurora-blob--2 {
  width: 38vw;
  height: 38vw;
  max-width: 460px;
  max-height: 460px;
  bottom: -16%;
  right: -8%;
  animation-duration: 27s;
  animation-delay: -8s;
}

.aurora-blob--3 {
  width: 28vw;
  height: 28vw;
  max-width: 340px;
  max-height: 340px;
  top: 38%;
  right: 20%;
  opacity: 0.22;
  animation-duration: 20s;
  animation-delay: -14s;
}

@keyframes aurora-drift {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(4vw, -3vw) scale(1.12);
  }
  66% {
    transform: translate(-3vw, 4vw) scale(0.9);
  }
}

@media (prefers-reduced-motion: reduce) {
  .aurora-blob {
    animation: none;
  }
}

.cta-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta-left h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  max-width: 360px;
}

.cta-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.pill-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.pill-btn svg {
  width: 16px;
  height: 16px;
}

.pill-btn.solid {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.pill-btn.solid:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0a0a;
}

.page-hero {
  padding: 90px 24px 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  font-weight: 600;
}

.page-hero p {
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
}

.projects-section {
  padding-top: 8px;
}

.about-intro {
  max-width: 640px;
  margin: 0 auto;
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.profile-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  flex-shrink: 0;
  overflow: hidden;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.prose {
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 15px;
}

.prose p {
  margin: 0 0 16px;
}

.info-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  max-width: var(--maxw);
  margin: 0 auto;
}

.info-card {
  flex: 0 1 240px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg-soft);
  padding: 20px;
  transition: border-color 0.2s ease;
}

.info-card:hover {
  border-color: var(--accent);
}

.info-card .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}

.info-card .value {
  font-size: 15px;
  font-weight: 500;
}

footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 13px;
}

.footer-inner a:hover {
  color: var(--text);
}
