/* ============================================================
   Tokens — YouTube dark theme
   ============================================================ */
:root {
  --bg: #0f0f0f;
  --surface: #212121;
  --surface-hover: #3f3f3f;
  --border: #303030;
  --text: #f1f1f1;
  --text-dim: #aaaaaa;
  --accent: #ff0000;
  --accent-dim: #cc0000;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --font-body: "Roboto", Arial, sans-serif;
  --font-display: "Roboto Condensed", "Roboto", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  height: 100%;
}

button { font-family: inherit; }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ============================================================
   App shell
   ============================================================ */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ---------- Left: static panel ---------- */
.panel-left {
  flex: 0 0 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px 28px;
  border-right: 1px solid var(--border);
  background: var(--bg);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dim);
}

.intro {
  margin-top: -40px;
}

.intro-title {
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1.1;
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: 0.2px;
}

.intro-role {
  font-size: 16px;
  font-weight: 500;
  color: var(--accent);
  margin: 0 0 18px;
}

.intro-desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0;
  max-width: 34ch;
}

.panel-left-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3ea34b;
  box-shadow: 0 0 0 3px rgba(62, 163, 75, 0.18);
  flex: none;
}

/* ---------- Right: scrollable panel ---------- */
.panel-right {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 40px 80px;
  scroll-behavior: smooth;
}

.right-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  margin: -32px -40px 28px;
  padding: 32px 40px 0;
  border-bottom: 1px solid var(--border);
}

.right-nav-inner {
  position: relative;
  display: flex;
  gap: 28px;
  padding-bottom: 14px;
}

.nav-item {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.15s ease;
}

.nav-item:hover,
.nav-item:focus-visible {
  color: var(--text);
}


.section {
  margin: 56px 0 56px;
  scroll-margin-top: 60px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 20px;
}

/* ---------- Project cards ---------- */

.project-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 0;
  text-align: left;
  color: inherit;
  width: 100%;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: flex-start;
}

.project-card:hover,
.project-card:focus-visible {
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.project-card:active {
  transform: translateY(0);
}


.project-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.project-label {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 16px 20px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 100%);
}

/* ---------- Tools grid ---------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 20px 16px;
}

.tool-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.tool-badge {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.tool-icon {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tool-name {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.3;
}

/* ---------- Contact ---------- */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background 0.15s ease, transform 0.15s ease;
}

.contact-row:hover,
.contact-row:focus-visible {
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.contact-icon {
  width: 44px;
  height: 44px;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.contact-icon svg {
  width: 24px;
  height: 24px;
}

.contact-label {
  font-size: 15px;
  font-weight: 500;
}

/* ============================================================
   Modal
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 100;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.2s ease;
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  flex: none;
}

.modal-close:hover { color: var(--accent); }

.modal-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.modal-header { margin-bottom: 40px; }

.modal-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 8px;
}

.modal-role {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  margin: 0 0 16px;
}

.modal-subtitle {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 14px;
}

.modal-text {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-dim);
  margin: 0 0 20px;
}

.modal-media {
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 13px;
  overflow: hidden;
}

.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  transition: opacity 0.15s ease;
}

.modal-media img:hover {
  opacity: 0.85;
}

.modal-sections {
  display: flex;
  flex-direction: column;
  gap: 36px;
  margin-bottom: 36px;
}

.modal-image-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 4px;
}

.modal-image-row.has-2 {
  grid-template-columns: 1fr 1fr;
}

.modal-image-row .modal-media {
  aspect-ratio: 4 / 3;
  margin: 0;
}

.modal-footer {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.modal-footer-label {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0 0 14px;
}

.modal-button {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  transition: background 0.15s ease, transform 0.15s ease;
}

.modal-button:hover,
.modal-button:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 200;
}

.lightbox-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  cursor: zoom-out;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.lightbox-close:hover { color: var(--accent); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .app {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  html, body { height: auto; overflow-y: auto; }

  .panel-left {
    flex: none;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 24px;
  }

  .intro { margin-top: 24px; }
  .intro-title { font-size: 32px; }

  .panel-left-footer { margin-top: 24px; }

  .panel-right {
    overflow: visible;
    padding: 24px 20px 60px;
  }

  .right-nav {
    margin: -24px -20px 24px;
    padding: 16px 20px 0;
  }

  .project-list {
    grid-template-columns: 1fr;
  }
}
