/* TTO Portfolio — Frontend CSS */
:root {
  --tto-red:   #E8152A;
  --tto-black: #0A0A0A;
  --tto-gray:  #666;
  --tto-light: #f0f0f0;
}

/* Grid shortcode */
.tto-grid { display: grid; gap: 2px; background: var(--tto-black); }
.tto-cols-3 { grid-template-columns: repeat(3,1fr); }
.tto-cols-2 { grid-template-columns: repeat(2,1fr); }
.tto-card   { background: var(--tto-black); overflow: hidden; }
.tto-card-link { display: block; text-decoration: none; color: inherit; }
.tto-card-img  { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #1a1a1a; }
.tto-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.tto-card:hover .tto-card-img img { transform: scale(1.04); }
.tto-card-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.8) 0%, transparent 60%); display: flex; align-items: flex-end; padding: 18px; }
.tto-card-no-img  { aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; background: #1a1a1a; font-size: 32px; }
.tto-card-cta { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fff; padding: 6px 12px; border: 1px solid rgba(255,255,255,.35); opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s; }
.tto-card:hover .tto-card-cta { opacity: 1; transform: none; }
.tto-card-info { padding: 14px 16px 18px; }
.tto-type-tag  { font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--tto-red); display: block; margin-bottom: 5px; }
.tto-card-title{ font-size: 18px; font-weight: 700; color: #fff; line-height: 1.2; }
.tto-card-meta { font-size: 12px; color: rgba(255,255,255,.4); margin-top: 4px; }
.tto-none { text-align: center; padding: 40px; color: var(--tto-gray); }

/* Single project overview */
.tto-overview { padding: 48px 0; }
.tto-overview-inner { display: grid; grid-template-columns: 1fr 280px; gap: 56px; }
.tto-project-desc { font-size: 17px; line-height: 1.8; color: #444; }
.tto-project-desc p { margin-bottom: 18px; }
.tto-sidebar {}
.tto-details-card { background: var(--tto-black); padding: 28px; margin-bottom: 20px; }
.tto-details-title { font-size: 14px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid rgba(232,21,42,.25); }
.tto-details-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13px; }
.tto-details-dl dt { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.4); font-size: 11px; padding-top: 2px; }
.tto-details-dl dd { color: #fff; }
.tto-back-link { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--tto-black); border-bottom: 1px solid var(--tto-red); padding-bottom: 2px; }
.tto-back-link:hover { color: var(--tto-red); }
.tto-section-label { font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--tto-red); margin-bottom: 20px; }

/* Photo grid */
.tto-gallery-section { padding-top: 8px; }
.tto-photo-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 3px; }
.tto-photo { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--tto-light); cursor: pointer; }
.tto-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tto-photo:hover img { transform: scale(1.04); }
.tto-photo-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .3s; font-size: 22px; color: #fff; }
.tto-photo:hover .tto-photo-overlay { opacity: 1; }

/* Timeline */
.tto-timeline-section { padding-top: 8px; }
.tto-timeline { position: relative; padding-left: 40px; }
.tto-timeline::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: linear-gradient(to bottom, var(--tto-red) 0%, rgba(232,21,42,.1) 100%); }
.tto-phase { position: relative; padding-bottom: 56px; }
.tto-phase:last-child { padding-bottom: 0; }
.tto-phase-marker { position: absolute; left: -40px; top: 4px; display: flex; align-items: center; gap: 10px; }
.tto-phase-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--tto-red); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--tto-red); flex-shrink: 0; }
.tto-phase-date-badge { background: var(--tto-black); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .08em; padding: 3px 10px; white-space: nowrap; }
.tto-phase-content {}
.tto-phase-title { font-size: 20px; font-weight: 700; color: var(--tto-black); margin-bottom: 12px; }
.tto-phase-desc  { font-size: 15px; line-height: 1.75; color: #555; margin-bottom: 20px; }
.tto-phase-desc p { margin-bottom: 10px; }

/* Lightbox */
.tto-lightbox { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .25s; }
.tto-lightbox.open { opacity: 1; pointer-events: all; }
.tto-lb-bg { position: absolute; inset: 0; background: rgba(0,0,0,.95); backdrop-filter: blur(4px); }
.tto-lb-wrap { position: relative; z-index: 1; max-width: min(90vw,1200px); max-height: 90vh; }
#tto-lb-img { max-width: 100%; max-height: 80vh; object-fit: contain; }
.tto-lb-caption { font-size: 13px; color: rgba(255,255,255,.5); text-align: center; margin-top: 10px; }
.tto-lb-close,.tto-lb-prev,.tto-lb-next { position: absolute; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); color: #fff; cursor: pointer; transition: background .2s; border-radius: 2px; }
.tto-lb-close { top: -42px; right: 0; width: 36px; height: 36px; font-size: 22px; display: flex; align-items: center; justify-content: center; }
.tto-lb-prev,.tto-lb-next { top: 50%; transform: translateY(-50%); width: 44px; height: 60px; font-size: 28px; display: flex; align-items: center; justify-content: center; }
.tto-lb-prev { left: -60px; } .tto-lb-next { right: -60px; }
.tto-lb-close:hover,.tto-lb-prev:hover,.tto-lb-next:hover { background: var(--tto-red); border-color: var(--tto-red); }

@media (max-width: 768px) {
  .tto-cols-3,.tto-cols-2 { grid-template-columns: 1fr; }
  .tto-overview-inner { grid-template-columns: 1fr; }
  .tto-photo-grid { grid-template-columns: repeat(2,1fr); }
  .tto-lb-prev { left: 8px; } .tto-lb-next { right: 8px; }
}
