:root {
  --bg:           #0b0b0b;
  --card:         #131313;
  --card-alt:     #0f1a0f;
  --ink:          #ededed;
  --ink-soft:     #999999;
  --ink-muted:    #4a4a4a;
  --green:        #5c9460;
  --green-bright: #6aad6e;
  --green-dim:    rgba(61, 90, 62, 0.14);
  --green-border: rgba(92, 148, 96, 0.28);
  --line:         rgba(255, 255, 255, 0.07);
  --line-hover:   rgba(255, 255, 255, 0.13);
  --radius:       18px;
  --gap:          10px;
  --max-w:        1160px;
}

[data-theme="light"] {
  --bg:           #f5f5f0;
  --card:         #ffffff;
  --card-alt:     #dff0e0;
  --ink:          #111111;
  --ink-soft:     #555555;
  --ink-muted:    #999999;
  --green:        #3d7a42;
  --green-bright: #4a9450;
  --green-dim:    rgba(61, 122, 66, 0.10);
  --green-border: rgba(61, 122, 66, 0.30);
  --line:         rgba(0, 0, 0, 0.08);
  --line-hover:   rgba(0, 0, 0, 0.15);
}

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

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }

/* ── Top Bar ── */

.top-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 52px;
  background: rgba(11, 11, 11, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.top-bar-initials {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--green);
  text-transform: uppercase;
}

.top-bar-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: color 150ms, background 150ms;
}

.nav-link:hover { color: var(--ink); background: rgba(255,255,255,0.06); }

.nav-link--green {
  color: var(--green);
  border: 1px solid var(--green-border);
}

.nav-link--green:hover {
  background: var(--green-dim);
  color: var(--green-bright);
}

/* ── Bento Layout ── */

.bento-wrapper {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--gap) 1rem 2rem;
}

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: auto 1fr repeat(4, auto);
  grid-template-areas:
    "photo   photo   hero    hero    connect connect"
    "photo   photo   hero    hero    about   about"
    "career  career  career  career  edu     edu"
    "seline  seline  seline  awaz    awaz    awaz"
    "craft   craft   craft   royalty royalty royalty"
    "locker  locker  locker  .       .       .";
  gap: var(--gap);
}

/* ── Bento Cards — base ── */

.bento-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 200ms ease, transform 200ms ease;
  overflow: hidden;
}

.bento-card:hover {
  border-color: var(--line-hover);
  transform: translateY(-2px);
}

.bento-label {
  margin: 0 0 1rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}

.bento-eyebrow {
  margin: 0 0 1rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}

/* ── Theme Toggle ── */

.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background 200ms, border-color 200ms, color 200ms, transform 200ms;
}

.theme-toggle:hover {
  border-color: var(--green-border);
  color: var(--green);
  transform: scale(1.08);
}

.theme-icon--light { display: none; }

[data-theme="light"] .theme-icon--dark  { display: none; }
[data-theme="light"] .theme-icon--light { display: inline; }

/* ── Photo Card ── */

.card-photo {
  grid-area: photo;
  position: relative;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 8%;
  display: block;
}

.photo-github-link {
  position: absolute;
  right: 0.9rem;
  bottom: 0.9rem;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  transition: background 150ms, color 150ms, transform 150ms;
}

.photo-github-link:hover {
  background: #111;
  color: #fff;
  transform: translateY(-1px);
}

.photo-github-link svg {
  width: 20px;
  height: 20px;
}

/* ── Hero Card ── */

.card-hero {
  grid-area: hero;
  background: var(--card);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 220px;
  padding: 1.5rem;
}

.hero-name {
  margin: 0 0 0.6rem;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.hero-bio {
  margin: 0 0 1.1rem;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 55ch;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.hero-tag {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.3rem 0.6rem;
}

/* ── Connect Card ── */

.card-connect {
  grid-area: connect;
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── About Card ── */

.card-about {
  grid-area: about;
  display: flex;
  flex-direction: column;
}

.about-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.about-list li {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink-soft);
}


.connect-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.connect-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.9rem;
  border: none;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  background: var(--green);
  transition: background 150ms, transform 150ms, opacity 150ms;
  flex: 1;
}

.connect-btn:hover {
  background: var(--green-bright);
  opacity: 0.92;
  transform: translateY(-1px);
}

.connect-icon {
  font-size: 0.85rem;
  width: 20px;
  text-align: center;
}

/* ── Career Card ── */

.card-career {
  grid-area: career;
}

.career-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.career-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
}



.org-logo {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  object-fit: contain;
  flex-shrink: 0;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 2px;
}

.org-logo-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: var(--line);
  flex-shrink: 0;
}

.career-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.career-period {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin-top: 0.1rem;
}

.career-role {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  display: block;
  line-height: 1.3;
}

.career-company {
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.career-desc {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.career-highlights {
  margin: 0.4rem 0 0;
  padding-left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.career-highlights li {
  font-size: 0.78rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ── Seline Card ── */

.card-seline {
  grid-area: seline;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.seline-showcase {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.9rem;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  padding: 0;
  background: transparent;
}

.iphone-frame {
  position: relative;
  border: 2px solid #2a2a2a;
  border-radius: 24px;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}

[data-theme="light"] .iphone-frame {
  background: #fff;
}

.iphone-xl {
  aspect-ratio: 1206 / 2622;
  height: calc(100% - 16px);
  width: auto;
}

.iphone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 38%;
  height: 10px;
  background: #000;
  border-radius: 0 0 8px 8px;
  z-index: 2;
}

.iphone-screen {
  position: absolute;
  inset: 2px;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  display: block;
  object-fit: cover;
  object-position: center top;
  border-radius: 22px;
}

.seline-footer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.8rem 0 0;
  flex-shrink: 0;
}

.seline-footer-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.seline-footer .project-desc {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ── Awaz Card ── */

.card-awaz {
  grid-area: awaz;
  display: flex;
  flex-direction: column;
}

.browser-frame {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  overflow: hidden;
  background: #1a1a1a;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  background: #222;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.browser-dots {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.browser-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3a3a3a;
}

.browser-url {
  font-size: 0.52rem;
  color: #666;
  background: #2a2a2a;
  border-radius: 3px;
  padding: 0.12rem 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
  flex: 1;
}

.browser-screen {
  width: 100%;
  aspect-ratio: 1600 / 829;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: top center;
}

/* ── Craft Card ── */

.card-craft {
  grid-area: craft;
  display: flex;
  flex-direction: column;
}

/* theme-aware image switching */
.theme-light-only { display: none; }
.theme-dark-only  { display: block; }

[data-theme="light"] .theme-dark-only  { display: none; }
[data-theme="light"] .theme-light-only { display: block; }


/* ── Royalty Card ── */

.card-royalty {
  grid-area: royalty;
  display: flex;
  flex-direction: column;
}

/* ── Locker Zero Card ── */

.card-locker-zero {
  grid-area: locker;
  display: flex;
  flex-direction: column;
}

/* ── Education Card ── */

.card-edu {
  grid-area: edu;
  display: flex;
  flex-direction: column;
}

.edu-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cert-label {
  margin-top: 1.25rem;
}

.edu-row { /* reuses .career-row styles via JS — kept for specificity */ }

/* ── Shared Project Parts ── */

.project-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.project-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

[data-theme="light"] .project-icon {
  border-color: rgba(0, 0, 0, 0.28);
}

.project-name {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.project-desc {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.project-card-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.project-card-link:hover { text-decoration: none; }

/* ── Badges ── */

.badge-row {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
  white-space: nowrap;
}

.badge-neutral {
  background: rgba(255,255,255,0.06);
  color: var(--ink-muted);
  border: 1px solid var(--line);
}

.badge-active {
  background: rgba(61, 90, 62, 0.2);
  color: var(--green-bright);
  border: 1px solid var(--green-border);
}

.badge-soon {
  background: rgba(255,255,255,0.04);
  color: var(--ink-muted);
  border: 1px solid var(--line);
}

.badge-progress {
  background: rgba(180, 140, 60, 0.12);
  color: #c4a045;
  border: 1px solid rgba(180, 140, 60, 0.25);
}

/* ── Footer ── */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1rem 1.5rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ── Scrollbar ── */

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 3px; }

/* ── Responsive ── */

@media (max-width: 960px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    grid-template-areas:
      "photo   hero"
      "connect about"
      "career  career"
      "seline  awaz"
      "craft   royalty"
      "locker  ."
      "edu     edu";
  }

  .card-photo { min-height: 200px; }
}

@media (max-width: 600px) {
  .bento {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "photo"
      "hero"
      "connect"
      "about"
      "career"
      "edu"
      "seline"
      "awaz"
      "craft"
      "royalty"
      "locker";
  }

  .card-photo { min-height: 280px; }
  .hero-name { font-size: 2.2rem; }

  /* Seline mobile: horizontal scroll, adjust sizing */
  .seline-showcase {
    aspect-ratio: auto;
    height: auto;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.4rem;
    overflow: hidden;
    padding: 0;
  }

  .iphone-xl {
    width: calc((100% - 0.8rem) / 3);
    height: auto;
    min-width: 0;
  }
}
