
:root {
  --bg: #10120f;
  --surface: #191c18;
  --surface-alt: #222620;
  --text: #f4f5ef;
  --muted: #a5ab9d;
  --line: #34392f;
  --accent: #b7f36b;
  --accent-text: #17200c;
  --lavender: #d9d6ff;
  --container: 1120px;
}

body.light-theme {
  --bg: #f5f6f0;
  --surface: #ffffff;
  --surface-alt: #e9ece3;
  --text: #171a15;
  --muted: #656b60;
  --line: #dce0d5;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  transition: background .25s, color .25s;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.container {
  width: min(var(--container), calc(100% - 44px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -.04em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
}

.brand-muted { color: var(--muted); font-weight: 500; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 25px;
  color: var(--muted);
  font-size: 13px;
}

.nav-links a:hover, .footer a:hover { color: var(--accent); }

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
}

.menu-toggle { display: none; }

.hero {
  min-height: 610px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 40px;
  padding-block: 60px 70px;
}

.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px #b7f36b20;
}

h1 {
  margin: 22px 0;
  font-size: clamp(50px, 7vw, 84px);
  font-weight: 800;
  line-height: .99;
  letter-spacing: -.075em;
}

h1 span { color: var(--accent); }

.hero-description {
  max-width: 570px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
}

.hero-description strong { color: var(--text); }

.hero-actions, .contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  transition: transform .2s, opacity .2s;
}

.button:hover { transform: translateY(-2px); }

.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.button-secondary {
  background: var(--surface);
  color: var(--text);
}

.hero-details {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 32px;
}

.hero-details span, .tag-list span {
  padding: 6px 10px;
  border-radius: 7px;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 11px;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 450px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  isolation: isolate;
}

/* A soft halo replaces the rectangular panel behind the portrait. */
.portrait-glow {
  position: absolute;
  z-index: -1;
  width: min(320px, 78%);
  aspect-ratio: 1;
  top: 34px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, #b7f36b24 0%, #b7f36b0b 58%, transparent 74%);
  filter: blur(8px);
  pointer-events: none;
}

.profile-picture {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 450px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 18px 26px #00000035);
}

.portrait-label {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  max-width: 90%;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  box-shadow: 0 8px 24px #00000014;
  backdrop-filter: blur(12px);
}

.portrait-label .status-dot { flex-shrink: 0; }
.portrait-label strong, .portrait-label small { display: block; }
.portrait-label strong { font-size: 12px; }
.portrait-label small { color: var(--muted); font-size: 11px; }

.section {
  padding-block: 80px;
  border-top: 1px solid var(--line);
}

.section-alt { background: color-mix(in srgb, var(--surface) 50%, var(--bg)); }

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 30px;
}

.section-heading h2, .contact-panel h2 {
  margin: 9px 0 0;
  font-size: clamp(30px, 4.5vw, 45px);
  line-height: 1.1;
  letter-spacing: -.06em;
}

.section-description {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.filter-button {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}

.filter-button.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.project-grid, .repo-grid, .skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.project-card, .repo-card, .skill-card {
  min-width: 0;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  transition: transform .2s, border-color .2s;
}

.project-card:hover, .repo-card:hover {
  transform: translateY(-3px);
  border-color: #7c965e;
}

.project-card[hidden] { display: none; }

.project-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--surface-alt);
  color: var(--accent);
  font-size: 22px;
}

.project-type {
  margin: 20px 0 8px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
}

.project-card h3, .repo-card h3 {
  margin: 0 0 10px;
  font-size: 19px;
  overflow-wrap: anywhere;
}

.project-card > p:not(.project-type),
.repo-card > p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.text-link, .repo-link {
  display: inline-block;
  margin-top: 22px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
}

.section-note {
  margin-top: 20px;
  color: var(--muted);
  font-size: 11px;
}

.github-intro { margin-bottom: 22px; }

.repo-card {
  display: flex;
  flex-direction: column;
  min-height: 245px;
}

.repo-card h3 { font-size: 17px; }
.repo-card > p { margin: 0; }
.repo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  color: var(--muted);
  font-size: 11px;
}

.repo-language {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.language-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.repo-link { margin-top: 17px; }
.loading-message { color: var(--muted); font-size: 13px; }

.skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.skill-card h3 { margin: 0; font-size: 15px; }

.about-panel {
  max-width: 850px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}

.about-panel p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}

.about-panel p:first-child { margin-top: 0; }
.about-panel p:last-child { margin-bottom: 0; }

.contact-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: clamp(26px, 5vw, 52px);
  border-radius: 28px;
  background: var(--accent);
  color: var(--accent-text);
}

.contact-panel .eyebrow { color: #526b2e; }
.contact-panel h2 { max-width: 550px; }
.contact-panel p { max-width: 500px; font-size: 13px; }

.contact-actions { margin-top: 0; }
.button-dark { background: #17200c; border-color: #17200c; color: #fff; }

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding-block: 25px;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr .85fr; gap: 24px; }
  .project-grid, .repo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .contact-panel { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 680px) {
  .container { width: calc(100% - 30px); }
  .nav { min-height: 68px; }
  .menu-toggle { display: grid; margin-left: auto; }
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 15px;
    right: 15px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; }
  .hero { grid-template-columns: 1fr; padding-block: 55px; }
  .hero-visual { min-height: 380px; }
  .profile-picture { height: 390px; }
  .hero-details { margin-top: 24px; }
  .section { padding-block: 55px; }
  .project-grid, .repo-grid, .skills-grid { grid-template-columns: 1fr; }
  .project-card, .repo-card, .skill-card { padding: 20px; }
  .footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
