/*
 * sections.css
 * ─────────────────────────────────────────────────────────
 * LEARNER NOTE:
 * Each <section> is hidden by default (display:none).
 * Only the .active section is visible.
 * JS toggles this class on nav click — see nav.js.
 *
 * The fade-in animation is applied when .active is added,
 * creating a smooth transition between sections.
 * ─────────────────────────────────────────────────────────
 */

/* ── Base section ── */
.section {
  display: none;        /* Hidden by default */
  padding: var(--sp-6) var(--sp-6);
  overflow-y: auto;     /* Scroll inside panel if content overflows */
  flex: 1;              /* Stretch to fill main-panel height */
}

.section.active {
  display: block;
  animation: fadeSlideIn var(--dur-slow) var(--ease-smooth) both;
}

/* ── Section heading ── */
.section__title {
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--clr-white);
  margin-bottom: var(--sp-5);
  position: relative;
  display: inline-block;
}

/* Decorative underline for section titles */
.section__title::after {
  content: '';
  display: block;
  margin-top: var(--sp-2);
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-accent), var(--clr-accent-2));
  border-radius: var(--radius-full);
}

.section__intro {
  color: var(--clr-text-muted);
  font-size: var(--fs-md);
  max-width: 560px;
  margin-bottom: var(--sp-6);
  line-height: 1.7;
}

/* ── SERVICE CARDS (About section) ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-4);
}

.service-card {
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-3);
  transition: transform var(--dur-base) var(--ease-smooth),
              border-color var(--dur-base) var(--ease-smooth),
              box-shadow var(--dur-base) var(--ease-smooth);
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--clr-accent);
  box-shadow: var(--shadow-accent);
}

.service-card__icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: var(--sp-3);
}

.service-card h3 {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--clr-white);
  margin: 0;
}

.service-card p {
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  line-height: 1.6;
  margin: 0;
}

.service-card img {
  width: 100px;
  height: auto;
  object-fit: contain;
}

/* ── RESUME LAYOUT ── */
.resume-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-7);
}

@media (max-width: 580px) {
  .resume-columns { grid-template-columns: 1fr; }
}

.resume-col__label {
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: var(--sp-4);
}

/* ── Timeline (Experience) ── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  position: relative;
  padding-left: var(--sp-4);
}

/* Vertical line */
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--clr-border);
  border-radius: var(--radius-full);
}

.timeline__item {
  position: relative;
}

/* Dot on timeline */
.timeline__item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--sp-4) - 4px);
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--clr-accent);
  border: 2px solid var(--clr-surface);
}

.timeline__year {
  font-size: var(--fs-xs);
  color: var(--clr-accent-2);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.timeline__role {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--clr-white);
  margin: var(--sp-1) 0;
}

.timeline__place {
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  margin-bottom: var(--sp-2);
  font-style: italic;
}

.timeline__item p:last-child {
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
}

/* ── Skill Bars ── */
.skill-bars {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.skill__name {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--clr-text);
  margin-bottom: var(--sp-1);
}

.skill__bar {
  height: 6px;
  background: var(--clr-surface-2);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.skill__fill {
  height: 100%;
  width: var(--pct); /* Set inline: style="--pct: 85%" */
  background: linear-gradient(90deg, var(--clr-accent), var(--clr-accent-2));
  border-radius: var(--radius-full);
  transform-origin: left;
  /* Animated in animations.css via .active trigger */
  transform: scaleX(0);
  transition: transform 0.8s var(--ease-smooth) 0.2s;
}

/* When section is active, expand skill bars */
#resume.active .skill__fill {
  transform: scaleX(1);
}


/* ── CONTACT MAP ── */
.contact-map {
  margin-bottom: var(--sp-6);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.contact-map iframe {
  display: block;
}

/* ── CONTACT FORM ── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  max-width: 560px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

@media (max-width: 520px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.form-group label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
}

.form-group input,
.form-group textarea {
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--sp-3) var(--sp-4);
  color: var(--clr-text);
  outline: none;
  resize: vertical;
  transition: border-color var(--dur-base) var(--ease-smooth),
              box-shadow var(--dur-base) var(--ease-smooth);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--clr-text-dim);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--clr-accent);
  box-shadow: 0 0 0 3px var(--clr-accent-glow);
}

/* Submit button */
.btn-send {
  align-self: flex-start;
  background: var(--clr-accent);
  color: var(--clr-white);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--radius-full);
  transition: background var(--dur-base) var(--ease-smooth),
              transform var(--dur-fast) var(--ease-bounce),
              box-shadow var(--dur-base) var(--ease-smooth);
}

.btn-send:hover {
  background: var(--clr-accent-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}

.btn-send:active {
  transform: translateY(0);
}

/* Feedback message */
.form-feedback {
  font-size: var(--fs-sm);
  color: var(--clr-accent-2);
  min-height: 1.4em;
  font-weight: 500;
}

/* Tech Stack Marquee Container */
.marquee {
  --marquee-speed: 40s;
  --marquee-gap: 60px;
  --marquee-logo-height: 50px;

  width: 100%;
  overflow: hidden;
  padding: var(--sp-5) 0;
  position: relative;
  background: var(--clr-surface-2);
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
  margin: var(--sp-6) 0;
}

.marquee::before,
.marquee::after {
  content: "";
  position: absolute;
  top: 0;
  width: 80px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.marquee::before {
  left: 0;
  background: linear-gradient(to right, var(--clr-surface-2), transparent);
}

.marquee::after {
  right: 0;
  background: linear-gradient(to left, var(--clr-surface-2), transparent);
}

.marquee-content {
  display: flex;
  width: max-content;
  gap: var(--marquee-gap);
  animation: scroll var(--marquee-speed) linear infinite;
}

.marquee-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--marquee-gap);
}

.marquee-item img {
  height: var(--marquee-logo-height);
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.marquee-item img:hover {
  filter: grayscale(0) opacity(1);
  transform: scale(1.1);
}

.marquee-item img:hover {
  filter: grayscale(0) opacity(1);
  transform: scale(1.1);
}

.marquee-content {
  animation: scroll var(--marquee-speed, 40s) linear infinite !important;
}

/* ── Light Mode Overrides ── */
html.light-mode .section__title {
  color: #1a1a2e;
}

html.light-mode .section__intro {
  color: #5a5a70;
}

html.light-mode .service-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.3);
}

html.light-mode .service-card:hover {
  border-color: #5a52e0;
  box-shadow: 0 4px 24px rgba(90,82,224,0.25); 
}


html.light-mode .service-card h3 {
  color: #1a1a2e;
}

html.light-mode .service-card p {
  color: #5a5a70;
}

html.light-mode .timeline__role {
  color: #1a1a2e;
}

html.light-mode .skill__name {
  color: #1a1a2e;
}

html.light-mode .resume-col__label {
  color: #5a52e0;
}

html.light-mode .timeline__item p:last-child {
  color: #5a5a70;
}

html.light-mode .form-group label {
  color: #5a5a70;
}

html.light-mode .form-group input,
html.light-mode .form-group textarea {
  background: #ffffff;
  color: #1a1a2e;
}

html.light-mode .marquee {
  background: #ebebf0;
}

html.light-mode .marquee::before {
  background: linear-gradient(to right, #ebebf0, transparent);
}

html.light-mode .marquee::after {
  background: linear-gradient(to left, #ebebf0, transparent);
}