/* ==========================================================================
   sukpat.dev — shared stylesheet
   Used by index.html and every page under /projects/
   ========================================================================== */

:root {
  --bg: #080b0f;
  --bg2: #0d1117;
  --bg3: #131920;
  --cyan: #22d3ee;
  --cyan-dim: rgba(34, 211, 238, 0.08);
  --cyan-border: rgba(34, 211, 238, 0.2);
  --text: #e2e8f0;
  --muted: #64748b;
  --border: #1e2938;
  --green: #4ade80;
  --amber: #fbbf24;
  --mono: "JetBrains Mono", monospace;
  --display: "Syne", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--mono);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  background-image: radial-gradient(circle, #1e2938 1px, transparent 1px);
  background-size: 32px 32px;
}

a { color: var(--cyan); text-decoration: none; transition: opacity 0.15s; }
a:hover { opacity: 0.75; }
a:focus-visible, .btn:focus-visible, button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.container { max-width: 1000px; margin: 0 auto; padding: 0 1.5rem; }

/* ── NAV ── */
nav {
  position: fixed; top: 0; width: 100%;
  background: rgba(8, 11, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
nav .container {
  display: flex; justify-content: space-between; align-items: center;
  height: 56px;
}
.logo { font-size: 0.9rem; font-weight: 700; color: var(--cyan); letter-spacing: 0.02em; }
.logo span { color: var(--muted); }
.nav-links { display: flex; gap: 1.75rem; list-style: none; }
.nav-links a { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.05em; }
.nav-links a:hover { color: var(--text); opacity: 1; }

/* ── HERO ── */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 56px; }
.hero-inner { padding: 4rem 0; }

.hero-tag {
  display: inline-block;
  font-size: 0.75rem; color: var(--cyan);
  border: 1px solid var(--cyan-border);
  background: var(--cyan-dim);
  padding: 0.3rem 0.8rem;
  border-radius: 2px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800; line-height: 1.05;
  margin-bottom: 0.5rem; letter-spacing: -0.02em;
}
.hero h1 .dim { color: var(--muted); }
.hero-role { font-size: 0.9rem; color: var(--muted); margin-bottom: 1.5rem; letter-spacing: 0.05em; }
.hero-role .sep { margin: 0 0.75rem; color: var(--border); }
.hero-desc { max-width: 560px; font-size: 0.875rem; color: var(--muted); margin-bottom: 2rem; line-height: 1.8; }
.hero-links { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; margin-bottom: 2.5rem; }

.btn {
  font-family: var(--mono); font-size: 0.8rem; font-weight: 500;
  padding: 0.6rem 1.25rem; border-radius: 3px; letter-spacing: 0.05em;
  transition: all 0.15s; display: inline-flex; align-items: center; gap: 0.4rem;
}
.btn-primary { background: var(--cyan); color: var(--bg); }
.btn-primary:hover { background: #67e8f9; opacity: 1; }
.btn-ghost { border: 1px solid var(--border); color: var(--muted); }
.btn-ghost:hover { border-color: var(--cyan-border); color: var(--text); opacity: 1; }

.live-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.75rem; color: var(--green);
  border: 1px solid rgba(74, 222, 128, 0.2);
  background: rgba(74, 222, 128, 0.06);
  padding: 0.3rem 0.75rem; border-radius: 2px;
}
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.hero-icons {
  display: flex; flex-wrap: wrap; gap: 1.1rem; align-items: center;
  padding-top: 1.75rem; border-top: 1px solid var(--border); max-width: 560px;
}
.hero-icons i { font-size: 1.5rem; color: var(--muted); transition: color 0.2s, transform 0.2s; }
.hero-icons i:hover { color: var(--text); transform: translateY(-2px); }

/* ── SECTIONS ── */
section { padding: 5rem 0; border-top: 1px solid var(--border); }
.section-label { font-size: 0.7rem; color: var(--cyan); letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 0.5rem; }
.section-title { font-family: var(--display); font-size: 2rem; font-weight: 800; margin-bottom: 0.75rem; letter-spacing: -0.01em; }
.section-sub { color: var(--muted); font-size: 0.85rem; margin-bottom: 3rem; }

/* ── NOW ── */
.now-list { display: flex; flex-direction: column; gap: 1px; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.now-item {
  background: var(--bg2); padding: 1.5rem 1.75rem;
  display: grid; grid-template-columns: 130px 1fr; gap: 1.5rem;
  transition: background 0.15s;
}
.now-item:hover { background: var(--bg3); }
.now-meta { display: flex; flex-direction: column; gap: 0.5rem; }
.now-date { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.05em; }
.now-status { font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.15rem 0.45rem; border-radius: 2px; align-self: flex-start; }
.status-building { background: rgba(34, 211, 238, 0.1); color: var(--cyan); border: 1px solid var(--cyan-border); }
.status-learning { background: rgba(251, 191, 36, 0.1); color: var(--amber); border: 1px solid rgba(251, 191, 36, 0.2); }
.status-shipped { background: rgba(74, 222, 128, 0.1); color: var(--green); border: 1px solid rgba(74, 222, 128, 0.2); }
.now-body h3 { font-family: var(--display); font-size: 1rem; font-weight: 600; margin-bottom: 0.4rem; }
.now-body p { font-size: 0.82rem; color: var(--muted); line-height: 1.75; margin-bottom: 0.75rem; }
.now-body p:last-child { margin-bottom: 0; }
.now-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.now-tag { font-size: 0.68rem; color: var(--muted); background: var(--bg); border: 1px solid var(--border); padding: 0.15rem 0.45rem; border-radius: 2px; }
.now-tag--icon { display: inline-flex; align-items: center; padding: 0.25rem 0.4rem; }
.now-tag--icon img { display: block; height: 14px; width: auto; }
.now-image { margin: 0.75rem 0; border: 1px solid var(--border); border-radius: 3px; overflow: hidden; }
.now-image img { display: block; width: 100%; height: auto; }

/* ── ABOUT ── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.about-text p { color: var(--muted); font-size: 0.875rem; margin-bottom: 1rem; line-height: 1.85; }
.about-text p strong { color: var(--text); }

.stack-block { background: var(--bg3); border: 1px solid var(--border); border-radius: 4px; padding: 1.25rem; }
.stack-block-title { font-size: 0.7rem; color: var(--cyan); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 1rem; }
.stack-row { display: flex; align-items: flex-start; margin-bottom: 0.9rem; gap: 0.75rem; font-size: 0.8rem; }
.stack-row:last-child { margin-bottom: 0; }
.stack-key { color: var(--muted); min-width: 78px; padding-top: 0.25rem; }
.stack-val { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.stack-val .tag {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 2px; padding: 0.2rem 0.45rem; font-size: 0.72rem; color: var(--text);
}
.stack-val .tag i { font-size: 0.95rem; color: var(--muted); }

/* ── PROJECTS ── */
.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px; border: 1px solid var(--border); border-radius: 4px; overflow: hidden;
}
.project-card { background: var(--bg2); padding: 1.75rem; transition: background 0.15s; position: relative; }
.project-card:hover { background: var(--bg3); }
.project-badge { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.2rem 0.5rem; border-radius: 2px; display: inline-block; margin-bottom: 1rem; }
.badge-live { background: rgba(74, 222, 128, 0.1); color: var(--green); border: 1px solid rgba(74, 222, 128, 0.2); }
.badge-wip { background: rgba(251, 191, 36, 0.1); color: var(--amber); border: 1px solid rgba(251, 191, 36, 0.2); }
.badge-archived { background: rgba(100, 116, 139, 0.1); color: var(--muted); border: 1px solid var(--border); }
.project-card h3 { font-family: var(--display); font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.project-card p { font-size: 0.82rem; color: var(--muted); margin-bottom: 1.25rem; line-height: 1.7; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1rem; }
.project-tag {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.68rem; color: var(--muted);
  background: var(--bg); border: 1px solid var(--border);
  padding: 0.18rem 0.45rem; border-radius: 2px;
}
.project-tag i { font-size: 0.85rem; }
.project-link { font-size: 0.78rem; color: var(--cyan); display: inline-flex; align-items: center; gap: 0.3rem; margin-right: 1rem; }
.project-link::after { content: "→"; transition: transform 0.15s; }
.project-link:hover::after { transform: translateX(3px); opacity: 1; }
.project-link-strong { font-weight: 700; }

/* thumbnail on a project card */
.project-thumb {
  margin: -1.75rem -1.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
  aspect-ratio: 16 / 9; overflow: hidden;
}
.project-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ── SKILLS ── */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.skill-group-title { font-size: 0.7rem; color: var(--cyan); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.75rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
.skill-group ul { list-style: none; }
.skill-group li { font-size: 0.82rem; color: var(--muted); padding: 0.35rem 0; display: flex; align-items: center; gap: 0.6rem; }
.skill-group li i { font-size: 1.05rem; color: var(--muted); width: 18px; text-align: center; }
.skill-group li .no-icon { color: var(--border); width: 18px; text-align: center; font-size: 0.9rem; }
.skill-group li:hover { color: var(--text); }
.skill-group li:hover i { color: var(--cyan); }

/* ── CONTACT ── */
.contact-wrap { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 2rem; }
.contact-text p { font-size: 0.875rem; color: var(--muted); max-width: 420px; line-height: 1.8; }
.contact-links { display: flex; flex-direction: column; gap: 0.75rem; }
.contact-item { display: flex; align-items: center; gap: 0.75rem; font-size: 0.82rem; color: var(--muted); transition: color 0.15s; }
.contact-item:hover { color: var(--text); }
.contact-icon { color: var(--cyan); font-size: 0.9rem; min-width: 16px; }

/* ── FOOTER ── */
footer { padding: 1.5rem 0; border-top: 1px solid var(--border); }
footer p { font-size: 0.75rem; color: var(--muted); }
footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }

/* ==========================================================================
   ARTICLE — used by project detail pages
   ========================================================================== */

.article-head { padding-top: 8rem; padding-bottom: 3rem; }
.back-link { font-size: 0.78rem; color: var(--muted); display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: 2rem; }
.back-link::before { content: "←"; }
.back-link:hover { color: var(--cyan); opacity: 1; }

.article-head h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800; line-height: 1.1;
  letter-spacing: -0.02em; margin-bottom: 0.75rem;
}
.article-lede { font-size: 0.95rem; color: var(--muted); max-width: 640px; line-height: 1.8; margin-bottom: 1.5rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: 1.5rem; font-size: 0.75rem; color: var(--muted); padding-top: 1.25rem; border-top: 1px solid var(--border); }
.article-meta div { display: flex; flex-direction: column; gap: 0.2rem; }
.article-meta dt, .article-meta .meta-key { color: var(--border); letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.66rem; }
.article-meta .meta-val { color: var(--text); }

/* the prose column — everything a writer needs */
.prose { max-width: 680px; padding-bottom: 5rem; }
.prose > * + * { margin-top: 1.25rem; }

.prose h2 {
  font-family: var(--display); font-size: 1.5rem; font-weight: 800;
  margin-top: 3.5rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  letter-spacing: -0.01em;
}
.prose h3 { font-family: var(--display); font-size: 1.1rem; font-weight: 600; margin-top: 2.25rem; color: var(--text); }
.prose p { font-size: 0.875rem; color: var(--muted); line-height: 1.9; }
.prose strong { color: var(--text); font-weight: 500; }
.prose em { color: var(--text); font-style: italic; }

.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { font-size: 0.875rem; color: var(--muted); line-height: 1.9; margin-bottom: 0.4rem; }
.prose li::marker { color: var(--cyan); }

.prose blockquote {
  border-left: 2px solid var(--cyan);
  padding: 0.25rem 0 0.25rem 1.25rem;
  color: var(--text); font-size: 0.875rem; font-style: italic;
}

/* inline code + code blocks */
.prose code {
  font-family: var(--mono); font-size: 0.8rem;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 2px; padding: 0.1rem 0.35rem; color: var(--cyan);
}
.prose pre {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 4px; padding: 1.25rem; overflow-x: auto;
  font-size: 0.78rem; line-height: 1.7;
}
.prose pre code { background: none; border: none; padding: 0; color: var(--text); }

/* callout box */
.callout {
  background: var(--cyan-dim); border: 1px solid var(--cyan-border);
  border-radius: 4px; padding: 1rem 1.25rem;
}
.callout p { color: var(--text); font-size: 0.82rem; margin: 0; }
.callout-label { font-size: 0.66rem; color: var(--cyan); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.4rem; display: block; }

/* ── FIGURES: images and diagrams ── */
figure {
  margin: 2.5rem 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg2);
  overflow: hidden;
}
figure img, figure video {
  display: block; width: 100%; height: auto;
  background: var(--bg3);
}
figure figcaption {
  font-size: 0.75rem; color: var(--muted);
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  line-height: 1.6;
}
figure figcaption b { color: var(--text); font-weight: 500; }

/* let a figure break out wider than the prose column on big screens */
@media (min-width: 900px) {
  figure.wide { width: 880px; margin-left: calc((680px - 880px) / 2); }
}

/* mermaid diagram container */
.diagram { padding: 1.5rem; display: flex; justify-content: center; background: var(--bg2); }
.diagram .mermaid { width: 100%; }
.diagram svg { max-width: 100%; height: auto; }

/* photo grid for 2-up screenshots */
.figure-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); }
.figure-grid img { width: 100%; }
@media (max-width: 640px) { .figure-grid { grid-template-columns: 1fr; } }

/* ── ANIMATION ── */
.fade-in { opacity: 0; transform: translateY(16px); animation: fadeUp 0.6s ease forwards; }
.fade-in:nth-child(2) { animation-delay: 0.1s; }
.fade-in:nth-child(3) { animation-delay: 0.2s; }
.fade-in:nth-child(4) { animation-delay: 0.3s; }
.fade-in:nth-child(5) { animation-delay: 0.4s; }
.fade-in:nth-child(6) { animation-delay: 0.5s; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .fade-in { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 640px) {
  .about-grid { grid-template-columns: 1fr; }
  .now-item { grid-template-columns: 1fr; gap: 0.75rem; }
  .now-meta { flex-direction: row; align-items: center; gap: 0.75rem; }
  .nav-links { gap: 1rem; }
  section { padding: 3rem 0; }
  .hero h1 { font-size: 2.75rem; }
  .article-head { padding-top: 6rem; }
  .prose pre { padding: 1rem; font-size: 0.72rem; }
}
