:root {
  --bg: #0e0f12;
  --panel: #111217;
  --text: #0e0f12;
  --muted: #6b7280;
  --white: #ffffff;
  --accent: #062c3e;
  --gradient: linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(16,18,24,0.85) 40%, rgba(6,44,62,0.7) 100%);
  --font-heading: 'Montserrat', 'Segoe UI', sans-serif;
  --font-body: 'Roboto Slab', Georgia, serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: #f6f7fb;
}
.title,
.section h2,
.stat .num,
.stat-title,
.btn,
.nav-link,
.eyebrow,
.kicker,
.hero-actions .btn,
.skill-value,
.info-line,
.stat .label {
  font-family: var(--font-heading);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
}

a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a.btn, button.btn { -webkit-tap-highlight-color: rgba(0,0,0,.1); }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 110px;
  background: #0f1115;
  color: #d1d5db;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 12px;
}
.brand { width: 100%; display: flex; justify-content: center; }
.logo { width: 44px; height: 44px; display: grid; place-items: center; }
.logo img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 0 rgba(0,0,0,0)); }
.nav { position: relative; margin-top: 32px; display: flex; flex-direction: column; gap: 12px; width: 100%; }
.nav-indicator { position: absolute; left: 6px; width: calc(100% - 12px); height: 34px; border-radius: 8px; background: #151923; z-index: 0; transition: transform .25s ease, height .2s ease; transform: translateY(0); }
.nav-link {
  position: relative; z-index: 1;
  font-size: 12px; font-weight: 700; letter-spacing: .04em; color: #c7ccd6;
  padding: 10px 8px; border-radius: 8px; text-align: center;
}
.nav-link:hover, .nav-link.active { color: #fff; }
.sidebar-footer { margin-top: auto; font-size: 10px; text-align: center; color: #7a8291; }

.content { margin-left: 110px; }
.burger { display: none; }
.backdrop { display: none; }

.section { padding: 64px min(6vw, 64px); }
.section-header { margin-bottom: 24px; }
.kicker { color: var(--muted); text-transform: lowercase; font-weight: 600; }
.section h2 { margin: 4px 0 0; font-size: 32px; letter-spacing: .04em; }

/* Hero */
.hero { min-height: 90vh; display: grid; place-items: center; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.title { font-size: clamp(40px, 6vw, 84px); line-height: 0.95; margin: 0; }
.subtitle { margin: 16px 0 24px; font-weight: 600; color: #374151; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-contacts { margin-top: 20px; display: flex; gap: 20px; color: #4b5563; font-weight: 500; }
.hero-visual { display: grid; place-items: center; }
.portrait-ring { position: relative; width: min(460px, 60vw); aspect-ratio: 1/1; border-radius: 50%; overflow: hidden; background: radial-gradient(ellipse at 50% 50%, #d9e8ff 0, #b3cff7 80%, #222 95%); }
.portrait-ring img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }

/* Buttons */
.btn { background: #0f1115; color: #fff; border: 1px solid #2c323f; padding: 10px 14px; border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer; position: relative; z-index: 1; pointer-events: auto; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,.08); }
.btn:active { transform: translateY(0); }
.btn-secondary { background: #1a1f2b; }
.btn-outline { background: transparent; color: #0f1115; border-color: #0f1115; }
.btn-small { padding: 8px 12px; font-size: 13px; }

/* About */
.about-grid { display: grid; grid-template-columns: 340px 1fr; gap: 32px; align-items: start; }
.about-photo img { width: 100%; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.info-cards { display: grid; gap: 16px; }
.info-card { background: #ffffff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 16px; display: grid; gap: 8px; }
.info-line { color: #1f2937; font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.stat { background: #ffffff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 16px; display: grid; align-content: center; }
.stat .num { font-size: 28px; font-weight: 800; color: #111827; }
.stat .label { color: #6b7280; font-weight: 600; }
.skills { background: #ffffff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 16px; }
.skills strong { display: block; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.skills ul { margin: 0; padding-left: 18px; color: #374151; }
.skills li { margin: 6px 0; }
.stat-inline { display: inline-grid; grid-auto-flow: row; gap: 2px; margin-top: 12px; padding: 12px 14px; }
/* Support list content inside stat card */
.stat .stat-title { display: block; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; color: #111827; }
.stat ul { margin: 0; padding-left: 18px; color: #374151; }
.stat li { margin: 6px 0; }
.skill-meter { display: grid; gap: 6px; margin-bottom: 12px; }
.skill-meter:last-of-type { margin-bottom: 0; }
.skill-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: #1f2937; font-weight: 600; }
.skill-value { color: #4b5563; font-weight: 700; }
.skill-track { width: 100%; height: 8px; border-radius: 999px; background: #e5e7eb; overflow: hidden; }
.skill-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #062c3e 0%, #2563eb 100%); }
.about-copy { margin-top: 8px; }
.about-copy .accent { color: var(--accent); }
.quote { margin: 16px 0 0; padding: 16px 18px; border-left: 4px solid #e5e7eb; color: #4b5563; background: #f9fafb; border-radius: 8px; }

/* Works */
.works-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 28px; }
.work-card { display: grid; gap: 10px; background: #fff; border: 1px solid #e5e7eb; border-radius: 18px; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; position: relative; z-index: 1; pointer-events: auto; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.work-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(0,0,0,.09); }
.work-card:active { transform: translateY(-1px); }
.work-card img { width: 100%; height: 220px; object-fit: cover; }
.work.hidden { display: none; }
.work-meta { padding: 12px 14px 16px; }
.eyebrow { color: #6b7280; font-weight: 700; font-size: 12px; text-transform: lowercase; }
.work h3 { margin: 4px 0 2px; }
.center { text-align: center; margin-top: 18px; }

/* Contact */
.contact-inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px; align-items: start; }
.contact-left address { font-style: normal; color: #4b5563; }
.contact-lines a { color: #111827; font-weight: 700; }
.socials { display: flex; gap: 16px; margin-top: 8px; }
.contact-card { background: var(--gradient); padding: 22px; border-radius: 18px; color: #eaf2ff; border: 1px solid rgba(255,255,255,.08); }
.contact-card h3 { margin-top: 0; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-full { grid-column: 1 / -1; }
.fields label { display: grid; gap: 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.fields input, .fields textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: #eaf2ff; outline: none; }
.fields input::placeholder, .fields textarea::placeholder { color: #c9d7ff; opacity: .7; }
.contact .btn { margin-top: 10px; background: #fff; color: #0f1115; border-color: transparent; }
.form-success, .form-error { 
  margin: 10px 0 0; 
  font-weight: 700; 
  padding: 12px 16px;
  border-radius: 8px;
  max-height: 200px;
  overflow: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease, margin 0.3s ease, padding 0.3s ease;
}
.form-success { color: #d1ffcf; background: rgba(209, 255, 207, 0.15); }
.form-error { color: #ffcccc; background: rgba(255, 204, 204, 0.15); }
.form-success[hidden], .form-error[hidden] {
  display: none;
}

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: grid; place-items: center; z-index: 2000; opacity: 0; transition: opacity .25s ease; }
.lightbox.show { opacity: 1; }
.lightbox[hidden] { display: none; }
.lightbox-inner { position: relative; max-width: min(92vw, 1100px); max-height: 84vh; display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; gap: 0; padding: 0; background: rgba(15,17,21,.75); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.lightbox-media { display: grid; justify-items: start; align-self: stretch; position: relative; }
.lightbox-image { width: 100%; height: 100%; object-fit: contain; border-radius: 0; background: #e9e2d9; }
.lightbox-image-credit { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.7); color: #fff; padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 500; white-space: nowrap; z-index: 20; display: none; }
.lightbox-img-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 999px; border: none; background: rgba(0,0,0,.6); color: #fff; font-size: 18px; font-weight: 700; cursor: pointer; z-index: 15; transition: background .2s ease, opacity .2s ease; display: none; place-items: center; }
.lightbox-img-nav[style*="grid"] { opacity: 1; }
.lightbox-media:hover .lightbox-img-nav[style*="grid"] { opacity: 1; }
.lightbox-img-nav:hover { background: rgba(0,0,0,.8); }
.lightbox-img-prev { left: 12px; }
.lightbox-img-next { right: 12px; }
.lightbox-details { color: #e5e7eb; background: transparent; border: 0; border-radius: 0; padding: 18px; height: 100%; overflow: auto; }
.lightbox-title { margin: 0 0 10px; font-size: 22px; font-weight: 800; letter-spacing: .02em; }
.lightbox-text { margin: 6px 0 0; line-height: 1.7; color: #cbd5e1; white-space: pre-wrap; }
.lightbox-text a { color: #60a5fa; text-decoration: underline; word-break: break-all; transition: color .2s ease; }
.lightbox-text a:hover { color: #93c5fd; }
.lightbox-close { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 999px; border: none; background: rgba(255,255,255,.9); color: #111; font-size: 22px; line-height: 40px; cursor: pointer; z-index: 10; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 999px; border: none; background: rgba(255,255,255,.85); color: #111; font-size: 20px; font-weight: 700; cursor: pointer; z-index: 10; transition: background .2s ease; display: grid; place-items: center; }
.lightbox-nav:hover { background: rgba(255,255,255,1); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* Responsive */
/* Tablet and below */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { order: -1; }
  .portrait-ring { width: min(400px, 70vw); }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .about-photo { max-width: 400px; margin: 0 auto; }
  .contact-inner { grid-template-columns: 1fr; gap: 24px; }
  .section h2 { font-size: clamp(24px, 5vw, 32px); }
}

/* Mobile menu breakpoint */
@media (max-width: 820px) {
  .sidebar {
    width: 280px;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.22,1,.36,1);
    box-shadow: 0 10px 40px rgba(0,0,0,.25);
    z-index: 60;
    pointer-events: none;
  }
  .sidebar.open { transform: translateX(0); pointer-events: auto; }
  .content { margin-left: 0; }
  .works-grid { grid-template-columns: 1fr; gap: 20px; }

  .burger { display: grid; position: fixed; top: 14px; left: 14px; width: 42px; height: 42px; border: 1px solid #d1d5db; background: #fff; border-radius: 10px; place-items: center; gap: 4px; z-index: 1000; }
  .burger span { display: block; width: 18px; height: 2px; background: #111827; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
  .burger.active span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
  .burger.active span:nth-child(2) { opacity: 0; }
  .burger.active span:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }

  .backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 55; pointer-events: none; opacity: 0; transition: opacity .25s ease; }
  .backdrop.show { opacity: 1; pointer-events: auto; }
  .backdrop[hidden] { display: none; pointer-events: none; }
  
  .content { position: relative; z-index: 1; }

  /* Hero adjustments */
  .hero { min-height: auto; padding: 40px 0; }
  .title { font-size: clamp(32px, 8vw, 56px); }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; text-align: center; position: relative; z-index: 1; pointer-events: auto; touch-action: manipulation; }
  .hero-contacts { flex-direction: column; gap: 8px; font-size: 14px; }

  /* About section */
  .stats { grid-template-columns: 1fr; }
  .info-cards { gap: 12px; }
  .skill-head { font-size: 12px; flex-wrap: wrap; }
  .skill-value { font-size: 12px; }

  /* Contact */
  .fields { grid-template-columns: 1fr; }
  .socials { flex-wrap: wrap; gap: 12px; }

  /* Lightbox mobile */
  .lightbox-inner { grid-template-columns: 1fr; max-height: 90vh; }
  .lightbox-media { justify-items: center; }
  .lightbox-image { width: 100%; height: auto; max-width: 95vw; max-height: 50vh; }
  .lightbox-details { height: auto; max-height: 40vh; padding: 14px; }
  .lightbox-title { font-size: 18px; }
  .lightbox-text { font-size: 14px; }
  .lightbox-nav { width: 36px; height: 36px; font-size: 16px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-close { width: 36px; height: 36px; top: 8px; right: 8px; font-size: 20px; }
}

/* Small mobile */
@media (max-width: 560px) {
  .section { padding: 40px 16px; }
  .section h2 { font-size: 24px; }
  .title { font-size: clamp(28px, 10vw, 40px); }
  .subtitle { font-size: 14px; }
  
  /* Buttons */
  .btn { padding: 10px 12px; font-size: 13px; }
  .btn-small { padding: 8px 10px; font-size: 12px; }
  
  /* About */
  .about-photo { max-width: 100%; }
  .info-card, .stat, .skills { padding: 12px; }
  .stat .num { font-size: 24px; }
  
  /* Works */
  .work-card img { height: 180px; }
  .work-meta { padding: 10px 12px 12px; }
  .work h3 { font-size: 16px; }
  
  /* Contact */
  .contact-card { padding: 16px; }
  .contact-left address, .contact-lines { font-size: 14px; }
  .fields label { font-size: 11px; }
  .fields input, .fields textarea { padding: 8px 10px; font-size: 14px; }
  
  /* Center buttons */
  .center { margin-top: 16px; position: relative; z-index: 1; }
  .center .btn { display: block; width: 100%; max-width: 280px; margin: 8px auto; position: relative; z-index: 2; pointer-events: auto; touch-action: manipulation; }
  
  /* Lightbox small mobile */
  .lightbox-details { padding: 12px; }
  .lightbox-title { font-size: 16px; }
  .lightbox-text { font-size: 13px; line-height: 1.6; }
}

/* Very small screens */
@media (max-width: 380px) {
  .section { padding: 32px 12px; }
  .title { font-size: 28px; }
  .hero-actions .btn { font-size: 12px; padding: 8px 10px; }
  .work-card img { height: 160px; }
}


