/* ============================================================
   Profile styles
   Visual language adapted from the previous johnie.epizy.com
   design: purple gradient surfaces, spotlit panels, dotted
   sidebar icons, Arial/Helvetica stack.
   ============================================================ */

:root {
  --purple-dark: #312450;
  --purple: #5e42a6;
  --purple-mid: #493382;
  --pink: #b74e91;
  --pink-dark: #953d75;
  --indigo: #3e4094;

  --text: #2b2b2b;
  --text-soft: #4a4a4a;
  --muted: #6a6a6a;
  --line: rgba(49, 36, 80, .12);

  --grad-dark: linear-gradient(135deg, #261c3e 0%, #312450 100%);
  --grad-purple: linear-gradient(135deg, #5e42a6 0%, #b74e91 100%);
  --grad-soft: linear-gradient(135deg, #5e42a6 0%, #953d75 100%);

  --radius: 6px;
  --font: Arial, Helvetica, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--purple-dark);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------------------------------------------------------- sidebar */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 90px;
  height: 100vh;
  background: var(--grad-dark);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}
#sidebar .inner { display: flex; flex-direction: column; align-items: center; gap: 40px; }

#sidebar nav ul { list-style: none; display: flex; flex-direction: column; gap: 26px; }

#sidebar nav a {
  display: block;
  width: 46px;
  height: 46px;
  line-height: 46px;
  text-align: center;
  color: rgba(255, 255, 255, .5);
  border: 2px dotted rgba(255, 255, 255, .22);
  border-radius: 50%;
  font-size: 16px;
  transition: color .2s, border-color .2s, background .2s, transform .2s;
}
#sidebar nav a:hover,
#sidebar nav a.active {
  color: #fff;
  border-color: var(--pink);
  background: var(--grad-purple);
  transform: translateY(-2px);
}

#sidebar .icons { list-style: none; display: flex; flex-direction: column; gap: 14px; }
#sidebar .icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: rgba(255, 255, 255, .5);
  border-radius: 50%;
  font-size: 15px;
  transition: color .2s, background .2s, transform .2s;
}
#sidebar .icons a:hover { color: #fff; background: var(--grad-purple); transform: translateY(-2px); }
/* Keep the accessible label available to screen readers only. */
#sidebar .icons a span {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------- layout */
.wrapper {
  margin-left: 90px;
  padding: 0 0 6rem;
  position: relative;
}
.wrapper .inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 3rem;
  width: 100%;
}
/* Sections using the flex card row manage their own gutters. */
#about > .inner, #skills > .inner, #faq > .inner, #experience > .inner, #contact > .inner {
  max-width: none;
  padding: 0;
}

.style1 { background: #fff; }
.style2 { background: #f7f5fb; }

/* Headings need the family set explicitly; without it the browser default
   serif leaks through and the type stops matching the rest of the page. */
h1, h2, h3, h4, h5, h6 { font-family: var(--font); font-weight: 700; }

h1 { font-size: 3.2rem; line-height: 1.15; letter-spacing: -.5px; }
h2 {
  font-size: 1.75rem;
  color: var(--purple);
  margin-bottom: 2.5rem;
  padding-bottom: .8rem;
  border-bottom: 2px solid rgba(94, 66, 166, .18);
}
h3 { font-size: 1.2rem; color: var(--purple-dark); margin-bottom: .6rem; }
h3 i { color: var(--pink); margin-right: .4rem; }

/* ---------------------------------------------------------- hero */
.fullscreen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--grad-purple);
  color: #fff;
  text-align: left;
}
.fullscreen .inner { position: relative; z-index: 2; }
.fullscreen h1 { color: #fff; }
.fullscreen p.txt {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, .9);
  max-width: 620px;
  margin-top: 1rem;
}
.fullscreen p.txt + p.txt { font-size: 1.35rem; color: #fff; font-weight: bold; }

.row { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 2rem; }

.button {
  display: inline-block;
  padding: .8rem 1.6rem;
  border-radius: var(--radius);
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, .5);
  color: #fff;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.button:hover { background: #fff; color: var(--purple); transform: translateY(-2px); }
.button.primary { background: #fff; color: var(--purple); border-color: #fff; }
.button.primary:hover { background: transparent; color: #fff; border-color: #fff; }


/* ---------------------------------------------------------- hero layout */
.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  align-items: center;
  gap: 3rem;
  max-width: 1080px;
  width: 100%;
}
.hero-photo {
  max-width: 340px;
  margin-left: auto;
  /* The source is 1280x960 (4:3). Fixing the ratio on the wrapper avoids
     fighting width:100% with aspect-ratio on the image itself. */
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 10px;
  border: 4px solid rgba(255, 255, 255, .18);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .28);
}
.hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Crop toward the top so the face stays in frame. */
  object-position: center 18%;
}

/* spotlight glow behind the hero */
.scroll-spotlight::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(circle at 30% 40%, rgba(255, 255, 255, .18), transparent 60%);
  pointer-events: none;
}

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}
.scroll-hint a {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 2px dotted rgba(255, 255, 255, .6);
  color: #fff;
  font-size: 1.1rem;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}

/* ---------------------------------------------------------- spotlights */
#about, #skills, #faq { padding: 5rem 3rem; }

/* Cards are direct children of the section, mirroring the old site where
   each .content sat beside the .inner wrapper. */
#about, #skills, #faq {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.5rem;
}
#about > .inner, #skills > .inner, #faq > .inner { flex: 1 1 100%; }
#about > .content, #skills > .content, #faq > .content {
  flex: 1 1 calc(33.333% - 1rem);
  min-width: 260px;
  padding: 0;
}
/* Questions read better full width than squeezed into a third of the page. */
#faq > .content { flex: 1 1 100%; }
#about .content .inner, #skills .content .inner, #faq .content .inner {
  padding: 1.8rem;
  max-width: none;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  position: relative;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
#about .content .inner:hover,
#skills .content .inner:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(49, 36, 80, .13);
  border-color: rgba(183, 78, 145, .35);
}
/* thin gradient edge, echoing the old card treatment */
#about .content .inner::before,
#skills .content .inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  height: 3px; width: 100%;
  background: var(--grad-soft);
  border-radius: var(--radius) var(--radius) 0 0;
}

#about .content p, #skills .content p { color: var(--text-soft); font-size: .98rem; }

/* ---------------------------------------------------------- experience */
#experience { padding: 5rem 3rem; }

.role {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--pink);
  border-radius: var(--radius);
  padding: 1.8rem 2rem;
  margin-bottom: 1.5rem;
  transition: box-shadow .2s, transform .2s;
}
.role:hover { box-shadow: 0 8px 24px rgba(49, 36, 80, .1); transform: translateY(-2px); }
.role header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.role h3 { margin-bottom: .2rem; }
.role .when {
  font-size: .85rem;
  color: #fff;
  background: var(--grad-soft);
  padding: .25rem .8rem;
  border-radius: 20px;
  white-space: nowrap;
}
.role .tags { color: var(--pink-dark); font-size: .9rem; font-weight: bold; margin-bottom: 1rem; }

ul.bullets { list-style: none; }
ul.bullets li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: .6rem;
  color: var(--text-soft);
  font-size: .98rem;
}
ul.bullets li::before {
  content: '\f111';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  left: 0; top: 0;
  color: var(--pink);
  font-size: .8rem;
}
ul.bullets.compact li { font-size: .93rem; margin-bottom: .4rem; }

/* ---------------------------------------------------------- contact */
#contact { padding: 5rem 3rem; }
.lead { color: var(--text-soft); max-width: 640px; margin-bottom: 2.5rem; }

.fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.field {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: 1.2rem 1.4rem;
  background: #fbfafd;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  min-height: 72px;
  justify-content: center;
  transition: border-color .2s, background .2s, transform .2s;
}
a.field:hover {
  background: #fff;
  border-color: var(--pink);
  transform: translateY(-2px);
}
.field .label {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--purple);
  font-weight: bold;
}
.field .label i { margin-right: .35rem; }
.field .value { color: var(--text); font-size: .98rem; word-break: break-word; }

/* ---------------------------------------------------------- footer */
.footer {
  margin-left: 90px;
  background: var(--grad-dark);
  color: rgba(255, 255, 255, .6);
  text-align: center;
  padding: 2.5rem 0;
  font-size: .9rem;
}
.footer .inner { max-width: 1080px; margin: 0 auto; padding: 0 3rem; }

/* ---------------------------------------------------------- reveal */
/* Visible by default. main.js adds .js-reveal, and only then are these
   hidden, so content is never lost when scripting is unavailable. */
.js-reveal.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.js-reveal.fade-up.in { opacity: 1; transform: none; }

/* ---------------------------------------------------------- focus */
a:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
  border-radius: 4px;
}
#sidebar a:focus-visible { outline-color: #fff; }

/* ---------------------------------------------------------- mobile */
@media (max-width: 900px) {
  #sidebar {
    top: auto;
    bottom: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    padding: 0;
    background: var(--grad-dark);
  }
  #sidebar .inner {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    gap: 0;
    padding: .5rem 1rem;
  }
  #sidebar nav ul { flex-direction: row; gap: 6px; }
  #sidebar nav a { width: 40px; height: 40px; line-height: 40px; font-size: 14px; }
  #sidebar .icons { flex-direction: row; gap: 6px; }
  #sidebar .icons a { width: 40px; height: 40px; }

  .wrapper, .footer { margin-left: 0; padding-bottom: 5rem; }
  .wrapper .inner, .footer .inner { padding: 0 1.25rem; }
  #about, #skills, #faq, #experience, #contact { padding: 3.5rem 1.25rem; }
  #about > .inner, #skills > .inner, #faq > .inner, #experience > .inner, #contact > .inner {
    padding: 0;
  }
  #about > .content, #skills > .content { flex: 1 1 100%; min-width: 0; }

  .fullscreen { min-height: auto; text-align: center; padding: 4rem 0 5rem; }
  .fullscreen p.txt { margin-left: auto; margin-right: auto; }
  .row { justify-content: center; }

  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-photo {
    order: -1;
    max-width: 230px;
    margin: 0 auto;
    aspect-ratio: 4 / 5;
  }

  h1 { font-size: 2.3rem; }
  h2 { font-size: 1.45rem; }
  .role header { flex-direction: column; align-items: flex-start; gap: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-up { opacity: 1; transform: none; transition: none; }
  .scroll-hint a { animation: none; }
  * { transition: none !important; }
}
