/* Om Kotwal portfolio (cream / ink style) */
:root {
  --bg: #E8E4E0;
  --ink: #1A1818;
  --dark: #0F0E0E;
  --muted: #6f6a66;
  --soft: #8f8a85;
  --line: rgba(26, 24, 24, .14);
  --card: #F4F1EE;
  --paper: #FBF9F7;
  --green: #7a8670;
  --gold: #C9A227;
  --wall: #D8D4CF;
  --wall-line: rgba(26, 24, 24, .08);
  --btn-bg: #1A1818;
  --btn-fg: #E8E4E0;
  --radius: 14px;
}
html[data-mode="dark"] {
  --bg: #1A1818;
  --ink: #E8E4E0;
  --muted: #a8a29d;
  --soft: #8a857f;
  --line: rgba(232, 228, 224, .16);
  --card: #262121;
  --wall: #211e1e;
  --wall-line: rgba(232, 228, 224, .07);
  --btn-bg: #E8E4E0;
  --btn-fg: #1A1818;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Onest', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
.shell { width: min(1240px, 92vw); margin: 0 auto; }
.skip {
  position: fixed; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px;
  transition: top .2s;
}
.skip:focus { top: 12px; }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--dark); color: #E8E4E0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 28px clamp(20px, 5vw, 64px);
  transition: transform .7s cubic-bezier(.7, 0, .2, 1), visibility 0s .7s;
}
.loader--done { transform: translateY(-100%); visibility: hidden; }
.loader__pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18vh; }
.loader__pill {
  background: var(--c); color: var(--t);
  font-weight: 600; font-size: 15px; padding: 10px 18px; border-radius: 999px;
  opacity: 0; transform: translateY(12px);
  animation: pillIn .5s ease forwards;
}
.loader__pill:nth-child(1) { animation-delay: .05s; }
.loader__pill:nth-child(2) { animation-delay: .15s; }
.loader__pill:nth-child(3) { animation-delay: .25s; }
.loader__pill:nth-child(4) { animation-delay: .35s; }
.loader__pill:nth-child(5) { animation-delay: .45s; }
.loader__pill:nth-child(6) { animation-delay: .55s; }
@keyframes pillIn { to { opacity: 1; transform: translateY(0); } }
.loader__top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: rgba(232, 228, 224, .65); margin-bottom: 18px; }
.loader__top b { color: #E8E4E0; }
.loader__num { display: flex; align-items: baseline; gap: 14px; }
.loader__num small { font-size: 13px; color: rgba(232, 228, 224, .65); }
.loader__num span { font-size: clamp(56px, 9vw, 96px); font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.loader__bar { height: 3px; background: rgba(232, 228, 224, .18); border-radius: 99px; margin-top: 14px; overflow: hidden; }
.loader__bar i { display: block; height: 100%; width: 0; background: #E8E4E0; border-radius: 99px; }

/* ---------- Pull-cord mode toggle ---------- */
.cord {
  position: fixed; top: 0; right: clamp(10px, 3vw, 34px); z-index: 90;
  background: none; border: 0; cursor: pointer; padding: 0;
  display: flex; flex-direction: column; align-items: center;
  transform-origin: top center;
}
.cord__line { width: 2px; height: 78px; background: repeating-linear-gradient(180deg, #b9b2aa 0 5px, #8f887e 5px 7px); }
.cord__bulb {
  width: 26px; height: 34px; margin-top: -2px;
  background: radial-gradient(circle at 50% 30%, #e9c46a, #a97e2f 70%);
  border-radius: 50% 50% 46% 46% / 58% 58% 42% 42%;
  box-shadow: 0 6px 14px -4px rgba(0, 0, 0, .45);
  display: flex; align-items: center; justify-content: center;
  transition: transform .3s;
}
.cord__bulb-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(26, 24, 24, .55); }
.cord:hover .cord__bulb { transform: translateY(4px); }
.cord:active .cord__bulb { transform: translateY(8px); }
html[data-mode="dark"] .cord__bulb { background: radial-gradient(circle at 50% 30%, #fff3c4, #e9c46a 65%); box-shadow: 0 0 22px 4px rgba(233, 196, 106, .45); }

/* ---------- Header ---------- */
.hdr { position: sticky; top: 0; z-index: 80; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); }
.hdr__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.nav { display: flex; gap: clamp(10px, 2.4vw, 30px); list-style: none; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap;
  padding: 4px 2px; border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.clock-pill {
  font-size: 14px; color: var(--muted); white-space: nowrap;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; background: var(--card);
}
.clock-pill b { color: var(--ink); font-variant-numeric: tabular-nums; }
.clock-dot { margin: 0 4px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(28px, 5vh, 64px) 0 0; }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(24px, 4vw, 64px); align-items: start; }
.eyebrow { font-size: 15px; font-weight: 500; color: var(--muted); display: flex; align-items: center; gap: 8px; letter-spacing: .01em; }
.eyebrow__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); flex: none; }
.eyebrow__dot--green { background: #8fbf7f; }
.eyebrow--light { color: rgba(232, 228, 224, .65); }
.h1 { font-size: clamp(44px, 7.2vw, 92px); font-weight: 800; letter-spacing: -.045em; line-height: 1.02; margin: 22px 0 8px; }
.h1__line { display: block; }
.h1__line--soft { color: var(--soft); font-weight: 700; }

/* Spiral notepad card */
.notepad {
  margin-top: 26px; max-width: 560px;
  background: var(--paper); color: #141414;
  border-radius: 12px; box-shadow: 0 24px 48px -22px rgba(0, 0, 0, .45), 0 2px 0 rgba(0, 0, 0, .06);
  transform: rotate(-1.2deg);
  padding: 0 0 10px;
}
.notepad__spiral { display: flex; justify-content: space-between; padding: 10px 22px 0; }
.notepad__spiral i {
  width: 13px; height: 18px; border: 2.5px solid #b9b2aa; border-radius: 50%;
  transform: translateY(-8px); background: var(--paper);
  box-shadow: inset 0 0 0 2px var(--paper);
}
.notepad__body { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 6px 26px 14px; min-height: 96px; }
.notepad__word { font-size: clamp(30px, 4.4vw, 54px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; transition: opacity .22s ease, transform .22s ease; }
.notepad__word--swap { opacity: 0; transform: translateY(8px); }
.notepad__no { font-size: 13px; font-weight: 500; color: rgba(20, 20, 20, .45); letter-spacing: .08em; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: inherit; font-size: 15px; font-weight: 600; text-decoration: none;
  padding: 13px 22px; border-radius: 999px; cursor: pointer; border: 1px solid transparent;
  transition: transform .15s ease, background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn__arrow { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--btn-fg); color: var(--btn-bg); font-size: 14px; }
.btn--dark { background: var(--btn-bg); color: var(--btn-fg); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--light { background: #E8E4E0; color: #1A1818; }
.btn--light .btn__arrow { background: #1A1818; color: #E8E4E0; }
.btn--outline-light { background: transparent; color: #E8E4E0; border-color: rgba(232, 228, 224, .35); }
.btn--outline-light:hover { border-color: #E8E4E0; }
.hero__btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__sub { margin-top: 24px; font-size: 19px; line-height: 1.55; color: var(--muted); max-width: 480px; }

.portrait { position: relative; }
.portrait img {
  width: 100%; height: clamp(520px, 68vh, 680px); object-fit: cover; object-position: center 12%;
  filter: grayscale(1); border-radius: 6px;
}
.portrait__tag {
  position: absolute; left: -14px; bottom: 34px;
  background: #1A1818; color: #E8E4E0; font-size: 14px; font-weight: 500;
  padding: 10px 18px; border-radius: 999px; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .5);
}
.hero__strip {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--line); margin-top: clamp(28px, 5vh, 56px);
  padding: 18px 0 22px; font-size: 13px; letter-spacing: .06em; font-weight: 500; color: var(--muted);
}

/* ---------- Doors ---------- */
.doors-section { padding: clamp(64px, 10vh, 110px) 0 0; }
.h2 { font-size: clamp(34px, 4.6vw, 58px); font-weight: 800; letter-spacing: -.04em; line-height: 1.05; }
.doors-section__sub { margin-top: 14px; font-size: 17px; color: var(--muted); }
.doors-section__sub span { font-size: 15px; }
.wall { background: var(--wall); margin-top: 44px; padding: 0 0 0; position: relative; }
.doors { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(10px, 2vw, 28px); padding: 56px 0 0; }
.door-unit { text-align: center; }
.door-frame {
  position: relative; aspect-ratio: 3 / 4.4; overflow: hidden;
  border: 6px solid rgba(255, 255, 255, .55); border-bottom: 0;
  box-shadow: 0 18px 34px -18px rgba(0, 0, 0, .45);
  background: #17130f;
}
.door-inside {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  gap: 10px; padding: 18px 16px; text-align: left; color: #F4F1EE;
  background: radial-gradient(circle at 50% 0%, #3a2f26, #17130f 75%);
}
.door-inside h3 { font-size: clamp(16px, 1.5vw, 21px); letter-spacing: -.02em; line-height: 1.2; }
.door-inside p { font-size: 13.5px; line-height: 1.55; color: rgba(244, 241, 238, .78); }
.door {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; cursor: pointer;
  background-color: var(--door);
  background-image: repeating-linear-gradient(90deg, rgba(0, 0, 0, .22) 0 2px, transparent 2px 13px);
  transform-origin: left center;
  transition: transform .9s cubic-bezier(.6, 0, .2, 1);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .18), inset 0 -14px 24px rgba(0, 0, 0, .25);
}
.door:hover { filter: brightness(1.07); }
.door--open { transform: perspective(1100px) rotateY(-104deg); }
/* Zoom on the opened door, dim the rest */
.door-frame { transition: transform .8s cubic-bezier(.22, 1, .36, 1), box-shadow .8s ease; will-change: transform; }
.door-frame--zoom { transform: scale(1.3); z-index: 6; box-shadow: 0 34px 64px -20px rgba(0, 0, 0, .55); }
.door-unit { transition: opacity .6s ease; }
.doors--focused .door-unit:not(.door-unit--zoom) { opacity: .45; }
.door-frame--zoom .door-inside { animation: insideZoom .8s cubic-bezier(.22, 1, .36, 1) .15s both; }
@keyframes insideZoom { from { transform: scale(1.14); opacity: .35; } to { transform: scale(1); opacity: 1; } }
.keyhole {
  position: absolute; top: 46%; right: 12px; width: 15px; height: 15px;
  background: radial-gradient(circle at 50% 35%, #f3dd9a, #b98f2e 70%);
  border-radius: 50%; box-shadow: 0 0 0 2px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .5);
}
.keyhole::after {
  content: ""; position: absolute; left: 50%; top: 11px; transform: translateX(-50%);
  border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 11px solid #b98f2e;
}
.door-label { margin-top: 14px; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.wall__skirting { height: 14px; background: rgba(255, 255, 255, .5); border-top: 1px solid var(--wall-line); margin-top: 34px; }

/* ---------- Story ---------- */
.story { padding: clamp(72px, 11vh, 120px) 0; }
.story__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 80px); }
.story__left { position: relative; }
.story__year {
  font-size: clamp(110px, 17vw, 220px); font-weight: 800; letter-spacing: -.05em; line-height: .95;
  margin-top: 34px; color: var(--ink);
}
.story__year-label { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 13px; letter-spacing: .14em; color: var(--muted); margin-top: 10px; }
.story__intro { font-size: 18px; line-height: 1.7; color: var(--ink); max-width: 560px; }
.skills { list-style: none; margin-top: 34px; display: grid; gap: 22px; }
.skill__label { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.skill__bar { height: 6px; border-radius: 999px; background: var(--line); margin-top: 9px; overflow: hidden; }
.skill__bar i { display: block; height: 100%; background: var(--ink); border-radius: 999px; }
.timeline { list-style: none; position: relative; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline__item { position: relative; padding-bottom: 54px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute; left: -34px; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 25%, transparent);
}
.timeline__item:nth-child(n+2) .timeline__dot { background: var(--ink); box-shadow: 0 0 0 5px color-mix(in srgb, var(--ink) 12%, transparent); }
.timeline__date { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 13px; letter-spacing: .14em; color: var(--muted); }
.timeline__item h3 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; letter-spacing: -.03em; margin: 8px 0 4px; }
.timeline__sub { color: var(--muted); font-size: 16px; margin-bottom: 14px; }
.timeline__bullets { list-style: none; }
.timeline__bullets li { color: var(--muted); font-size: 15.5px; line-height: 1.6; padding-left: 20px; position: relative; }
.timeline__bullets li::before { content: "–"; position: absolute; left: 0; color: var(--soft); }

/* ---------- Process ---------- */
.process { padding: 0 0 clamp(72px, 10vh, 110px); }
.process__sub { color: var(--muted); margin-top: 10px; font-size: 17px; }
.process__grid { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 34px; }
.process__step { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; background: var(--card); }
.process__no { font-size: 13px; font-weight: 700; letter-spacing: .14em; color: var(--soft); font-variant-numeric: tabular-nums; }
.process__step h3 { font-size: 21px; letter-spacing: -.02em; margin: 12px 0 8px; }
.process__step p { color: var(--muted); font-size: 15px; line-height: 1.6; }

/* ---------- Work ---------- */
.work { padding: 0 0 clamp(72px, 10vh, 110px); }
.work__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; }
.work__grid--single { grid-template-columns: minmax(0, 560px); }
.work-card {
  display: flex; flex-direction: column; gap: 10px; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  padding: 28px 24px; min-height: 210px;
  transition: transform .2s ease, border-color .2s;
}
a.work-card:hover { transform: translateY(-3px); border-color: var(--ink); }
.work-card__handle { font-size: clamp(22px, 2.2vw, 28px); font-weight: 800; letter-spacing: -.03em; }
.work-card__desc { color: var(--muted); font-size: 15.5px; line-height: 1.6; flex: 1; }
.work-card__link { font-size: 14px; font-weight: 600; }
.work-card--cta { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.work-card--cta .work-card__desc { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.work-card--cta .btn { align-self: flex-start; margin-top: 6px; }

/* ---------- Contact (dark) ---------- */
.contact { background: var(--dark); color: #E8E4E0; padding: clamp(72px, 11vh, 120px) 0 clamp(64px, 9vh, 100px); }
.contact__h { font-size: clamp(44px, 7vw, 88px); font-weight: 800; letter-spacing: -.045em; line-height: 1.04; margin: 26px 0 22px; }
.contact__h--cream { color: #E8E4E0; }
.contact__h--grey { color: #6e6a66; }
.contact__p { max-width: 560px; color: rgba(232, 228, 224, .72); font-size: 17px; line-height: 1.65; }
.contact__btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.contact__meta { margin-top: 26px; font-size: 15px; color: rgba(232, 228, 224, .8); }
.contact__meta a { color: #E8E4E0; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Footer (dark) ---------- */
.footer { background: var(--dark); color: #E8E4E0; border-top: 1px solid rgba(232, 228, 224, .12); padding: 56px 0 34px; }
.footer__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer h3 { font-size: 12.5px; letter-spacing: .14em; color: rgba(232, 228, 224, .55); margin-bottom: 16px; font-weight: 600; }
.footer ul { list-style: none; }
.footer li { padding: 5px 0; font-size: 15.5px; color: rgba(232, 228, 224, .88); }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 52px; padding-top: 22px; border-top: 1px solid rgba(232, 228, 224, .12); font-size: 14px; color: rgba(232, 228, 224, .6); }
.footer__top { color: rgba(232, 228, 224, .85); }

/* Back to top */
.totop {
  position: fixed; right: 22px; bottom: 22px; z-index: 85;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  background: var(--ink); color: var(--bg); border: 1px solid var(--line);
  font-size: 19px; line-height: 1;
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .25s, transform .25s;
}
.totop--show { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .portrait { max-width: 520px; }
  .portrait img { height: auto; aspect-ratio: 3 / 3.4; }
  .doors { grid-template-columns: repeat(3, 1fr); }
  .story__grid { grid-template-columns: 1fr; }
  .story__year { margin-top: 10px; }
  .process__grid { grid-template-columns: repeat(2, 1fr); }
  .work__grid { grid-template-columns: 1fr; }
  .work-card { min-height: 0; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .clock-pill { font-size: 12px; padding: 7px 12px; }
  .nav a { font-size: 14px; }
  .doors { grid-template-columns: repeat(2, 1fr); }
  .door-unit:last-child { grid-column: 1 / -1; max-width: 46%; margin: 0 auto; width: 100%; }
  .door-frame--zoom { transform: scale(1.14); }
  .process__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .portrait__tag { left: 10px; }
  .notepad__body { min-height: 76px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .door { transition: none; }
  .door-frame, .door-unit { transition: none; }
  .door-frame--zoom .door-inside { animation: none; }
  .loader { transition: none; }
}
