/* =============================================
   CLEMENTINA TOM — Shared Stylesheet
   ============================================= */

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

:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --border: #1e1e1e;
  --border-light: #2a2a2a;
  --text: #e8e6e1;
  --muted: #666;
  --muted2: #888;
  --accent: #c8f542;
  --font-display: 'Syne', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --nav-h: 72px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9000;
  opacity: 0.5;
}

/* Cursor */
.cursor {
  position: fixed;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
}
.cursor-ring {
  position: fixed;
  width: 32px; height: 32px;
  border: 1px solid rgba(200,245,66,0.35);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transition: all 0.15s ease;
}
.cursor-ring.hovering {
  transform: scale(2);
  border-color: var(--accent);
}

/* Nav */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
nav.scrolled {
  border-color: var(--border);
  background: rgba(10,10,10,0.94);
  backdrop-filter: blur(14px);
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
}
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: none;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px; height: 1px;
  background: var(--muted);
  transition: all 0.3s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: rgba(10,10,10,0.97);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 490;
  padding: 24px 32px;
  flex-direction: column;
  gap: 0;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover, .nav-mobile a.active { color: var(--accent); }

/* Page wrap */
.page-wrap { padding-top: var(--nav-h); }

/* Sections */
.section {
  padding: 96px 48px;
  max-width: 1100px;
  margin: 0 auto;
}
.section-label {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 24px; height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 50px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 52px;
  color: var(--text);
}
.section-title em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1px rgba(232,230,225,0.28);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.2s;
  cursor: none;
  border: none;
}
.btn-primary { background: var(--accent); color: #0a0a0a; font-weight: 500; }
.btn-primary:hover { background: #d4f55a; transform: translateY(-1px); }
.btn-secondary { border: 1px solid var(--border-light); color: var(--muted); background: transparent; }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* Icon links */
.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--border-light);
  border-radius: 2px;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s;
}
.icon-link:hover { border-color: var(--accent); color: var(--accent); }
.icon-link svg { width: 16px; height: 16px; }

/* Project cards */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
}
.project-card {
  background: var(--bg);
  padding: 36px;
  position: relative;
  overflow: hidden;
  transition: background 0.25s;
  text-decoration: none;
  display: block;
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 0;
  background: var(--accent);
  transition: height 0.3s ease;
}
.project-card:hover { background: var(--surface); }
.project-card:hover::before { height: 100%; }
.project-tier {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  opacity: 0.7;
}
.project-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.2;
}
.project-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 24px;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  font-size: 10px;
  padding: 4px 10px;
  border: 1px solid var(--border-light);
  color: var(--muted);
  letter-spacing: 0.04em;
  border-radius: 1px;
  transition: all 0.2s;
}
.project-card:hover .tag { border-color: rgba(200,245,66,0.22); color: rgba(200,245,66,0.8); }
.project-arrow {
  position: absolute;
  top: 36px; right: 36px;
  font-size: 18px;
  color: var(--border-light);
  transition: all 0.25s;
}
.project-card:hover .project-arrow { color: var(--accent); transform: translate(3px,-3px); }

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
}
.skill-group {
  background: var(--bg);
  padding: 32px 28px;
  transition: background 0.2s;
}
.skill-group:hover { background: var(--surface); }
.skill-group-title {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.skill-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.skill-list li {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.2s;
}
.skill-group:hover .skill-list li { color: var(--muted2); }
.skill-list li::before {
  content: '';
  width: 4px; height: 4px;
  background: var(--border-light);
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 0.2s;
}
.skill-group:hover .skill-list li::before { background: var(--accent); }

/* Posts */
.posts-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); }
.post-item {
  background: var(--bg);
  padding: 26px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  text-decoration: none;
  transition: background 0.2s;
  position: relative;
  overflow: hidden;
}
.post-item::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.post-item:hover { background: var(--surface); }
.post-item:hover::after { width: 100%; }
.post-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: color 0.2s;
  line-height: 1.3;
}
.post-item:hover .post-title { color: var(--accent); }
.post-meta { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.post-tag {
  font-size: 10px;
  padding: 3px 9px;
  border: 1px solid var(--border-light);
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 1px;
}
.post-date { font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
}
.stat { background: var(--bg); padding: 28px 24px; transition: background 0.2s; }
.stat:hover { background: var(--surface); }
.stat-num {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label { font-size: 10px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 48px;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-left p { font-size: 11px; color: var(--muted); letter-spacing: 0.05em; }
.footer-left p + p { margin-top: 4px; }
.footer-left span { color: var(--accent); }
.footer-icons { display: flex; gap: 10px; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* Divider */
.divider { height: 1px; background: var(--border); max-width: 1100px; margin: 0 auto; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  nav { padding: 0 24px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .section { padding: 64px 24px; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  footer { padding: 24px; flex-direction: column; text-align: center; }
  .post-item { flex-direction: column; align-items: flex-start; gap: 10px; }
}
@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
}
