/* =========================================================
   DENIS TITA PORTFOLIO
   Responsive Professional Layout
   ========================================================= */

:root {
  --navy: #07111f;
  --navy-2: #0b1728;
  --navy-3: #102033;
  --teal: #14b8a6;
  --teal-dark: #0f8f82;
  --teal-soft: #ccfbf1;
  --white: #ffffff;
  --off-white: #f8fafc;
  --muted-bg: #f1f5f9;
  --text: #0f172a;
  --text-soft: #475569;
  --text-light: #cbd5e1;
  --border: #dbe3ec;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);

  --container: 1320px;
}

/* =========================================================
   RESET / GLOBAL
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 82px;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

.container {
  width: min(92%, var(--container));
  max-width: var(--container);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-top: 0;
}

p {
  color: var(--text-soft);
}

.section {
  padding: clamp(75px, 7vw, 115px) 0;
}

.section-white {
  background: var(--white);
}

.section-muted {
  background: var(--muted-bg);
}

.section-dark {
  background: var(--navy);
  color: var(--white);
}

.section-kicker {
  margin: 0 0 14px;
  color: var(--teal-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.19em;
}

.section-kicker-light {
  color: #5eead4;
}

.section-title {
  color: var(--text);
  font-size: clamp(2.2rem, 4vw, 4.3rem);
  line-height: 1.05;
  margin-bottom: 24px;
}

.section-title-light {
  color: var(--white);
}

.section-intro {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.8;
}

.section-heading {
  margin-bottom: clamp(42px, 5vw, 65px);
}

/* =========================================================
   LOADER
   ========================================================= */

.loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader .inner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--teal);
  animation: loaderSpin 0.8s linear infinite;
}

@keyframes loaderSpin {
  to {
    transform: rotate(360deg);
  }
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
  position: relative;
  width: 100%;
  min-height: 88vh;
  background:
    radial-gradient(
      circle at 78% 25%,
      rgba(20, 184, 166, 0.14),
      transparent 30%
    ),
    linear-gradient(115deg, #07111f 0%, #0d1b2b 58%, #172334 100%);
  color: var(--white);
  overflow: hidden;
}

#slides {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
}

.overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(7, 17, 31, 0.35),
      rgba(7, 17, 31, 0.05)
    );
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.09;
  background-image:
    linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: linear-gradient(to right, black, transparent 85%);
}

.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  padding-top: 70px;
  padding-bottom: 80px;
}

.hero-copy {
  max-width: 1000px;
}

.eyebrow {
  margin-bottom: 22px;
  color: #5eead4;
  font-size: clamp(0.72rem, 1vw, 0.9rem);
  font-weight: 800;
  letter-spacing: 0.2em;
}

.hero h1 {
  max-width: 1050px;
  margin-bottom: 24px;
  color: var(--white);
  font-size: clamp(3.2rem, 6vw, 6.6rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero h2 {
  margin-bottom: 25px;
  color: #e2e8f0;
  font-size: clamp(1.15rem, 1.8vw, 1.65rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.hero-summary {
  max-width: 850px;
  margin-bottom: 30px;
  color: #cbd5e1;
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  line-height: 1.8;
}

.hero-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}

.hero-tech span {
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: #e2e8f0;
  font-size: 0.85rem;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
}

.btn-primary-custom,
.btn-secondary-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 8px;
  font-weight: 700;
  transition: 0.25s ease;
}

.btn-primary-custom {
  background: var(--teal);
  color: #04111d;
}

.btn-primary-custom:hover {
  background: #2dd4bf;
  color: #04111d;
  transform: translateY(-2px);
}

.btn-secondary-custom {
  border: 1px solid rgba(255,255,255,.3);
  color: var(--white);
  background: rgba(255,255,255,.04);
}

.btn-secondary-custom i {
  margin-right: 9px;
}

.btn-secondary-custom:hover {
  color: var(--white);
  border-color: var(--teal);
  transform: translateY(-2px);
}

.scroll-cue {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 25px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: rgba(255,255,255,.7);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .65rem;
  font-weight: 700;
}

.scroll-cue i {
  margin-top: 6px;
  color: var(--teal);
}

.scroll-cue:hover {
  color: var(--white);
}

/* =========================================================
   NAVIGATION
   ========================================================= */

#navMenu {
  min-height: 78px;
  padding: 0;
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,.07);
  z-index: 1000;
}

#navMenu .container {
  min-height: 78px;
}

.navbar-brand {
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: var(--teal);
  color: var(--navy) !important;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
}

.navbar-nav {
  align-items: center;
}

.navbar-nav .nav-link {
  position: relative;
  margin-left: 20px;
  padding: 26px 4px !important;
  color: #cbd5e1 !important;
  font-size: 0.9rem;
  font-weight: 600;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--white) !important;
}

.navbar-nav .nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 17px;
  left: 4px;
  right: 4px;
  height: 2px;
  background: var(--teal);
}

.navbar-nav .nav-contact {
  margin-left: 25px;
  padding: 11px 19px !important;
  border: 1px solid rgba(20,184,166,.6);
  border-radius: 8px;
  color: #99f6e4 !important;
}

.navbar-nav .nav-contact.active::after {
  display: none;
}

.navbar-toggler {
  border-color: rgba(255,255,255,.25) !important;
}

/* =========================================================
   ABOUT
   ========================================================= */

#bio {
  padding-top: clamp(85px, 8vw, 130px);
  padding-bottom: clamp(85px, 8vw, 130px);
}

.profile-frame {
  position: relative;
  max-width: 500px;
}

.bioImage {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.profile-badge {
  position: absolute;
  right: -35px;
  bottom: 35px;
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 205px;
  padding: 20px 22px;
  border-radius: 16px;
  background: var(--navy);
  box-shadow: 0 18px 40px rgba(7,17,31,.2);
}

.badge-number {
  color: var(--teal);
  font-family: "Manrope", sans-serif;
  font-size: 2.3rem;
  font-weight: 800;
}

.badge-label {
  color: var(--white);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: .07em;
  text-transform: uppercase;
}

#bio .col-lg-7 {
  padding-left: clamp(30px, 5vw, 75px);
}

#bio .section-title {
  max-width: 760px;
}

.lead-copy {
  color: var(--text);
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  line-height: 1.65;
}

#bio p:not(.section-kicker) {
  font-size: 1rem;
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 32px;
}

.about-highlights > div {
  min-height: 115px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
}

.about-highlights i {
  display: block;
  margin-bottom: 13px;
  color: var(--teal-dark);
  font-size: 1.15rem;
}

.about-highlights span {
  font-weight: 700;
  color: var(--text);
  font-size: .9rem;
}

/* =========================================================
   SKILLS
   ========================================================= */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.skill-card {
  min-height: 250px;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(15,23,42,.035);
  transition: transform .25s ease, box-shadow .25s ease;
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.card-icon {
  display: flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  border-radius: 11px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 1.1rem;
}

.skill-card h3 {
  margin-bottom: 18px;
  color: var(--text);
  font-size: 1.1rem;
}

.tag-list,
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list span,
.project-tech span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  font-size: .75rem;
  font-weight: 600;
}

/* =========================================================
   EXPERIENCE
   ========================================================= */

#experience {
  padding-top: clamp(90px, 8vw, 130px);
  padding-bottom: clamp(90px, 8vw, 130px);
}

#experience .section-heading {
  max-width: 720px;
}

.experience-shell {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(0, 1.5fr);
  gap: clamp(50px, 8vw, 130px);
  margin-top: 35px;
}

.experience-meta {
  align-self: start;
}

.experience-label {
  display: inline-block;
  margin-bottom: 18px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(20,184,166,.15);
  color: #5eead4;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.experience-meta h3 {
  max-width: 330px;
  margin-bottom: 16px;
  color: var(--white);
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  line-height: 1.15;
}

.experience-meta p {
  margin-bottom: 7px;
  color: #94a3b8;
}

.experience-details {
  border-top: 1px solid rgba(255,255,255,.15);
}

.experience-item {
  display: grid;
  grid-template-columns: 55px 1fr;
  gap: 20px;
  padding: 30px 0;
  border-bottom: 1px solid rgba(255,255,255,.15);
}

.experience-number {
  color: #2dd4bf;
  font-size: .8rem;
  font-weight: 800;
}

.experience-item h4 {
  margin-bottom: 10px;
  color: var(--white);
  font-size: 1.1rem;
}

.experience-item p {
  max-width: 720px;
  margin: 0;
  color: #cbd5e1;
  line-height: 1.8;
}

/* =========================================================
   SELECTED WORK
   ========================================================= */

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  display: flex;
  min-height: 560px;
  flex-direction: column;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 12px 35px rgba(15,23,42,.04);
  transition: transform .25s ease, box-shadow .25s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.project-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  color: var(--teal-dark);
}

.project-type {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .15em;
}

.project-card h3 {
  margin-bottom: 16px;
  color: var(--text);
  font-size: clamp(1.35rem, 1.8vw, 1.65rem);
  line-height: 1.2;
}

.project-card > p {
  margin-bottom: 25px;
  line-height: 1.8;
}

.mini-architecture {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 105px;
  margin: auto 0 25px;
  padding: 18px;
  border-radius: 12px;
  background: var(--navy);
}

.mini-architecture span {
  padding: 7px 10px;
  border: 1px solid #45627d;
  border-radius: 5px;
  color: var(--white);
  font-size: .65rem;
  font-weight: 700;
}

.mini-architecture b {
  color: #2dd4bf;
  font-weight: 600;
}

/* =========================================================
   CREDENTIALS
   ========================================================= */

.credentials-section {
  padding-top: clamp(80px, 7vw, 110px);
  padding-bottom: clamp(80px, 7vw, 110px);
}

.credentials-section .section-heading {
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
}

.credentials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.credential-card {
  display: flex;
  min-height: 125px;
  align-items: center;
  gap: 20px;
  padding: 25px 28px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--white);
}

.credential-card > i {
  color: var(--teal-dark);
  font-size: 1.55rem;
}

.credential-card small {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: .65rem;
  letter-spacing: .15em;
}

.credential-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.25;
}

/* =========================================================
   CONTACT
   ========================================================= */

.contact-section {
  padding-top: 35px;
  padding-bottom: clamp(70px, 7vw, 110px);
  background: var(--muted-bg);
}

.contact-panel {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(45px, 7vw, 100px);
  align-items: center;
  padding: clamp(40px, 5vw, 70px);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(20,184,166,.15), transparent 40%),
    var(--navy);
  box-shadow: 0 25px 60px rgba(15,23,42,.14);
}

.contact-panel h2 {
  max-width: 620px;
  margin-bottom: 20px;
  color: var(--white);
  font-size: clamp(2.1rem, 3.5vw, 3.8rem);
  line-height: 1.08;
}

.contact-panel > div:first-child > p:last-child {
  max-width: 620px;
  margin: 0;
  color: #cbd5e1;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-link {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 16px;
  padding: 13px 18px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 11px;
  color: var(--white);
  background: rgba(255,255,255,.035);
  transition: .25s ease;
}

.contact-link:hover {
  border-color: var(--teal);
  color: var(--white);
  transform: translateX(4px);
}

.contact-link.primary {
  border-color: rgba(20,184,166,.55);
  background: rgba(20,184,166,.08);
}

.contact-link i {
  display: flex;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(20,184,166,.13);
  color: #5eead4;
}

.contact-link span {
  overflow-wrap: anywhere;
  font-size: .86rem;
  font-weight: 600;
}

.contact-link small {
  display: block;
  margin-bottom: 2px;
  color: #94a3b8;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* =========================================================
   FOOTER
   ========================================================= */

footer.page {
  padding: 25px 0;
  background: #040b14;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-inner p {
  margin: 0;
  color: #94a3b8;
  font-size: .8rem;
}

.footer-inner a {
  color: #cbd5e1;
  font-size: .8rem;
  font-weight: 600;
}

.footer-inner a:hover {
  color: #5eead4;
}

/* =========================================================
   LARGE DESKTOP
   ========================================================= */

@media (min-width: 1500px) {
  :root {
    --container: 1420px;
  }

  .hero-copy {
    max-width: 1080px;
  }
}

/* =========================================================
   LAPTOP / SMALL DESKTOP
   ========================================================= */

@media (max-width: 1199.98px) {
  :root {
    --container: 1080px;
  }

  .hero {
    min-height: 82vh;
  }

  #slides {
    min-height: 82vh;
  }

  .hero h1 {
    max-width: 900px;
  }

  .profile-badge {
    right: -15px;
  }

  .project-card {
    padding: 26px;
  }
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 991.98px) {
  .section {
    padding: 80px 0;
  }

  .hero,
  #slides {
    min-height: auto;
  }

  .hero-content {
    padding-top: 110px;
    padding-bottom: 110px;
  }

  .hero h1 {
    max-width: 800px;
  }

  .scroll-cue {
    display: none;
  }

  #navMenu,
  #navMenu .container {
    min-height: 70px;
  }

  #navMenu {
    padding: 9px 0;
  }

  .navbar-brand {
    width: 46px;
    height: 46px;
  }

  .navbar-collapse {
    padding: 15px 0 20px;
  }

  .navbar-nav {
    align-items: stretch;
  }

  .navbar-nav .nav-link {
    margin-left: 0;
    padding: 11px 4px !important;
  }

  .navbar-nav .nav-link.active::after {
    display: none;
  }

  .navbar-nav .nav-contact {
    display: inline-block;
    align-self: flex-start;
    margin: 10px 0 0;
    padding: 10px 18px !important;
  }

  #bio .col-lg-7 {
    padding-left: 15px;
  }

  .profile-frame {
    max-width: 460px;
    margin: 0 auto 25px;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .experience-shell {
    grid-template-columns: 1fr;
    gap: 45px;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: auto;
  }

  .mini-architecture {
    margin-top: 15px;
  }

  .credentials-grid {
    grid-template-columns: 1fr;
  }

  .contact-panel {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767.98px) {
  html {
    scroll-padding-top: 70px;
  }

  .container {
    width: min(91%, 680px);
  }

  .section {
    padding: 65px 0;
  }

  .section-title {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  .hero-content {
    padding-top: 85px;
    padding-bottom: 85px;
  }

  .eyebrow {
    line-height: 1.6;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 12vw, 4.4rem);
    line-height: 1;
  }

  .hero h2 {
    font-size: 1.05rem;
  }

  .hero-summary {
    font-size: .98rem;
    line-height: 1.7;
  }

  .hero-tech {
    gap: 7px;
  }

  .hero-tech span {
    padding: 7px 11px;
    font-size: .72rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn-primary-custom,
  .btn-secondary-custom {
    width: 100%;
  }

  .profile-frame {
    width: min(100%, 420px);
  }

  .profile-badge {
    right: 12px;
    bottom: 12px;
    min-width: 175px;
    padding: 14px 17px;
  }

  .badge-number {
    font-size: 1.8rem;
  }

  .badge-label {
    font-size: .67rem;
  }

  #bio .section-kicker {
    margin-top: 10px;
  }

  .about-highlights {
    grid-template-columns: 1fr;
  }

  .about-highlights > div {
    min-height: auto;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .skill-card {
    min-height: auto;
    padding: 25px;
  }

  .experience-item {
    grid-template-columns: 38px 1fr;
    gap: 10px;
  }

  .project-card {
    padding: 25px;
  }

  .contact-panel {
    padding: 32px 24px;
    border-radius: 18px;
  }

  .contact-panel h2 {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {
  .hero h1 {
    font-size: 2.55rem;
  }

  .hero-tech span {
    font-size: .68rem;
  }

  .profile-badge {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: 12px;
  }

  .mini-architecture {
    justify-content: flex-start;
  }

  .contact-link {
    padding: 12px;
  }
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Version 2 does not use a loading screen */
.loader {
    display: none !important;
}

.loader .inner {
    display: none !important;
}

/* Final hero desktop refinement */
@media (min-width: 992px) {
  .hero h1 {
    font-size: clamp(3.8rem, 5vw, 5.5rem);
    max-width: 1050px;
    line-height: 1.02;
  }

  .hero-copy {
    max-width: 1100px;
  }

  .hero-summary {
    max-width: 900px;
  }
}
/* ===== VERSION 2.1 REFINEMENTS ===== */
:root { --container: 1240px; }

.container {
  width: min(calc(100% - 48px), var(--container));
  margin-left: auto;
  margin-right: auto;
}

.section-title { font-size: clamp(2rem, 3.35vw, 3.65rem); }

.hero, #slides { min-height: min(860px, 88vh); }
.hero-content {
  padding-top: clamp(90px, 10vh, 130px);
  padding-bottom: clamp(100px, 11vh, 145px);
}
.hero-copy { max-width: 980px; }
.hero h1 {
  max-width: 900px;
  font-size: clamp(3.35rem, 4.55vw, 5rem);
  line-height: 1.015;
  letter-spacing: -0.05em;
}
.hero h2 { font-size: clamp(1.1rem, 1.45vw, 1.45rem); }
.hero-summary { max-width: 790px; font-size: clamp(1rem, 1.1vw, 1.12rem); }

.hero-grid { animation: gridDrift 22s linear infinite; }
@keyframes gridDrift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 70px 70px, 70px 70px; }
}
.scroll-cue i { animation: cueBounce 1.8s ease-in-out infinite; }
@keyframes cueBounce {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.skill-card, .project-card, .credential-card, .about-highlights > div {
  position: relative;
  overflow: hidden;
}
.skill-card::before, .project-card::before, .credential-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s ease;
}
.skill-card:hover::before, .project-card:hover::before, .credential-card:hover::before {
  transform: scaleX(1);
}
.skill-card:hover, .project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 55px rgba(15,23,42,.11);
}
.credential-card {
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.credential-card:hover {
  transform: translateY(-4px);
  border-color: rgba(20,184,166,.5);
  box-shadow: 0 18px 40px rgba(15,23,42,.08);
}
.project-arrow { transition: transform .25s ease; }
.project-card:hover .project-arrow { transform: translateX(5px); }

/* Keep every architecture node and arrow in one intentional row. */
.mini-architecture {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 112px;
  padding: 16px;
}
.mini-architecture span {
  min-width: 0;
  padding: 8px 7px;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
}
.mini-architecture b { display: block; text-align: center; }

.projects-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 34px;
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f8fafc;
}
.projects-footer p { margin: 0; }
.github-projects-link {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 9px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  transition: transform .25s ease, background .25s ease;
}
.github-projects-link:hover {
  color: #fff;
  background: var(--navy-3);
  transform: translateY(-2px);
}

.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .65s ease, transform .65s cubic-bezier(.2,.75,.25,1);
}
.reveal-ready .reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1199.98px) {
  :root { --container: 1080px; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-card { min-height: 520px; }
  .project-card:last-child {
    grid-column: 1 / -1;
    width: min(100%, 530px);
    justify-self: center;
  }
}

@media (max-width: 991.98px) {
  .container { width: min(calc(100% - 40px), 900px); }
  .hero, #slides { min-height: auto; }
  .hero h1 { max-width: 760px; font-size: clamp(3rem, 7vw, 4.5rem); }
  .project-grid { grid-template-columns: 1fr; }
  .project-card, .project-card:last-child {
    width: 100%;
    min-height: auto;
    grid-column: auto;
  }
  .mini-architecture { max-width: 650px; margin: 18px 0 25px; }
}

@media (max-width: 767.98px) {
  .container { width: min(calc(100% - 32px), 680px); }
  .section-title { font-size: clamp(2rem, 8vw, 2.85rem); }
  .hero-content { padding-top: 78px; padding-bottom: 82px; }
  .hero h1 { font-size: clamp(2.65rem, 11vw, 3.7rem); line-height: 1.02; }
  .projects-footer { align-items: stretch; flex-direction: column; padding: 22px; }
  .github-projects-link { justify-content: center; }

  /* On phones, deliberately switch the flow to vertical. */
  .mini-architecture {
    grid-template-columns: 1fr;
    gap: 7px;
    max-width: none;
  }
  .mini-architecture span { width: 100%; }
  .mini-architecture b { transform: rotate(90deg); line-height: 1; }
}

@media (max-width: 420px) {
  .container { width: calc(100% - 28px); }
  .hero h1 { font-size: clamp(2.35rem, 11.5vw, 2.85rem); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-grid, .scroll-cue i { animation: none !important; }
  .reveal-ready .reveal { opacity: 1; transform: none; }
}


/* =========================================================
   VERSION 2.1 FINAL POLISH
   ========================================================= */

/* Slightly calmer hero scale and tighter rhythm */
@media (min-width: 992px) {
  .hero h1 {
    max-width: 940px;
    font-size: clamp(3.15rem, 4.05vw, 4.45rem);
    line-height: 1.035;
    margin-bottom: 20px;
  }

  .hero h2 {
    margin-bottom: 20px;
  }

  .hero-summary {
    margin-bottom: 26px;
  }

  .hero-tech {
    margin-bottom: 30px;
  }
}

/* Compact project cards */
.project-card {
  min-height: 510px;
}

.project-card > p {
  margin-bottom: 22px;
}

/* Architecture is a true single-row flow on desktop/laptop.
   minmax(0, auto) prevents long labels from forcing the last node down. */
@media (min-width: 768px) {
  .mini-architecture {
    display: grid !important;
    grid-template-columns:
      minmax(0, auto) 18px
      minmax(0, auto) 18px
      minmax(0, auto) 18px
      minmax(0, auto) !important;
    justify-content: center;
    align-items: center;
    column-gap: 7px;
    row-gap: 0;
    min-height: 104px;
    padding: 15px 12px;
  }

  .mini-architecture span {
    width: auto !important;
    min-width: 0;
    white-space: nowrap;
    overflow-wrap: normal;
    padding: 8px 9px;
  }

  .mini-architecture b {
    width: 18px;
    min-width: 18px;
    transform: none !important;
    text-align: center;
  }
}

/* Give laptop cards enough width for their diagrams instead of squeezing 3 across */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card:last-child {
    grid-column: 1 / -1;
    width: min(100%, 540px);
    justify-self: center;
  }
}

/* Desktop can comfortably use three columns */
@media (min-width: 1200px) {
  .project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project-card {
    min-height: 510px;
    padding: 28px;
  }
}

/* Phones retain the intentional vertical architecture flow */
@media (max-width: 767.98px) {
  .mini-architecture {
    display: grid !important;
    grid-template-columns: 1fr !important;
    justify-items: stretch;
  }

  .mini-architecture span {
    width: 100% !important;
    white-space: normal;
  }

  .mini-architecture b {
    width: auto;
    min-width: 0;
    transform: rotate(90deg) !important;
  }
}


/* =========================================================
   VERSION 2.2 — CENTERED PLATFORM HERO + ROBUST FLOWS
   ========================================================= */

/* Heroku-inspired positioning: centered composition, constrained copy */
.hero-content {
  display: flex;
  align-items: center;
  text-align: center;
}

.hero-copy {
  width: min(100%, 1180px);
  max-width: 1180px;
  margin: 0 auto;
}

.hero-eyebrow {
  justify-content: center;
  text-align: center;
}

.hero h1 {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  font-size: clamp(3.15rem, 4.35vw, 4.85rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.hero h2 {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.hero-summary {
  max-width: 940px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  font-size: clamp(1.05rem, 1.3vw, 1.22rem);
  line-height: 1.75;
}

.hero-tech,
.hero-actions {
  justify-content: center;
}

.hero-tech {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

/* Architecture flow:
   Only four nodes exist in the layout. Connectors are pseudo-elements,
   so an arrow can never wrap independently from a node. */
.mini-architecture {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-items: center !important;
  justify-content: stretch !important;
  gap: 24px !important;
  width: 100%;
  min-height: 104px;
  padding: 18px 16px !important;
  overflow: hidden;
}

.mini-architecture span {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  min-width: 0;
  min-height: 42px;
  padding: 7px 6px !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
  text-align: center;
  line-height: 1.15;
}

.mini-architecture span:not(:last-child)::after {
  content: "→";
  position: absolute;
  left: calc(100% + 6px);
  top: 50%;
  width: 12px;
  color: #2dd4bf;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Old arrow elements are no longer used; defensive rule for cached HTML. */
.mini-architecture b {
  display: none !important;
}

/* Tablet retains a clean horizontal flow while labels scale down slightly. */
@media (max-width: 991.98px) and (min-width: 768px) {
  .hero-copy {
    width: min(100%, 860px);
  }

  .hero h1 {
    font-size: clamp(3rem, 7vw, 4.25rem);
  }

  .mini-architecture {
    gap: 22px !important;
  }

  .mini-architecture span {
    font-size: .62rem;
  }
}

/* Phone hero remains centered; architecture becomes an intentional vertical journey. */
@media (max-width: 767.98px) {
  .hero-content {
    text-align: center;
  }

  .hero h1,
  .hero h2,
  .hero-summary {
    text-align: center;
  }

  .hero-tech,
  .hero-actions {
    justify-content: center;
  }

  .mini-architecture {
    grid-template-columns: 1fr !important;
    gap: 26px !important;
    overflow: visible;
  }

  .mini-architecture span {
    width: min(100%, 320px) !important;
    margin: 0 auto;
  }

  .mini-architecture span:not(:last-child)::after {
    content: "↓";
    left: 50%;
    top: calc(100% + 7px);
    width: auto;
    transform: translateX(-50%);
  }
}


/* =========================================================
   VERSION 2.3 — BRAND + STICKY NAV + EDITORIAL SECTION POLISH
   ========================================================= */

/* The nav begins as the visual footer of the hero, then remains available while scrolling. */
#navigation {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 72px;
  background: rgba(5, 15, 29, .96);
  border-top: 1px solid rgba(148, 163, 184, .10);
  border-bottom: 1px solid rgba(148, 163, 184, .12);
  box-shadow: 0 10px 28px rgba(2, 8, 23, .12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#navigation .container {
  min-height: 72px;
  display: flex;
  align-items: center;
}

#navigation .navbar {
  width: 100%;
  padding-top: 0;
  padding-bottom: 0;
}

/* DT is now clearly a personal brand mark rather than an isolated button. */
.brand-lockup {
  display: inline-flex !important;
  align-items: center;
  gap: 12px;
  margin-right: 30px;
  padding: 0 !important;
  color: #fff !important;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--teal);
  color: var(--navy);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -.03em;
  box-shadow: 0 8px 22px rgba(20, 184, 166, .16);
  transition: transform .25s ease, box-shadow .25s ease;
}

.brand-name {
  color: #f8fafc;
  font-size: .86rem;
  font-weight: 750;
  letter-spacing: .01em;
  white-space: nowrap;
}

.brand-lockup:hover .brand-mark {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(20, 184, 166, .25);
}

/* Keep navigation visually balanced against the brand. */
#navMenu {
  margin-left: auto;
}

#navMenu .navbar-nav {
  align-items: center;
  gap: 6px;
}

#navMenu .nav-link {
  position: relative;
  padding: 25px 12px 22px;
}

#navMenu .nav-link::after {
  bottom: 13px;
}

/* Editorial section headings should contrast with the centered hero.
   Reduce their scale slightly rather than centering every section. */
#experience .section-title,
.experience-section .section-title {
  max-width: 620px;
  font-size: clamp(3rem, 4.8vw, 5.25rem);
  line-height: .98;
  letter-spacing: -.05em;
}

/* Better visual balance in the experience/editorial split. */
.experience-shell {
  align-items: start;
  column-gap: clamp(48px, 7vw, 110px);
}

.experience-meta {
  padding-top: 18px;
}

.experience-list {
  padding-top: 8px;
}

/* Anchor navigation should not hide section headings behind sticky nav. */
main section[id] {
  scroll-margin-top: 88px;
}

/* On smaller screens the readable name can disappear while DT remains. */
@media (max-width: 991.98px) {
  #navigation .container {
    min-height: 66px;
  }

  .brand-name {
    display: none;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  #navMenu .navbar-nav {
    align-items: stretch;
    gap: 0;
    padding: 12px 0 18px;
  }

  #navMenu .nav-link {
    padding: 11px 4px;
  }

  #navMenu .nav-link::after {
    bottom: 4px;
  }

  #experience .section-title,
  .experience-section .section-title {
    max-width: 720px;
    font-size: clamp(2.8rem, 7vw, 4.4rem);
  }
}

@media (max-width: 767.98px) {
  #navigation {
    min-height: 62px;
  }

  #navigation .container {
    min-height: 62px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  #experience .section-title,
  .experience-section .section-title {
    font-size: clamp(2.5rem, 11vw, 3.5rem);
    line-height: 1.02;
  }
}


/* =========================================================
   VERSION 2.4 — FINAL NAVIGATION LOCKUP
   ========================================================= */

/* Keep navigation visible at the top during the entire scroll. */
#navigation {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  width: 100%;
}

/* Align brand and links within one deliberate content frame. */
#navigation > .container,
#navigation .container {
  width: min(calc(100% - 48px), 1240px) !important;
  max-width: 1240px !important;
  margin: 0 auto !important;
}

.brand-lockup {
  display: inline-flex !important;
  align-items: center !important;
  gap: 13px !important;
  width: auto !important;
  height: auto !important;
  background: transparent !important;
  border-radius: 0 !important;
  margin-right: 34px !important;
}

.brand-mark {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 44px !important;
  height: 44px !important;
  border-radius: 11px !important;
  background: var(--teal) !important;
  color: var(--navy) !important;
  font-weight: 900;
}

.brand-name {
  display: inline-block !important;
  color: #fff !important;
  font-size: .9rem !important;
  font-weight: 800 !important;
  letter-spacing: .08em;
  text-transform: uppercase;
}

#navMenu {
  margin-left: auto !important;
}

#navMenu .nav-link {
  font-size: .91rem !important;
  font-weight: 650 !important;
  letter-spacing: -.01em;
}

/* With the redundant Explore cue removed, keep a clean hero-to-nav transition. */
.hero-content {
  padding-bottom: clamp(72px, 8vh, 105px);
}

@media (max-width: 991.98px) {
  #navigation > .container,
  #navigation .container {
    width: min(calc(100% - 36px), 900px) !important;
  }

  .brand-name {
    display: none !important;
  }
}

@media (max-width: 767.98px) {
  #navigation > .container,
  #navigation .container {
    width: calc(100% - 28px) !important;
  }
}


/* =========================================================
   VERSION 2.5 — FIXED STICKY NAV + REMOVE EXPLORE CUE
   ========================================================= */

/* Defensive: hide any legacy Explore cue that survives cached/older markup. */
.scroll-cue,
.hero .scroll-cue,
#slides .scroll-cue {
  display: none !important;
}

/*
  Use fixed positioning after the hero instead of CSS sticky.
  A fixed bar is not affected by an ancestor's overflow/transform rules,
  which is why the previous sticky implementation could fail.
  JS toggles .nav-fixed when the bar reaches the top.
*/
#navigation {
  position: relative !important;
  top: auto !important;
  left: auto;
  right: auto;
  width: 100%;
  z-index: 9999 !important;
}

#navigation.nav-fixed {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  animation: navDrop .22s ease-out;
}

@keyframes navDrop {
  from { transform: translateY(-8px); opacity: .96; }
  to   { transform: translateY(0); opacity: 1; }
}

/* Placeholder prevents the page from jumping when nav becomes fixed. */
.nav-placeholder {
  display: none;
  width: 100%;
}

.nav-placeholder.active {
  display: block;
}

/* The hero no longer needs room for the removed Explore cue. */
.hero-content {
  padding-bottom: clamp(58px, 6.5vh, 86px) !important;
}

/* Section anchor offsets for the fixed navigation. */
main section[id] {
  scroll-margin-top: 90px !important;
}

@media (prefers-reduced-motion: reduce) {
  #navigation.nav-fixed {
    animation: none;
  }
}

/* =========================================================
   FINAL STICKY NAV FIX
   ========================================================= */

#navMenu {
    position: sticky !important;
    position: -webkit-sticky !important;
    top: 0 !important;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999 !important;

    background: rgba(5, 15, 29, 0.97) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);

    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

/* Make sure section headings aren't hidden behind the sticky nav */
html {
    scroll-padding-top: 90px;
}

main section[id] {
    scroll-margin-top: 90px;
}

/* Remove the old Explore indicator */
.scroll-cue {
    display: none !important;
}

/* =========================================================
   SELECTED WORK — BALANCED FINAL LAYOUT
   ========================================================= */

/* All cards stretch to the same height */
.project-grid {
    align-items: stretch;
}

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/*
   Give the text area a consistent amount of room.
   This aligns the diagrams without creating excessive whitespace.
*/
.project-card > p {
    min-height: 150px;
    margin-bottom: 24px;
}

/* Architecture panel */
.mini-architecture {
    display: grid !important;
    grid-template-columns: repeat(4, auto) !important;
    justify-content: center !important;
    align-items: center !important;

    column-gap: 22px !important;

    width: 100%;
    min-height: 112px;

    padding: 18px 14px !important;
    margin: 0 0 18px !important;

    overflow: hidden;
}

/* Individual nodes */
.mini-architecture span {
    position: relative;

    display: flex !important;
    align-items: center;
    justify-content: center;

    width: auto !important;
    min-width: 0 !important;

    padding: 8px 9px !important;

    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;

    font-size: 0.60rem !important;
    line-height: 1 !important;
    font-weight: 700;

    border: 1px solid #36526d;
    border-radius: 5px;
}

/* Arrows live in the space between nodes */
.mini-architecture span:not(:last-child)::after {
    content: "→";

    position: absolute !important;

    left: calc(100% + 6px) !important;
    top: 50% !important;

    color: #2dd4bf;

    font-size: 0.85rem;
    font-weight: 700;

    transform: translateY(-50%) !important;
}

/*
   Tags are pinned to the bottom.
   This keeps all three tag rows aligned.
*/
.project-tags {
    margin-top: auto !important;
    padding-top: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Slightly smaller architecture text where three cards share the screen */
@media (min-width: 992px) and (max-width: 1250px) {

    .mini-architecture {
        column-gap: 18px !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .mini-architecture span {
        font-size: 0.56rem !important;
        padding: 7px 6px !important;
    }
}

/* Mobile: deliberately turn the flow vertical */
@media (max-width: 767.98px) {

    .project-card > p {
        min-height: auto;
    }

    .mini-architecture {
        grid-template-columns: 1fr !important;
        row-gap: 28px !important;
        min-height: auto;
        padding: 24px !important;
    }

    .mini-architecture span {
        width: min(100%, 280px) !important;
        margin: 0 auto;

        font-size: 0.72rem !important;
    }

    .mini-architecture span:not(:last-child)::after {
        content: "↓";

        left: 50% !important;
        top: calc(100% + 8px) !important;

        transform: translateX(-50%) !important;
    }
}

/* =========================================================
   VERSION 2.5 — FOUR-PROJECT SELECTED WORK GRID
   ========================================================= */

/* Four featured projects read best as a balanced 2 × 2 layout. */
@media (min-width: 992px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .project-card,
  .project-card:last-child {
    width: 100% !important;
    min-height: 510px;
    grid-column: auto !important;
    justify-self: stretch !important;
  }
}

/* Links used by projects that have a public demo/repository. */
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--navy);
  font-size: .78rem;
  font-weight: 700;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.project-link:hover {
  color: var(--navy);
  border-color: rgba(20, 184, 166, .65);
  background: var(--teal-soft);
  transform: translateY(-2px);
}

.project-link i {
  color: var(--teal-dark);
}

/* Keep the existing single-column mobile/tablet treatment. */
@media (max-width: 991.98px) {
  .project-grid {
    grid-template-columns: 1fr !important;
  }

  .project-card,
  .project-card:last-child {
    width: 100% !important;
    min-height: auto;
    grid-column: auto !important;
  }
}

@media (max-width: 575.98px) {
  .project-links {
    flex-direction: column;
  }

  .project-link {
    width: 100%;
  }
}

