@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&display=swap');

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

:root {
  --bg: #0a0a0f;
  --fg: #e8e4df;
  --accent: #ff6b35;
  --accent2: #7b61ff;
  --muted: #888;
  --border: #2a2a35;
}

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  padding: 2rem;
  max-width: 1060px;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
}

.grain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  opacity: 0.03;
  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)'/%3E%3C/svg%3E");
  z-index: 9999;
}

main {
  padding: 4rem 0;
  position: relative;
}

header {
  margin-bottom: 4rem;
  position: relative;
}

header::after {
  content: '';
  position: absolute;
  bottom: -1.5rem;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
}

header h1 {
  font-family: 'Space Mono', monospace;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--fg) 0%, var(--accent) 50%, var(--accent2) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.subtitle {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: lowercase;
  margin-top: 0.5rem;
}

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

section {
  margin-bottom: 3rem;
}

.writing h2 {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.software-header {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.software-tagline {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: var(--muted);
}

.writing ul {
  list-style: none;
}

.writing li {
  margin-bottom: 0.4rem;
}

.writing li.divider {
  margin: 1rem 0;
  border-top: 1px solid var(--border);
}

.writing a {
  color: var(--fg);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.3s;
  padding-bottom: 1px;
}

.writing a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.writing .pub {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  color: var(--accent2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-left: 0.4rem;
  opacity: 0.7;
}

.section-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

/* Expandable sections */
.expandable {
  margin: 0;
}

.expandable summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.expandable summary::-webkit-details-marker {
  display: none;
}

.expandable summary::before {
  content: '+';
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent2);
  width: 1rem;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.expandable[open] summary::before {
  content: '\2212';
}

.expandable summary a {
  color: var(--fg);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.3s;
  padding-bottom: 1px;
}

.expandable summary a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.expandable summary:hover::before {
  color: var(--accent);
}

.sub-list {
  padding-left: 1.5rem;
  margin-top: 0.4rem;
  border-left: 1px solid var(--border);
}

.sub-list li {
  margin-bottom: 0.3rem;
}

.sub-list a {
  font-size: 0.85rem !important;
  color: var(--muted) !important;
}

.sub-list a:hover {
  color: var(--accent) !important;
}

/* Featured project */
.project.featured {
  border-color: var(--accent);
  background: rgba(255, 107, 53, 0.06);
}

.project.featured::before {
  opacity: 1;
}

.projects {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color 0.3s, background 0.3s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.project::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity 0.3s;
}

.project:hover {
  border-color: var(--accent);
  background: rgba(255, 107, 53, 0.04);
  transform: translateX(4px);
}

.project:hover::before {
  opacity: 1;
}

.project h3 {
  font-family: 'Space Mono', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--fg);
}

.project p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.back {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: color 0.2s;
}

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

.repo-link a {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s, color 0.2s;
}

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

.private-badge {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent2);
  border: 1px solid var(--accent2);
  border-radius: 3px;
  padding: 0.1rem 0.4rem;
  margin-left: 0.5rem;
  vertical-align: middle;
  opacity: 0.7;
}

.reach-out {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.4rem;
  font-style: italic;
}

footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.contact {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.3s;
}

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

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

  body {
    padding: 1.25rem;
  }

  main {
    padding: 2rem 0;
  }

  header h1 {
    font-size: 1.8rem;
  }
}
