/* ===================================================
   PORTFOLIO — Monochrome Editorial
   Isaac Sobredilla — Developer & Builder
   Inspired by: split-identity editorial reference
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ===================================================
   DESIGN TOKENS
   =================================================== */
:root {
  --white:       #ffffff;
  --black:       #0a0a0a;
  --gray-light:  #f5f5f5;
  --gray-mid:    #888888;
  --gray-dark:   #2e2e2e;
  --accent:      #e8390e;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --nav-h:  68px;
  --ease:   cubic-bezier(0.4, 0, 0.2, 1);
  --fast:   0.18s;
  --normal: 0.3s;
  --slow:   0.5s;
}

/* ===================================================
   RESET & BASE
   =================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
button { font-family: var(--font-body); cursor: pointer; border: none; background: none; }

/* ===================================================
   CONTAINER
   =================================================== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 52px;
}

/* ===================================================
   SECTION ATOMS
   =================================================== */
.section-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gray-mid);
  margin-bottom: 32px;
  padding-bottom: 14px;
  border-bottom: 1.5px solid var(--black);
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5.5vw, 5rem);
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--black);
  margin-bottom: 48px;
}

/* ===================================================
   SCROLL REVEAL
   =================================================== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }

/* ===================================================
   NAVBAR
   =================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: var(--black);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 44px;
  gap: 0;
}

.nav-monogram {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  color: var(--white);
  flex-shrink: 0;
  transition: border-color var(--normal) var(--ease);
}
.nav-monogram:hover {
  border-color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 auto;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.52);
  padding: 6px 14px;
  letter-spacing: 0.05em;
  position: relative;
  transition: color var(--fast) var(--ease);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--normal) var(--ease);
}
.nav-links a:hover {
  color: var(--white);
}
.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-socials {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.nav-socials a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.78rem;
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
  border-radius: 2px;
}
.nav-socials a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.07);
}

/* ===================================================
   HERO — SPLIT IDENTITY
   =================================================== */
.hero {
  min-height: 100vh;
  padding-top: var(--nav-h);
  display: grid;
  grid-template-columns: 1fr 360px 1fr;
  align-items: end;
  overflow: hidden;
}

/* Left & Right text columns */
.hero-side {
  padding-bottom: 72px;
}

.hero-left {
  padding-left: 52px;
  padding-right: 44px;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  height: 100%;
}

.hero-right {
  padding-right: 52px;
  padding-left: 44px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  height: 100%;
}

/* Big identity words */
.hero-word {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(64px, 8.5vw, 130px);
  line-height: 1;
  letter-spacing: 0.03em;
  color: var(--black);
  margin-bottom: 14px;
}

.hero-word-code {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(28px, 3.8vw, 58px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 14px;
  white-space: nowrap;
}

.hero-sub {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--gray-mid);
  line-height: 1.75;
  max-width: 230px;
  font-weight: 400;
  margin-bottom: 26px;
}

.hero-ctas {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.hero-left .hero-ctas {
  justify-content: flex-end;
}

/* Hero status badge */
.hero-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #059669;
  letter-spacing: 0.06em;
  margin-top: 20px;
}
.hero-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #059669;
  animation: pulse-dot 2.5s ease-in-out infinite;
  flex-shrink: 0;
}

/* ===================================================
   HERO — PHOTO SPLIT
   =================================================== */
.hero-photo-container {
  position: relative;
  overflow: hidden;
  align-self: stretch;
  display: flex;
}

.hero-photo {
  width: 100%;
  height: 100%;
  min-height: calc(100vh - var(--nav-h));
  object-fit: cover;
  object-position: center top;
  display: block;
  position: relative;
  z-index: 1;
}

/* Paint overlay — left half (colorful artistic effect) */
.photo-paint-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background-image: url('assests/hero_paint_overlay.png');
  background-size: cover;
  background-position: center;
  mix-blend-mode: multiply;
  opacity: 0.82;
  z-index: 2;
  pointer-events: none;
}

/* Right half — subtle dark tint */
.photo-right-tint {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: rgba(10, 10, 10, 0.18);
  z-index: 2;
  pointer-events: none;
}

/* Vertical bisect line */
.photo-bisect {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1.5px;
  height: 100%;
  background: var(--black);
  transform: translateX(-50%);
  z-index: 3;
}

/* Code text overlay on right portion */
.photo-code-text {
  position: absolute;
  bottom: 56px;
  right: 14px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: rgba(10, 10, 10, 0.3);
  line-height: 1.9;
  text-align: right;
  z-index: 3;
  pointer-events: none;
  width: calc(50% - 22px);
}

/* ===================================================
   BUTTONS
   =================================================== */
.btn-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--black);
  padding: 11px 22px;
  border: 1.5px solid var(--black);
  transition: background var(--normal) var(--ease), color var(--normal) var(--ease), border-color var(--normal) var(--ease);
  white-space: nowrap;
}
.btn-solid:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
  background: transparent;
  padding: 11px 22px;
  border: 1.5px solid var(--black);
  transition: background var(--normal) var(--ease), color var(--normal) var(--ease);
  white-space: nowrap;
}
.btn-outline:hover {
  background: var(--black);
  color: var(--white);
}

.btn-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--white);
  padding: 13px 26px;
  border: 1.5px solid var(--white);
  transition: background var(--normal) var(--ease), color var(--normal) var(--ease), border-color var(--normal) var(--ease);
  white-space: nowrap;
}
.btn-white:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.btn-ghost-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  background: transparent;
  padding: 13px 26px;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  transition: color var(--normal) var(--ease), border-color var(--normal) var(--ease);
  white-space: nowrap;
}
.btn-ghost-white:hover {
  color: var(--white);
  border-color: var(--white);
}

/* ===================================================
   ABOUT
   =================================================== */
.about-section {
  padding: 120px 0;
  background: var(--gray-light);
  position: relative;
  overflow: hidden;
}

.about-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.06;
  filter: grayscale(100%);
  pointer-events: none;
}

.about-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-bio p {
  font-size: 1rem;
  color: var(--gray-dark);
  line-height: 1.9;
  margin-bottom: 18px;
  font-weight: 400;
}
.about-bio p:last-child { margin-bottom: 0; }

/* Quick facts panel */
.about-facts {
  border-left: 1.5px solid var(--black);
  display: flex;
  flex-direction: column;
}

.fact-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 26px;
  border-bottom: 1px solid rgba(10, 10, 10, 0.1);
  transition: background var(--fast) var(--ease);
}
.fact-row:last-child { border-bottom: none; }
.fact-row:hover { background: rgba(10, 10, 10, 0.03); }

.fact-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray-mid);
}

.fact-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  letter-spacing: 0.03em;
  line-height: 1;
  color: var(--black);
}

.fact-value.sm {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
  color: var(--gray-dark);
}

.fact-value.avail {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #059669;
  display: flex;
  align-items: center;
  gap: 8px;
}

.avail-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #059669;
  flex-shrink: 0;
  animation: pulse-dot 2.5s ease-in-out infinite;
}

/* ===================================================
   SKILLS
   =================================================== */
.skills-section {
  padding: 120px 0;
  background: var(--white);
  position: relative;
}

.skills-layout {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 48px;
  align-items: start;
}

.skills-ornament-col {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 8px;
}

.skills-ornament-img {
  width: 100%;
  opacity: 0.06;
  filter: grayscale(100%);
}

.skills-groups {
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.skills-group-title {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray-mid);
  margin-bottom: 14px;
  display: block;
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  padding: 7px 16px;
  border: 1.5px solid var(--black);
  color: var(--black);
  background: transparent;
  cursor: default;
  letter-spacing: 0.02em;
  transition:
    background var(--fast) var(--ease),
    color var(--fast) var(--ease),
    border-color var(--fast) var(--ease);
}
.tag:hover {
  background: var(--black);
  color: var(--white);
}
.tag.t-accent:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

/* ===================================================
   WORK (PROJECTS)
   =================================================== */
.work-section {
  padding: 120px 0;
  background: var(--gray-light);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1.5px solid var(--black);
}

.project-card {
  background: var(--white);
  display: flex;
  flex-direction: column;
  border-right: 1.5px solid var(--black);
  border-bottom: 1.5px solid var(--black);
  overflow: hidden;
  position: relative;
  transition: transform var(--normal) var(--ease), box-shadow var(--normal) var(--ease);
}
.project-card:nth-child(even) { border-right: none; }
.project-card:nth-last-child(-n+2) { border-bottom: none; }
.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 7px 7px 0 var(--black);
  z-index: 2;
}

.project-thumb-wrap {
  height: 230px;
  overflow: hidden;
  flex-shrink: 0;
  border-bottom: 1.5px solid var(--black);
}
.project-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(15%);
  transition: transform 0.55s var(--ease), filter 0.4s var(--ease);
}
.project-card:hover .project-thumb {
  transform: scale(1.05);
  filter: grayscale(0%);
}

.project-body {
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-index {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--gray-mid);
  letter-spacing: 0.16em;
  margin-bottom: 10px;
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: 0.03em;
  color: var(--black);
  line-height: 1.05;
  margin-bottom: 10px;
}

.project-desc {
  font-size: 0.875rem;
  color: var(--gray-mid);
  line-height: 1.75;
  flex: 1;
  margin-bottom: 20px;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid rgba(10, 10, 10, 0.1);
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  padding: 3px 9px;
  border: 1px solid rgba(10, 10, 10, 0.18);
  color: var(--gray-dark);
  letter-spacing: 0.03em;
}

.live-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--black);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-bottom: 1px;
  border-bottom: 1.5px solid var(--black);
  white-space: nowrap;
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.live-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ===================================================
   CLIENTS
   =================================================== */
.clients-section {
  padding: 120px 0;
  background: var(--white);
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1.5px solid var(--black);
  margin-top: 0;
}

.client-card {
  border-right: 1.5px solid var(--black);
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  transition: background var(--normal) var(--ease);
}
.client-card:last-child { border-right: none; }
.client-card:hover { background: var(--gray-light); }

.client-index {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--gray-mid);
  letter-spacing: 0.16em;
  margin-bottom: 24px;
  display: block;
}

.client-name {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.04em;
  color: var(--black);
  line-height: 1;
  margin-bottom: 4px;
}

.client-type-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-mid);
  margin-bottom: 18px;
  display: block;
}

.client-desc {
  font-size: 0.86rem;
  color: var(--gray-dark);
  line-height: 1.75;
  flex: 1;
  margin-bottom: 22px;
}

.client-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--black);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-bottom: 1px;
  border-bottom: 1.5px solid var(--black);
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease);
  align-self: flex-start;
}
.client-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ===================================================
   CERTIFICATIONS
   =================================================== */
.certs-section {
  padding: 120px 0;
  background: var(--gray-light);
}

.certs-list {
  display: flex;
  flex-direction: column;
  border: 1.5px solid var(--black);
}

.cert-card {
  display: flex;
  border-bottom: 1.5px solid var(--black);
  transition: background var(--normal) var(--ease);
}
.cert-card:last-child { border-bottom: none; }
.cert-card:hover { background: rgba(10, 10, 10, 0.02); }

.cert-img-col {
  width: 280px;
  flex-shrink: 0;
  border-right: 1.5px solid var(--black);
  overflow: hidden;
}

.cert-img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  filter: grayscale(20%);
  transition: filter var(--normal) var(--ease), transform var(--normal) var(--ease);
}
.cert-img:hover {
  filter: grayscale(0%);
  transform: scale(1.03);
}

.cert-body {
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.cert-issuer {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}

.cert-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  letter-spacing: 0.03em;
  line-height: 1.05;
  color: var(--black);
  margin-bottom: 12px;
}

.cert-desc {
  font-size: 0.875rem;
  color: var(--gray-dark);
  line-height: 1.8;
  flex: 1;
  margin-bottom: 24px;
}

.cert-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.cert-id {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--gray-mid);
  padding: 5px 12px;
  border: 1px solid rgba(10, 10, 10, 0.15);
  letter-spacing: 0.06em;
}

.cert-verify {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--black);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-bottom: 1px;
  border-bottom: 1.5px solid var(--black);
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.cert-verify:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ===================================================
   CONTACT
   =================================================== */
.contact-section {
  position: relative;
  overflow: hidden;
  background: var(--black);
}

.contact-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.1;
  filter: grayscale(100%);
  pointer-events: none;
}

.contact-inner {
  position: relative;
  z-index: 1;
  padding: 120px 0 100px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 100px;
  align-items: center;
}

.contact-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: rgba(255, 255, 255, 0.36);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.contact-headline {
  font-family: var(--font-display);
  font-size: clamp(58px, 8.5vw, 108px);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--white);
  margin-bottom: 24px;
}
.contact-headline .accent-word {
  color: var(--accent);
}

.contact-sub {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.75;
  max-width: 380px;
  font-weight: 400;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
  min-width: 190px;
}

/* ===================================================
   FOOTER
   =================================================== */
footer {
  background: var(--black);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 22px 0;
  text-align: center;
}
footer p {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: rgba(255, 255, 255, 0.22);
  letter-spacing: 0.1em;
}

/* ===================================================
   LIGHTBOX
   =================================================== */
#cert-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease;
}

.lightbox-inner {
  position: relative;
  max-width: 900px;
  width: 100%;
  animation: scaleIn 0.25s ease;
}

.lightbox-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--white);
  width: 36px;
  height: 36px;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.lightbox-close:hover {
  background: var(--accent);
  border-color: var(--accent);
}

#lightbox-img {
  width: 100%;
  display: block;
}

/* ===================================================
   KEYFRAMES
   =================================================== */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.45; transform: scale(0.65); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { transform: scale(0.88); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr 300px 1fr;
  }
  .hero-photo-container {
    width: 300px;
  }
  .hero-word {
    font-size: clamp(52px, 7vw, 100px);
  }
  .hero-word-code {
    font-size: clamp(24px, 3.2vw, 48px);
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
    align-items: start;
  }
  .hero-photo-container {
    width: 100%;
    height: 55vw;
    min-height: 300px;
    order: 0;
    align-self: auto;
  }
  .hero-photo {
    min-height: 0;
    height: 100%;
  }
  .hero-left {
    order: 1;
    text-align: left;
    align-items: flex-start;
    padding: 36px 40px;
  }
  .hero-right {
    order: 2;
    text-align: left;
    align-items: flex-start;
    padding: 0 40px 60px;
    border-top: 1.5px solid var(--black);
  }
  .hero-left .hero-ctas { justify-content: flex-start; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .skills-layout { grid-template-columns: 1fr; }
  .skills-ornament-col { display: none; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card { border-right: none; border-bottom: 1.5px solid var(--black); }
  .project-card:nth-last-child(-n+2) { border-bottom: 1.5px solid var(--black); }
  .project-card:last-child { border-bottom: none; }
  .project-card:hover { transform: none; box-shadow: none; }
  .clients-grid { grid-template-columns: 1fr; }
  .client-card { border-right: none; border-bottom: 1.5px solid var(--black); }
  .client-card:last-child { border-bottom: none; }
  .contact-inner { grid-template-columns: 1fr; gap: 40px; }
  .contact-actions { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .navbar { padding: 0 20px; }
  .nav-links { display: none; }
  .cert-card { flex-direction: column; }
  .cert-img-col { width: 100%; border-right: none; border-bottom: 1.5px solid var(--black); }
  .cert-img { min-height: 200px; }
  .contact-headline { font-size: 13vw; }
  .contact-inner { padding: 80px 0 70px; }
  .hero-left, .hero-right { padding-left: 20px; padding-right: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}