:root {
  --bg-color: #060608;
  --bg-surface: #0e0e12;
  --bg-surface-elevated: #15151c;
  --border-color: #24242c;
  --border-active: #ffffff;
  
  --text-main: #f4f4f5;
  --text-muted: #8e8e99;
  --text-dim: #52525b;
  --text-pure-white: #ffffff;

  --accent-contrast: #ffffff;
  --accent-invert: #000000;

  --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-display: 'Cinzel', serif;

  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s var(--ease-kinetic);
  --transition-normal: 0.35s var(--ease-kinetic);

  --max-width: 1100px;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
  position: relative;
  background-color: var(--bg-color);
  min-height: 100vh;
}

.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.grid-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 48px 48px;
}

.mono {
  font-family: var(--font-mono);
}

.mono-bracket {
  color: var(--text-dim);
}

.section-pad {
  padding: 100px 0;
}

.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(6, 6, 8, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
  height: 72px;
}

.brand-logo {
  text-decoration: none;
  color: var(--text-pure-white);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 24px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-family: var(--font-mono);
  transition: var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 2px;
}

.nav-links a:hover {
  color: var(--text-pure-white);
  border-color: var(--border-color);
  background: rgba(255, 255, 255, 0.03);
}

.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
}

.mobile-nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-pure-white);
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.72rem;
  letter-spacing: 1.2px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-pure-white);
  border-radius: 2px;
  text-transform: uppercase;
}

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--border-color);
}

.hero-container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-tagline-wrap {
  margin-bottom: 24px;
}

.hero-headline {
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -2px;
  color: var(--text-pure-white);
  margin-bottom: 28px;
}

.hero-description {
  max-width: 720px;
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.hero-description strong {
  color: var(--text-pure-white);
  font-weight: 600;
}

.hero-container.align-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.hero-container.align-right .hero-description {
  margin-left: auto;
  margin-right: 0;
}

.projects-section {
  min-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.single-project-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
}

.featured-project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 48px;
  border-radius: 2px;
  transition: var(--transition-normal);
  position: relative;
}

.featured-project-card:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: var(--bg-surface-elevated);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}

.project-header {
  margin-bottom: 20px;
}

.project-title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  color: var(--text-pure-white);
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  font-weight: 700;
}

.project-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 36px 0;
  background: #040405;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-mono);
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-pure-white);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 36px;
  z-index: 10;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.95);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-pure-white);
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: #0a0a0e;
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links.mobile-open {
    display: flex;
  }

  .mobile-nav-toggle {
    display: flex;
  }

  .featured-project-card {
    padding: 32px 24px;
  }

  .hero-description {
    font-size: 1.05rem;
  }
}
