:root {
  --bg: #07070d;
  --bg-alt: #0e0e18;
  --surface: rgba(255,255,255,.04);
  --border: rgba(255,255,255,.08);
  --text: #f4f4f8;
  --muted: #9ca3b8;
  --accent: #8b7cff;
  --accent2: #22d3ee;
  --radius: 16px;
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent2); }
img { max-width: 100%; display: block; }
.container { width: min(1120px, 92vw); margin: 0 auto; }
.container.narrow { max-width: 720px; }
.text-muted { color: var(--muted); }

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(7,7,13,.75);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.site-logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); font-family: var(--font-display); font-weight: 600;
}
.site-logo__img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.site-logo__dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 12px var(--accent);
}
.site-nav { display: flex; gap: 24px; }
.site-nav a { color: var(--muted); font-size: .95rem; }
.site-nav a:hover { color: var(--text); }
.nav-toggle {
  display: none; background: none; border: none; color: var(--text);
  font-size: 1.5rem; cursor: pointer;
}

.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  padding: 100px 0 60px; overflow: hidden;
}
.hero__glow {
  position: absolute; inset: -20%;
  background:
    radial-gradient(ellipse 50% 40% at 20% 30%, color-mix(in srgb, var(--accent) 35%, transparent), transparent),
    radial-gradient(ellipse 40% 35% at 80% 70%, color-mix(in srgb, var(--accent2) 25%, transparent), transparent);
  pointer-events: none;
}
.hero__inner {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center;
  position: relative; z-index: 1;
}
.hero__greeting { color: var(--accent2); font-weight: 500; margin-bottom: 8px; }
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.1; font-weight: 700; margin-bottom: 16px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__subtitle { color: var(--muted); font-size: 1.1rem; max-width: 520px; margin-bottom: 28px; }
.hero__socials { display: flex; gap: 12px; margin-top: 24px; }
.hero__socials a {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); color: var(--muted);
}
.hero__socials a:hover { border-color: var(--accent); color: var(--text); }
.hero__avatar {
  width: min(380px, 100%); margin-left: auto;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px; font-weight: 600;
  border: none; cursor: pointer; font-family: inherit; font-size: 1rem;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent2) 60%, var(--accent)));
  color: #fff; box-shadow: 0 8px 32px color-mix(in srgb, var(--accent) 40%, transparent);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.08); color: #fff; }

.section { padding: 88px 0; }
.section--alt { background: var(--bg-alt); }
.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 32px;
}
.section__more { margin-top: 28px; }

.prose p { margin-bottom: 1em; color: var(--muted); }
.prose p:last-child { margin-bottom: 0; }
.prose a { text-decoration: underline; }

.skills-grid { display: grid; gap: 20px; max-width: 640px; }
.skill__head { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: .95rem; }
.skill__bar {
  height: 8px; background: var(--surface); border-radius: 99px; overflow: hidden;
  border: 1px solid var(--border);
}
.skill__bar span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px; transition: width 1s ease;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s, border-color .25s;
}
.project-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.project-card__img { aspect-ratio: 16/10; overflow: hidden; background: var(--bg-alt); }
.project-card__img img { width: 100%; height: 100%; object-fit: cover; }
.project-card__body { padding: 20px; }
.project-card__tags { font-size: .8rem; color: var(--accent2); margin-bottom: 8px; }
.project-card h3 { font-family: var(--font-display); margin-bottom: 8px; }
.project-card p { color: var(--muted); font-size: .95rem; }
.project-card__link { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; font-weight: 600; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.blog-card {
  display: block; color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s;
}
.blog-card:hover { transform: translateY(-3px); color: inherit; }
.blog-card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.blog-card__body { padding: 20px; }
.blog-card time { font-size: .8rem; color: var(--muted); }
.blog-card h3 { font-family: var(--font-display); margin: 8px 0; }

.contact-intro { margin-bottom: 8px; }

.contact-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.contact-channel {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.contact-channel:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.contact-channel i {
  font-size: 1.25rem;
  color: var(--accent);
}

.contact-form { display: grid; gap: 14px; margin-top: 24px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; color: var(--text); font: inherit;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--accent);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-msg { font-size: .95rem; }
.form-msg.ok { color: #4ade80; }
.form-msg.err { color: #f87171; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.site-footer__inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: .9rem;
}
.site-footer__end {
  display: flex; align-items: center; flex-wrap: wrap; gap: 20px;
}
.socials { display: flex; gap: 12px; }
.socials a { color: var(--muted); font-size: 1.2rem; }
.socials a:hover { color: var(--text); }

.page-head { padding-top: 120px; padding-bottom: 24px; }
.post-meta { color: var(--muted); margin-bottom: 20px; }
.post-cover { border-radius: var(--radius); margin-bottom: 28px; width: 100%; }
.post-title { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 24px; }

.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__subtitle { margin-left: auto; margin-right: auto; }
  .hero__socials { justify-content: center; }
  .hero__visual { order: -1; }
  .hero__avatar { margin: 0 auto; max-width: 280px; }
  .site-nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; padding: 16px;
    background: var(--bg); border-bottom: 1px solid var(--border);
  }
  .site-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .form-row { grid-template-columns: 1fr; }
}
