/* =========================================
   PORTFOLIO — style.css
   Theme: Dark, editorial, futuristic
   Fonts: Syne (headings) + DM Sans (body)
   ========================================= */

/* ---- RESET & VARIABLES ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #c4c4c4;
  --bg2:       #333333;
  --bg3:       #333333;
  --accent:    #00aa91;
  --accent2:   #333333;
  --text:      #000000;
  --muted:     #0d0303;
  --border:    rgba(255,255,255,0.08);
  --card-bg:   #64ef8b00;
  --radius:    12px;
  --font-head: 'Poppins', sans-serif;
  --font-body: 'Poppins', sans-serif;
  --max-w:     1100px;
  --nav-h:     68px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---- UTILITIES ---- */
.container {
  width: 90%;
  max-width: var(--max-w);
  margin: 0 auto;
}

.section {
  padding: 100px 0;
}

.section__title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 56px;
  letter-spacing: -0.02em;
}

.section__title::after {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  background: var(--accent);
  margin: 12px auto 0;
  border-radius: 2px;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 50px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.01em;
}

.btn--primary {
  background: var(--accent);
  color: #000000;
  border: 2px solid var(--accent);
}
.btn--primary:hover {
  background: transparent;
  color: var(--accent);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}
.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---- TAGS ---- */
.tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all 0.2s;
}

.tag--glow {
  color: var(--accent);
  border-color: rgba(200,240,77,0.25);
  background: rgba(200,240,77,0.05);
}

/* =========================================
   NAV
   ========================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav__logo {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.nav__logo span { color: var(--accent); }

.nav__links {
  display: flex;
  gap: 36px;
  list-style: none;
}
.nav__links a {
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.2s;
  font-weight: 500;
}
.nav__links a:hover { color: var(--text); }

.nav__cta {
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 9px 22px;
  border-radius: 50px;
  background: var(--accent);
  color: #0a0a0a;
  transition: opacity 0.2s;
}
.nav__cta:hover { opacity: 0.85; }

.nav__burger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}



/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  padding: 24px 5%;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
}
.mobile-menu ul { list-style: none; }
.mobile-menu ul li { padding: 12px 0; border-bottom: 1px solid var(--border); }
.mobile-menu ul li a { font-size: 1.1rem; font-weight: 600; }

/* =========================================
   HERO
   ========================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}

.hero__bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero__accent {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,240,77,0.12) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 60px 0;
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 50px;
  border: 1px solid rgba(200,240,77,0.3);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 28px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.hero__tag::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero__heading {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.hero__heading span { color: var(--accent); }

.hero__sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero__cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* =========================================
   LOADER ANIMATION
   ========================================= */

#loader-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
  overflow: hidden;
}

/* SHOW LOADER */
#loader-screen.show {
  display: flex;
}

/* BIG PERCENTAGE */
.loader-number {
  font-family: var(--font-head);
  font-size: clamp(5rem, 18vw, 12rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--text);
  margin-bottom: 40px;
}

.loader-number .pct-sign {
  color: var(--accent);
  font-size: 0.35em;
  vertical-align: super;
}

/* BAR */
.loader-bar-wrap {
  width: min(500px, 80vw);
}

.loader-bar-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;

  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.loader-track {
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
}

.loader-fill {
  position: absolute;
  left: 0;
  top: 0;

  width: 0%;
  height: 100%;

  background: var(--accent);

  box-shadow:
    0 0 10px rgba(0,170,145,0.5),
    0 0 20px rgba(0,170,145,0.25);
}

/* STATUS TEXT */
.loader-status {
  margin-top: 22px;

  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}


/* =========================================
   ROTATING SQUARE
   ========================================= */

.loader-animation {
  position: relative;

  width: 220px;
  height: 220px;

  margin-top: 70px;

  display: flex;
  align-items: center;
  justify-content: center;

  perspective: 1200px;
}

/* MAIN SQUARE */
.square {
  position: relative;

  width: 120px;
  height: 120px;

  border: 2px solid var(--accent);

  background: rgba(0,170,145,0.05);

  transform-style: preserve-3d;

  backface-visibility: visible;

  box-shadow:
    0 0 25px rgba(0,170,145,0.2),
    inset 0 0 20px rgba(0,170,145,0.1);

  animation: squareSpin 4s ease-in-out infinite;
}

/* OUTER FRAME */
.square::before {
  content: '';

  position: absolute;
  inset: -16px;

  border: 1px solid rgba(0,170,145,0.18);

  transform: translateZ(-25px);
}

/* INNER GLOW */
.square::after {
  content: '';

  position: absolute;
  inset: 18px;

  border: 1px solid rgba(0,170,145,0.35);

  background: rgba(0,170,145,0.08);

  box-shadow:
    0 0 15px rgba(0,170,145,0.2);
}

/* ANIMATION */
@keyframes squareSpin {

  0% {
    transform:
      rotateX(0deg)
      rotateY(0deg)
      scale(1);
  }

  25% {
    transform:
      rotateX(180deg)
      rotateY(0deg)
      scale(1.05);
  }

  50% {
    transform:
      rotateX(180deg)
      rotateY(180deg)
      scale(1);
  }

  75% {
    transform:
      rotateX(360deg)
      rotateY(180deg)
      scale(1.05);
  }

  100% {
    transform:
      rotateX(360deg)
      rotateY(360deg)
      scale(1);
  }
}

/* FADE OUT */
.fade-out {
  animation: fadeOut 0.7s ease forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* =========================================
   PROJECTS
   ========================================= */
.projects {
  background: var(--bg2);
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(200,240,77,0.3);
}

.project-card__img {
  height: 180px;
  background: linear-gradient(135deg, #1a1a1a 0%, #222 50%, #1a1a1a 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.project-card__img::after {
  content: '⬡';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  font-size: 3rem;
  color: var(--border);
}

.project-card__body {
  padding: 22px;
}
.project-card__body h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.project-card__body p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.project-card__body p span {
  color: var(--text);
  font-weight: 600;
  margin-right: 6px;
}
.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

/* =========================================
   TECH STACK
   ========================================= */
.stack {
  background: var(--bg);
}

.stack__grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 720px;
  margin: 0 auto;
}

.stack__row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 28px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stack__label {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--muted);
  min-width: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stack__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* =========================================
   ABOUT
   ========================================= */
.about {
  background: var(--bg2);
}

.about__inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: center;
}

.about__avatar {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  overflow: hidden;
  position: relative;
}
.about__avatar::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(var(--accent), transparent, var(--accent));
  z-index: -1;
  animation: spin 6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.about__avatar-placeholder svg {
  width: 100px;
  height: 100px;
}

.about__bio {
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.8;
}

.about__right .section__title::after {
  margin-left: 0;
}

.about__items {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about__item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.about__item:hover {
  border-color: rgba(200,240,77,0.3);
}

.about__icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.about__item strong {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  margin-bottom: 4px;
}
.about__item p {
  font-size: 0.88rem;
  color: var(--muted);
}

/* =========================================
   EXPERIENCE & EDUCATION
   ========================================= */
.experience {
  background: var(--bg);
}

.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--border);
  transform: translateX(-50%);
}

.timeline__item {
  display: flex;
  width: 50%;
  padding-bottom: 40px;
  position: relative;
}
.timeline__item::before {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  top: 20px;
  border: 3px solid var(--bg);
}

.timeline__item--left {
  padding-right: 40px;
  justify-content: flex-end;
}
.timeline__item--left::before {
  right: -7px;
}

.timeline__item--right {
  padding-left: 40px;
  margin-left: 50%;
}
.timeline__item--right::before {
  left: -7px;
}

.timeline__card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  width: 100%;
  transition: border-color 0.2s;
}
.timeline__card:hover {
  border-color: rgba(200,240,77,0.3);
}

.timeline__card h4 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
}

.timeline__org {
  display: block;
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 2px;
}

.timeline__date {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.timeline__card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 80px 0 40px;
}

.footer__inner {
  text-align: center;
}

.footer__cta h2 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.footer__cta p {
  color: var(--muted);
  margin-bottom: 32px;
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 48px 0 24px;
  flex-wrap: wrap;
}
.footer__links a {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.2s;
}
.footer__links a:hover { color: var(--accent); }

.footer__copy {
  font-size: 0.8rem;
  color: #555;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: block; }
  .mobile-menu { display: block; }

  .about__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about__right .section__title { text-align: center; }
  .about__right .section__title::after { margin: 12px auto 0; }

  .timeline::before { left: 16px; }
  .timeline__item,
  .timeline__item--right {
    width: 100%;
    margin-left: 0;
    padding-left: 48px;
    padding-right: 0;
    justify-content: flex-start;
  }
  .timeline__item--left { padding-right: 0; }
  .timeline__item::before,
  .timeline__item--left::before,
  .timeline__item--right::before {
    left: 10px;
    right: auto;
  }

  .stack__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .hero__heading { font-size: clamp(2rem, 8vw, 3rem); }
  .section { padding: 70px 0; }
}

@media (max-width: 480px) {
  .hero__cta { flex-direction: column; }
  .btn { width: 100%; text-align: center; }
  .projects__grid { grid-template-columns: 1fr; }
}

/* ---- PAGE SECTION (top padding for inner pages) ---- */
.page-section {
  padding-top: calc(var(--nav-h) + 60px);
}

/* ---- ACTIVE NAV LINK ---- */
.nav__links a.active {
  color: var(--accent);
  font-weight: 700;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

/* ---- CONTACT FORM ---- */
.contact__wrapper {
  max-width: 620px;
  margin: 0 auto;
}
.contact__sub {
  text-align: center;
  color: var(--muted);
  margin-bottom: 40px;
}
.contact__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form__group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form__group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form__group input,
.form__group textarea {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}
.form__group input:focus,
.form__group textarea:focus {
  border-color: var(--accent);
}
.form__note {
  font-size: 0.88rem;
  min-height: 20px;
}