*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0d0d0d;
  --surface: #161616;
  --border: #262626;
  --text: #e0e0e0;
  --text-muted: #888;
  --accent: #8ab4f8;
  --accent-hover: #aecbfa;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 700px;
  margin: 0 auto;
  padding: 4rem 1.5rem 80vh;
}

/* --- Typography --- */

h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

strong {
  color: #fff;
  font-weight: 600;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.mono {
  font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
}

/* --- Side Nav --- */

.side-nav {
  position: fixed;
  left: calc((100vw - 700px) / 2 - 180px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  z-index: 10;
}

.side-nav a {
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 0.3rem 0.75rem;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  text-decoration: none;
}

.side-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.side-nav a.active {
  color: #fff;
  border-left-color: var(--accent);
}

/* --- Sections --- */

section {
  margin-top: 3.5rem;
}

.intro {
  margin-top: 0;
}

.tagline {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.location {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.9em;
}

/* --- Core Stack Grid --- */

.stack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stack-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem;
}

.stack-item h3 {
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.stack-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.stack-item a {
  font-size: 0.8rem;
}

/* --- About phases --- */

.phase {
  margin-bottom: 2.5rem;
}

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

.phase li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.8rem;
}

.phase li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
}

.phase li a {
  font-size: 0.9em;
}

/* --- Selected Work --- */

.work-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.work-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.2rem;
}

.work-title {
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.work-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.work-item a {
  font-size: 0.85rem;
}

/* --- Writing --- */

.writing-intro {
  margin-bottom: 1rem;
}

.writing-list {
  list-style: none;
  padding: 0;
}

.writing-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.writing-list li:last-child {
  border-bottom: none;
}

/* --- Socials --- */

.socials ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.socials li a {
  font-size: 0.95rem;
}

/* --- Responsive --- */

@media (max-width: 1100px) {
  .side-nav {
    display: none;
  }
}

@media (max-width: 550px) {
  main {
    padding: 2.5rem 1rem 4rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  .tagline {
    font-size: 1.1rem;
  }

  .stack-grid {
    grid-template-columns: 1fr;
  }
}
