﻿html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* Focus outline */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Skip-to-content link for keyboard / screen-reader users */
.skip-link {
  position: absolute;
  top: -2.5rem;
  left: 1rem;
  z-index: 1100;
  padding: 0.4rem 0.8rem;
  background: #0d6efd;
  color: #fff;
  border-radius: 0 0 0.375rem 0.375rem;
  transition: top 0.15s;
}

.skip-link:focus {
  top: 0;
}

/* Layout */
html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background-color: #f5f5f7;
}

/* Form floating placeholder (unused in this site but kept for scaffold compat) */
.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Section spacing and divider */
section {
  scroll-margin-top: 90px;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

section + section {
  border-top: 1px solid #e5e5e5;
}

/* Section h2 left-accent for scannability */
section h2.h3 {
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-left: 0.75rem;
  border-left: 3px solid #0d6efd;
}

/* Hero section */
.hero {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: 0.75rem;
  padding: 3rem 1.5rem;
}

.hero .display-4 {
  letter-spacing: 0.03em;
}

.hero-image {
  margin-left: auto;
  max-width: 190px;
}

@media (max-width: 991.98px) {
  .hero-image {
    margin-right: auto;
    max-width: 220px;
  }
}

.hero-image img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #dee2e6;
  border-radius: 0.75rem;
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.08);
}

.profile-image img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
}

.project-result {
  color: #0a58ca;
}

.hero .lead {
  font-weight: 600;
  max-width: 760px;
}

/* Hero CTA button min-width */
.hero .btn {
  min-width: 160px;
}

/* Timeline */
.timeline {
  position: relative;
  margin-left: 1rem;
  padding-left: 1.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 0.2rem;
  bottom: 0.2rem;
  width: 2px;
  background-color: #dee2e6;
}

.timeline-item {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 1.75rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -0.1rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.2);
}

.timeline-item-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  margin-bottom: 0.25rem;
}

.timeline-item-title {
  font-weight: 600;
}

.timeline-item-meta {
  font-size: 0.85rem;
  color: #6c757d;
}

/* Sub-project header within a timeline item (e.g. multiple projects at one company) */
.timeline-sub-header {
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #dee2e6;
}

.timeline-sub-header .timeline-item-title {
  font-size: 0.925rem;
  color: #343a40;
}

/* Skills / About lists */
#skills ul,
#about ul {
  padding-left: 1.25rem;
}

#about li {
  margin-bottom: 0.25rem;
}

#skills li {
  margin-bottom: 0.75rem;
}

/* Subtle tag style for tech stack names in skills list */
#skills li strong {
  display: inline-block;
  background-color: #e9ecef;
  padding: 0.05rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.85em;
  font-weight: 600;
}

.skill-description {
  display: block;
  margin-top: 0.2rem;
  line-height: 1.5;
}

/* Link styles */
a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Strong in section paragraphs */
section p strong {
  font-weight: 600;
}

/* Projects card */
#projects .card {
  border-radius: 0.75rem;
}

#projects .card + .card {
  margin-top: 1rem;
}

@media (max-width: 576px) {
  .hero {
    padding: 2.5rem 1.25rem;
  }

  .timeline {
    margin-left: 0.5rem;
  }

  section {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
}

/* ============================
 * Portfolio (project cards)
 * ============================ */

/* Scroll container */
.portfolio-scroll {
  overflow: visible;
  padding-bottom: 0;
}


/* Card full-width layout */
.portfolio-card {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.portfolio-toggle {
  align-self: flex-start;
  margin-top: 0.5rem;
}

.portfolio-collapse-bottom {
  margin-top: 1rem;
}

.portfolio-collapse-footer {
  display: none;
  justify-content: flex-end;
}

.collapse.show + .portfolio-collapse-footer {
  display: flex;
}




/* Card body layout */
.portfolio-card .card-body {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Expandable code and presentation sections */
.portfolio-card details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0;
  color: inherit;
  background: none;
  cursor: pointer;
  user-select: none;
}

.portfolio-card details > summary::-webkit-details-marker {
  display: none;
}

.portfolio-card details > summary::after {
  flex-shrink: 0;
  color: inherit;
  content: "펼치기";
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.55;
}

.portfolio-card details[open] > summary::after {
  content: "접기";
}

.portfolio-card details > summary:hover {
  text-decoration: underline;
}

.portfolio-card details > summary:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 2px;
}

/* Code blocks */
.portfolio-card pre.bg-dark {
  padding: 0 !important;
  color: #24292f !important;
  background-color: #f6f8fa !important;
  border: 1px solid #e1e4e8;
  border-radius: 0.375rem !important;
}

.portfolio-card pre.bg-dark code.hljs {
  background-color: transparent;
  border: 0;
}

/* Video / image border radius */
.portfolio-card .ratio,
.portfolio-card iframe {
    border-radius: 0.75rem;
}

.portfolio-video {
    width: 100%;
    max-width: 640px;
    aspect-ratio: 16 / 9;
}

.portfolio-video iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.youtube-thumbnail {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: #000;
    cursor: pointer;
}

.youtube-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.youtube-play {
    position: absolute;
    top: 50%;
    left: 50%;
    padding: 0.5rem 0.9rem;
    color: #fff;
    background: #dc3545;
    border-radius: 0.35rem;
    transform: translate(-50%, -50%);
}

/* Mobile: card full width */
@media (max-width: 576px) {
  .portfolio-card {
    max-width: 100%;
  }
}


/* Desktop: cards auto height */
@media (min-width: 992px) {
  .portfolio-scroll .portfolio-card {
    height: auto;
  }

  .portfolio-card .card-body {
    overflow: visible;
  }

  .portfolio-card .card-body > *:last-child {
    margin-bottom: 0;
  }
}