/* ══════════════════════════════════════════════
   style.css
   ══════════════════════════════════════════════ */

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

:root {
  --sidebar-w:    40%;
  --bg:           #f2f4f0;
  --text:         #1a2018;
  --muted:        #5a6b55;
  --accent:       #2d6a4f;
  --accent-light: #d8ede3;
  --divider:      #d4dbd0;
  --card-bg:      #ffffff;
  --card-shadow:  0 2px 20px rgba(0,0,0,0.06);
  --card-hover:   0 8px 40px rgba(0,0,0,0.11);
  --radius:       12px;
  --transition:   0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --blob-c:       #b7d4c0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Karla', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.layout {
  display: flex;
  min-height: 100vh;
}

/* ══════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════ */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg);
  z-index: 100;
  display: flex;
  align-items: stretch;
  overflow: hidden;
}

.goo-svg {
  position: absolute;
  width: 0; height: 0;
  pointer-events: none;
}

/* ══════════════════════════════════════════════
   SHARED GOO CONTAINER
   ══════════════════════════════════════════════ */
.blob-all-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  filter: url('#goo-shared');
}

/* ── Static blob ── */
.blob-static {
  position: absolute;
  left: 50%;
  top: 50%;
}

.blob-static div {
  position: absolute;
  border-radius: 50%;
  background: var(--blob-c);
  transform: translate(-50%, -50%);
}

/*
  OVAL BLOB STRATEGY:
  - One large tall core (narrower width, tall height) = vertical oval base
  - 4 side lobes placed very close (±60px) and sized to fill gaps = smooth edges
  - 2 top and 2 bottom lobes to extend height
  - ALL lobes taller than wide to reinforce the oval silhouette
  - Drift amounts are small so lobes never separate from the core
*/

.blob-static .bs-core {
  width: 340px; height: 500px;
  left: 0; top: 0;
  animation: drift-core 6s ease-in-out infinite;
}

/* Top cap */
.blob-static .bs-top  { width: 300px; height: 260px; left: 0;    top: -200px; animation: drift-a 4.0s ease-in-out infinite 0.0s; }
.blob-static .bs-top2 { width: 220px; height: 180px; left: 0;    top: -340px; animation: drift-a 5.2s ease-in-out infinite 0.6s; }

/* Bottom cap */
.blob-static .bs-bot  { width: 300px; height: 260px; left: 0;    top:  200px; animation: drift-d 4.3s ease-in-out infinite 0.3s; }
.blob-static .bs-bot2 { width: 220px; height: 180px; left: 0;    top:  340px; animation: drift-d 5.5s ease-in-out infinite 0.9s; }

/* Left side — close in so goo merges cleanly */
.blob-static .bs-l    { width: 260px; height: 300px; left: -120px; top:  0;    animation: drift-l 4.8s ease-in-out infinite 1.0s; }

/* Right side */
.blob-static .bs-r    { width: 260px; height: 300px; left:  120px; top:  0;    animation: drift-r 4.6s ease-in-out infinite 1.4s; }

/* Corner fills — close overlap so no gap forms */
.blob-static .bs-tl   { width: 240px; height: 260px; left: -90px;  top: -140px; animation: drift-tl 4.2s ease-in-out infinite 0.5s; }
.blob-static .bs-tr   { width: 240px; height: 260px; left:  90px;  top: -140px; animation: drift-tr 3.9s ease-in-out infinite 1.1s; }
.blob-static .bs-bl   { width: 240px; height: 260px; left: -90px;  top:  140px; animation: drift-bl 4.4s ease-in-out infinite 1.7s; }
.blob-static .bs-br   { width: 240px; height: 260px; left:  90px;  top:  140px; animation: drift-br 4.1s ease-in-out infinite 0.8s; }

/* Zero out unused */
.blob-static .bs-top3,
.blob-static .bs-bot3 { width: 0; height: 0; }

/* Drift keyframes — small movements so shape never breaks apart */
@keyframes drift-core {
  0%,100% { transform: translate(-50%,-50%) translate(  0px,  0px); }
  33%     { transform: translate(-50%,-50%) translate(  6px, -6px); }
  66%     { transform: translate(-50%,-50%) translate( -5px,  7px); }
}
@keyframes drift-a {
  0%,100% { transform: translate(-50%,-50%) translate( 0px, -10px); }
  50%     { transform: translate(-50%,-50%) translate( 5px,  10px); }
}
@keyframes drift-d {
  0%,100% { transform: translate(-50%,-50%) translate( 0px,  10px); }
  50%     { transform: translate(-50%,-50%) translate(-5px, -10px); }
}
@keyframes drift-l {
  0%,100% { transform: translate(-50%,-50%) translate(-10px,  4px); }
  50%     { transform: translate(-50%,-50%) translate(  6px, -6px); }
}
@keyframes drift-r {
  0%,100% { transform: translate(-50%,-50%) translate( 10px, -4px); }
  50%     { transform: translate(-50%,-50%) translate( -6px,  6px); }
}
@keyframes drift-tl {
  0%,100% { transform: translate(-50%,-50%) translate(-8px, -8px); }
  50%     { transform: translate(-50%,-50%) translate( 6px,  8px); }
}
@keyframes drift-tr {
  0%,100% { transform: translate(-50%,-50%) translate( 8px, -8px); }
  50%     { transform: translate(-50%,-50%) translate(-6px,  8px); }
}
@keyframes drift-bl {
  0%,100% { transform: translate(-50%,-50%) translate(-8px,  8px); }
  50%     { transform: translate(-50%,-50%) translate( 6px, -8px); }
}
@keyframes drift-br {
  0%,100% { transform: translate(-50%,-50%) translate( 8px,  8px); }
  50%     { transform: translate(-50%,-50%) translate(-6px, -8px); }
}

/* ── Cursor blob ── */
.blob-cursor {
  position: absolute;
  left: 50%;
  top: 50%;
}

.blob-cursor div {
  position: absolute;
  border-radius: 50%;
  background: var(--blob-c);
  transform: translate(-50%, -50%);
  left: 0; top: 0;
  visibility: hidden;
}

.blob-cursor div.active { visibility: visible; }

.blob-cursor .bc-core { width: 75px;  height: 75px; }
.blob-cursor .bc-s1   { width: 58px;  height: 58px; }
.blob-cursor .bc-s2   { width: 46px;  height: 46px; }
.blob-cursor .bc-s3   { width: 36px;  height: 36px; }
.blob-cursor .bc-s4   { width: 28px;  height: 28px; }
.blob-cursor .bc-s5   { width: 20px;  height: 20px; }

/* ══════════════════════════════════════════════
   SIDEBAR INNER — larger profile to match right side
   ══════════════════════════════════════════════ */
.sidebar-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 64px 36px 52px;
  overflow-y: auto;
}

.blob-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar {
  width: clamp(110px, 12vw, 160px);
  height: clamp(110px, 12vw, 160px);
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 6px 28px rgba(0,0,0,0.14);
}

.avatar-placeholder {
  width: clamp(110px, 12vw, 160px);
  height: clamp(110px, 12vw, 160px);
  border-radius: 50%;
  background: linear-gradient(135deg, #a8c5b0 0%, #6b9e7a 100%);
  border: 4px solid #fff;
  box-shadow: 0 6px 28px rgba(0,0,0,0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar-placeholder svg {
  width: 58%; height: 58%;
  fill: #fff; opacity: 0.85;
}

.sidebar-name {
  margin-top: 22px;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  font-weight: 800;
  color: var(--text);
  text-align: center;
  letter-spacing: -0.02em;
}

.sidebar-tags {
  margin-top: 6px;
  font-family: 'Karla', sans-serif;
  font-size: clamp(0.78rem, 1.1vw, 0.95rem);
  color: var(--muted);
  text-align: center;
  line-height: 1.8;
  font-style: italic;
}

.sidebar-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.icon-link {
  color: var(--muted);
  opacity: 0.8;
  display: flex;
  transition: color var(--transition), opacity var(--transition), transform var(--transition);
}

.icon-link:hover {
  color: var(--accent);
  opacity: 1;
  transform: translateY(-2px);
}

.icon-link svg {
  width: clamp(20px, 2vw, 26px);
  height: clamp(20px, 2vw, 26px);
  fill: currentColor;
}

.menu-toggle { display: none; }

/* ══════════════════════════════════════════════
   MAIN CONTENT
   ══════════════════════════════════════════════ */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 64px clamp(28px, 4vw, 72px) 80px clamp(24px, 3vw, 52px);
  min-width: 0;
}

.section { margin-bottom: 0; }

.section-divider {
  border: none;
  border-top: 1px solid var(--divider);
  margin: 56px 0 0 0;
}

.section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 28px;
  margin-top: 56px;
}

.section:first-child .section-title { margin-top: 0; }

.about-text {
  font-family: 'Karla', sans-serif;
  font-size: clamp(0.9rem, 1.25vw, 1rem);
  line-height: 1.85;
  color: #374151;
  max-width: 100%;
  text-align: justify;
}

.about-text p + p { margin-top: 14px; }

.about-text a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-style: dotted;
  transition: color var(--transition);
}

.about-text a:hover { color: var(--accent); }

/* ══════════════════════════════════════════════
   PROJECT ENTRIES
   ══════════════════════════════════════════════ */
.project-entry { padding: 40px 0; }

.project-entry-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #b45309;
  background: #fef3c7;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid #fde68a;
  flex-shrink: 0;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tech-tag {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-light);
  padding: 3px 10px;
  border-radius: 20px;
}

.project-entry-desc {
  font-family: 'Karla', sans-serif;
  font-size: clamp(0.88rem, 1.15vw, 0.97rem);
  color: #374151;
  line-height: 1.82;
  margin-bottom: 24px;
  max-width: 100%;
  text-align: justify;
}

.project-entry-img-wrap { width: 100%; margin-bottom: 20px; }

.project-entry-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.project-entry-img-placeholder {
  width: 100%;
  height: 260px;
  border-radius: 8px;
  background: #e8ede6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  border: 2px dashed var(--divider);
}

.project-entry-link {
  font-family: 'Karla', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1.5px solid var(--accent-light);
  padding-bottom: 1px;
  transition: border-color var(--transition), color var(--transition);
}

.project-entry-link:hover { border-color: var(--accent); }

.project-divider {
  border: none;
  border-top: 1px solid var(--divider);
  margin: 0;
}

/* ── Contact ── */
.contact-block {
  max-width: 100%;
  font-family: 'Karla', sans-serif;
  font-size: clamp(0.9rem, 1.25vw, 1rem);
  color: #374151;
  line-height: 1.85;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Karla', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 40px;
  background: var(--card-bg);
  border: 1.5px solid var(--divider);
  box-shadow: var(--card-shadow);
  transition: border-color var(--transition), color var(--transition),
              box-shadow var(--transition), transform var(--transition);
}

.contact-pill svg {
  width: 16px; height: 16px;
  fill: currentColor; flex-shrink: 0;
}

.contact-pill:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: var(--card-hover);
  transform: translateY(-2px);
}

.site-footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--divider);
  font-family: 'Karla', sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ══════════════════════════════════════════════
   SCROLL-REVEAL
   ══════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.4,0,0.2,1),
              transform 0.65s cubic-bezier(0.4,0,0.2,1);
}
.reveal.reveal-delay-1 { transition-delay: 0.12s; }
.reveal.reveal-delay-2 { transition-delay: 0.22s; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ══════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 768px)
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {
 
  .layout { flex-direction: column; }
 
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    min-height: 130px;
    border-bottom: 1px solid var(--divider);
    overflow: hidden;
  }
 
  .blob-all-wrap { display: none; }
  .blob-cursor div { visibility: hidden !important; }
 
  .blob-static .bs-core { width: 160px; height: 200px; }
  .blob-static .bs-top,  .blob-static .bs-bot  { width: 130px; height: 110px; }
  .blob-static .bs-top2, .blob-static .bs-bot2 { width: 100px; height:  85px; }
  .blob-static .bs-l,    .blob-static .bs-r    { width: 110px; height: 130px; }
  .blob-static .bs-tl,   .blob-static .bs-tr,
  .blob-static .bs-bl,   .blob-static .bs-br   { width: 100px; height: 110px; }
 
  .sidebar-inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 16px 20px;
    padding: 22px 20px 18px;
    overflow-y: visible;
  }
 
  .blob-wrap {
    flex-direction: row;
    align-items: center;
    gap: 14px;
  }
 
  .avatar, .avatar-placeholder { width: 64px; height: 64px; flex-shrink: 0; }
 
  .sidebar-name { font-size: 1.05rem; margin-top: 0; text-align: left; }
  .sidebar-tags { font-size: 0.72rem; margin-top: 0; text-align: left; }
  .sidebar-icons { gap: 14px; }
  .icon-link svg { width: 20px; height: 20px; }
  .menu-toggle { display: none !important; }
 
  .main { margin-left: 0; padding: 36px 20px 60px; }
  .section-title { font-size: 1.5rem; margin-top: 40px; }
  .project-entry { padding: 32px 0; }
  .project-entry-img-placeholder { height: 180px; }
}
 
@media (max-width: 480px) {
 
  .sidebar-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 20px 16px 16px;
  }
 
  .blob-wrap { flex-direction: column; align-items: center; gap: 10px; }
  .sidebar-name { text-align: center; font-size: 1rem; }
  .sidebar-tags { text-align: center; }
  .main { padding: 28px 16px 52px; }
  .section-title { font-size: 1.3rem; }
  .contact-pill { font-size: 0.78rem; padding: 8px 14px; }
}