
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background-color: var(--ws-bg);
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

main.workspace-container {
  width: 100%;
  min-height: 100vh;
  padding: 140px 5% 80px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Header */
.workspace-header {
  margin-bottom: 80px;
  background: rgba(14, 18, 16, 0.7);
  border: 1px solid var(--ws-header-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.terminal-bar {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mac-dots {
  display: flex;
  gap: 8px;
}

.mac-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.mac-dots span:nth-child(1) { background: #ff5f56; }
.mac-dots span:nth-child(2) { background: #ffbd2e; }
.mac-dots span:nth-child(3) { background: #27c93f; }

.terminal-bar .path {
  flex-grow: 1;
  text-align: center;
  color: var(--ws-terminal-bar);
  font-family: 'Space Grotesk', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  margin-right: 56px; /* Offset to center text evenly against the dots */
}

.header-body {
  padding: 48px;
  position: relative;
}

.header-glitch {
  font-family: monospace;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--ws-header-glitch);
  margin: 0 0 16px 0;
  position: relative;
  display: inline-block;
}

.header-glitch::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: #0d110f; /* Match the header body apparent color */
  border-left: 0.15em solid var(--ws-header-hover-glitch);
  animation: typing-reveal 1.5s steps(13) forwards, blink-caret 0.8s infinite step-end;
}

@keyframes typing-reveal {
  from { width: 100%; }
  to { width: 0%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--ws-header-hover-glitch); }
}

.subtitle {
  color: var(--ws-subtitle, #A0A0A0);
  font-family: monospace;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  max-width: 600px;
  margin: 0;
  font-weight: 400;
  line-height: 1.6;
  opacity: 0;
  animation: fade-in-up 0.5s ease-out 1.6s forwards;
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.prompt-arrow {
  color: var(--ws-prompt-arrow, #6b8a7a);
  margin-right: 8px;
  font-weight: bold;
}

/* Content Layout */
.workspace-content {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ws-section-title, #6b8a7a);
  margin: 0;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}

.line-divider {
  height: 1px;
  flex-grow: 1;
  background: var(--ws-line-devider, rgba(255, 255, 255, 0.05));
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.project-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--ws-header-border);
  border-radius: 12px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  isolation: isolate;
}

/* Dynamic Sheen Sweep */
.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent,var(--ws-project-card-bg), transparent);
  transform: skewX(-20deg);
  transition: left 0s;
  z-index: -1;
}

.project-card:hover::before {
  left: 150%;
  transition: left 0.8s ease-in-out;
}

.project-card:hover {
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(107, 138, 122, 0.4);
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(107, 138, 122, 0.1),
    inset 0 0 20px rgba(107, 138, 122, 0.05);
}

.card-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--ws-card-top);
  margin-bottom: 24px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.project-tech {
  color: var(--ws-project-tech, #6b8a7a);
  transition: text-shadow 0.3s ease;
}

.project-card:hover .project-tech {
  text-shadow: 0 0 10px rgba(107, 138, 122, 0.5);
}

.project-name {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: var(--ws-header-glitch);
}

.project-desc {
  color: var(--ws-terminal-bar);
  font-size: 0.95rem;
  margin: 0 0 32px 0;
  flex-grow: 1;
}

.card-bottom {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.project-link {
  position: relative;
  color: var(--ws-header-glitch);
  text-decoration: none;
  font-size: 0.85rem;
  font-family: monospace;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: transparent;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  text-transform: uppercase;
  letter-spacing: 1px;
  overflow: hidden;
  z-index: 1;
}

.project-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: var(--ws-prompt-arrow);
  transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: -1;
  opacity: 0.15;
}

.project-link:hover {
  color: var(--ws-prompt-arrow);
  border-color: var(--ws-prompt-arrow);
  box-shadow: 
    inset 0 0 10px rgba(107, 138, 122, 0.2), 
    0 0 15px rgba(107, 138, 122, 0.25);
  transform: translateY(-2px);
  gap: 14px;
}

.project-link:hover::before {
  width: 100%;
}

/* Snippets / Experiments */
.snippet-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.coming-soon-badge {
  font-family: monospace;
  font-size: 0.75rem;
  padding: 4px 10px;
  background: rgba(107, 138, 122, 0.1);
  color: var(--ws-prompt-arrow);
  border: 1px solid rgba(107, 138, 122, 0.3);
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.snippet-list.empty-state {
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.terminal-loader {
  font-family: monospace;
  color: var(--ws-terminal-bar);
  font-size: 1rem;
}

.blinking-cursor {
  color: var(--ws-prompt-arrow);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.snippet-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--ws-header-border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--ws-header-glitch);
  transition: all 0.3s ease;
}

.snippet-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  padding-left: 32px;
}

.snippet-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.snippet-icon {
  font-family: monospace;
  color: var(--ws-prompt-arrow);
  font-size: 0.9rem;
  font-weight: bold;
}

.snippet-name {
  font-weight: 500;
}

.snippet-date {
  font-size: 0.85rem;
  color: var(--ws-terminal-bar);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  main.workspace-container {
    padding: 120px 20px 60px;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .snippet-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 20px;
  }
  
  .snippet-item:hover {
    padding-left: 20px;
    transform: translateX(4px);
  }
}

/* Articles Section */
.articles-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--ws-header-border);
  border-radius: 12px;
  padding: 24px 32px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  transition: all 0.3s ease;
}

.article-card:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateX(8px);
  border-color: var(--ws-prompt-arrow);
}

.article-content {
  flex-grow: 1;
}

.article-title {
  font-size: 1.3rem;
  color: var(--ws-header-glitch);
  margin: 0 0 8px 0;
  font-family: 'Space Grotesk', sans-serif;
}

.article-date {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--ws-prompt-arrow);
  margin-bottom: 8px;
  display: inline-block;
}

.article-desc {
  color: var(--ws-terminal-bar);
  font-size: 0.9rem;
  margin: 0;
  max-width: 800px;
}

.article-actions {
  flex-shrink: 0;
}

.article-link {
  text-decoration: none;
  color: var(--ws-header-glitch);
  font-family: monospace;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: rgba(107, 138, 122, 0.1);
  border: 1px solid rgba(107, 138, 122, 0.3);
  border-radius: 6px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.article-link:hover {
  background: var(--ws-prompt-arrow);
  color: #0d110f;
}

.link-icon {
  font-size: 0.7rem;
  padding: 2px 6px;
  background: var(--ws-prompt-arrow);
  color: #0d110f;
  border-radius: 3px;
}

.article-link:hover .link-icon {
  background: #0d110f;
  color: var(--ws-prompt-arrow);
}

@media (max-width: 900px) {
  .article-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
  }
  
  .article-card:hover {
    transform: translateY(-4px);
  }
}
