/* ---------- CSS Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #ffffff;
  color: #111111;
  line-height: 1.6;
  cursor: none; /* custom cursor on desktop */
}

/* ---------- Variables ---------- */
:root {
  --bg-main: #ffffff;
  --bg-alt: #f4f0ff;       /* light lavender */
  --accent: #111111;
  --accent-soft: rgba(0, 0, 0, 0.06);
  --text-main: #111111;
  --text-muted: #555555;
  --border-subtle: #dddddd;
  --card-bg: #ffffff;
  --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.08);
  --radius-lg: 18px;
  --radius-full: 999px;
  --container-width: 1080px;
  --nav-height: 70px;
}

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 100;
  background: transparent;
}

.scroll-progress__bar {
  height: 100%;
  width: 0;
  background: #111111;
  transform-origin: left center;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section__header {
  max-width: 620px;
  margin-bottom: 3rem;
}

.section__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.8rem;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section__title {
  font-size: 2rem;
  margin-top: 1rem;
}

.section__subtitle {
  margin-top: 0.4rem;
  color: var(--text-muted);
}

/* Sections can hold absolute decorations */
.section,
.section--alt {
  position: relative;
}

/* ---------- Header / Nav ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(22px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav {
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* stylish logo */
.nav__logo {
  text-decoration: none;
  color: inherit;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo__icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 2px solid #111;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo__avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #111;
  border-bottom-width: 3px;
  position: relative;
  top: 3px;
}

.logo__bubble {
  position: absolute;
  right: -6px;
  top: 2px;
  font-size: 0.55rem;
  padding: 2px 4px;
  border-radius: 6px;
  border: 1.5px solid #111;
  background: #fff;
}

.logo__text-block {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo__text {
  font-weight: 700;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
}

.logo__sub {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.nav__menu {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav__link {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--text-muted);
  position: relative;
  padding-bottom: 2px;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s ease;
}

.nav__link:hover {
  color: var(--text-main);
}

.nav__link:hover::after {
  width: 100%;
}

.active-link {
  color: var(--accent);
}

.active-link::after {
  width: 100%;
}

/* Mobile nav */
.nav__toggle {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  background: transparent;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 4px;
  padding: 0;
}

.nav__toggle span {
  width: 14px;
  height: 2px;
  background: #111111;
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav__toggle--open span:nth-child(1) {
  transform: translateY(3px) rotate(45deg);
}

.nav__toggle--open span:nth-child(2) {
  transform: translateY(-3px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  background: var(--bg-alt);   /* lavender for home too */
  padding-top: calc(6rem + var(--nav-height));
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center;
  gap: 3rem;
}

.hero__tag {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.hero__title {
  font-size: 2.6rem;
  line-height: 1.1;
  color: var(--text-main);
}

.hero__title span {
  color: var(--accent);
}

.hero__subtitle {
  margin-top: 0.6rem;
  font-size: 1.1rem;
  color: var(--text-muted);
  min-height: 1.5em;
}

.hero__desc {
  margin-top: 1.2rem;
  color: var(--text-muted);
}

.hero__actions {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero__meta {
  margin-top: 1.6rem;
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

.hero__meta a {
  color: var(--text-muted);
  text-decoration: none;
}

.hero__socials {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
}

.hero__socials a {
  color: var(--accent);
  text-decoration: none;
}

.hero__image {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  position: relative; /* for local shapes */
}

/* circular hero avatar with outline */
.hero__avatar {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  border: 3px solid #111;
  overflow: hidden;
}

.hero__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero__badge {
  font-size: 0.88rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  background: #f5f5f5;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

/* small shapes around hero image */
.shape {
  position: absolute;
  font-size: 30px;
  opacity: 0.7;
  pointer-events: none;
  animation: float 5s ease-in-out infinite, shake 3.5s ease-in-out infinite;
}

.shape--star {
  top: -18px;
  right: -12px;
}

.shape--zig {
  bottom: -8px;
  left: -10px;
  font-size: 32px;
}

.shape--sparkle {
  top: 40%;
  right: -25px;
  font-size: 22px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.3rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn--primary {
  background: linear-gradient(135deg, #000000, #333333);
  color: #ffffff;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.25);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.35);
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
  border-color: rgba(0, 0, 0, 0.4);
}

.btn--ghost:hover {
  background: #f5f5f5;
}

/* ---------- Grid / Cards ---------- */
.grid {
  display: grid;
  gap: 1.5rem;
}

.skills__grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.experience__grid,
.projects__grid,
.awards__grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.3rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* slight hover lift */
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.12);
}

.card h3 {
  margin-bottom: 0.6rem;
  color: var(--text-main);
}

.card p,
.card ul {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.card ul {
  padding-left: 1.1rem;
}

.card__meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* ---------- Timeline ---------- */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}

.timeline {
  list-style: none;
  position: relative;
  padding-left: 1.4rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.3rem;
  bottom: 0.3rem;
  width: 2px;
  background: rgba(0, 0, 0, 0.16);
}

.timeline li {
  margin-bottom: 1.4rem;
  position: relative;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -0.1rem;
  top: 0.2rem;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.timeline h4 {
  font-size: 1rem;
  color: var(--text-main);
}

.timeline p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.timeline span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Projects ---------- */
.project__header {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: baseline;
}

.project__tag {
  font-size: 0.7rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.project__highlights {
  margin-top: 0.6rem;
  padding-left: 1.1rem;
  font-size: 0.9rem;
}

/* ---------- Slider band in Awards ---------- */
.slider-band {
  background: #f4f0ff;
  border-radius: 30px;
  padding: 3rem 1.5rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.slider {
  max-width: 820px;
  margin: 0 auto;
  position: relative;
}

/* fixed card box like reference */
.slider__viewport {
  overflow: hidden;
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid #111;
  height: 420px;              /* fixed height */
}

.slider__track {
  display: flex;
  height: 100%;
  transition: transform 0.45s ease;
}

/* each slide fills the viewport height */
.slider__item {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* image stays inside, box size never changes */
.slider__item img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  object-fit: cover;
  border-radius: 18px;
  display: block;
}

/* circular arrow buttons */
.slider__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid #111;
  background: #ffe39c;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.slider__btn span {
  font-size: 1rem;
}

.slider__btn--prev {
  left: -20px;   /* slightly outside white card */
}

.slider__btn--next {
  right: -20px;
}

.slider__btn:hover {
  transform: translateY(-50%) translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

/* ---------- Contact ---------- */
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

.contact__info p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.contact__info p + p {
  margin-top: 0.3rem;
}

.contact__socials {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
}

.contact__socials a {
  color: var(--accent);
  font-size: 0.9rem;
  text-decoration: none;
}

/* Form */
.contact__form {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.3rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

.form__group {
  margin-bottom: 1rem;
}

.form__group label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
  color: var(--text-main);
}

.form__group input,
.form__group textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid #cccccc;
  background: #ffffff;
  color: #111111;
  font-size: 0.9rem;
}

.form__group input:focus,
.form__group textarea:focus {
  outline: 1px solid var(--accent);
  border-color: var(--accent);
}

.form__note {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Footer ---------- */
.footer {
  padding: 1.8rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: #f5f5f5;
}

.footer__content {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Reveal on Scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ---------- Typing Cursor ---------- */
.cursor-blink {
  display: inline-block;
  width: 1px;
  background: var(--accent);
  margin-left: 3px;
  animation: blink 0.9s infinite;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  50.1%,
  100% {
    opacity: 0;
  }
}

/* ---------- Global Decorations: stars, zigzags, scratches ---------- */
.decorations {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: transform 0.3s ease-out; /* for scroll parallax */
}

.dec {
  position: absolute;
  opacity: 0.25;
  font-size: 26px;
  font-weight: bold;
  animation: float 6s ease-in-out infinite, shake 4s ease-in-out infinite;
}

.dec-star {
  color: #000;
  font-size: 32px;
  top: 18px;
  left: 6%;
}

.dec-zig {
  color: #000;
  font-size: 40px;
  top: 55%;
  right: 10%;
}

.dec-scratch {
  color: #000;
  font-size: 28px;
}

.dec-scratch--1 {
  bottom: 28%;
  left: 10%;
  transform: rotate(-12deg);
}

.dec-scratch--2 {
  bottom: 12%;
  right: 18%;
  transform: rotate(15deg);
}

/* floating + subtle shaking */
@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

@keyframes shake {
  0%   { transform: translate(0,0) rotate(0deg); }
  25%  { transform: translate(1px,-1px) rotate(-1deg); }
  50%  { transform: translate(-1px,1px) rotate(1deg); }
  75%  { transform: translate(1px,0) rotate(0deg); }
  100% { transform: translate(0,0) rotate(0deg); }
}

/* ---------- Custom Cursor ---------- */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 200;
  transform: translate(-50%, -50%);
  transition:
    transform 0.08s ease-out,
    opacity 0.2s ease-out,
    width 0.15s ease-out,
    height 0.15s ease-out,
    border-color 0.15s ease-out;
}

.cursor--dot {
  background: #111;
}

.cursor--ring {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #111;
  background: transparent;
  opacity: 0.35;
}

body.cursor-link .cursor--ring {
  width: 40px;
  height: 40px;
  opacity: 0.5;
}

body.cursor-link .cursor--dot {
  transform: translate(-50%, -50%) scale(0.7);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__image {
    order: -1;
  }

  .about__grid,
  .contact__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {

  /* ⚠️ Removed body cursor:auto & cursor display:none here */

  .section {
    padding: 4rem 0;
  }

  .hero__title {
    font-size: 2.2rem;
  }

  .hero__avatar {
    width: 230px;
    height: 230px;
  }

  .nav__toggle {
    display: inline-flex;
  }

  .nav__menu {
    position: absolute;
    inset-inline: 1.5rem;
    top: calc(var(--nav-height) + 0.7rem);
    background: #ffffff;
    border-radius: 20px;
    padding: 0.8rem 1.1rem;
    flex-direction: column;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.2s ease, opacity 0.2s ease;
  }

  .nav__menu--open {
    max-height: 300px;
    opacity: 1;
    pointer-events: auto;
  }

  .slider__viewport {
    height: 340px;
  }

  .slider__btn--prev {
    left: 4px;
  }

  .slider__btn--next {
    right: 4px;
  }
}

/* 👍 Disable custom cursor ONLY on touch devices */
@media (pointer: coarse) {
  body {
    cursor: auto;
  }
  .cursor {
    display: none;
  }
}
