/* ==============================================
   portfolio.css
   Portfolio page: hero, profile card, timeline,
   certs, projects, hobbies, carousel.
   Used on: /portfolio/
   ============================================== */

/* Portfolio hero */
.portfolio-hero {
  padding: clamp(56px, 9vw, 108px) clamp(20px, 5vw, 72px) clamp(40px, 6vw, 60px);
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 72px;
  align-items: center;
}

.portfolio-hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.8rem, 5.5vw, 4.4rem);
  font-weight: 300;
  line-height: 1.06;
  color: var(--ink);
  margin: 0 0 20px;
}

.portfolio-hero-title em {
  font-style: italic;
  color: var(--amber-dark);
}

.portfolio-hero-bio {
  font-family: var(--font-essay-body);
  font-size: 1.063rem;
  line-height: 1.84;
  color: var(--text-muted);
  margin: 0 0 28px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
}

.stat-item {
  background: var(--bg-subtle);
  padding: 16px 12px;
  text-align: center;
}

.stat-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 500;
  color: var(--amber-dark);
  line-height: 1;
  display: block;
  margin-bottom: 4px;
}

.stat-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* Profile card */
.profile-card {
  background: var(--bg);
  border: 1px solid var(--amber);
  border-radius: 8px;
  padding: 32px 28px 28px;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.profile-photo-wrap {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 18px;
  border: 2px solid var(--amber);
}

.profile-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
}

.profile-role {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 16px;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  margin-bottom: 18px;
}

.profile-tag {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 3px 8px;
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.profile-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 18px;
}

.profile-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.profile-link {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.pli {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  flex-shrink: 0;
}

.pli img {
  width: 14px;
  height: 14px;
  display: block;
}

.pli-x {
  background: #111111;
  border-color: #111111;
}

.pli-x img {
  width: 12px;
  height: 12px;
}

/* Portfolio content area */
.portfolio-content {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 72px) clamp(56px, 8vw, 88px);
}

/* Tabs */
.portfolio-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 40px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 12px 20px;
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-faint);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}

.tab-btn:hover {
  color: var(--text-muted);
}

.tab-btn.active {
  color: var(--amber-dark);
  border-color: var(--amber);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 16px;
}

.timeline-dot {
  position: absolute;
  left: -30px;
  top: 22px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--amber);
}

.timeline-item.current .timeline-dot {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(200, 151, 58, 0.15);
}

/* Timeline card */
.timeline-card {
  background: var(--bg);
  border: 1px solid var(--amber);
  border-radius: 6px;
  padding: 22px 26px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  user-select: none;
}

.timeline-card:hover {
  border-color: #C8C8C8;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}


.timeline-item.open .timeline-card {
  border-radius: 6px 6px 0 0;
  border-bottom-color: transparent;
}

.timeline-role {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.28rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 3px;
}

.timeline-company {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.tl-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.tl-meta-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.timeline-period {
  font-family: 'DM Mono', monospace;
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

.timeline-desc {
  font-family: var(--font-essay-body);
  font-size: 0.96rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.timeline-tag {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 2px 8px;
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-faint);
}


.timeline-badge {
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  white-space: nowrap;
}

.badge-current {
  background: rgba(200, 151, 58, 0.1);
  color: var(--amber-dark);
  border: 1px solid rgba(200, 151, 58, 0.25);
}

.badge-past {
  background: var(--bg-subtle);
  color: var(--text-faint);
  border: 1px solid var(--border);
}

.tl-chevron {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.32s, background 0.2s;
  flex-shrink: 0;
}

.tl-chevron img {
  width: 14px;
  height: 14px;
  display: block;
}

.timeline-item.open .tl-chevron {
  transform: rotate(180deg);
  background: var(--amber-pale);
  border-color: rgba(200, 151, 58, 0.28);
  color: var(--amber-dark);
}

/* Timeline expanded photos panel */
.timeline-photos-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s;
  opacity: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 6px 6px;
}


.timeline-item.open .timeline-photos-panel {
  max-height: 600px;
  opacity: 1;
}

.tpp-inner {
  padding: 20px 26px 24px;
}

.tpp-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tpp-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-warm);
}

/* Timeline photo slider */
.tl-slider {
  position: relative;
  margin: 0 -20px -20px;
}

.tl-slider-viewport {
  overflow: hidden;
}

.tl-slider-track {
  display: flex;
  gap: 8px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tl-slide {
  flex: 0 0 calc(50% - 4px);
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-subtle);
}

.tl-slide img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
}

.tl-slide video {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
  background: #000;
}

.tl-slide figcaption {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 7px 8px;
}

.tl-slider-btn {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s;
  padding: 0;
}

.tl-slider-btn img {
  width: 22px;
  height: 22px;
  display: block;
}

.tl-slider-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.tl-slider-prev {
  left: 10px;
}

.tl-slider-next {
  right: 10px;
}

.tl-slider-btn.is-disabled {
  opacity: 0.38;
  pointer-events: none;
  box-shadow: none;
}

.tl-slider-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 28px 0 0;
}

.tl-slider-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(92, 61, 30, 0.2);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.tl-slider-dot.is-active {
  background: var(--amber);
  transform: scale(1.1);
}

.tl-slider-dot:hover {
  background: rgba(200, 151, 58, 0.7);
}

/* Certifications */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.cert-card {
  background: var(--bg);
  border: 1px solid var(--amber);
  border-radius: 5px;
  padding: 20px 24px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cert-card:hover {
  border-color: #C8C8C8;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.cert-card.in-progress {
  border-color: rgba(200, 151, 58, 0.26);
}

.cert-icon {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.cert-icon img {
  width: 24px;
  height: 24px;
  display: block;
}

.cert-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.28rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 2px;
  line-height: 1.3;
}

.cert-issuer {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.cert-status {
  font-family: 'DM Mono', monospace;
  font-size: 0.61rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.s-ok {
  color: #5A8A52;
}

.s-wip {
  color: var(--amber-dark);
}

.cert-bar {
  margin-top: 8px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.cert-fill {
  height: 100%;
  background: var(--amber);
  border-radius: 2px;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
  background: var(--bg);
  transition: box-shadow 0.3s, border-color 0.3s;
  cursor: pointer;
}

.project-card:hover {
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.08);
  border-color: #C8C8C8;
}

.pc2-img {
  aspect-ratio: 16/8;
  overflow: hidden;
  position: relative;
}

.pc2-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.project-card:hover .pc2-img img {
  transform: scale(1.04);
}

.proj-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-style: italic;
  color: rgba(245, 240, 232, 0.4);
}

.proj-ph.p1 {
  background: linear-gradient(135deg, #5C3D1E, #1C1208);
}

.proj-ph.p2 {
  background: linear-gradient(135deg, #3A220E, #7A5230);
}

.proj-ph.p3 {
  background: linear-gradient(135deg, #9E7220, #5C3D1E);
}

.proj-ph.p4 {
  background: linear-gradient(135deg, #2A1A0A, #5C3D1E);
}

.proj-badge {
  position: absolute;
  top: 11px;
  left: 11px;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(4px);
  border-radius: 2px;
  padding: 3px 8px;
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--amber-light);
}

.pc2-body {
  padding: 20px 22px;
}

.proj-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 7px;
  line-height: 1.25;
}

.proj-desc {
  font-family: var(--font-essay-body);
  font-size: 1.063rem;
  line-height: 1.72;
  color: var(--text-muted);
  margin-bottom: 13px;
}

.proj-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.proj-techs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.proj-tech {
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 2px;
}

.proj-link {
  font-family: 'DM Mono', monospace;
  font-size: 0.64rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: gap 0.2s;
}

.proj-link:hover {
  gap: 9px;
}

.proj-link::after {
  content: '\2192';
}

.project-featured {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.project-featured .pc2-img {
  aspect-ratio: unset;
  min-height: 240px;
}

.project-featured .pc2-body {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-featured .proj-name {
  font-size: 1.55rem;
  margin-bottom: 10px;
}

.project-featured .proj-desc {
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* Hobbies section */
.hobbies-section {
  padding: clamp(48px, 7vw, 76px) clamp(20px, 5vw, 72px);
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.hobbies-inner {
  max-width: 1140px;
  margin: 0 auto;
}

.hobbies-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.hobby-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.3s;
}

.hobby-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.07);
}

.hobby-card-top {
  padding: 28px 28px 24px;
  position: relative;
  overflow: hidden;
}

.hobby-card-top.travel {
  background: linear-gradient(135deg, #1A3A5C, #0E2240);
}

.hobby-card-top.reading {
  background: linear-gradient(135deg, #3A2810, #5C3D1E);
}

.hobby-bg-text {
  position: absolute;
  right: -8px;
  bottom: -18px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 6rem;
  font-weight: 600;
  line-height: 1;
  color: rgba(255, 255, 255, 0.06);
  pointer-events: none;
  user-select: none;
}

.hobby-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.hobby-icon img {
  height: 48px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.hobby-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.55rem;
  font-weight: 400;
  color: #fff;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.hobby-subtitle {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  position: relative;
  z-index: 1;
}

/* Carousel */
.hobby-carousel {
  position: relative;
  background: var(--bg-subtle);
  overflow: hidden;
  aspect-ratio: 16/9;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 10px 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #fff;
}

.carousel-slide.add-slide {
  cursor: pointer;
  flex-direction: column;
  gap: 8px;
  border: none;
  background: var(--bg-subtle);
  transition: background 0.2s;
}

.carousel-slide.add-slide:hover {
  background: var(--amber-pale);
}

.add-plus {
  font-size: 2rem;
  color: var(--text-faint);
  line-height: 1;
}

.add-hint {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.carousel-slide.add-slide:hover .add-plus {
  color: var(--amber);
}

.carousel-slide.add-slide:hover .add-hint {
  color: var(--amber);
}

.carousel-input {
  display: none;
}

/* Carousel nav arrows */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 0;
  left: 0;
  right: 0;
  justify-content: space-between;
  padding: 0 10px;
  pointer-events: none;
}

.carousel-btn {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: all;
  transition: box-shadow 0.2s;
}

.carousel-btn img {
  width: 22px;
  height: 22px;
  display: block;
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Carousel dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 10px 0 14px;
  background: var(--bg-subtle);
}

@media (max-width: 680px) {
  .tl-slider-btn,
  .carousel-nav {
    display: none;
  }
}

.cdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s;
  cursor: pointer;
}

.cdot.active {
  background: var(--amber);
}

.hobby-body {
  padding: 18px 24px 22px;
  background: var(--bg);
}

.hobby-desc {
  font-family: var(--font-essay-body);
  font-size: 1.063rem;
  line-height: 1.78;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.hobby-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hobby-tag {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
