@font-face {
  font-family: 'Delius';
  src: url('assets/fonts/Delius-Regular.ttf') format('truetype');
  font-display: swap;
}

:root {
  /* Ported from the Flutter app's color_settings.dart */
  --bg: #333333;            /* kDarkBackgroundColor */
  --side: #B2FF59;          /* Colors.lightGreenAccent (kSideColor) */
  --main: #ffffff;          /* kMainColor */
  --secondary: #000000;     /* kSecondaryColor */
  --max-width: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--main);
  font-family: Roboto, 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, .nav__name { font-family: 'Delius', cursive; font-weight: 400; }

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.underline {
  height: 4px;
  width: 220px;
  background: var(--side);
  border-radius: 2px;
}
.underline--center { margin: 8px auto 40px; }

/* ---------- Nav (SliverAppBar: black, 70px, green moving bar under it) ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--secondary);
}
.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  min-height: 70px;
}
.nav__progress-track { height: 5px; }
.nav__progress {
  height: 5px;
  background: var(--side);
  width: 0%;
  transition: width 0.1s linear;
}
.nav__name { font-size: 36px; }
.nav__links { display: flex; gap: 32px; }
.nav__links a {
  font-size: 15px;
  letter-spacing: 0.03em;
  opacity: 0.85;
  transition: opacity 0.2s, color 0.2s;
}
.nav__links a:hover, .nav__links a.active { opacity: 1; color: var(--side); }
.nav__socials { display: flex; align-items: center; }
.nav__burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav__burger span {
  display: block; width: 24px; height: 2px; background: var(--main); margin: 5px 0;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 20px;
  background: rgba(0, 0, 0, 0.85);
  padding: 20px 24px 30px;
  position: sticky;
  top: 75px;
  z-index: 49;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { font-size: 18px; }
.mobile-menu__socials { display: flex; align-items: center; margin-top: 10px; }

@media (max-width: 760px) {
  .nav__links, .nav__socials { display: none; }
  .nav__burger { display: block; }
}

/* ---------- Hero (BezierContainerHeader, 600px desktop) ---------- */
.hero {
  position: relative;
  background: var(--bg);
  overflow: hidden;
}
.hero__wave-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__wave-bg svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  gap: 40px;
  padding: 40px 80px 0;
  min-height: 600px;
}
.hero__text {
  flex: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero__photo {
  flex: 3;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 20px 50px 100px 40px;
}
.hero__photo img { max-height: 440px; }
.hero h1 {
  font-size: 38px;
  margin: 0;
  min-height: 1.3em;
}
.hero .underline { width: 345px; margin: 4px 0 0; }
.typewriter { color: var(--main); }
.cursor { color: var(--side); animation: blink 0.9s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero__presentation {
  color: var(--main);
  font-size: 20px;
  margin-top: 16px;
  max-width: 580px;
  text-align: justify;
}

@media (max-width: 900px) {
  .hero__inner { flex-direction: column-reverse; padding: 20px 40px 60px; min-height: 0; }
  .hero__photo { padding: 0; align-items: center; }
  .hero__photo img { max-height: 400px; }
  .hero h1 { font-size: 32px; }
  .hero .underline { width: 290px; }
}

/* ---------- Sections (flat on the #333 scaffold, like the original) ---------- */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 50px 80px;
  text-align: center;
}
.section h2 { font-size: 32px; margin: 0; }

@media (max-width: 760px) {
  .section { padding: 50px 40px; }
}

/* ---------- Skills ---------- */
.skill-row {
  display: flex;
  align-items: center;
  gap: 60px;
  text-align: left;
  margin-top: 20px;
}
.skill-row__image { flex: 0 0 240px; max-width: 240px; }
.skill-row__text { flex: 1; }
.skill-row__text p { color: var(--main); font-size: 20px; text-align: justify; margin: 0; }

/* Divider(color: kSideColor, thickness: 2) with vertical padding 20 */
.skill-line { height: 2px; background: var(--side); margin: 40px 0; }

@media (max-width: 760px) {
  .skill-row { flex-direction: column; gap: 24px; }
  .skill-row__image { max-width: 200px; align-self: center; }
}

/* ---------- BezierImage (ImageFrame painter + bezier-clipped image) ---------- */
.bezier-image { width: 100%; }
.bezier-image svg { display: block; width: 100%; height: auto; }

/* ---------- Wave divider (MyDivider: 50px wave + 5px green bar + 50px wave) ---------- */
.wave-divider {
  position: relative;
  height: 105px;
}
.wave-divider__half {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50px;
  overflow: hidden;
}
.wave-divider__half svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wave-divider__half--top { top: 0; transform: rotate(180deg); }
.wave-divider__half--bottom { bottom: 0; }
.wave-divider__bar {
  position: absolute;
  top: 50px;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--side);
}

/* ---------- Carousel ---------- */
.carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.carousel__track {
  position: relative;
  width: 100%;
  max-width: 780px;
}
.carousel__card {
  display: none;
  padding: 0 10px;
  animation: carouselFadeIn 0.3s ease;
}
.carousel__card.active { display: block; }
@keyframes carouselFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.carousel__frame {
  display: block;
  border: 2px solid #555;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
  transition: border-color 0.2s, transform 0.2s;
}
.carousel__frame:hover { border-color: var(--side); transform: translateY(-4px); }
/* Matches the source screenshots, now a fixed 1280x720 (16:9). */
.carousel__frame img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.carousel__label {
  text-align: center;
  padding-top: 14px;
  font-size: 18px;
  font-family: 'Delius', cursive;
  color: var(--main);
}
.carousel__arrow {
  background: none;
  border: 2px solid var(--side);
  color: var(--side);
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  flex-shrink: 0;
}
.carousel__arrow:hover { background: var(--side); color: #111; }
.carousel__dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.carousel__dots span {
  width: 8px; height: 8px; border-radius: 50%; background: #666; cursor: pointer;
}
.carousel__dots span.active { background: var(--side); }

/* ---------- Contact (MyCoder) ---------- */
.coder { margin-top: 20px; }
.coder__box {
  display: inline-flex;
  border: 2px solid var(--main);
  border-radius: 26px;
  padding: 4px;
  gap: 4px;
}
.picker, .unlock {
  width: 96px; height: 150px;
  border: 2px solid var(--main);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 45px;
  color: var(--side);
  overflow: hidden;
  position: relative;
}
.picker { flex-direction: column; cursor: ns-resize; user-select: none; }
.picker__digit {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}
.unlock {
  background: none;
  cursor: pointer;
  color: var(--side);
}
.unlock.locked .unlock__icon { color: #ff5252; }
.coder__hint { color: var(--main); margin-top: 12px; font-size: 16px; }

.contact-reveal {
  display: flex;
  align-items: center;
  gap: 60px;
  text-align: left;
  margin-top: 20px;
}
.contact-reveal__image, .contact-reveal__text { flex: 1; }
.contact-reveal__text p { font-size: 20px; text-align: justify; }
.hidden { display: none; }

@media (max-width: 760px) {
  .contact-reveal { flex-direction: column; }
  .picker, .unlock { width: 70px; height: 100px; font-size: 30px; }
  .picker__digit { height: 35px; }
}

/* ---------- Footer (MyFooter: wave + green bar + gradient band) ---------- */
.footer { background: var(--bg); margin-top: 40px; }
.footer__wave { position: relative; height: 100px; }
.footer__wave-bg {
  position: absolute;
  inset: 0;
  transform: rotate(180deg);
}
.footer__wave-bg svg { width: 100%; height: 100%; display: block; }
.footer__socials {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.footer__bar { height: 5px; background: var(--side); }
.footer__grad {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* websiteGradient: white 0.8 at bottom -> black 0.8 at top */
  background: linear-gradient(to top, rgba(255,255,255,0.8), rgba(0,0,0,0.8));
}
.footer__grad p { color: rgba(0, 0, 0, 0.87); font-size: 14px; margin: 0; }

/* ---------- Social icon buttons (MyIconButton: Card + InkWell hover) ---------- */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 5px;
  padding: 5px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.5);
  transition: background-color 0.15s;
}
.icon-btn:hover { background: var(--side); }
.icon-btn img { display: block; border-radius: 50%; }

/* ---------- Scroll to top ---------- */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px; height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  border: 2px solid transparent;
  color: var(--side);
  font-size: 26px;
  cursor: pointer;
  z-index: 40;
  transition: opacity 0.2s, transform 0.2s, border-color 0.2s;
}
.scroll-top:hover { transform: translateY(-3px); border-color: var(--side); }
.scroll-top.hidden { opacity: 0; pointer-events: none; }
