/* ============================================================
   KonKok — style.css
   Aesthetic: Editorial Bold × Refined Dark-Edge
   Fonts: Syne (display) + DM Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ========== Design Tokens ========== */
:root {
  /* Core palette — near-black base, electric lime accent */
  --bg:        #0d0e11;
  --bg2:       #141519;
  --surface:   #1a1c22;
  --surface2:  #21232b;
  --border:    #2a2d38;
  --border2:   #353847;

  --accent:    #c8f135;   /* electric lime */
  --accent2:   #a3d621;
  --accent3:   #e8ff70;
  --accent-rgb: 200, 241, 53;

  --success:   #34d399;
  --danger:    #f87171;
  --warning:   #fbbf24;

  --muted:     #5a6070;
  --muted2:    #7c8494;
  --text:      #e8eaf0;
  --text2:     #9ea5b8;

  --sans:      'DM Sans', sans-serif;
  --display:   'Plus Jakarta Sans', sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
}

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

/* ========== Base ========== */
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Noise grain overlay */
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: 9999;
  opacity: 0.35;
}

/* Ambient glow spots */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 35% at 5% 0%, rgba(200,241,53,.06) 0%, transparent 65%),
    radial-gradient(ellipse 40% 25% at 95% 90%, rgba(200,241,53,.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ========== Header ========== */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
  height: 64px;
  gap: 20px;
  flex-wrap: nowrap;
  background: rgba(13,14,17,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
}

/* Thin accent line at very top of header */
.main-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 40%, var(--accent3) 60%, transparent 100%);
  opacity: 0.7;
}

/* ── Logo ── */
.logo a {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
}

/* Hide the SVG icon — we go pure text */
.logo-mark {
  display: none;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.logo-text .logo-main {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1;
  text-transform: uppercase;
}

/* The "Kok" part gets the accent color */
.logo-text .logo-main span {
  color: var(--accent);
}

.logo-text .logo-sub {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 500;
  color: var(--muted2);
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

/* ── Header Search ── */
.header-search {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  max-width: 420px;
}

.header-search input[type="text"] {
  flex: 1;
  padding: 9px 16px 9px 20px;
  font-size: 13px;
  font-family: var(--sans);
  background: var(--surface);
  border: 1px solid var(--border2);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  outline: none;
  color: var(--text);
  transition: border-color .2s, background .2s;
  letter-spacing: .01em;
}

.header-search input[type="text"]::placeholder { color: var(--muted); }

.header-search input[type="text"]:focus {
  border-color: var(--accent);
  background: var(--surface2);
}

.header-search button {
  padding: 9px 18px;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #0d0e11;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}

.header-search button:hover  { background: var(--accent3); }
.header-search button:active { transform: scale(.97); }

/* ========== Main Hero ========== */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px 50px;
  position: relative;
}

/* Decorative horizontal rule above h1 */
main::before {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent);
  margin: 0 auto 24px;
  border-radius: 2px;
}

h1 {
  font-family: var(--display);
  font-size: clamp(34px, 5.5vw, 60px);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.1;
  letter-spacing: -1.5px;
}

.slogan {
  font-size: 16px;
  font-weight: 300;
  color: var(--text2);
  margin-bottom: 36px;
  max-width: 500px;
  line-height: 1.7;
  letter-spacing: .01em;
}

/* ========== Search Box ========== */
.search-box {
  width: 100%;
  max-width: 520px;
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  transition: border-color .2s, box-shadow .2s;
  box-shadow: 0 4px 24px rgba(0,0,0,.4);
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .12), 0 4px 24px rgba(0,0,0,.4);
}

.search-box input {
  flex: 1;
  padding: 16px 20px;
  font-size: 15px;
  font-family: var(--sans);
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  letter-spacing: .01em;
}

.search-box input::placeholder { color: var(--muted); }

.search-box button {
  padding: 16px 28px;
  font-size: 13px;
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--accent);
  color: #0d0e11;
  border: none;
  cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}

.search-box button:hover  { background: var(--accent3); }
.search-box button:active { opacity: .9; }

/* ========== Container ========== */
.container {
  width: 92%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 0 48px;
}

/* ========== Section divider ========== */
.container > h2 {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted2);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 32px 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.container > h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ========== User Grid ========== */
.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  padding: 24px 0;
}

.user-info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}

/* Hover accent left-border flash */
.user-info::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .22s cubic-bezier(.4,0,.2,1);
  border-radius: 0 2px 2px 0;
}

.user-info:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,.45);
}

.user-info:hover::before {
  transform: scaleY(1);
}

.user-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.user-header img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border2);
  flex-shrink: 0;
}

.user-meta { text-align: left; min-width: 0; }

.user-meta strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-meta small a {
  color: var(--accent);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: .01em;
}

.user-meta small a:hover { text-decoration: underline; }

.bio {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.55;
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========== Post Grid — Masonry ========== */
.post-grid {
  column-count: 3;
  column-gap: 16px;
  padding: 24px 0;
}

/* ========== Post Card ========== */
.post {
  display: inline-block;
  width: 100%;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  break-inside: avoid;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  position: relative;
}

.post:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
}

/* Subtle top-right corner accent dot */
.post::after {
  content: '';
  position: absolute;
  top: 14px; right: 14px;
  width: 6px; height: 6px;
  background: var(--border2);
  border-radius: 50%;
  transition: background .2s;
}

.post:hover::after { background: var(--accent); }

.post p {
  margin: 0 0 10px;
  line-height: 1.65;
  font-size: 14px;
  color: var(--text2);
}

.post img {
  max-width: 100%;
  border-radius: var(--radius-sm);
}

.post small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 6px;
  letter-spacing: .03em;
}

.post a {
  color: var(--accent);
  text-decoration: none;
}

/* ========== Card Box (Embeds) ========== */
.card-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 12px;
  background: var(--bg2);
  transition: border-color .2s, transform .15s;
}

.card-box:hover {
  border-color: var(--border2);
  transform: scale(1.01);
}

.card-box img {
  width: 100%;
  height: auto;
  display: block;
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-meta {
  padding: 10px 14px;
}

.card-meta small {
  color: var(--muted2);
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
}

.card-meta strong {
  font-size: 13px;
  font-weight: 600;
  display: block;
  color: var(--text);
}

/* ========== YouTube Thumb ========== */
.youtube-thumb {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
}

.youtube-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .85;
}

.youtube-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  color: var(--accent);
  transition: background .2s;
}

.youtube-lazy:hover .youtube-overlay { background: rgba(0,0,0,.2); }

/* ========== Profile Hero ========== */
.profile-hero {
  background: var(--bg2);
  padding: 48px 20px;
  text-align: center;
  color: white;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

/* Geometric background pattern */
.profile-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 40px,
      rgba(200,241,53,.02) 40px,
      rgba(200,241,53,.02) 41px
    );
  pointer-events: none;
}

.profile-hero-inner {
  position: relative;
  display: inline-block;
  background: rgba(26,28,34,.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 32px 44px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border2);
}

/* Accent top border on hero card */
.profile-hero-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: 0 0 4px 4px;
}

.profile-nav-btn {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 50px;
  color: var(--text2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: 0 4px;
  border: 1px solid var(--border2);
  transition: all .15s;
  background: transparent;
}

.profile-nav-btn.active {
  background: var(--accent);
  color: #0d0e11;
  border-color: var(--accent);
}

.profile-nav-btn:hover:not(.active) {
  border-color: var(--accent);
  color: var(--accent);
}

/* ========== Load More ========== */
.load-more-btn {
  padding: 11px 32px;
  border-radius: 50px;
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--text2);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .15s;
}

.load-more-btn:hover {
  background: var(--accent);
  color: #0d0e11;
  border-color: var(--accent);
}

.load-more-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

/* ========== Page Content (About / Privacy / Terms) ========== */
.page-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  margin-top: 8px;
}

.page-content h2 {
  color: var(--text);
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px !important;
}

.page-content p,
.page-content li {
  color: var(--text2);
  line-height: 1.8;
  font-size: 15px;
}

.page-content a { color: var(--accent); text-decoration: none; }
.page-content a:hover { text-decoration: underline; }

/* ========== Footer ========== */
footer {
  text-align: center;
  padding: 28px 20px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 20px;
  background: var(--bg2);
  letter-spacing: .01em;
}

.footer-links {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted2);
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid transparent;
  transition: all .15s;
  font-size: 12px;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.footer-links a:hover {
  border-color: var(--border2);
  color: var(--text);
}

.footer-links .sep { color: var(--border); }

/* ========== Animations ========== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

main { animation: fadeUp .45s ease both; }

.post      { animation: fadeUp .35s ease both; }
.user-info { animation: fadeUp .35s ease both; }

/* Stagger for grid children */
.post:nth-child(1), .user-info:nth-child(1) { animation-delay: .05s; }
.post:nth-child(2), .user-info:nth-child(2) { animation-delay: .10s; }
.post:nth-child(3), .user-info:nth-child(3) { animation-delay: .15s; }
.post:nth-child(4), .user-info:nth-child(4) { animation-delay: .20s; }
.post:nth-child(5), .user-info:nth-child(5) { animation-delay: .25s; }
.post:nth-child(6), .user-info:nth-child(6) { animation-delay: .30s; }

/* ========== Responsive ========== */
@media (min-width: 992px) and (max-width: 1199px) {
  .post-grid { column-count: 3; }
}

@media (min-width: 768px) and (max-width: 991px) {
  .post-grid  { column-count: 2; }
  .user-grid  { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

@media (max-width: 767px) {
  .post-grid  { column-count: 1; }
  .user-grid  { grid-template-columns: 1fr; }
  .profile-hero-inner { padding: 24px 20px; }
}

@media (max-width: 600px) {
  h1 { font-size: 32px; letter-spacing: -1px; }
  .slogan { font-size: 15px; }
  .main-header { padding: 0 16px; }
  main { padding: 56px 16px 32px; }
  .container { padding: 0 0 32px; }
  .page-content { padding: 24px 20px; }
  .search-box { border-radius: var(--radius-sm); }
  .header-search { max-width: 260px; }
}
