:root {
  --bg: #0b0b0d;
  --bg-elev: #131418;
  --surface: #1a1c22;
  --border: #24262d;
  --text: #ececee;
  --muted: #8a8d96;
  --accent: #e8c46c;
  --accent-soft: rgba(232, 196, 108, 0.12);
  --radius: 10px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --photo-shadow:
    0 18px 44px rgba(255, 255, 255, 0.09),
    0 4px 14px rgba(255, 255, 255, 0.06),
    0 22px 46px rgba(0, 0, 0, 0.34);
  --photo-shadow-hover:
    0 26px 68px rgba(255, 255, 255, 0.14),
    0 8px 22px rgba(255, 255, 255, 0.08),
    0 30px 58px rgba(0, 0, 0, 0.38);

  --cord: #3a3d44;
  --bulb-off: rgba(42, 45, 54, 0.48);
  --bulb-off-stroke: #595c64;
  --metal: #1b1c20;
  --metal-highlight: #555861;
  --img-filter: saturate(0.9) brightness(0.92);
  --img-filter-hover: saturate(1) brightness(1);
}

body.light {
  --bg: #f4f2ed;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --border: #e3dfd6;
  --text: #1c1b18;
  --muted: #6b6a64;
  --accent: #b8862a;
  --accent-soft: rgba(184, 134, 42, 0.12);
  --shadow: 0 8px 28px rgba(40, 30, 10, 0.08);
  --photo-shadow:
    0 18px 40px rgba(48, 37, 16, 0.16),
    0 4px 12px rgba(48, 37, 16, 0.08);
  --photo-shadow-hover:
    0 26px 60px rgba(48, 37, 16, 0.22),
    0 8px 18px rgba(48, 37, 16, 0.12);

  --cord: #b9b3a6;
  --bulb-off: rgba(255, 247, 214, 0.78);
  --bulb-off-stroke: #e6c772;
  --metal: #c9c0af;
  --metal-highlight: #fff3cf;
  --img-filter: saturate(1) brightness(1);
  --img-filter-hover: saturate(1.05) brightness(1.04);
}

html, body {
  transition: background-color .5s ease, color .5s ease;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter",
    "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
}

img { display: block; max-width: 100%; }

.layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
}

/* ---------- Profile (left) ---------- */
.profile {
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
}

.profile-inner {
  padding: 44px 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 100%;
}

.avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a2d36 0%, #1a1c22 100%);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 26px;
  letter-spacing: 1px;
  color: var(--accent);
}

.name {
  font-size: 26px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

.bio {
  color: var(--muted);
  font-size: 14.5px;
  margin: 0;
}

.tagline {
  color: var(--text);
  font-family: "Courier New", Courier, monospace;
  font-size: 12.5px;
  line-height: 1.75;
  letter-spacing: 0.08em;
  text-wrap: balance;
}

.tagline span {
  color: #ffffff;
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(232, 196, 108, 0.24);
}

body.light .tagline span {
  color: var(--text);
  text-shadow: none;
}

.meta {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 22px;
}

.meta li {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.meta span { color: var(--muted); }
.meta strong {
  color: var(--text);
  font-weight: 500;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.links a {
  flex: 1 1 auto;
  text-align: center;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  background: var(--surface);
  transition: border-color .2s, color .2s, background .2s;
}

.links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.footer-note {
  margin-top: auto;
  padding-top: 24px;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ---------- Gallery (right) ---------- */
.gallery {
  padding: 150px 48px 64px;
}

.gallery-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.gallery-head h2 {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.filters {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: 999px;
}

.filter {
  background: transparent;
  color: var(--muted);
  border: 0;
  padding: 7px 14px;
  font-size: 12.5px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: color .2s, background .2s;
}

.filter:hover { color: var(--text); }

.filter.active {
  background: var(--accent);
  color: #1a1408;
  font-weight: 600;
}

.grid {
  columns: 2 280px;
  column-gap: 16px;
}

.card {
  margin: 0;
  display: inline-block;
  width: 100%;
  break-inside: avoid;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 0;
  box-shadow: var(--photo-shadow);
  transform: translateY(0);
  transition: box-shadow .32s ease, transform .32s ease;
  will-change: transform;
}

.card:hover,
.card:focus-within {
  box-shadow: var(--photo-shadow-hover);
  transform: translateY(-4px);
}

.card img {
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform .6s ease, filter .4s ease;
  filter: var(--img-filter);
}

.photo-button {
  appearance: none;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
  text-align: inherit;
}

.photo-button:focus-visible {
  outline: none;
}

.card:hover img,
.photo-button:focus-visible img {
  transform: scale(1.025);
  filter: var(--img-filter-hover);
}

.card figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0) 100%);
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.05em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s, transform .3s;
}

.card:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

.card figcaption em {
  font-style: normal;
  color: var(--accent);
  font-size: 12px;
}

.card.hidden { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(3, 3, 5, 0.88);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease;
}

.lightbox.open,
.lightbox[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.lightbox-active {
  overflow: hidden;
}

.lightbox-frame {
  margin: 0;
  max-width: min(94vw, 1440px);
  max-height: 92vh;
  display: grid;
  gap: 12px;
}

.lightbox-img {
  max-width: 100%;
  max-height: calc(92vh - 42px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
}

.lightbox-caption {
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-align: center;
}

.lightbox-close {
  position: fixed;
  top: 22px;
  right: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(20, 21, 25, 0.76);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid { column-gap: 14px; }
}

@media (max-width: 720px) {
  .layout { grid-template-columns: 1fr; }
  .profile {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .profile-inner { padding: 140px 24px 32px; }
  .gallery { padding: 44px 20px 48px; }
  .grid { columns: 1; }
}

/* ---------- Hanging lamp ---------- */
.lamp {
  position: fixed;
  top: 0;
  left: 386px;
  width: 68px;
  height: 122px;
  transform: none;
  z-index: 1000;
  display: block;
  isolation: isolate;
  background: url("assets/reference-lamp-cutout@2x.png") center top / 68px 122px no-repeat;
  filter: contrast(1.12) saturate(1.06) drop-shadow(0 10px 18px rgba(0, 0, 0, 0.22));
  pointer-events: none;
  user-select: none;
  transition: transform .45s ease, opacity .45s ease;
}

.lamp::before {
  content: "";
  position: absolute;
  top: 76px;
  left: 50%;
  z-index: -1;
  width: 96px;
  height: 74px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(232, 154, 48, 0.24) 0%,
    rgba(193, 103, 28, 0.13) 40%,
    rgba(193, 103, 28, 0) 74%
  );
  filter: blur(2px);
  pointer-events: none;
}

.lamp.hidden {
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
}

.lamp-wire {
  display: none;
}

.bulb {
  display: none;
}

.bulb::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 9px;
  height: 9px;
  background:
    linear-gradient(90deg, rgba(58, 39, 18, 0.5), rgba(213, 147, 54, 0.96) 48%, rgba(67, 45, 20, 0.7)),
    #8a5f2b;
  border: 1px solid rgba(43, 31, 18, 0.42);
  border-bottom: 0;
  border-radius: 3px 3px 1px 1px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.34);
  transition: background-color .5s ease, border-color .5s ease;
}

.bulb::after {
  content: "";
  position: absolute;
  top: 21px;
  left: 50%;
  transform: translateX(-50%);
  width: 31px;
  height: 8px;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(255, 239, 181, 0.98) 0%, rgba(255, 194, 88, 0.64) 48%, transparent 74%);
  clip-path: none;
  border-radius: 50%;
  box-shadow:
    0 3px 14px rgba(255, 189, 77, 0.36),
    0 16px 44px rgba(188, 103, 30, 0.18);
}

.lamp-cap {
  display: none;
}

.bulb-filament {
  display: none;
}

.bulb-filament::before {
  content: "";
  width: 18px;
  height: 17px;
  border: 1px solid #6f6048;
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
  transition: border-color .5s ease, box-shadow .5s ease;
}

.bulb-glow {
  display: none;
}

.bulb-reflection {
  display: none;
}

body.light .lamp {
  filter: contrast(1.12) saturate(1.04) drop-shadow(0 8px 16px rgba(40, 30, 10, 0.1));
}

body.light .lamp::before {
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(184, 134, 42, 0.2) 0%,
    rgba(184, 134, 42, 0.09) 42%,
    rgba(184, 134, 42, 0) 78%
  );
}

.cord {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  cursor: pointer;
  padding: 0;
  display: block;
  touch-action: none;
}

.cord:active { cursor: pointer; }

.cord:focus,
.cord:focus-visible {
  outline: none;
}

.cord-line {
  display: none;
}

.cord-knob {
  display: none;
}

.lamp.swinging {
  animation: lamp-swing .6s ease-out;
  transform-origin: top center;
}

@keyframes lamp-swing {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(2.5deg); }
  55%  { transform: rotate(-1.6deg); }
  80%  { transform: rotate(0.8deg); }
  100% { transform: rotate(0deg); }
}

@media (max-width: 720px) {
  .lamp {
    left: 34px;
  }
  .lamp-wire { height: 28px; }
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #24262d; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #34373f; }

.card.small {
  width: 74%;
}

.card.feature {
  width: 100%;
  column-span: all;
}

