:root{
  --bg: #0b0c0f;
  --panel: #12141a;
  --text: #e9eef5;
  --muted: #a6b0c3;
  --brand: #6aa9ff;
  --brand-2: #8b5cf6;
  --ok: #2ecc71;
  --warn: #ffb020;
  --err: #ff5a6e;
  --border: #232633;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --focus: 0 0 0 3px rgba(106,169,255,.35);

  /* Calendar */
  --today : #cf3d3d;
  --off-range : #2b2b2b;
}
[data-theme="light"]{
  --bg: #f7f8fb;
  --panel: #ffffff;
  --text: #1d2433;
  --muted: #495265;
  --border: #e6e9f0;
  --shadow: 0 8px 20px rgba(0,0,0,.08);
  --focus: 0 0 0 3px rgba(80,120,255,.25);

  /* Calendar */
  --off-range : #e6e6e6;
}

/* Base */
*{ box-sizing: border-box; }
html, body{ height: 100%; overflow: auto; }
body{
  margin:0;
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  background: radial-gradient(1200px 800px at 80% -20%, rgba(106,169,255,.15), transparent 60%),
              radial-gradient(900px 600px at -10% -10%, rgba(139,92,246,.12), transparent 55%),
              var(--bg);
  color: var(--text);
}
img, svg{ display:block; max-width:100%; }

a{ color: var(--text); text-decoration: none; }
a:hover{ color: var(--brand-2); text-decoration: underline; }

.container{
  width: min(1100px, 92vw);
  margin-inline: auto; 
}

/* Header / Nav */
header{
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}

/* scrollbar */
/* width */
::-webkit-scrollbar {
  width: 12px;
}

/* Track */
::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 50px;
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 50px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #555;
}
/* scrollbar */

.nav{
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 10px 0;
}
.brand{
  display:flex; align-items:center; gap:10px; font-weight: 700; letter-spacing:.2px;
}
.brand .logo{
  width: 34px; height: 34px; border-radius: 9px;
  background: conic-gradient(from 210deg, var(--brand), var(--brand-2));
  box-shadow: inset 0 0 20px rgba(255,255,255,.15);
}
.navlinks{
  display:flex; align-items:center; gap: 8px; flex-wrap: wrap;
}
.navlinks a{
  padding: 8px 12px; border-radius: 999px; color: var(--text);
}
.navlinks a.active{
  background: color-mix(in oklab, var(--brand) 18%, transparent);
  color: var(--text);
}

.nav-rt{ display:flex; align-items:center; gap:10px; }
.btn, button{
  appearance:none; border: 1px solid var(--border); background: var(--panel);
  color: var(--text); padding: 10px 14px; border-radius: 999px; cursor: pointer;
  transition: .15s transform, .2s background-color, .2s border-color, .2s opacity;
  box-shadow: var(--shadow);
}
button:hover, .btn:hover{ transform: translateY(-1px); }
button:active, .btn:active{ transform: translateY(0); }
button:focus-visible, .btn:focus-visible{ outline: none; box-shadow: var(--focus); }

.icon-btn{
  padding: 9px 10px; display:inline-flex; align-items:center; justify-content:center;
  aspect-ratio: 1; border-radius: 12px;
}

.hamburger{ display:none; }
@media (max-width: 820px){
  .navlinks{ display:none; position:absolute; top: 58px; left:0; right:0; padding:10px; background: var(--bg); border-bottom:1px solid var(--border); }
  .navlinks.open{ display:flex; }
  .hamburger{ display:inline-flex; }
}

/* Sections */
section{ padding: 60px 0; scroll-margin-top: 70px; }
.panel{
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.grid{
  display:grid; gap: 16px;
}
@media (min-width: 720px){
  .grid-2{ grid-template-columns: 1fr 1fr; }
  .grid-3{ grid-template-columns: repeat(3, 1fr); }
  .grid-auto{ grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

h1{ font-size: clamp(28px, 4vw, 44px); margin: 8px 0 6px; }
h2{ font-size: clamp(22px, 3.2vw, 30px); margin: 0 0 14px; }
h3{ font-size: 18px; margin: 0 0 10px; }

.muted{ color: var(--muted); }
.tag{
  display:inline-flex; gap:6px; align-items:center; justify-content: center;
  font-size: 14px; padding: 4px 10px; border-radius: 999px;
  border: 1px dashed var(--border); background: color-mix(in oklab, var(--panel) 80%, transparent);
}
.creater{ grid-template-columns: 1fr; }
.creater .pill{ flex: 1 1 300px; }

@media (max-width: 820px){ .creater{ grid-template-columns: 1fr; } }

.creater-card{
  padding: 28px; border-radius: var(--radius);
  background:
    radial-gradient(800px 500px at 0% -20%, rgba(106,169,255,.12), transparent 50%),
    radial-gradient(500px 300px at 120% 120%, rgba(139,92,246,.10), transparent 55%),
    var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.creater-cta{ display:flex; gap:10px; flex-wrap: wrap; margin-top: 12px; }
.pill{
  display:inline-flex; align-items:center; gap:8px; padding:10px 14px; border-radius:999px;
  border:1px solid var(--border);
  background: color-mix(in oklab, var(--panel) 85%, transparent);
}
.avatar{
  width: 110px; height: 110px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display:grid; place-items:center; color:#fff; font-weight: 800; font-size: 36px;
  box-shadow: inset 0 0 30px rgba(255,255,255,.2);
}

/* About */
.about-layout{
  display:flex
}
@media (max-width: 900px){ .about-layout{ grid-template-columns: 1fr; } .timeline-chart{ display: none; } }
.timeline{ border-left: 2px dashed var(--border); padding-left: 14px; }
.timeline .item{ margin: 14px 0; }
.skills{ display:flex; gap: 8px; flex-wrap: wrap; }

/* Photos */
.photo-actions{ display:flex; gap: 10px; flex-wrap: wrap; align-items:center; }
.photogrid{
  display:grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; max-height: 53vh; overflow-y: auto;
}
.photo{
  position:relative; border-radius: var(--radius-sm); overflow:hidden; border:1px solid var(--border);
  background: linear-gradient(135deg, rgba(106,169,255,.2), rgba(139,92,246,.15));
  min-height: 130px; display:grid; place-items:center;
}
.photo img{ width: 100%; height: 140px; object-fit: cover; display:block; }
.photo .controls{
  position:absolute; top:6px; right:6px; display:flex; gap:6px;
}
.dropzone{
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 20px;
  text-align:center; color: var(--muted);
}
.dropzone.drag{ border-color: var(--brand); background: color-mix(in oklab, var(--brand) 14%, transparent); color: var(--text); }

/* Calendar */
.calendar{
  display:grid; gap: 10px;
}
.calendar .cal-head{
  display:flex; align-items:center; justify-content:space-between; gap: 10px;
}
.calendar .grid{
  display:grid; grid-template-columns: repeat(7, 1fr); gap: 8px;
}
.dow{ text-align:center; font-weight: 600; color: var(--muted); font-size: 12px; }
.day{
  border:1px solid var(--border); border-radius: var(--radius-sm); padding: 8px; min-height: 90px;
  background: var(--panel); display:flex; flex-direction: column; gap: 6px;
}
.day .num{ font-weight: 700; font-size: 12px; color: var(--muted); display:flex; justify-content:space-between; align-items:center; }
.day.today{ outline: 2px solid color-mix(in oklab, var(--brand) 40%, transparent); }
.day .event{
  font-size: 12px; background: color-mix(in oklab, var(--brand) 18%, transparent); padding: 4px 6px; border-radius: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.event-count{
  background: color-mix(in oklab, var(--brand-2) 40%, transparent); color:#fff; border-radius: 999px; padding: 0 6px; font-size: 11px;
}
.event-editor{
  display:flex; gap: 6px; margin-top: 8px;
}
.event-list{ display:flex; flex-direction:column; gap: 6px; margin-top: 8px; }

/* Tools */
.tools-grid{ display:grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.tool{ display:flex; flex-direction:column; gap: 10px; }
.input, input[type="text"], input[type="number"], input[type="password"], textarea, select{
  width: 100%; padding: 10px 12px; color: var(--text);
  background: color-mix(in oklab, var(--panel) 90%, transparent);
  border: 1px solid var(--border); border-radius: var(--radius-xs);
}
textarea{ min-height: 120px; resize: vertical; }
label{ font-size: 12px; color: var(--muted); display:block; margin-bottom: 6px; }
.row{ display:flex; gap: 10px; flex-wrap: wrap; }
.row > *{ flex: 1 1 140px; }
.kpi{ font-feature-settings: "tnum" 1, "lnum" 1; font-variant-numeric: tabular-nums; }
.kbd{ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #0003; padding: 2px 6px; border-radius: 6px; border:1px solid var(--border); }
.small{ font-size: 12px; color: var(--muted); }
.actions{ display:flex; gap: 8px; flex-wrap: wrap; }

/* Footer */
footer{
  padding: 36px 0; color: var(--muted);
}

/* Utility */
.sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.right{ margin-left:auto; }
.center{ text-align:center; }
.spacer{ height: 10px; }
.divider{ height:1px; background: var(--border); margin: 12px 0; border-radius: 2px; }

/* Copy tooltip */
.tooltip{ position: relative; }
.tooltip .tip{
  position:absolute; bottom: 110%; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg);
  padding: 4px 8px; border-radius: 6px; font-size: 12px; opacity: 0; pointer-events: none; transition: .2s; white-space: nowrap;
}
.tooltip.show .tip{ opacity: 1; }

.rbc-today{ background-color: var(--today); }
.rbc-off-range-bg{ background-color: var(--off-range); }

/* Timeline Chart */
.timeline-chart{
  position: relative;
  padding: 10px 0 10px;
}

.timeline-track{
  position: absolute;
  top: 45px; bottom: 45px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  background: var(--text);
  border-radius: 999px;
}
.timeline-track::before{
  content:"";
  position:absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px; height: 14px;
  background: var(--text);
  border: 3px solid var(--text);
  border-radius: 50%;
}

.timeline-rows{
  display:flex;
  flex-direction:column;
  gap: 26px;
}

.tl-row{
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  align-items: center;
  min-height: 110px;
}

.tl-row .col.center{
  position: relative;
  height: 100%;
  display:grid;
  align-items:center;
  justify-items:center;
}

.arrow{
  position: relative;
  width: 70%;
  height: 2px;
  background: var(--text);
}
.arrow.left{
    justify-self: start;
    transform: translateX(-10px);
}
.arrow.right{
    justify-self: end;
    transform: translateX(10px);
}
.arrow.left::after,
.arrow.right::after{
  content:"";
  position:absolute;
  top: 50%;
  border: 6px solid transparent;
}
.arrow.left::after{
  left: 0;
  border-right-color: var(--text);
  transform: translate3D(-50%, -50%, 0);
}
.arrow.right::after{
  right: 0;
  border-left-color: var(--text);
  transform: translate3D(50%, -50%, 0);
}

.bubble{
  background: var(--panel);
  border: 2px solid var(--border);
  color: var(--text);
  border-radius: 36px;
  padding: 18px 22px;
  max-width: min(520px, 92%);
  margin: 0 8px;
  text-align: center;
  box-shadow: var(--shadow);
}
.bubble-header{
  font-weight: 700;
  margin-bottom: 6px;
}
.bubble-body{
  color: var(--text);
}

/* Responsive: stack on small screens */
@media (max-width: 720px){
  .tl-row{
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .timeline-track{
    left: 12px;
    transform: none;
    width: 2px;
    background: var(--border);
  }
  .arrow{ display:none; }
  .bubble{
    text-align: left;
    border-radius: 18px;
    margin-left: 28px;
    max-width: 100%;
  }
}
