:root {
  --background: hsl(0, 0%, 6%);
  --foreground: hsl(0, 0%, 94%);
  --accent: hsl(70, 97%, 61%);
  --card: hsl(0, 0%, 12%);
  --border: hsl(0, 0%, 20%);
  --muted: hsl(0, 0%, 42%);
  --radius: 0px;
}

html.light {
  --background: hsl(0, 0%, 96%);
  --foreground: hsl(0, 0%, 6%);
  --card: hsl(0, 0%, 100%);
  --border: hsl(0, 0%, 88%);
  --muted: hsl(0, 0%, 42%);
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'IBM Plex Mono', monospace;
  background-color: var(--background);
  color: var(--foreground);
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
  cursor: none;
}

.cursor {
  display: none;
}

@media (pointer: fine) {
  .cursor {
    display: block;
    position: fixed;
    width: 20px;
    height: 20px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    top: 0;
    left: 0;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: width 0.2s ease, height 0.2s ease, background-color 0.2s ease;
  }

  body:hover a, body:hover button {
    cursor: none;
  }

  .cursor.hover {
    width: 40px;
    height: 40px;
    background-color: hsla(var(--accent-hsl), 0.2);
  }
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--foreground);
  font-weight: 700;
  line-height: 1.1;
}

a {
  color: var(--foreground);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 120px 0;
}

.section-header {
  margin-bottom: 60px;
}

.eyebrow {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--accent);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.section-header h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.section-body {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
  max-width: 40em;
  color: var(--muted);
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 1.5rem 0;
  background: linear-gradient(to bottom, var(--background), transparent);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1600px;
  padding: 0 2rem;
  margin: 0 auto;
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
}

.main-nav {
  display: flex;
  gap: 2rem;
  font-family: 'IBM Plex Mono', monospace;
}

#theme-toggle {
  background: none;
  border: none;
  color: var(--foreground);
  cursor: pointer;
}
#theme-toggle .moon { display: none; }
#theme-toggle .sun { display: block; }
html.light #theme-toggle .moon { display: block; }
html.light #theme-toggle .sun { display: none; }

/* Hero */
#hero {
  height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  padding: 0;
}

#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-title {
  font-size: clamp(3rem, 15vw, 16rem);
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  line-height: 0.85;
  position: relative;
  z-index: 0;
  pointer-events: none;
  color: hsl(0, 0%, 15%);
}

html.light .hero-title {
    color: hsl(0, 0%, 88%);
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

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

.project-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.project-card:hover img {
  filter: grayscale(0%);
}

.card-content {
  padding: 1.5rem;
}

.card-content h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.card-content p {
  color: var(--muted);
  margin-bottom: 1rem;
}

.card-content span {
    font-family: 'IBM Plex Mono', monospace;
    text-decoration: underline;
}

/* Skills */
.skills-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 4rem;
    font-size: 1rem;
    line-height: 1.8;
}

.skills-list h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.skills-list ul {
    list-style: none;
}

/* Blog */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.blog-post {
    background-color: transparent;
}

.blog-post img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    margin-bottom: 1.5rem;
}

.post-meta {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.blog-post h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.blog-post p {
    color: var(--muted);
}

/* Contact Form */
.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 800px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group-full {
    grid-column: 1 / -1;
}

.contact-form label {
    font-family: 'IBM Plex Mono', monospace;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted);
}

.contact-form input,
.contact-form textarea {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--foreground);
    padding: 0.75rem 1rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.button {
    grid-column: 1 / -1;
    background-color: var(--accent);
    color: var(--background);
    border: none;
    padding: 1rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    justify-self: start;
    min-width: 200px;
    text-align: center;
    transition: opacity 0.2s ease;
}

.button:hover {
    opacity: 0.85;
    color: var(--background);
}

/* Footer */
.site-footer-main {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
}

.site-footer-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.875rem;
    color: var(--muted);
}

.social-links {
    display: flex;
    gap: 1.5rem;
}
.social-links a:hover {
    color: var(--foreground);
}

/* Animate on scroll */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
}

/* Responsive */
@media (max-width: 768px) {
  section {
    padding: 80px 0;
  }
  .contact-form {
    grid-template-columns: 1fr;
  }
  .site-footer-main .container {
    flex-direction: column;
    gap: 1.5rem;
  }
  .header-container {
    padding: 0 1rem;
  }
  .container {
    padding: 0 1rem;
  }
}