
/* ==========================================
   PORTFOLIO SECTIONS — DESIGN 2
   FILE: css/sections.css
========================================== */

.portfolio-section,
.portfolio-footer {
  box-sizing: border-box;
  background: #0d0d0f;
  color: #f5f5f5;
  position: relative;
  overflow: hidden;
}

.portfolio-section *,
.portfolio-footer * {
  box-sizing: border-box;
}

.portfolio-section {
  padding: 120px 5%;
  min-height: 85vh;
}

.section-inner {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  margin: 0 auto;
}

.section-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(230,57,70,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230,57,70,.035) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}

.section-kicker {
  font: 700 11px Consolas, monospace;
  letter-spacing: 2px;
  color: #e63946;
  margin-bottom: 28px;
}

.section-heading {
  font-size: clamp(32px, 3.7vw, 65px);
  line-height: 1.13;
  letter-spacing: -.045em;
  font-weight: 750;
  margin: 0 0 28px;
}

.section-heading span {
  color: #e63946;
}

.section-description {
  color: #aaa;
  font-size: 16px;
  line-height: 1.85;
  max-width: 620px;
}

.about-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr .65fr;
  gap: 55px;
  align-items: center;
}

.about-details {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 45px;
  font: 11px Consolas, monospace;
  color: #ddd;
}

.about-details span::first-letter {
  color: #e63946;
}

.about-visual {
  position: relative;
  height: 480px;
  border: 1px solid rgba(230,57,70,.45);
  background: radial-gradient(circle at center, #4b121a, #111);
}

.about-portrait-frame {
  position: absolute;
  inset: 15px;
  overflow: hidden;
}

.about-portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: contrast(1.08);
}

.about-vertical-name {
  position: absolute;
  left: -22px;
  bottom: 20px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: #e63946;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 3px;
}

.about-visual-coordinate {
  position: absolute;
  right: 12px;
  top: 12px;
  font: 10px Consolas, monospace;
  color: #aaa;
}

.about-interests {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.about-interests > span {
  padding: 18px 0;
  border-bottom: 1px solid #303034;
  font-size: 12px;
  letter-spacing: 1px;
}

.projects-section {
  background: #111114;
}

.projects-intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 50px;
  margin-bottom: 60px;
}

.projects-intro .section-description {
  max-width: 420px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 24px;
}

.project-card {
  background: #17171b;
  border: 1px solid #303034;
  min-width: 0;
  overflow: hidden;
  transition: border-color .3s, transform .3s;
}

.project-card:hover {
  border-color: #e63946;
  transform: translateY(-8px);
}

.project-preview {
  min-height: 290px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}

.project-preview::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 50%;
  right: -80px;
  bottom: -90px;
}

.project-preview-awards {
  background: radial-gradient(circle at 75% 65%, #725017, #16110b 70%);
}

.project-preview-magazine {
  background: radial-gradient(circle at 75% 65%, #30445b, #101820 70%);
}

.project-preview-crm {
  background: radial-gradient(circle at 75% 65%, #772331, #141016 70%);
}

.project-preview-top,
.project-preview-bottom,
.project-number {
  font: 10px Consolas, monospace;
  letter-spacing: 2px;
  color: #ccc;
}

.project-preview-title {
  font-size: clamp(25px, 2.5vw, 42px);
  line-height: 1;
  font-weight: 850;
  letter-spacing: -.04em;
}

.project-information {
  padding: 28px;
}

.project-number {
  color: #e63946;
}

.project-information h3 {
  font-size: 21px;
  margin: 14px 0;
}

.project-information p {
  color: #999;
  font-size: 13px;
  line-height: 1.8;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.project-tags span {
  padding: 7px 10px;
  background: #25252b;
  color: #ccc;
  font: 10px Consolas, monospace;
}

.skills-layout {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 55px;
  align-items: center;
}

.skills-visual {
  position: relative;
  height: 380px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(230,57,70,.18), transparent 65%);
}

.skills-core {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff5867, #6d0c19 75%);
  box-shadow: 0 0 70px rgba(230,57,70,.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.skills-core > span {
  font-size: 55px;
  font-weight: 900;
}

.skills-core small {
  font: 9px Consolas, monospace;
  letter-spacing: 2px;
}

.skills-orbit {
  position: absolute;
  width: 85%;
  height: 60%;
  border: 1px solid rgba(230,57,70,.45);
  border-radius: 50%;
  transform: rotate(-30deg);
}

.orbit-two {
  transform: rotate(35deg);
}

.orbit-point {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e63946;
  box-shadow: 0 0 15px #e63946;
}

.point-one { top: 20%; left: 25%; }
.point-two { top: 65%; right: 10%; }
.point-three { bottom: 12%; left: 35%; }

.skills-list {
  display: grid;
  gap: 12px;
}

.skills-list > div {
  padding: 17px;
  border: 1px solid #303034;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: #151518;
}

.skills-list strong {
  font-size: 14px;
}

.skills-list span {
  color: #888;
  font-size: 11px;
}

.contact-section {
  background: #111114;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 40px;
}

.contact-links a {
  color: #eee;
  text-decoration: none;
  font-size: 14px;
}

.contact-links a:hover {
  color: #e63946;
}

.contact-form {
  padding: 30px;
  border: 1px solid #e63946;
  background: #131316;
}

.contact-form-header {
  font: 10px Consolas, monospace;
  letter-spacing: 2px;
  color: #e63946;
  margin-bottom: 25px;
}

.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: #0c0c0f;
  border: 1px solid #34343b;
  color: white;
  padding: 16px;
  margin-bottom: 12px;
  font: 13px inherit;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #e63946;
}

.contact-form button {
  background: #e63946;
  border: none;
  color: white;
  padding: 16px 30px;
  font: 700 12px Consolas, monospace;
  letter-spacing: 1px;
  cursor: pointer;
}

.contact-form button:hover {
  background: #ff5260;
}

.contact-form small {
  display: block;
  margin-top: 14px;
  color: #888;
  font-size: 11px;
}

.portfolio-footer {
  padding: 50px 5% 25px;
  border-top: 1px solid #303034;
}

.footer-top,
.footer-bottom {
  max-width: 1440px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.footer-logo {
  color: white;
  font-size: 32px;
  font-weight: 900;
  text-decoration: none;
}

.footer-logo span {
  color: #e63946;
}

.footer-top p {
  color: #999;
  font-size: 12px;
}

.footer-top nav {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
}

.footer-top nav a {
  color: #ccc;
  text-decoration: none;
  font: 10px Consolas, monospace;
}

.footer-bottom {
  border-top: 1px solid #303034;
  margin-top: 40px;
  padding-top: 20px;
  color: #777;
  font: 10px Consolas, monospace;
}

@media (max-width: 1050px) {
  .about-layout,
  .skills-layout {
    grid-template-columns: 1fr 1fr;
  }

  .about-interests,
  .skills-list {
    grid-column: 1 / -1;
  }

  .project-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .portfolio-section {
    padding: 85px 22px;
  }

  .about-layout,
  .skills-layout,
  .contact-layout,
  .project-grid {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .about-visual {
    height: 380px;
  }

  .projects-intro {
    flex-direction: column;
    align-items: start;
  }

  .contact-form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .footer-top,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =====================================================
   FULL WEBSITE CONSTRUCTION ANIMATIONS
===================================================== */

.portfolio-section {
  isolation: isolate;
  perspective: 1200px;
}

/* Blueprint overlay for every section */

.portfolio-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;

  background-image:
    linear-gradient(
      rgba(230, 57, 70, 0.035) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(230, 57, 70, 0.035) 1px,
      transparent 1px
    );

  background-size: 60px 60px;
}

/* Construction card borders */

.project-card,
.skills-list > div {
  position: relative;
  transform-style: preserve-3d;
}

.card-build-frame {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.card-edge {
  position: absolute;
  display: block;
  background: #e63946;
  box-shadow: 0 0 12px rgba(230, 57, 70, 0.45);
}

.card-edge-top,
.card-edge-bottom {
  left: 0;
  width: 100%;
  height: 1px;
  transform-origin: left center;
}

.card-edge-top {
  top: 0;
}

.card-edge-bottom {
  bottom: 0;
}

.card-edge-left,
.card-edge-right {
  top: 0;
  height: 100%;
  width: 1px;
  transform-origin: center top;
}

.card-edge-left {
  left: 0;
}

.card-edge-right {
  right: 0;
}

/* Cursor */

.section-build-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99999;
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  will-change: transform;
}

.section-build-cursor svg {
  flex-shrink: 0;
  filter: drop-shadow(
    0 0 8px rgba(230, 57, 70, 0.65)
  );
}

.section-build-cursor span {
  background: #e63946;
  color: #fff;
  padding: 6px 9px;
  white-space: nowrap;

  font-family: Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;

  box-shadow: 0 0 20px rgba(230, 57, 70, .3);
}

/* Prevent section content from clipping cursor */

.section-inner {
  position: relative;
  z-index: 2;
}

/* Keep cards visible at their completed state */

.project-card,
.skills-list > div,
.contact-form,
.about-visual {
  will-change: transform, opacity;
}

/* Section layouts need room while pinned */

@media (min-width: 901px) {
  .portfolio-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
  }

  .portfolio-section > .section-inner {
    width: 100%;
  }
}

/* Mobile: no pinned sections */

@media (max-width: 900px) {
  .portfolio-section {
    min-height: auto;
    perspective: none;
  }

  .section-build-cursor {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .section-build-cursor {
    display: none;
  }
}
/* Hide the older simplified cursor */
.section-build-cursor {
  display: none !important;
}

/* =====================================================
   ABOUT — CINEMATIC AI CONSTRUCTION
===================================================== */

.about-section {
  position: relative;
  isolation: isolate;
}

/* Keep the portrait frame visible during construction */

.about-visual {
  position: relative;
  overflow: visible;
  transform-style: preserve-3d;
}

/* Border frame inserted by sections.js */

.about-visual > .card-build-frame {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
}

.about-visual > .card-build-frame .card-edge {
  background: #e63946;
  box-shadow: 0 0 14px rgba(230, 57, 70, .65);
}

/* Image scanning line */

.about-build-scan {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  z-index: 10;
  pointer-events: none;

  background: linear-gradient(
    90deg,
    transparent,
    #e63946 20%,
    #ff7983 50%,
    #e63946 80%,
    transparent
  );

  box-shadow:
    0 0 15px rgba(230, 57, 70, .9),
    0 0 35px rgba(230, 57, 70, .4);
}

/* Subtle construction grid inside portrait */

.about-portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;

  background-image:
    linear-gradient(
      rgba(230, 57, 70, .055) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(230, 57, 70, .055) 1px,
      transparent 1px
    );

  background-size: 35px 35px;
}

/* About construction status */

.about-build-status {
  position: absolute;
  top: 28px;
  right: 5%;
  z-index: 20;

  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px 14px;

  border: 1px solid rgba(230, 57, 70, .35);
  background: rgba(13, 13, 15, .88);

  color: #ddd;
  font: 700 10px Consolas, monospace;
  letter-spacing: 1px;

  pointer-events: none;
}

.about-build-status-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #e63946;
  box-shadow: 0 0 12px #e63946;
}

.about-build-status-text {
  color: #ddd;
}

.about-build-status-percent {
  color: #e63946;
  min-width: 40px;
  text-align: right;
}

/* Specialization items appear as installed modules */

.about-interests > span {
  position: relative;
  overflow: hidden;
}

.about-interests > span::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;

  background: linear-gradient(
    90deg,
    #e63946,
    rgba(230, 57, 70, .1)
  );
}

@media (max-width: 900px) {
  .about-build-status {
    top: 12px;
    right: 12px;
    padding: 7px 9px;
    font-size: 8px;
  }

  .about-build-status-text {
    max-width: 145px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
