@font-face {
  font-family: 'Excalifont';
  src: url('https://excalidraw.nyc3.cdn.digitaloceanspaces.com/fonts/Excalifont-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg:        #ffffff;
  --panel:     #ffffff;
  --surface:   #ffffff;
  --border:    #d6d2ca;
  --text-1:    #1a1916;
  --text-2:    #4a4742;
  --text-3:    #9a9590;
  --tag-bg:    #f0f0f0;
  --nav-hover: #ece8e2;
  --nav-active:#e4e0d8;
  --accent:    #b85450;

  --f-hand: 'Excalifont', cursive;
  --f-body: 'Inter', system-ui, sans-serif;

  --r: 12px;
  --gap: 12px;
  --trans: 180ms ease;
}

html { overflow: hidden; height: 100%; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; cursor: none !important; }

wired-card, wired-button, wired-divider { cursor: none !important; }

/* ── Custom cursor ── */
#cursor {
  position: fixed;
  width: 12px;
  height: 12px;
  background: #1a1916;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: width 140ms ease, height 140ms ease, background 140ms ease, border 140ms ease;
  will-change: transform;
}

#cursor.hover {
  width: 30px;
  height: 30px;
  background: rgba(180, 176, 170, 0.45);
  border: 1.5px solid #bbb;
}

body {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  height: 100vh;
  overflow: hidden;
  padding: 24px;
  font-family: var(--f-body);
  font-size: 14px;
  color: var(--text-1);
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
}

.frame {
  display: flex;
  gap: 14px;
  width: 100%;
  max-width: 980px;
  height: calc(100vh - 48px);
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity 200ms ease;
}

.frame.ready { opacity: 1; }

/* ── Sidebar ── */
.sidebar {
  width: 200px;
  min-width: 200px;
  height: 100%;
  background: #ffffff;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 48px 16px 24px 8px;
  overflow: hidden;
}

.sidebar-logo {
  font-family: var(--f-hand);
  font-size: 12px;
  color: var(--text-3);
  padding: 0 10px;
  margin-top: auto;
}

.nav-label {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 0 10px;
  margin-bottom: 4px;
}

.nav-item {
  display: block;
  width: 100%;
  background: none;
  border: none;
  padding: 6px 10px;
  font-family: var(--f-hand);
  font-size: 17px;
  color: var(--text-3);
  text-align: left;
  transition: color var(--trans);
  line-height: 1.3;
  position: relative;
}

.nav-item::before {
  content: '— ';
  color: transparent;
  transition: color var(--trans);
}

.nav-item:hover  { color: var(--text-2); }
.nav-item.active { color: var(--text-1); }
.nav-item.active::before { color: var(--accent); }

/* ── Content ── */
.content-area {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  padding: 40px 44px;
  background: #ffffff;
  scrollbar-width: none;
}

.content-area::-webkit-scrollbar { display: none; }

.content-inner {
  max-width: 620px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

/* ── Sections ── */
.section {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  transition: opacity 260ms ease, transform 260ms ease;
}

.section.active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  position: relative;
}

/* ── Shared typography ── */
.page-title {
  font-family: var(--f-hand);
  font-size: 38px;
  color: var(--text-1);
  line-height: 1.1;
  margin-bottom: 3px;
}

.page-sub { font-size: 12.5px; color: var(--text-3); margin-bottom: 18px; }

wired-divider { --wired-item-color: #999; margin-bottom: 24px; display: block; }

.sidebar-sep {
  flex-shrink: 0;
  width: 16px;
  height: 100%;
}

#sep-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.block-label {
  font-family: var(--f-hand);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
  margin-top: 20px;
}

/* ── wired-card ── */
wired-card {
  display: block;
  background: #fff;
  padding: 18px 22px;
  --wired-item-color: #888;
  transition: transform var(--trans);
}

wired-card:hover { transform: translateY(-2px); }

wired-button {
  font-family: var(--f-hand);
  font-size: 16px;
  --wired-item-color: #444;
}

wired-button a { text-decoration: none; color: inherit; }

/* ── About ── */
.about-hero { margin-bottom: 18px; }

.about-name { font-family: var(--f-hand); font-size: 40px; line-height: 1.1; margin-bottom: 5px; }
.about-tag  { font-size: 13px; color: var(--text-3); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--tag-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 20px;
}

.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #5baa79;
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

.bio { font-size: 14px; line-height: 1.78; color: var(--text-2); margin-bottom: 12px; }
.bio strong { color: var(--accent); font-weight: 500; }

.skill-row { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  background: var(--tag-bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 10px;
  font-family: var(--f-hand);
  font-size: 15px;
  color: var(--text-2);
}

.link-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }

/* ── Timeline ── */
.timeline {
  position: relative;
  padding-left: 28px;
}

#tl-svg {
  position: absolute;
  left: 0;
  top: 0;
  width: 16px;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.tl-entry {
  position: relative;
  margin-bottom: 18px;
}

.tl-entry:last-child { margin-bottom: 0; }

.tl-dot {
  position: absolute;
  left: -25px;
  top: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--text-1);
  z-index: 1;
}

.tl-entry.current .tl-dot {
  background: var(--accent);
  border-color: var(--text-1);
}

.tl-role  { font-family: var(--f-hand); font-size: 20px; color: var(--text-1); margin-bottom: 4px; }
.tl-co    {
  font-family: var(--f-hand);
  font-size: 17px;
  color: var(--accent);
  display: inline-block;
  margin-bottom: 5px;
}
.tl-meta  { font-family: var(--f-hand); font-size: 13px; color: var(--text-3); }

.tl-entry wired-card { --wired-item-color: #bbb; padding: 14px 16px; }

/* ── Projects ── */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  align-items: stretch;
  gap: var(--gap);
}

.proj-grid > a { display: block; }
.proj-grid > a wired-card { display: block; width: 100%; }
.proj-inner { display: flex; flex-direction: column; height: 100%; }
.proj-name  { font-family: var(--f-hand); font-size: 20px; color: var(--text-1); margin-bottom: 5px; word-break: break-word; overflow-wrap: break-word; }
.proj-desc  { font-size: 12px; color: var(--text-3); line-height: 1.55; flex: 1; margin-bottom: 10px; }
.proj-tags  { margin-bottom: 10px; }

.proj-pin {
  font-family: var(--f-hand);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.proj-link {
  font-size: 11.5px;
  color: var(--text-3);
  text-decoration: none;
  transition: color var(--trans);
}
.proj-link:hover { color: var(--accent); }

.proj-loading {
  font-family: var(--f-hand);
  font-size: 16px;
  color: var(--text-3);
  padding: 12px 0;
}

/* ── Contact ── */
.contact-list { display: flex; flex-direction: column; gap: var(--gap); }
.contact-link { text-decoration: none; color: inherit; display: block; }
.contact-link wired-card { display: block; }
.contact-inner { display: flex; align-items: center; gap: 12px; }
.contact-icon {
  width: 34px; height: 34px;
  border-radius: 7px;
  background: var(--tag-bg);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0; color: var(--text-2);
}
.contact-name  { font-family: var(--f-hand); font-size: 19px; color: var(--text-1); }
.contact-value { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.contact-arrow { margin-left: auto; color: var(--accent); font-size: 13px; }

/* ── Mobile ── */
@media (max-width: 620px) {
  html { overflow: auto; height: auto; }

  body {
    padding: 0;
    height: auto;
    overflow: auto;
    align-items: stretch;
    flex-direction: column;
  }

  .frame {
    flex-direction: column;
    height: auto;
    max-width: 100%;
    gap: 0;
  }

  .sidebar {
    width: 100%;
    min-width: unset;
    height: auto;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    padding: 12px 16px;
    overflow-x: auto;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .nav-item::before { display: none; }
  .nav-item { padding: 6px 12px; white-space: nowrap; font-size: 15px; width: auto; }
  .nav-label { display: none; }
  .sidebar-logo { display: none; }

  .sidebar-sep { display: none; }

  .content-area {
    height: auto;
    overflow: visible;
    padding: 24px 20px;
  }

  .content-inner { overflow: visible; }

  .section {
    position: relative;
    top: auto;
    left: auto;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    display: none;
  }

  .section.active { display: block; }

  .proj-grid { grid-template-columns: 1fr; }

  .proj-grid > a wired-card { height: auto !important; }

  #cursor { display: none; }
  *, *::before, *::after { cursor: auto !important; }
  wired-card, wired-button, wired-divider { cursor: auto !important; }
}
