/* HOME PAGE STYLES */

/* HERO */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

#hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 125%;
  /* Extra height for parallax */
  object-fit: cover;
  object-position: center 25%;
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(9, 9, 11, 0.3) 0%, rgba(9, 9, 11, 1) 100%);
  pointer-events: none;
}

.hero-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.15;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 0 4rem 6rem;
  width: 100%;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--f-mono);
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(192,57,43,0.9);
  background: rgba(192,57,43,0.08);
  padding: .4rem .8rem;
  border-radius: 100px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(192,57,43,0.3);
  /* Repositioned: below nav, not overlapping */
  margin-top: 6rem;
  margin-bottom: 1.5rem;
  align-self: flex-start;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--red), 0 0 16px rgba(192,57,43,.5);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%   { opacity: 0.4; box-shadow: 0 0 6px var(--red); }
  50%  { opacity: 1;   box-shadow: 0 0 14px var(--red), 0 0 24px rgba(192,57,43,.4); }
  100% { opacity: 0.4; box-shadow: 0 0 6px var(--red); }
}

.hero-sub {
  font-size: .85rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(216, 216, 216, .45);
  margin-bottom: 2rem;
}

.hero-title {
  font-size: clamp(4rem, 10vw, 10rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: .9;
  color: var(--white);
  margin-bottom: 1rem;
  overflow: hidden;
  padding-bottom: 0.1em;
  /* Prevent clipping */
}

.hero-title .line {
  display: block;
  opacity: 0;
  transform: translateY(80%);
  animation: slideUp .9s var(--ease) both;
}

.hero-title .line:nth-child(1) {
  animation-delay: .4s;
}

.hero-title .line:nth-child(2) {
  animation-delay: .55s;
  font-style: italic;
  color: rgba(255, 255, 255, .5);
}

.hero-footer {
  margin-top: 3rem;
  max-width: 450px;
}

.hero-desc {
  font-size: 1.1rem;
  font-weight: 400;
  color: rgba(216, 216, 216, .65);
  line-height: 1.65;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.scroll-line {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 80px;
  background: linear-gradient(to bottom, var(--red), transparent);
  animation: scrollPulse 2s infinite;
  box-shadow: 0 0 8px rgba(192,57,43,.4);
}

/* MARQUEE */
.marquee-wrap {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: .1rem 0;
}

.marquee-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: marqueeSroll 30s linear infinite;
  font-family: var(--f-disp);
  font-size: 1.4rem;
  letter-spacing: .08em;
  color: rgba(216, 216, 216, .25);
  gap: 2.5rem;
  padding: 1rem 0;
}

.marquee-track .sep {
  color: var(--red);
  font-size: 1rem;
  text-shadow: 0 0 8px rgba(192,57,43,.6);
}

/* ABOUT */
#about {
  padding: 10rem 4rem;
  border-bottom: 1px solid var(--line);
}

.about-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.about-big {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 400;
  line-height: 1.45;
  color: var(--white);
  max-width: 900px;
  margin-bottom: 6rem;
}

.about-big em {
  font-style: italic;
  color: var(--red);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  border-top: 1px solid var(--line);
  padding-top: 3rem;
}

.about-stat {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.stat-num {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: -.02em;
  text-shadow: 0 0 20px rgba(192,57,43,.4);
}

.stat-lbl {
  font-size: .8rem;
  color: rgba(216, 216, 216, .4);
  line-height: 1.4;
}

/* WORK */
#work {
  padding: 8rem 4rem;
}

.work-header {
  max-width: 1100px;
  margin: 0 auto 5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.work-title {
  font-size: clamp(3rem, 6vw, 6rem);
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--white);
  line-height: 1;
}

.projects-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 3rem;
}

.proj-card {
  background: rgba(255, 255, 255, 0.015);
  border-radius: 12px;
  cursor: none;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), background .5s var(--ease), border-color .5s var(--ease);
  overflow: hidden;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.proj-card:hover {
  transform: translateY(-6px);
  background: rgba(192,57,43,0.04);
  box-shadow: 0 16px 48px rgba(0,0,0,.35), 0 0 30px rgba(192,57,43,.12);
  border: 1px solid rgba(192,57,43,.3);
}

.proj-thumb {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.proj-thumb-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  transition: transform .6s var(--ease);
}

.proj-gif {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}

.proj-card:hover .proj-gif {
  transform: scale(1.05);
}

.thumb-label {
  font-family: var(--f-disp);
  font-size: 2rem;
  color: rgba(255, 255, 255, .15);
  letter-spacing: .05em;
  line-height: 1;
}

.thumb-year {
  font-size: .65rem;
  color: rgba(255, 255, 255, .25);
  letter-spacing: .15em;
  margin-top: .5rem;
}

.proj-overlay {
  position: absolute;
  inset: 0;
  background: rgba(9, 9, 11, .8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .4s var(--ease);
}

.proj-card:hover .proj-overlay {
  opacity: 1;
}

.explore-btn {
  font-family: var(--f-mono);
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--white);
  padding: .7rem 1.6rem;
  border: 1px solid rgba(192,57,43,.6);
  background: rgba(192,57,43,.15);
  transition: all .3s;
  box-shadow: 0 0 12px rgba(192,57,43,.2);
}

.explore-btn:hover {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 0 20px rgba(192,57,43,.5);
}

.proj-info {
  padding: 1.8rem;
}

.proj-name {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--white);
  margin-bottom: .4rem;
}

.proj-role {
  font-size: .65rem;
  letter-spacing: .1em;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: .8rem;
  opacity: .8;
}

.proj-desc {
  font-size: .9rem;
  color: rgba(216, 216, 216, .55);
  line-height: 1.6;
}

/* SKILLS */
.skills-section {
  padding: 10rem 4rem;
  background: rgba(255, 255, 255, .015);
  border-top: 1px solid var(--line);
}

.skills-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.skills-cols {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 6rem;
  margin-top: 3rem;
}

.skills-left h2 {
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--white);
  line-height: 1.1;
}

.skills-left h2 em {
  font-style: italic;
  color: rgba(255, 255, 255, .4);
}

.sk-group {
  margin-bottom: 3rem;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}

.sk-label {
  font-size: .6rem;
  letter-spacing: .2em;
  color: rgba(216, 216, 216, .3);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.sk-items {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.sk-items span {
  font-size: .82rem;
  color: var(--red);
  padding: .32rem .85rem;
  border: 1px solid rgba(192,57,43,.35);
  background: rgba(192,57,43,.08);
  border-radius: 4px;
  transition: all .3s var(--ease);
  cursor: none;
}

.sk-items span:hover {
  border-color: var(--red);
  background: rgba(192,57,43,.2);
  box-shadow: 0 0 12px rgba(192,57,43,.3);
  color: var(--white);
  transform: translateY(-1px);
}

/* CONTACT */
#contact {
  padding: 12rem 4rem;
  text-align: center;
  border-top: 1px solid var(--line);
}

.contact-inner {
  max-width: 800px;
  margin: 0 auto;
}

.contact-heading {
  font-size: clamp(3rem, 7vw, 7rem);
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--white);
  line-height: 1;
  margin-bottom: 3rem;
}

.contact-heading em {
  font-style: italic;
  color: rgba(255, 255, 255, .4);
}

.contact-email {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: clamp(.8rem, 1.5vw, 1.1rem);
  letter-spacing: .05em;
  color: var(--red);
  padding: 1rem 2.5rem;
  border: 1px solid rgba(192,57,43,.4);
  background: rgba(192,57,43,.07);
  transition: all .4s var(--ease);
  margin-bottom: 2rem;
  cursor: none;
  box-shadow: 0 0 16px rgba(192,57,43,.15);
}

.contact-email:hover {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 0 28px rgba(192,57,43,.5);
  border-color: var(--red);
  transform: translateY(-2px);
}

.contact-sub {
  font-size: .65rem;
  letter-spacing: .15em;
  color: rgba(216, 216, 216, .3);
  text-transform: uppercase;
}

/* KEYFRAMES */
@keyframes slideUp {
  from {
    transform: translateY(80%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

@keyframes marqueeSroll {
  0% {
    transform: translateX(0)
  }

  100% {
    transform: translateX(-50%)
  }
}

@keyframes scrollPulse {

  0%,
  100% {
    opacity: .2
  }

  50% {
    opacity: .8
  }
}

/* ── TABLET (max 1024px) ── */
@media(max-width:1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .skills-cols {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .work-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

/* ── MOBILE (max 768px) ── */
@media(max-width:768px) {

  /* HERO */
  #hero {
    min-height: 100svh;
    align-items: flex-end;
  }

  .hero-inner {
    padding: 0 1.5rem 5rem;
  }

  .hero-status {
    font-size: .75rem;
    padding: .5rem 1rem;
  }

  .hero-title {
    font-size: clamp(4rem, 18vw, 7rem);
    margin-bottom: .75rem;
  }

  .hero-sub {
    font-size: .7rem;
    letter-spacing: .12em;
    margin-bottom: 1.2rem;
  }

  .hero-desc {
    font-size: .95rem;
  }

  .hero-footer {
    margin-top: 2rem;
    max-width: 100%;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: .75rem;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-outline {
    width: 100%;
    justify-content: center;
  }

  .scroll-line {
    display: none;
  }

  /* Make the portrait fill better on mobile and push it up */
  .hero-img {
    height: 130%;
    object-position: 65% 100%;
  }

  .hero-overlay {
    background: linear-gradient(to bottom,
        rgba(9, 9, 11, 0.5) 0%,
        rgba(9, 9, 11, 0.6) 40%,
        rgba(9, 9, 11, 1) 80%);
  }

  /* MARQUEE - slower on mobile */
  .marquee-track {
    animation-duration: 20s;
    font-size: 1.1rem;
    gap: 1.5rem;
  }

  /* ABOUT */
  #about {
    padding: 5rem 1.5rem;
  }

  .about-big {
    font-size: clamp(1.3rem, 5vw, 1.8rem);
    margin-bottom: 3rem;
  }

  .about-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding-top: 2rem;
  }

  .stat-num {
    font-size: 2rem;
  }

  .stat-lbl {
    font-size: .7rem;
  }

  /* WORK */
  #work {
    padding: 4rem 1.5rem;
  }

  .work-header {
    margin-bottom: 3rem;
  }

  .work-title {
    font-size: clamp(2.5rem, 10vw, 3.5rem);
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Project cards - bigger touch target */
  .proj-card {
    border-radius: 10px;
  }

  .proj-thumb {
    aspect-ratio: 16/9;
  }

  /* Slightly wider on mobile */
  .proj-info {
    padding: 1.3rem;
  }

  .proj-name {
    font-size: 1.2rem;
  }

  .proj-overlay {
    display: none;
  }

  /* Remove hover overlay on touch */

  /* SKILLS */
  .skills-section {
    padding: 5rem 1.5rem;
  }

  .skills-cols {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
  }

  .skills-left h2 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .sk-items span {
    font-size: .8rem;
  }

  /* CONTACT */
  #contact {
    padding: 6rem 1.5rem;
  }

  .contact-heading {
    font-size: clamp(2.5rem, 10vw, 4rem);
    margin-bottom: 2rem;
  }

  .contact-email {
    font-size: .75rem;
    letter-spacing: .03em;
    padding: .8rem 1.5rem;
  }
}

/* ── VERY SMALL (max 400px) ── */
@media(max-width:400px) {
  .hero-title {
    font-size: clamp(3rem, 15vw, 4rem);
  }

  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}