/* ============================================
   GrokNight-inspired design tokens
   ============================================ */
:root {
  --bg-base: #0e0e0e;
  --bg-light: #1a1a1a;
  --bg-dark: #080808;
  --bg-card: #141414;
  --bg-card-hover: #1c1c1c;
  --bg-highlight: #1a1a1a;

  --text-primary: #c8c8c8;
  --text-secondary: #747ca1;
  --text-muted: #51597d;

  --accent: #bb9af7;
  --accent-dim: #9d7cd8;
  --accent-glow: rgba(187, 154, 247, 0.15);

  --cyan: #7dcfff;
  --green: #9ece6a;
  --orange: #ff9e64;
  --blue: #7aa2f7;
  --red: #f7768e;

  --border: #222222;
  --border-bright: #363636;

  --radius: 6px;
  --radius-sm: 4px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);

  --font-mono: 'JetBrains Mono', 'SF Mono', 'Menlo', monospace;
  --transition: 0.2s ease;
}

/* ============================================
   Reset & Base
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  font-family: var(--font-mono);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 0.9rem;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

main,
.header,
.footer {
  position: relative;
  z-index: 1;
}

/* ============================================
   Layout
   ============================================ */
.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5.5rem 0;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.section-accent {
  width: 3px;
  height: 1.5rem;
  background: var(--accent);
  border-radius: 1px;
  flex-shrink: 0;
}

.section-title {
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.section-subtitle {
  color: var(--text-muted);
  margin: -1.75rem 0 2.5rem 1.125rem;
  font-size: 0.82rem;
}

/* ============================================
   Header & Navigation
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(14, 14, 14, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo-prompt {
  color: var(--accent);
}

.logo-path {
  color: var(--cyan);
}

.nav-links {
  display: flex;
  gap: 0.25rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  border-color: var(--border);
  background: var(--bg-light);
}

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

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font-mono);
  cursor: pointer;
  border: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.btn-primary {
  background: var(--bg-light);
  color: var(--accent);
  border-color: var(--accent-dim);
}

.btn-primary:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
}

.btn-secondary:hover {
  color: var(--cyan);
  border-color: var(--border-bright);
  background: var(--bg-light);
}

.btn-prefix {
  color: var(--green);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 50% -10%, rgba(187, 154, 247, 0.08), transparent),
    radial-gradient(ellipse 30% 25% at 90% 80%, rgba(125, 207, 255, 0.04), transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  text-align: left;
  padding-top: 56px;
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}

.hero-terminal {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-dark);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-light);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--border-bright);
}

.terminal-dot--red { background: #ff5370; }
.terminal-dot--yellow { background: #e0af68; }
.terminal-dot--green { background: #9ece6a; }

.hero-terminal-title {
  margin-left: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.hero-terminal-body {
  padding: 2rem 1.75rem 2.25rem;
}

.hero-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
}

.hero-prompt {
  color: var(--accent);
  user-select: none;
}

.hero-command {
  color: var(--cyan);
}

.hero-greeting {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 0.5rem;
}

.hero-title {
  font-size: clamp(2rem, 7vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.hero-title .accent {
  color: var(--accent);
}

.hero-subtitle {
  font-size: clamp(0.85rem, 2vw, 1rem);
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 2rem;
}

.hero-subtitle .type {
  color: var(--orange);
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  animation: scroll-pulse 2.5s infinite;
}

.scroll-hint::before {
  content: '↓';
  color: var(--accent);
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ============================================
   About Section
   ============================================ */
.about {
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.avatar-placeholder {
  width: 200px;
  height: 200px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.avatar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.avatar-placeholder::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  z-index: 1;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
  font-size: 0.85rem;
}

.about-text p::before {
  content: '// ';
  color: var(--text-muted);
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.skills-list li {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--cyan);
}

.skills-list li:nth-child(2) { color: var(--green); }
.skills-list li:nth-child(3) { color: var(--accent); }
.skills-list li:nth-child(4) { color: var(--orange); }

/* ============================================
   Projects Section
   ============================================ */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  opacity: 0.6;
  transition: opacity var(--transition);
}

.project-card:hover {
  border-color: var(--border-bright);
  background: var(--bg-card-hover);
}

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

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1rem;
}

.project-image {
  height: 140px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--bg-light);
}

.project-image-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.project-image-placeholder {
  height: 140px;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.project-body {
  padding: 1.25rem;
}

.project-body h3 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: var(--text-primary);
}

.project-body h3::before {
  content: '◆';
  font-size: 0.65rem;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
}

.project-body p {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-bottom: 1rem;
  line-height: 1.55;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.project-tags span {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--blue);
  background: rgba(122, 162, 247, 0.08);
  border: 1px solid rgba(122, 162, 247, 0.2);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
}

.project-tags span:nth-child(2) { color: var(--cyan); border-color: rgba(125, 207, 255, 0.2); background: rgba(125, 207, 255, 0.08); }
.project-tags span:nth-child(3) { color: var(--green); border-color: rgba(158, 206, 106, 0.2); background: rgba(158, 206, 106, 0.08); }

.project-link {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  transition: color var(--transition);
}

.project-link:hover {
  color: var(--cyan);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
  background: var(--bg-dark);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-content p {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.footer-content p::before {
  content: '# ';
  color: var(--accent-dim);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--cyan);
}

/* ============================================
   Responsive — Mobile
   ============================================ */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(14, 14, 14, 0.97);
    backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 0.35rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-toggle.open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .about-grid {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .about-image {
    display: flex;
    justify-content: flex-start;
  }

  .footer-content {
    flex-direction: column;
    text-align: left;
    align-items: flex-start;
  }

  .scroll-hint {
    display: none;
  }

  .hero-terminal-body {
    padding: 1.5rem 1.25rem 1.75rem;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}