:root {
  --bg: #05070a;
  --bg-alt: #080b10;
  --card-bg: #111827;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.18);
  --text-main: #ffffff;
  --text-muted: #c7cfdd;
  --border-subtle: #1f2937;
  --radius-lg: 18px;
  --radius-sm: 10px;
  --shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.55);
}

/* Reset & base -------------------------------------------------- */

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #111827 0, #020308 55%);
  color: var(--text-main);
  line-height: 1.6;
}

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

a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header / nav -------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: linear-gradient(
    to bottom,
    rgba(5, 7, 11, 0.95),
    rgba(5, 7, 11, 0.8),
    transparent
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.logo-mark {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Fancy KL badge */

.logo-initials {
  position: relative;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: radial-gradient(
    circle at 20% 0,
    #e0f2fe,
    #0f172a 60%,
    #020617 100%
  );
  color: #e5f2ff;
  border: 1px solid rgba(148, 163, 184, 0.7);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.logo-initials::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: inherit;
  background: conic-gradient(
    from 210deg,
    rgba(56, 189, 248, 0.75),
    transparent 40%,
    transparent 60%,
    rgba(56, 189, 248, 0.9)
  );
  mix-blend-mode: screen;
  opacity: 0.4;
}

.logo-initials::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: radial-gradient(
    circle at 30% 0,
    rgba(15, 23, 42, 0.95),
    #020617
  );
  border: 1px solid rgba(15, 23, 42, 0.95);
}

.logo-k,
.logo-l {
  position: relative;
  z-index: 1;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  font-size: 0.8rem;
}

.logo-initials:hover {
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.9);
  transform: translateY(-1px);
  transition: all 0.18s ease-out;
}

.main-nav {
  display: flex;
  gap: 18px;
  font-size: 0.9rem;
}

.main-nav a {
  color: #e5e7f3;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.main-nav a:hover {
  color: var(--text-main);
  border-color: var(--accent);
}

/* Hero ---------------------------------------------------------- */

.hero {
  padding: 64px 0 32px;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  color: var(--accent);
  margin: 0 0 10px;
}

.hero h1 {
  font-size: clamp(2rem, 3vw + 1rem, 2.9rem);
  line-height: 1.2;
  margin: 0 0 16px;
}

.hero-body {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 0 24px;
  font-size: 0.98rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), #0ea5e9);
  color: #02131c;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.65);
}

.btn.primary:hover {
  filter: brightness(1.05);
}

.btn.ghost {
  background: transparent;
  border-color: var(--accent-soft);
  color: var(--text-main);
}

.btn.ghost:hover {
  border-color: var(--accent);
}

/* Sections ------------------------------------------------------ */

.section {
  padding: 56px 0;
}

.section-alt {
  background: radial-gradient(
      circle at top left,
      rgba(56, 189, 248, 0.12),
      transparent 60%
    ),
    #05070a;
}

.section-header {
  max-width: 720px;
  margin-bottom: 32px;
}

.section-header h2 {
  font-size: 1.4rem;
  margin: 0 0 8px;
}

.section-header p,
.section-intro {
  margin: 0;
  color: #dde3f0;
  font-size: 0.98rem;
  line-height: 1.7;
}

/* Cards / grids ------------------------------------------------- */

.grid {
  display: grid;
  gap: 20px;
}

.projects-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.project-card {
  background: radial-gradient(
      circle at top left,
      rgba(56, 189, 248, 0.12),
      transparent 55%
    ),
    var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 20px 20px 22px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

.project-tag {
  display: inline-flex;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--accent-soft);
  color: var(--accent);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}

.project-card h3 {
  font-size: 1rem;
  margin: 0 0 8px;
}

.project-card p {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.project-meta {
  font-size: 0.8rem;
  color: #9ca3af;
}

.project-thumb {
  margin: 0 0 10px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #020617;
  height: 380px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.project-thumb img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  border-radius: 8px;
}

.project-links {
  font-size: 0.9rem;
}

.project-links a {
  color: var(--accent);
}

/* ─── Video section layout ───────────────────────── */

.video-layout {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  margin-top: 24px;
}

/* Left column: stacked thumbnails */
.video-thumbs {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 0 0 32%;
  max-width: 320px;
}

.video-thumb-img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-soft);
  object-fit: cover;
  display: block;
}

/* Right column: stacked video cards */
.video-card-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ——— Video cards ——————————————————————— */

.video-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.video-card {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr); /* fixed video, flexible text */
  gap: 28px;
  align-items: center;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 55%);
  border-radius: var(--radius-lg);
  padding: 20px 20px 22px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

.video-thumb {
  margin: 0;
  width: 100%;
  max-width: 320px;
  height: 200px;              /* tweak up/down to taste */
  border-radius: 14px;
  overflow: hidden;
  border: none;
  background: transparent;     /* no extra underlay */
}

/* Make both images and videos fill the thumb cleanly */
.video-thumb img,
.video-thumb video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.video-body .project-tag {
  margin-bottom: 6px;
}

.video-body h3 {
  margin: 0 0 6px;
}

.video-body p {
  margin: 0 0 10px;
}

/* Stack on small screens */
@media (max-width: 800px) {
  .video-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .video-thumb {
    max-width: 100%;
    height: 230px;   /* slightly taller on mobile */
  }
}

/* About / contact ----------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
  gap: 32px;
}

.simple-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.simple-list li {
  margin-bottom: 6px;
}

.contact-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.contact-details p {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

/* Footer -------------------------------------------------------- */

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 18px 0 24px;
  background: #020308;
}

.footer-inner {
  text-align: center;
  font-size: 0.8rem;
  color: #6b7280;
}

/* Responsive ---------------------------------------------------- */

@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .video-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .video-thumbs {
    max-width: 100%;
    flex-direction: row;
    justify-content: flex-start;
  }

  .video-thumb-img {
    height: 180px;
    max-width: 50%;
  }
}

@media (max-width: 640px) {
  .header-inner {
    flex-direction: row;
    gap: 10px;
  }

  .main-nav {
    gap: 10px;
    font-size: 0.8rem;
  }

  .hero {
    padding-top: 56px;
  }

  .projects-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .video-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .video-thumbs {
    flex-direction: column;
  }

  .video-thumb-img {
    max-width: 100%;
    height: 200px;
  }

  .contact-inner {
    flex-direction: column;
  }
}