:root {
  --bg: #0f0f0d;
  --surface: #181815;
  --border: #2a2a26;
  --accent: #c8a84b;
  --accent2: #4b8fc8;
  --text: #d4d0c4;
  --muted: #6b6860;
  --mono: "IBM Plex Mono", monospace;
  --display: "Barlow Condensed", sans-serif;
  --body: "Barlow", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.4;
}

/* HEADER */
header {
  padding: 3rem 2rem 2.5rem;
  max-width: 860px;
  margin: 0 auto;
  animation: fadeUp 0.8s ease both;
}

.topnav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(15, 15, 13, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.topnav-inner {
  max-width: 860px;
  margin: 0 400px;
  padding: 0.9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2rem;
}

.topnav-brand {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.6rem;
  color: #ebe8dc;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.topnav-brand span {
  color: var(--accent);
}

.topnav-links {
  display: flex;
  gap: 2rem;
}

.topnav-links a {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.topnav-links a:hover {
  color: var(--accent);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(3.5rem, 8vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: #ebe8dc;
  margin-bottom: 1.4rem;
}

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

.tagline {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.6;
}

.tagline strong {
  color: var(--text);
  font-weight: 400;
}

nav {
  margin-top: 2rem;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

nav a {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* MAIN */
main {
  .blog-card {
    display: block;
    text-decoration: none;
    padding: 1.4rem;
    background: var(--surface);
    border: 1px solid var(--border);
    margin-bottom: 1rem;
    transition:
      border-color 0.2s,
      transform 0.2s;
  }

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

  .blog-card-date {
    font-family: var(--mono);
    font-size: 0.68rem;
    color: var(--muted);
    letter-spacing: 0.08em;
    margin-bottom: 0.3rem;
  }

  .blog-card-title {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.2rem;
    color: #ebe8dc;
    margin-bottom: 0.4rem;
  }

  .blog-card-desc {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.55;
  }

  .blog-body {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.8;
    max-width: 680px;
  }

  .blog-body p {
    margin-bottom: 1.2rem;
  }
  .blog-body h2 {
    font-family: var(--display);
    font-size: 1.4rem;
    color: #ebe8dc;
    margin: 2rem 0 0.8rem;
  }
  .blog-body h3 {
    font-family: var(--display);
    font-size: 1.1rem;
    color: #ebe8dc;
    margin: 1.5rem 0 0.6rem;
  }
  .blog-body code {
    font-family: var(--mono);
    font-size: 0.85rem;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.1rem 0.4rem;
    color: var(--accent2);
  }
  .blog-body pre {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1.2rem;
    overflow-x: auto;
    margin-bottom: 1.2rem;
  }
  .blog-body pre code {
    background: none;
    border: none;
    padding: 0;
    color: var(--text);
  }
  .blog-body a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
  }
  .blog-body a:hover {
    border-color: var(--accent);
  }
  max-width: 860px;
  margin: 0 auto;
  padding: 0 2rem 6rem;
  padding-top: 5rem;
}

section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--border);
  animation: fadeUp 0.8s ease both;
}

section:last-child {
  border-bottom: none;
}

section:first-of-type {
  border-top: none;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.8rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: 0.01em;
  color: #ebe8dc;
  margin-bottom: 1rem;
  line-height: 1.1;
}

h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  color: #ebe8dc;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text);
}
p:last-child {
  margin-bottom: 0;
}

/* ABOUT */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

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

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.4rem;
}

.about-card h3 {
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 0.6rem;
}

.about-card p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

/* EXPERIENCE */
.job {
  margin-bottom: 2.8rem;
  padding-left: 1.2rem;
  border-left: 2px solid var(--border);
  position: relative;
  transition: border-color 0.2s;
}

.job:hover {
  border-left-color: var(--accent);
}

.job::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 6px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s;
}

.job:hover::before {
  opacity: 1;
}
.job:last-child {
  margin-bottom: 0;
}

.job-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.3rem;
}

.job-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  color: #ebe8dc;
  letter-spacing: 0.02em;
}

.job-date {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.job-org {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent2);
  letter-spacing: 0.06em;
  margin-bottom: 0.9rem;
}

.job ul {
  list-style: none;
  padding: 0;
}

.job ul li {
  font-size: 0.92rem;
  color: var(--muted);
  padding: 0.25rem 0 0.25rem 1rem;
  position: relative;
  line-height: 1.55;
}

.job ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--border);
  font-size: 0.8rem;
}

/* SKILLS */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.2rem;
}

.skill-group h3 {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.skill-group ul {
  list-style: none;
}
.skill-group ul li {
  font-size: 0.88rem;
  color: var(--muted);
  padding: 0.15rem 0;
}

/* PROJECTS */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}

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

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.4rem;
  transition:
    border-color 0.2s,
    transform 0.2s;
  text-decoration: none;
  display: block;
  cursor: pointer;
}

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

.project-card h3 {
  color: #ebe8dc;
}

.project-card p {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.9rem;
}

.tag {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent2);
  background: rgba(75, 143, 200, 0.08);
  border: 1px solid rgba(75, 143, 200, 0.2);
  padding: 0.2rem 0.5rem;
}

/* PUBLICATION */
.pub {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 1.2rem 1.4rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 0.5rem;
}

.pub em {
  color: var(--text);
  font-style: normal;
}
.pub a {
  color: var(--accent2);
  text-decoration: none;
}

/* CONTACT */
.contact-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.contact-link {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
  padding-bottom: 2px;
}

.contact-link:hover {
  border-color: var(--accent);
}

/* PROJECT SINGLE PAGE */
.project-hero {
  margin-bottom: 2rem;
}

.project-hero h2 {
  margin-bottom: 0.4rem;
}

.project-meta-row {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.project-links a {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
  margin-right: 1rem;
}

.project-links a:hover {
  border-color: var(--accent);
}

.project-body {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 3rem;
}

.project-body p {
  margin-bottom: 1.2rem;
}

/* DEVLOG */
.devlog-entry {
  margin-bottom: 2.5rem;
  padding-left: 1.2rem;
  border-left: 2px solid var(--border);
  position: relative;
  transition: border-color 0.2s;
}

.devlog-entry:hover {
  border-left-color: var(--accent);
}

.devlog-entry::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 6px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s;
}

.devlog-entry:hover::before {
  opacity: 1;
}

.devlog-date {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.devlog-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
  color: #ebe8dc;
  margin-bottom: 0.6rem;
}

.devlog-body {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
}

/* BACK LINK */
.back-link {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 2rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--accent);
}

/* FOOTER */
footer {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ANIMATIONS */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section:nth-child(1) {
  animation-delay: 0.1s;
}
section:nth-child(2) {
  animation-delay: 0.2s;
}
section:nth-child(3) {
  animation-delay: 0.3s;
}
section:nth-child(4) {
  animation-delay: 0.4s;
}
section:nth-child(5) {
  animation-delay: 0.5s;
}

.blog-card {
  display: block;
  text-decoration: none;
  padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
  transition:
    border-color 0.2s,
    transform 0.2s;
}

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

.blog-card-date {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
}

.blog-card-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.2rem;
  color: #ebe8dc;
  margin-bottom: 0.4rem;
}

.blog-card-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}

.blog-body {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.8;
  max-width: 680px;
}

.blog-body p {
  margin-bottom: 1.2rem;
}
.blog-body h2 {
  font-family: var(--display);
  font-size: 1.4rem;
  color: #ebe8dc;
  margin: 2rem 0 0.8rem;
}
.blog-body h3 {
  font-family: var(--display);
  font-size: 1.1rem;
  color: #ebe8dc;
  margin: 1.5rem 0 0.6rem;
}
.blog-body code {
  font-family: var(--mono);
  font-size: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.1rem 0.4rem;
  color: var(--accent2);
}
.blog-body pre {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.2rem;
  overflow-x: auto;
  margin-bottom: 1.2rem;
}
.blog-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
}
.blog-body a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.blog-body a:hover {
  border-color: var(--accent);
}
