/* ==========================================================================
   Portfolio: floaty Material-inspired stylesheet
   White elements floating on a light blue background.
   Accent: light blues (#4FC3F7, #81D4FA), background #E3F2FD.
   ========================================================================== */

:root {
  --accent: #81d4fa;
  --accent-strong: #4fc3f7;
  --accent-deep: #039be5;
  --accent-light: #c9ebfd;
  --accent-faint: #eaf7fe;
  --background: #f0f9ff;
  --surface: #ffffff;
  --text-primary: #29434e;
  --text-secondary: #546e7a;
  --text-hint: #90a4ae;
  --shadow-soft: 0 8px 24px rgba(3, 169, 244, 0.10);
  --shadow-float: 0 16px 40px rgba(3, 169, 244, 0.16);
  --radius: 20px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  font-family: "Roboto", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--background);
  background-image:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 45%),
    radial-gradient(circle at 85% 70%, rgba(201, 235, 253, 0.45) 0%, rgba(201, 235, 253, 0) 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   Floating pill navigation
   -------------------------------------------------------------------------- */

.float-nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  animation: float-down 0.7s var(--ease) both;
}

.float-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 8px 18px;
  border-radius: 999px;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
  white-space: nowrap;
}

.float-nav a:hover,
.float-nav a:focus {
  background: var(--accent-faint);
  color: var(--accent-deep);
}

.float-nav a.float-nav__home {
  background: var(--accent);
  color: #075e8d;
}

.float-nav a.float-nav__home:hover,
.float-nav a.float-nav__home:focus {
  background: var(--accent-strong);
}

.float-nav a.float-nav__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  color: #0a66c2; /* LinkedIn brand blue */
}

.float-nav a.float-nav__icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
}

.float-nav a.float-nav__icon:hover,
.float-nav a.float-nav__icon:focus {
  background: var(--accent-faint);
}

/* Home chip shows initials only on narrow screens */
.nav-name--short {
  display: none;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 48px 0;
}

.section__title {
  font-size: 1.9rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 6px;
}

.section__subtitle {
  text-align: center;
  color: var(--text-hint);
  font-size: 0.95rem;
  margin-bottom: 36px;
}

/* Intro (replaces the old hero banner) */

.intro {
  padding: 140px 24px 32px;
  text-align: center;
}

.intro h1 {
  font-size: 2.8rem;
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.intro h1 strong {
  font-weight: 500;
  color: var(--accent-deep);
}

.intro p {
  max-width: 560px;
  margin: 14px auto 0;
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Floating cards
   -------------------------------------------------------------------------- */

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-float);
}

.card__body {
  padding: 28px;
}

/* Scroll-reveal animation (elements start hidden, .is-revealed floats them in).
   Applied via the .reveal class; resources/js/reveal.js toggles it. */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children: add .reveal--delay-1/2 to siblings for a cascade */
.reveal--delay-1 { transition-delay: 0.12s; }
.reveal--delay-2 { transition-delay: 0.24s; }

@keyframes float-down {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Gentle idle bobbing for the avatar bubble */
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* About Me */

.about-card__body {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 32px;
}

.about-card__avatar {
  flex: 0 0 auto;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: var(--accent-faint);
  border: 4px solid #fff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  animation: bob 5s ease-in-out infinite;
}

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

.about-card__text p + p {
  margin-top: 12px;
}

.about-card__text p {
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Project module
   --------------------------------------------------------------------------
   Each project is a self-contained <article class="project-card card reveal">
   containing:
     - a .gallery (interactive image window, cycles through .gallery__slide imgs)
     - a .project-card__content with title, brief, description and a link
       to the project's detail page.
   To add a project, copy a whole <article> block in index.html and swap
   the images, text and link.
   -------------------------------------------------------------------------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 36px;
}

.project-card {
  display: flex;
  flex-direction: column;
}

.project-card__content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 26px 28px 24px;
}

.project-card__title {
  font-size: 1.35rem;
  font-weight: 500;
}

.project-card__brief {
  color: var(--accent-deep);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 4px 0 12px;
}

.project-card__description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  flex: 1;
}

.project-card__actions {
  margin-top: 20px;
}

/* Buttons */

.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent-deep);
  background: var(--accent-faint);
  border: none;
  border-radius: 999px;
  padding: 11px 22px;
  cursor: pointer;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.btn:hover,
.btn:focus {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.btn--raised {
  color: #075e8d;
  background: var(--accent);
  box-shadow: var(--shadow-soft);
}

.btn--raised:hover,
.btn--raised:focus {
  background: var(--accent-strong);
  box-shadow: var(--shadow-float);
}

/* --------------------------------------------------------------------------
   Gallery (interactive image window)
   -------------------------------------------------------------------------- */

.gallery {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--accent-faint);
  overflow: hidden;
}

.gallery__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.6s var(--ease), transform 0.9s var(--ease);
}

.gallery__slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.gallery__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-deep);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.gallery__arrow:hover,
.gallery__arrow:focus {
  background: #fff;
  box-shadow: var(--shadow-float);
  transform: translateY(-50%) scale(1.08);
}

.gallery__arrow--prev { left: 14px; }
.gallery__arrow--next { right: 14px; }

.gallery__dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.gallery__dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}

.gallery__dot.is-active {
  background: #fff;
  transform: scale(1.35);
  box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.45);
}

/* --------------------------------------------------------------------------
   Project detail pages
   -------------------------------------------------------------------------- */

.detail-header {
  padding: 130px 24px 8px;
  text-align: center;
}

.detail-header h1 {
  font-size: 2.3rem;
  font-weight: 300;
}

.detail-header .detail-header__brief {
  color: var(--accent-deep);
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 6px;
}

.detail-content {
  padding: 36px 0 72px;
}

.detail-content .card {
  margin-bottom: 32px;
}

.detail-content h2 {
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.detail-content p {
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.detail-content ul {
  color: var(--text-secondary);
  padding-left: 24px;
  margin-bottom: 12px;
}

/* On a detail page the window sizes itself to whichever photo is showing, so
   nothing is ever cropped. resources/js/gallery.js measures the active image
   and sets an explicit width/height; the aspect-ratio below is only the
   fallback used before that runs (or if JS is unavailable). */
.detail-content .gallery {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  margin: 0 auto 36px;
  transition: width 0.4s var(--ease), height 0.4s var(--ease);
}

.detail-content .gallery__slide {
  object-fit: contain;
}

/* --------------------------------------------------------------------------
   TODO callouts: placeholders for content still to be written.
   Delete each .todo block as the real material replaces it; nothing else
   on the page depends on them.
   -------------------------------------------------------------------------- */

.todo {
  background: #fff9ec;
  border: 1.5px dashed #e3c37c;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 12px;
  color: #7a6023;
  font-size: 0.92rem;
}

.todo strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  color: #b08a2e;
}

.todo ul {
  color: inherit;
  padding-left: 20px;
  margin: 4px 0 0;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  text-align: center;
  padding: 28px 24px 40px;
  font-size: 0.875rem;
  color: var(--text-hint);
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .float-nav,
  .about-card__avatar {
    animation: none;
  }
  .detail-content .gallery {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */

@media (max-width: 600px) {
  html {
    scroll-padding-top: 84px;
  }

  .float-nav {
    top: 12px;
    max-width: calc(100% - 24px);
  }

  .float-nav a {
    padding: 8px 11px;
    font-size: 0.8rem;
  }

  .nav-name--full { display: none; }
  .nav-name--short { display: inline; }

  .intro {
    padding: 110px 16px 24px;
  }

  .intro h1 {
    font-size: 2.1rem;
  }

  .container {
    padding: 0 16px;
  }

  .section {
    padding: 36px 0;
  }

  .about-card__body {
    flex-direction: column;
    text-align: center;
    padding: 28px 22px;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .detail-header {
    padding: 100px 16px 4px;
  }

  .detail-header h1 {
    font-size: 1.8rem;
  }
}
